ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- useradd000064400000000167152342432030006120 0ustar00# useradd defaults file GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel CREATE_MAIL_SPOOL=yes grub000064400000000607152342432030005427 0ustar00GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=auto resume=UUID=4ea075a1-3ff9-4581-a22a-17ef37f9aa06 rd.md.uuid=f582fdb4:c8190134:17b17df8:90135831 rd.md.uuid=2e56daf2:6508fa1d:6539d87d:50e384a8" GRUB_DISABLE_RECOVERY="true" GRUB_ENABLE_BLSCFG=true anycast_delay000064400000000004152345415500007305 0ustar00100 app_solicit000064400000000002152345415500006771 0ustar000 base_reachable_time000064400000000003152345415500010402 0ustar0030 base_reachable_time_ms000064400000000006152345415500011104 0ustar0030000 delay_first_probe_time000064400000000002152345415500011175 0ustar005 gc_interval000064400000000003152345415500006761 0ustar0030 gc_stale_time000064400000000003152345415500007263 0ustar0060 gc_thresh1000064400000000004152345415500006514 0ustar00128 gc_thresh2000064400000000004152345415500006515 0ustar00512 gc_thresh3000064400000000005152345415500006517 0ustar001024 locktime000064400000000002152345415500006272 0ustar000 mcast_resolicit000064400000000002152345415500007647 0ustar000 mcast_solicit000064400000000002152345415500007320 0ustar003 proxy_delay000064400000000003152345415500007023 0ustar0080 proxy_qlen000064400000000003152345415500006664 0ustar0064 retrans_time000064400000000005152345415500007162 0ustar001000 retrans_time_ms000064400000000005152345415500007661 0ustar001000 ucast_solicit000064400000000002152345415500007330 0ustar003 unres_qlen000064400000000004152345415500006640 0ustar00101 unres_qlen_bytes000064400000000007152345415500010051 0ustar00212992 usr/libexec/getconf/default000075500000100730152345555050012001 0ustar00ELF>0@y@8 @ @@@hhNN XX X 4 mm m  DDStd PtdLLLLLQtdRtdXX X 00/lib64/ld-linux-x86-64.so.2GNUGNUGNU$_%4G2Z 9Z 9Z 9[ 0<[ 9 [ 90[ :@[ :P[ :`[ ":p[ -:[ >:[ P:[ 5J[ V:[ _:[ i:[ r:[ :\ :\ : \ :0\ :@\ ;P\ :`\ =p\ :\ >\ :\ :\ ;\ ;\ ;\ #;\ ,;] :;] L; ] ^;0] j;@] y;P] ;`] ;p] ;] ;] ;] ;] ;] <] )<] <<] L<^ W<^ k< ^ <0^ <@^ <P^ <`^ <p^ <^ <^  =^ =^ +=^ F=^ ^=^ o=^ }=_ =_ = _ =0_ =@_ =P_ =`_ >p_ 86_ />_ J>_ `6_ 6_ e>_ >_ >_  J` >` > ` >0` >@` >P` >`` ?p` ?` ,?` 7?` C?` R?` e?` q?` }?` ?a ?a ? a ?0a ?@a @Pa ?`a V@pa @a ?a ?a ?a ?a ?a  @a #@a 1@b >@b O@ b d@0b t@@b @Pb @`b @pb @b @b @b @b @b @b @b @b @c @c A c A0c #A@c 1APc F0g \F@g sFPg F`g Fpg 7g Fg Fg Fg Fg Gg (Gg ?Gg NGh dGh {G h G0h G@h GPh G`h Gph Gh Gh Hh %Hh ;Hh MHh hHh zHh Hi Hi H i H0i H@i HPi H`i  Ipi %Ii 5Ii QIi dIi yIi Ii Ii Ii Ij Ij = j I0j I@j IPj J`j Jpj #Jj 2Jj >Jj JJj [Jj hJj Jj Jj Jk Jk J k J0k J@k JPk J`k Kpk .Kk FKk [Kk gKk xKk Kk Kk Kk Kl Kl K l L0l L@l -LPl @L`l VLpl hLl {Ll Ll Ll Ll Ll Ll Ll Lo o  o o o m  p @p 0o 8o @o Ho Po Xo `o ho  po  xo  o  o o o o o o o o HHF HtH5*E %+E hhhhhhhhqhah Qh Ah 1h !h hhhhh%C D%C D%C D%C D%C D%C D%C D%C D%C D%C D%C D%C D%C D%C D%C D%}C D%uC D%mC D%eC DAWAVAUIH5 ATUS1HH5 zH=s@ ImH5 HH5 HPH5 Hou}xt9It-ImH5r Hq>)ÍSwHL%+ H-H MtL= HL$LH;t,LHH}LAD$ ujdrHHD$At$IlH}H3bH=> H5 H=1II,$H/H5g H=> mL1H1ImH5 MeMH,H5 HЃH H5} H= H5H1H5q H1H5e 1H5b H1H1[]A\A]A^A_úH51`H1f1H5xCH5H1B묃A|$Hu~AT$tyHH= 1A|$119HHHHtrA|$HHH9uCHH=51,HH=1I}H=cH01H5H=< l1H1HMH1@1I^HHPTL&H H=? H=A? H:? H9tH> Ht H=? H5 ? H)HHH?HHtH> HtfD= ? u+UH=> Ht H=' d> ]wSH> H5\H=u; 0H=> HH1,He> H5)H=B; H=f> HH1Off.@AVH5UAUIATL%USH& GfDu,sLXHtHH=1a HH3HL1=C t5u{HuKQwHH=q1D{11DHI)HHtE{LH#L9u[HH=B1HH/H3H\1,H5H=9 1H1H01fAWIAVIAUAATL%T% UH-T% SL)H7Ht1LLDAHH9uH[]A\A]A^A_ff.HHUsage: %s [-v specification] variable_name [pathname] Copyright (C) %s Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Usage: getconf [-v SPEC] VAR or: getconf [-v SPEC] PATH_VAR PATH Get the configuration value for variable VAR, or for variable PATH_VAR for path PATH. If SPEC is given, give values for compilation environment SPEC. For bug reporting instructions, please see: %s. _POSIX_THREAD_PRIORITY_SCHEDULING_POSIX_THREAD_ROBUST_PRIO_INHERIT_POSIX_THREAD_ROBUST_PRIO_PROTECTPOSIX_V6_ILP32_OFF32_LINTFLAGS_POSIX_V6_WIDTH_RESTRICTED_ENVSPOSIX_V6_WIDTH_RESTRICTED_ENVSPOSIX_V6_ILP32_OFFBIG_LINTFLAGSPOSIX_V6_LPBIG_OFFBIG_LINTFLAGSPOSIX_V7_ILP32_OFF32_LINTFLAGS_POSIX_V7_WIDTH_RESTRICTED_ENVSPOSIX_V7_WIDTH_RESTRICTED_ENVSPOSIX_V7_ILP32_OFFBIG_LINTFLAGSPOSIX_V7_LPBIG_OFFBIG_LINTFLAGS %s -a [pathname] %-35s%ld%lumemory exhaustedconfstr%.*s --version2.28(GNU libc) getconf %s%s 2018Written by %s. Roland McGrath--help-v-a/--_POSIX_pathconf: %sundefined%ld %lu Unrecognized variable `%s'_POSIX_LINK_MAX_POSIX_MAX_CANON_POSIX_MAX_INPUT_POSIX_NAME_MAX_POSIX_PATH_MAX_POSIX_PIPE_BUFSOCK_MAXBUF_POSIX_ASYNC_IO_POSIX_CHOWN_RESTRICTED_POSIX_NO_TRUNC_POSIX_PRIO_IO_POSIX_SYNC_IO_POSIX_VDISABLEATEXIT_MAXCHAR_BITCLK_TCKINT_MINLOGNAME_MAXLONG_BITMB_LEN_MAXNL_ARGMAXNL_LANGMAXNL_MSGMAXNL_NMAXNL_SETMAXNL_TEXTMAXNSS_BUFLEN_GROUPNSS_BUFLEN_PASSWDNZEROPAGESIZEPAGE_SIZEPASS_MAXPTHREAD_DESTRUCTOR_ITERATIONSPTHREAD_KEYS_MAXPTHREAD_STACK_MINPTHREAD_THREADS_MAXSCHAR_MAXSCHAR_MINSHRT_MINTTY_NAME_MAXUCHAR_MAXUINT_MAXUIO_MAXIOVULONG_MAXUSHRT_MAXWORD_BIT_AVPHYS_PAGES_NPROCESSORS_CONF_NPROCESSORS_ONLN_PHYS_PAGES_POSIX_ARG_MAX_POSIX_ASYNCHRONOUS_IO_POSIX_CHILD_MAX_POSIX_FSYNC_POSIX_JOB_CONTROL_POSIX_MAPPED_FILES_POSIX_MEMLOCK_POSIX_MEMLOCK_RANGE_POSIX_MEMORY_PROTECTION_POSIX_MESSAGE_PASSING_POSIX_NGROUPS_MAX_POSIX_OPEN_MAX_POSIX_PII_POSIX_PII_INTERNET_POSIX_PII_INTERNET_DGRAM_POSIX_PII_INTERNET_STREAM_POSIX_PII_OSI_POSIX_PII_OSI_CLTS_POSIX_PII_OSI_COTS_POSIX_PII_OSI_M_POSIX_PII_SOCKET_POSIX_PII_XTI_POSIX_POLL_POSIX_PRIORITIZED_IO_POSIX_PRIORITY_SCHEDULING_POSIX_REALTIME_SIGNALS_POSIX_SAVED_IDS_POSIX_SELECT_POSIX_SEMAPHORES_POSIX_SHARED_MEMORY_OBJECTS_POSIX_SSIZE_MAX_POSIX_STREAM_MAX_POSIX_SYNCHRONIZED_IO_POSIX_THREADS_POSIX_THREAD_ATTR_STACKADDR_POSIX_THREAD_ATTR_STACKSIZE_POSIX_THREAD_PRIO_INHERIT_POSIX_THREAD_PRIO_PROTECT_POSIX_THREAD_PROCESS_SHARED_POSIX_THREAD_SAFE_FUNCTIONS_POSIX_TIMERS_POSIX_TZNAME_MAX_POSIX_VERSION_T_IOV_MAX_XOPEN_CRYPT_XOPEN_ENH_I18N_XOPEN_LEGACY_XOPEN_REALTIME_XOPEN_REALTIME_THREADS_XOPEN_SHM_XOPEN_UNIX_XOPEN_VERSION_XOPEN_XCU_VERSION_XOPEN_XPG2_XOPEN_XPG3_XOPEN_XPG4CHARCLASS_NAME_MAXEQUIV_CLASS_MAXPOSIX2_BC_BASE_MAXPOSIX2_BC_DIM_MAXPOSIX2_BC_SCALE_MAXPOSIX2_BC_STRING_MAXPOSIX2_CHAR_TERMPOSIX2_COLL_WEIGHTS_MAXPOSIX2_C_BINDPOSIX2_C_DEVPOSIX2_C_VERSIONPOSIX2_EXPR_NEST_MAXPOSIX2_FORT_DEVPOSIX2_FORT_RUN_POSIX2_LINE_MAXPOSIX2_LOCALEDEFPOSIX2_RE_DUP_MAXPOSIX2_SW_DEVPOSIX2_UPEPOSIX2_VERSIONCS_PATHLFS_CFLAGSLFS_LDFLAGSLFS_LIBSLFS_LINTFLAGSLFS64_CFLAGSLFS64_LDFLAGSLFS64_LIBSLFS64_LINTFLAGS_XBS5_WIDTH_RESTRICTED_ENVS_XBS5_ILP32_OFF32XBS5_ILP32_OFF32_CFLAGSXBS5_ILP32_OFF32_LDFLAGSXBS5_ILP32_OFF32_LIBSXBS5_ILP32_OFF32_LINTFLAGS_XBS5_ILP32_OFFBIGXBS5_ILP32_OFFBIG_CFLAGSXBS5_ILP32_OFFBIG_LDFLAGSXBS5_ILP32_OFFBIG_LIBSXBS5_ILP32_OFFBIG_LINTFLAGS_XBS5_LP64_OFF64XBS5_LP64_OFF64_CFLAGSXBS5_LP64_OFF64_LDFLAGSXBS5_LP64_OFF64_LIBSXBS5_LP64_OFF64_LINTFLAGS_XBS5_LPBIG_OFFBIGXBS5_LPBIG_OFFBIG_CFLAGSXBS5_LPBIG_OFFBIG_LDFLAGSXBS5_LPBIG_OFFBIG_LIBSXBS5_LPBIG_OFFBIG_LINTFLAGS_POSIX_V6_ILP32_OFF32POSIX_V6_ILP32_OFF32_CFLAGSPOSIX_V6_ILP32_OFF32_LDFLAGSPOSIX_V6_ILP32_OFF32_LIBS_POSIX_V6_ILP32_OFFBIGPOSIX_V6_ILP32_OFFBIG_CFLAGSPOSIX_V6_ILP32_OFFBIG_LDFLAGSPOSIX_V6_ILP32_OFFBIG_LIBS_POSIX_V6_LP64_OFF64POSIX_V6_LP64_OFF64_CFLAGSPOSIX_V6_LP64_OFF64_LDFLAGSPOSIX_V6_LP64_OFF64_LIBSPOSIX_V6_LP64_OFF64_LINTFLAGS_POSIX_V6_LPBIG_OFFBIGPOSIX_V6_LPBIG_OFFBIG_CFLAGSPOSIX_V6_LPBIG_OFFBIG_LDFLAGSPOSIX_V6_LPBIG_OFFBIG_LIBS_POSIX_V7_ILP32_OFF32POSIX_V7_ILP32_OFF32_CFLAGSPOSIX_V7_ILP32_OFF32_LDFLAGSPOSIX_V7_ILP32_OFF32_LIBS_POSIX_V7_ILP32_OFFBIGPOSIX_V7_ILP32_OFFBIG_CFLAGSPOSIX_V7_ILP32_OFFBIG_LDFLAGSPOSIX_V7_ILP32_OFFBIG_LIBS_POSIX_V7_LP64_OFF64POSIX_V7_LP64_OFF64_CFLAGSPOSIX_V7_LP64_OFF64_LDFLAGSPOSIX_V7_LP64_OFF64_LIBSPOSIX_V7_LP64_OFF64_LINTFLAGS_POSIX_V7_LPBIG_OFFBIGPOSIX_V7_LPBIG_OFFBIG_CFLAGSPOSIX_V7_LPBIG_OFFBIG_LDFLAGSPOSIX_V7_LPBIG_OFFBIG_LIBS_POSIX_ADVISORY_INFO_POSIX_BARRIERS_POSIX_BASE_POSIX_C_LANG_SUPPORT_POSIX_C_LANG_SUPPORT_R_POSIX_CLOCK_SELECTION_POSIX_CPUTIME_POSIX_THREAD_CPUTIME_POSIX_DEVICE_SPECIFIC_POSIX_DEVICE_SPECIFIC_R_POSIX_FD_MGMT_POSIX_FIFO_POSIX_PIPE_POSIX_FILE_ATTRIBUTES_POSIX_FILE_LOCKING_POSIX_FILE_SYSTEM_POSIX_MONOTONIC_CLOCK_POSIX_MULTI_PROCESS_POSIX_SINGLE_PROCESS_POSIX_NETWORKING_POSIX_READER_WRITER_LOCKS_POSIX_SPIN_LOCKS_POSIX_REGEXP_REGEX_VERSION_POSIX_SHELL_POSIX_SIGNALS_POSIX_SPAWN_POSIX_SPORADIC_SERVER_POSIX_THREAD_SPORADIC_SERVER_POSIX_SYSTEM_DATABASE_POSIX_SYSTEM_DATABASE_R_POSIX_TIMEOUTS_POSIX_TYPED_MEMORY_OBJECTS_POSIX_USER_GROUPS_POSIX_USER_GROUPS_RPOSIX2_PBSPOSIX2_PBS_ACCOUNTINGPOSIX2_PBS_LOCATEPOSIX2_PBS_TRACKPOSIX2_PBS_MESSAGESYMLOOP_MAXAIO_LISTIO_MAXAIO_MAXAIO_PRIO_DELTA_MAXDELAYTIMER_MAXHOST_NAME_MAXLOGIN_NAME_MAXMQ_OPEN_MAXMQ_PRIO_MAX_POSIX_DEVICE_IO_POSIX_TRACE_POSIX_TRACE_EVENT_FILTER_POSIX_TRACE_INHERIT_POSIX_TRACE_LOGRTSIG_MAXSEM_NSEMS_MAXSEM_VALUE_MAXSIGQUEUE_MAXFILESIZEBITSPOSIX_ALLOC_SIZE_MINPOSIX_REC_INCR_XFER_SIZEPOSIX_REC_MAX_XFER_SIZEPOSIX_REC_MIN_XFER_SIZEPOSIX_REC_XFER_ALIGNSYMLINK_MAXGNU_LIBC_VERSIONGNU_LIBPTHREAD_VERSIONPOSIX2_SYMLINKSLEVEL1_ICACHE_SIZELEVEL1_ICACHE_ASSOCLEVEL1_ICACHE_LINESIZELEVEL1_DCACHE_SIZELEVEL1_DCACHE_ASSOCLEVEL1_DCACHE_LINESIZELEVEL2_CACHE_SIZELEVEL2_CACHE_ASSOCLEVEL2_CACHE_LINESIZELEVEL3_CACHE_SIZELEVEL3_CACHE_ASSOCLEVEL3_CACHE_LINESIZELEVEL4_CACHE_SIZELEVEL4_CACHE_ASSOCLEVEL4_CACHE_LINESIZE_POSIX_IPV6_POSIX_RAW_SOCKETS;H|DtdtLzRx 8/D$4@FJ w?:*3$"\0tqA(8WBIE H(A0Hl,FBB L(A0A8HP 8C0A(B BBBA D eFEE E(H0H8G@n8A0A(B BBBLHp101X ^K888989 9"9929+9;9 G9 W9o99 9 9q;9W9e:f:g;9:h9i><9G9j9l0<9w9x:y:z:{":|-:E>:FP:m5JV:_:i:Xr:I:J:K:L:o:p;q:r=n:H>:s:t;<;u;v#;k,;V:;SL;T^;Uj;y; ;;;;;;;<)<<<L<5W<8k<><=<9<@<?<A<7<6 =:= += F= ^=o=;}===n===C=M>N86O/>PJ>Q`66e>R>D> J#>>>B>\>]>??,?^7?[C?YR?Ze?bq?c}?d?$?%?&?'?-@(?)V@*@+?$?%?&?'?_ @(#@/1@0>@`O@*d@1t@2@+@+@4@,@3@a@.@,@@@@@AA#A1AFw\FsFxFyFz7{FFFFG(G?GNGdG{GGGGGGGGH%H;HMHhHzHHHHHHHH I%I5IQIdIyIIIIII=IIIJJ#JG2J>JJJ[JhJJJJJ J!J"J JJK.KFK[KgKxKKKKKKKLL-L@LVLhL{LLLLLLLL ) 3X X 0opP I o ( oooooCm ** *0*@*P*`*p*********++ +GA$3a1)0 GA$3p1113`,W3GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realignGA$3a103 GA$3p1113`33GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realign GA*FORTIFY1W3GA+GLIBCXX_ASSERTIONSGA+GLIBCXX_ASSERTIONS`33 GA*FORTIFYgetconf-2.28-251.el8_10.40.x86_64.debug$7zXZִF!t/7]?Eh=ڊ2NTj ړνt|^@BeM2Pc" Y~Q7 foyo^!W Ӥέ]))o}7AϻwvC8n3/tf藫$P @J%VN&Tdq$ib90 RD`qX_) o's20Y^e8kRpBJ槉M=wCղg )?3qðO8T4DW58|\~}"j"YK vtG# *X@4ELpA / zaObMPܷsA c E.t=`m'LWܭnKg!$@%о:Q($YEXfl<JD> =} `I(`؋eKK [dD]`%twnLSpfapQ7Afp !uײZ1X TlH1N%%sNѻ "\sT뉔Oc;ĊPįBAIAkLjMkR-u`` AK.|sQվ$UyCwA GA.Rđ6/ƨͺ}P3mNm4[1w"pVo^s4v /|sQ`hz`ь,Vٴ~yT"aX d3+%##kla,eB H.x^r5wudVʎpT{q+{n =7!DBJsyDMTA˺uC&w|!pQ5c 96m47WĶL nMAbf@$N>D?<(t(9Pٓ?t -;4gYZ.shstrtab.interp.note.gnu.property.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.sec.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.data.rel.ro.dynamic.got.data.bss.gnu.build.attributes.gnu_debuglink.gnu_debugdata  & 4$K00@Gopp<Q YPPIao8no }B(())))@0+0+0`,`,u33 33LLL8M8M`X XX XX X5 m mo op p p p0 Pp`p t,/tx>accept_local000064400000000002152346166140007100 0ustar000 accept_redirects000064400000000002152346166140007772 0ustar001 accept_source_route000064400000000002152346166140010524 0ustar001 arp_accept000064400000000002152346166140006570 0ustar000 arp_announce000064400000000002152346166140007137 0ustar000 arp_filter000064400000000002152346166140006616 0ustar000 arp_ignore000064400000000002152346166140006614 0ustar000 arp_notify000064400000000002152346166140006641 0ustar000 bc_forwarding000064400000000002152346166140007275 0ustar000 bootp_relay000064400000000002152346166140007006 0ustar000 disable_policy000064400000000002152346166140007451 0ustar000 disable_xfrm000064400000000002152346166140007126 0ustar000 drop_gratuitous_arp000064400000000002152346166140010563 0ustar000 drop_unicast_in_l2_multicast000064400000000002152346166140012331 0ustar000 force_igmp_version000064400000000002152346166140010346 0ustar000 forwarding000064400000000002152346166140006631 0ustar000 igmpv2_unsolicited_report_interval000064400000000006152346166140013600 0ustar0010000 igmpv3_unsolicited_report_interval000064400000000005152346166140013600 0ustar001000 ignore_routes_with_linkdown000064400000000002152346166140012313 0ustar000 log_martians000064400000000002152346166140007146 0ustar000 mc_forwarding000044400000000002152346166140007306 0ustar000 medium_id000064400000000002152346166140006423 0ustar000 promote_secondaries000064400000000002152346166140010533 0ustar000 proxy_arp000064400000000002152346166140006512 0ustar000 proxy_arp_pvlan000064400000000002152346166140007712 0ustar000 route_localnet000064400000000002152346166140007506 0ustar000 rp_filter000064400000000002152346166140006455 0ustar000 secure_redirects000064400000000002152346166140010021 0ustar001 send_redirects000064400000000002152346166140007464 0ustar001 shared_media000064400000000002152346166140007074 0ustar001 src_valid_mark000064400000000002152346166140007447 0ustar000 tag000064400000000002152346166140005242 0ustar000 forumsel.inc000064400000004615152346206440007107 0ustar00 0 ' : ' WHERE '. q_bitand('g1.group_cache_opt', 1) .' > 0 AND f.url_redirect IS NULL '). 'ORDER BY v.id'); } $f = array($frm_id => 1); $frmcount = 0; $oldc = $selection_options = ''; while ($r = db_rowarr($c)) { if ($oldc != $r[2]) { foreach ($GLOBALS['cat_cache'] as $k => $i) { if ($r[2] != $k && $i[0] >= $GLOBALS['cat_cache'][$r[2]][0]) { continue; } $selection_options .= ''; if ($k == $r[2]) { break; } } $oldc = $r[2]; } $selection_options .= ''; $frmcount++; } unset($c); return ''.($frmcount > 1 ? ' Goto Forum:
'._hs.'   
' : '' ) ; } ?> err.inc000064400000010465152346206440006043 0ustar00sid; } // Log the error. if (defined('fud_logging') || $level !== 'INFO') { // Build error string. $error_msg = '[Error] '. $title .'
'; $error_msg .= '[Message to User] '. trim($msg) .'
'; $error_msg .= '[User IP] '. get_ip() .'
'; $error_msg .= '[Requested URL] http://'; $error_msg .= isset($_SERVER['HTTP_HOST']) ? htmlspecialchars($_SERVER['HTTP_HOST']) : ''; $error_msg .= isset($_SERVER['REQUEST_URI']) ? htmlspecialchars($_SERVER['REQUEST_URI']) : ''; // Mask out sensitive data. unset($_POST['password']); unset($_POST['quick_password']); $error_msg .= !empty($_POST) ? '
[Post-Data] '. htmlspecialchars(serialize($_POST)) : ''; $error_msg .= '
'; if (isset($_SERVER['HTTP_REFERER'])) { $error_msg .= '[Referring URL] '. htmlspecialchars($_SERVER['HTTP_REFERER']) .'
'; } else if (isset($_SERVER['HTTP_USER_AGENT'])) { $error_msg .= '[User Agent] '. htmlspecialchars($_SERVER['HTTP_USER_AGENT']) .'
'; } fud_logerror($error_msg, 'fud_errors'); } // No need to redirect, we just want to log the error. if ($level == 'LOG&RETURN') { return; } // Store persistently. ses_putvar($ses, array('er_msg' => $msg, 'err_t' => $title)); // Redirect to error template. if (is_int($ses)) { if ($GLOBALS['FUD_OPT_2'] & 32768) { header('Location: [[relativeurl]]/index.php/e/'. _rsidl); } else { header('Location: [[relativeurl]]/index.php?t=error&'. _rsidl); } } else { if ($GLOBALS['FUD_OPT_2'] & 32768) { header('Location: [[relativeurl]]/index.php/e/0/'. $ses); } else { header('Location: [[relativeurl]]/index.php?t=error&S='. $ses); } } exit; } /** Signal standard errors. */ function std_error($type) { if (!isset($_SERVER['HTTP_REFERER'])) { $_SERVER['HTTP_REFERER'] = 'unknown'; } $ses_id = s; $usr_d = new stdClass(); $usr_d->email = $GLOBALS['usr']->email; if ($type == 'login') { if (__fud_real_user__) { $type = 'perms'; } else { ses_anonuser_auth($GLOBALS['usr']->sid, '
ERROR: You are not logged-inTo access this page you must be a member of this forum.

'); } } $err_array = array( 'ERR_disabled'=>array('Disabled feature', 'This feature has been disabled by the system administrator.'), 'ERR_access'=>array('ERROR: Insufficient Permissions', 'You do not have the required permissions to perform this action.'), 'ERR_registration_disabled'=>array('Registration Disabled', 'The administrator has disabled registration. Please try again later.'), 'ERR_user'=>array('ERROR: No such user', 'There is no such user'), 'ERR_perms'=>array('Permission Denied!', 'Your user permissions do not allow you to perform the action you are attempting.'), 'ERR_systemerr'=>array('ERROR: System Error', 'A system error has occurred. Please report it to the webmaster.'), 'ERR_emailconf'=>array('ERROR: Your account is not yet confirmed', 'You have not confirmed your account via e-mail yet.
  1. If you have not received a confirmation e-mail, request it again.
  2. If '.$usr_d->email.' is not your correct e-mail address, specify the correct address.
') ); if (isset($err_array['ERR_'. $type])) { $err = $err_array['ERR_'. $type]; error_dialog($err[0], $err[1]); } error_dialog('Critical error', 'An error has occurred. Unfortunately, there is also a problem with the error reporting system.'); } /** Signal an invalid input error. */ function invl_inp_err() { error_dialog('Invalid Input', 'You have followed an invalid link. Please notify the webmaster how you got here.', 'INFO'); } ?> drawmsg.inc000064400000060617152346206440006723 0ustar00buddy_list) { $usr->buddy_list = unserialize($usr->buddy_list); } if ($usr->ignore_list) { $usr->ignore_list = unserialize($usr->ignore_list); if (isset($usr->ignore_list[1])) { $usr->ignore_list[0] =& $usr->ignore_list[1]; } } /* Handle temporarily un-hidden users. */ if (isset($_GET['reveal'])) { $_GET['reveal'] = htmlspecialchars((string)$_GET['reveal']); foreach(explode(':', $_GET['reveal']) as $v) { $v = (int) $v; if (isset($usr->ignore_list[$v])) { $usr->ignore_list[$v] = 0; } } if ($GLOBALS['FUD_OPT_2'] & 32768) { define('unignore_tmp', '/'. $_GET['reveal']); } else { define('unignore_tmp', '&reveal='. $_GET['reveal']); } } else { define('unignore_tmp', ''); } } else { define('unignore_tmp', ''); if (isset($_GET['reveal'])) { unset($_GET['reveal']); } } $_SERVER['QUERY_STRING_ENC'] = htmlspecialchars($_SERVER['QUERY_STRING']); function make_tmp_unignore_lnk($id) { if ($GLOBALS['FUD_OPT_2'] & 32768 && strpos($_SERVER['QUERY_STRING_ENC'], '?') === false) { $_SERVER['QUERY_STRING_ENC'] .= '?1=1'; } if (!isset($_GET['reveal'])) { return $_SERVER['QUERY_STRING_ENC'] .'&reveal='. $id; } else { return str_replace('&reveal='. $_GET['reveal'], unignore_tmp .':'. $id, $_SERVER['QUERY_STRING_ENC']); } } function make_reveal_link($id) { if ($GLOBALS['FUD_OPT_2'] & 32768 && strpos($_SERVER['QUERY_STRING_ENC'], '?') === false) { $_SERVER['QUERY_STRING_ENC'] .= '?1=1'; } if (empty($GLOBALS['__FMDSP__'])) { return $_SERVER['QUERY_STRING_ENC'] .'&rev='. $id; } else { return str_replace('&rev='. $_GET['rev'], reveal_lnk .':'. $id, $_SERVER['QUERY_STRING_ENC']); } } /* Draws a message, needs a message object, user object, permissions array, * flag indicating wether or not to show controls and a variable indicating * the number of the current message (needed for cross message pager) * last argument can be anything, allowing forms to specify various vars they * need to. */ function tmpl_drawmsg($obj, $usr, $perms, $hide_controls, &$m_num, $misc) { $o1 =& $GLOBALS['FUD_OPT_1']; $o2 =& $GLOBALS['FUD_OPT_2']; $a = (int) $obj->users_opt; $b =& $usr->users_opt; $MOD =& $GLOBALS['MOD']; $next_page = $next_message = $prev_message = ''; /* Draw next/prev message controls. */ if (!$hide_controls && $misc) { /* Tree view is a special condition, we only show 1 message per page. */ if ($_GET['t'] == 'tree' || $_GET['t'] == 'tree_msg') { $prev_message = $misc[0] ? 'Go to previous message' : ''; $next_message = $misc[1] ? 'Go to previous message' : ''; } else { /* Handle previous link. */ if (!$m_num && $obj->id > $obj->root_msg_id) { /* prev link on different page */ $prev_message = 'Go to previous message'; } else if ($m_num) { /* Inline link, same page. */ $prev_message = 'Go to previous message'; } /* Handle next link. */ if ($obj->id < $obj->last_post_id) { if ($m_num && !($misc[1] - $m_num - 1)) { /* next page link */ $next_message = 'Go to previous message'; $next_page = 'Next Page '; } else { $next_message = 'Go to next message'; } } } ++$m_num; } $user_login = $obj->user_id ? $obj->login : $GLOBALS['ANON_NICK']; /* Check if the message should be ignored and it is not temporarily revelead. */ if ($usr->ignore_list && !empty($usr->ignore_list[$obj->poster_id]) && !isset($GLOBALS['__FMDSP__'][$obj->id])) { return !$hide_controls ? '
'.($obj->user_id ? 'Message by '.$obj->login.' is ignored' : ''.$GLOBALS['ANON_NICK'].' is ignored' ) .'  [reveal message]  [reveal all messages by '.$user_login.']  [stop ignoring this user] '.$prev_message.$next_message.'
' : ' Post by '.$user_login.' is ignored  '; } if ($obj->user_id && !$hide_controls) { $custom_tag = $obj->custom_status ? '
'.$obj->custom_status.'' : ''; $c = (int) $obj->level_opt; if ($obj->avatar_loc && $a & 8388608 && $b & 8192 && $o1 & 28 && !($c & 2)) { if (!($c & 1)) { $level_name =& $obj->level_name; $level_image = $obj->level_img ? ' ' : ''; } else { $level_name = $level_image = ''; } } else { $level_image = $obj->level_img ? ' ' : ''; $obj->avatar_loc = ''; $level_name =& $obj->level_name; } $avatar = ($obj->avatar_loc || $level_image) ? ''.$obj->avatar_loc.$level_image.'' : ''; $dmsg_tags = ($custom_tag || $level_name) ? '
'.$level_name.$custom_tag.'
' : ''; if (($o2 & 32 && !($a & 32768)) || $b & 1048576) { $online_indicator = (($obj->time_sec + $GLOBALS['LOGEDIN_TIMEOUT'] * 60) > __request_timestamp__) ? ''.$obj->login.' is currently online ' : ''.$obj->login.' is currently offline '; } else { $online_indicator = ''; } $user_link = ''.$user_login.''; $location = $obj->location ? '
Location: '.(strlen($obj->location) > $GLOBALS['MAX_LOCATION_SHOW'] ? substr($obj->location, 0, $GLOBALS['MAX_LOCATION_SHOW']) . '...' : $obj->location).'' : ''; if (_uid && _uid != $obj->user_id) { $buddy_link = !isset($usr->buddy_list[$obj->user_id]) ? 'add to buddy list
' : 'remove from buddy list
'; $ignore_link = !isset($usr->ignore_list[$obj->user_id]) ? 'ignore all messages by this user' : 'stop ignoring messages by this user'; $dmsg_bd_il = ''.$buddy_link.$ignore_link.'
'; } else { $dmsg_bd_il = ''; } /* Show im buttons if need be. */ if ($b & 16384) { $im = ''; if ($obj->icq) { $im .= ''; } if ($obj->facebook) { $im .= ''; } if ($obj->yahoo) { $im .= ''; } if ($obj->jabber) { $im .= ''; } if ($obj->google) { $im .= ''; } if ($obj->skype) { $im .= ''; } if ($obj->twitter) { $im .= ''; } if ($im) { $dmsg_im_row = ''.$im.'
'; } else { $dmsg_im_row = ''; } } else { $dmsg_im_row = ''; } } else { $user_link = $obj->user_id ? ''.$user_login.'' : ''.$user_login; $dmsg_tags = $dmsg_im_row = $dmsg_bd_il = $location = $online_indicator = $avatar = ''; } /* Display message body. * If we have message threshold & the entirity of the post has been revelead show a * preview otherwise if the message body exists show an actual body. * If there is no body show a 'no-body' message. */ if (!$hide_controls && $obj->message_threshold && $obj->length_preview && $obj->length > $obj->message_threshold && !isset($GLOBALS['__FMDSP__'][$obj->id])) { $msg_body = ''.read_msg_body($obj->offset_preview, $obj->length_preview, $obj->file_id_preview).' ...

'; } else if ($obj->length) { $msg_body = ''.read_msg_body($obj->foff, $obj->length, $obj->file_id).''; } else { $msg_body = 'No Message Body'; } /* Draw file attachments if there are any. */ $drawmsg_file_attachments = ''; if ($obj->attach_cnt && !empty($obj->attach_cache)) { $atch = unserialize($obj->attach_cache); if (!empty($atch)) { foreach ($atch as $v) { $sz = $v[2] / 1024; $drawmsg_file_attachments .= '
  • Attachment: '.$v[1].'
    (Size: '.($sz < 1000 ? number_format($sz, 2).'KB' : number_format($sz/1024, 2).'MB').', Downloaded '.convertPlural($v[3], array(''.$v[3].' time',''.$v[3].' times')).')
  • '; } $drawmsg_file_attachments = '
      '.$drawmsg_file_attachments.'
    '; } /* Append session to getfile. */ if (_uid) { if ($o1 & 128 && !isset($_COOKIE[$GLOBALS['COOKIE_NAME']])) { $msg_body = str_replace('poll_cache) { $obj->poll_cache = unserialize($obj->poll_cache); } /* Handle poll votes. */ if (!empty($_POST['poll_opt']) && ($_POST['poll_opt'] = (int)$_POST['poll_opt']) && !($obj->thread_opt & 1) && $perms & 512) { if (register_vote($obj->poll_cache, $obj->poll_id, $_POST['poll_opt'], $obj->id)) { $obj->total_votes += 1; $obj->cant_vote = 1; } unset($_GET['poll_opt']); } /* Display poll if there is one. */ if ($obj->poll_id && $obj->poll_cache) { /* We need to determine if we allow the user to vote or see poll results. */ $show_res = 1; if (isset($_GET['pl_view']) && !isset($_POST['pl_view'])) { $_POST['pl_view'] = $_GET['pl_view']; } /* Various conditions that may prevent poll voting. */ if (!$hide_controls && !$obj->cant_vote && (!isset($_POST['pl_view']) || $_POST['pl_view'] != $obj->poll_id) && ($perms & 512 && (!($obj->thread_opt & 1) || $perms & 4096)) && (!$obj->expiry_date || ($obj->creation_date + $obj->expiry_date) > __request_timestamp__) && /* Check if the max # of poll votes was reached. */ (!$obj->max_votes || $obj->total_votes < $obj->max_votes) ) { $show_res = 0; } $i = 0; $poll_data = ''; foreach ($obj->poll_cache as $k => $v) { ++$i; if ($show_res) { $length = ($v[1] && $obj->total_votes) ? round($v[1] / $obj->total_votes * 100) : 0; $poll_data .= ' '.$i.'. '.$v[0].' '.$v[1].' / '.$length.'% '; } else { $poll_data .= ' '.$i.'. '; } } if (!$show_res) { $poll = '
    '._hs.' '.$poll_data.'
    '.$obj->poll_name.'[ '.$obj->total_votes.' '.convertPlural($obj->total_votes, array('vote','votes')).' ]
     '.($obj->total_votes ? '' : '' ) .'

    '; } else { $poll = '
    '.$poll_data.'
    '.$obj->poll_name.'[ '.$obj->total_votes.' '.convertPlural($obj->total_votes, array('vote','votes')).' ]

    '; } if (($p = strpos($msg_body, '{POLL}')) !== false) { $msg_body = substr_replace($msg_body, $poll, $p, 6); } else { $msg_body = $poll . $msg_body; } } /* Determine if the message was updated and if this needs to be shown. */ if ($obj->update_stamp) { if ($obj->updated_by != $obj->poster_id && $o1 & 67108864) { $modified_message = '

    [Updated on: '.print_date('%a, %d %B %Y %H:%M', $obj->update_stamp).'] by Moderator

    '; } else if ($obj->updated_by == $obj->poster_id && $o1 & 33554432) { $modified_message = '

    [Updated on: '.print_date('%a, %d %B %Y %H:%M', $obj->update_stamp).']

    '; } else { $modified_message = ''; } } else { $modified_message = ''; } if ($_GET['t'] != 'tree' && $_GET['t'] != 'msg') { $lnk = d_thread_view; } else { $lnk =& $_GET['t']; } $rpl = ''; if (!$hide_controls) { /* Show reply links, eg: [message #1 is a reply to message #2]. */ if ($o2 & 536870912) { if ($obj->reply_to && $obj->reply_to != $obj->id) { $rpl = '[message #'.$obj->id.' is a reply to message #'.$obj->reply_to.']'; } else { $rpl = '[message #'.$obj->id.']'; } } /* Little trick, this variable will only be available if we have a next link leading to another page. */ if (empty($next_page)) { $next_page = ' '; } // Edit button if editing is enabled, EDIT_TIME_LIMIT has not transpired, and there are no replies. if (_uid && ($perms & 16 || (_uid == $obj->poster_id && (!$GLOBALS['EDIT_TIME_LIMIT'] || __request_timestamp__ - $obj->post_stamp < $GLOBALS['EDIT_TIME_LIMIT'] * 60 ) && (($GLOBALS['FUD_OPT_3'] & 1024) || $obj->id == $obj->last_post_id)) ) ) { $edit_link = '    '; } else { $edit_link = ''; } if (!($obj->thread_opt & 1) || $perms & 4096) { $reply_link = ' '; $quote_link = ''; } else { $reply_link = $quote_link = ''; } } return ' '.(!$hide_controls ? '' : '' ) .'
    '.($obj->icon && !$hide_controls ? ''.$obj->icon.'  ' : '' ) .''.$obj->subject.' '.$rpl.' '.print_date('%a, %d %B %Y %H:%M', $obj->post_stamp).' '.$prev_message.$next_message.'
    '.$avatar.'
    '.$online_indicator.' '.$user_link.' '.(!$hide_controls ? ''.($obj->disp_flag_cc && $GLOBALS['FUD_OPT_3'] & 524288 ? '  '.$obj->flag_country.'' : '' ) .($obj->user_id ? '
    Messages: '.$obj->posted_msg_count.'
    Registered: '.print_date('%B %Y', $obj->join_date).' '.$location.'' : '' ) .'' : '' ) .' '.($GLOBALS['FUD_OPT_4'] & 4 && $obj->poster_id > 0 ? '
    '.($MOD ? '' : '' ) .' Karma: '.$obj->karma.' '.($MOD ? '' : '' ) .' ' : '' ) .'
    '.$dmsg_tags.' '.$dmsg_bd_il.$dmsg_im_row.(!$hide_controls ? ''.(($obj->host_name && $o1 & 268435456) ? 'From: '.$obj->host_name.'
    ' : '' ) .(($b & 1048576 || $usr->md || $o1 & 134217728) ? 'IP: '.$obj->ip_addr.'' : '' ) .'' : '' ) .'
    '.$msg_body.' '.$drawmsg_file_attachments.' '.(!$hide_controls ? ''.(($obj->sig && $o1 & 32768 && $obj->msg_opt & 1 && $b & 4096 && !($a & 67108864)) ? '

    '.$obj->sig.'
    ' : '' ) .'
    '.$modified_message.'

    Report message to a moderator

    ' : '' ) .'
    '; } ?> allowed_user_lnk.inc000064400000007167152346206440010611 0ustar00 $v) { if (($v && (strpos($addr, $k) !== false)) || (!$v && preg_match($k, $addr))) { return 1; } } return; } function is_allowed_user(&$usr, $simple=0) { /* Check if the ban expired. */ if (($banned = $usr->users_opt & 65536) && $usr->ban_expiry && $usr->ban_expiry < __request_timestamp__) { q('UPDATE fud30_users SET users_opt = '. q_bitand('users_opt', ~65536) .' WHERE id='. $usr->id); $usr->users_opt ^= 65536; $banned = 0; } if ($banned || is_email_blocked($usr->email) || is_login_blocked($usr->login) || is_ip_blocked(get_ip())) { $ban_expiry = (int) $usr->ban_expiry; $ban_reason = $usr->ban_reason; if (!$simple) { // On login page we already have anon session. ses_delete($usr->sid); $usr = ses_anon_make(); } setcookie($GLOBALS['COOKIE_NAME'].'1', 'd34db33fd34db33fd34db33fd34db33f', ($ban_expiry ? $ban_expiry : (__request_timestamp__ + 63072000)), $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']); if ($banned) { error_dialog('ERROR: You have been banned.', 'Your account was '.($ban_expiry ? 'temporarily banned until '.print_date('%a, %d %B %Y %H:%M', $ban_expiry).'' : 'permanently banned' ) .' from accessing the site, due to a violation of the forum's rules.

    '.$ban_reason.''); } else { error_dialog('ERROR: Your account has been filtered out.', 'Your account has been blocked from accessing the forum due to one of the installed user filters.'); } } if ($simple) { return; } if ($GLOBALS['FUD_OPT_1'] & 1048576 && $usr->users_opt & 262144) { error_dialog('ERROR: Your account is not yet confirmed', 'We have not received a confirmation from your parent and/or legal guardian, which would allow you to post messages. If you lost your COPPA form, view it again.'); } if ($GLOBALS['FUD_OPT_2'] & 1 && !($usr->users_opt & 131072)) { std_error('emailconf'); } if ($GLOBALS['FUD_OPT_2'] & 1024 && $usr->users_opt & 2097152) { error_dialog('Unverified Account', 'The administrator had chosen to review all accounts manually prior to activation. Until your account has been validated by the administrator you will not be able to utilize the full capabilities of your account.'); } } ?> post_opt.inc000064400000005372152346206440007123 0ustar00HTML code is off'; $post_opt_fud = 'BBcode is off'; $post_opt_images = 'Images are off'; $post_opt_smilies = 'Smilies are off'; $edit_time_limit = ''; if (is_int($arg)) { if ($arg & 16) { $post_opt_fud = 'BBcode is on'; } else if (!($arg & 8)) { $post_opt_html = 'HTML is on'; } if ($perms & 16384) { $post_opt_smilies = 'Smilies are on'; } if ($perms & 32768) { $post_opt_images = 'Images are on'; } if ($GLOBALS['EDIT_TIME_LIMIT'] >= 0) { // Time limit enabled, $edit_time_limit = $GLOBALS['EDIT_TIME_LIMIT'] ? '
    Editing Time Limit: '.$GLOBALS['EDIT_TIME_LIMIT'].' minutes' : '
    Editing Time Limit: Unlimited'; } } else if ($arg == 'private') { $o =& $GLOBALS['FUD_OPT_1']; if ($o & 4096) { $post_opt_fud = 'BBcode is on'; } else if (!($o & 2048)) { $post_opt_html = 'HTML is on'; } if ($o & 16384) { $post_opt_images = 'Images are on'; } if ($o & 8192) { $post_opt_smilies = 'Smilies are on'; } } else if ($arg == 'sig') { $o =& $GLOBALS['FUD_OPT_1']; if ($o & 131072) { $post_opt_fud = 'BBcode is on'; } else if (!($o & 65536)) { $post_opt_html = 'HTML is on'; } if ($o & 524288) { $post_opt_images = 'Images are on'; } if ($o & 262144) { $post_opt_smilies = 'Smilies are on'; } } return 'Forum Options:
    '.$post_opt_html.'
    '.$post_opt_fud.'
    '.$post_opt_images.'
    '.$post_opt_smilies.$edit_time_limit.'
    '; } ?> draw_forum_path.inc000064400000002012152346206440010421 0ustar00'.$cat_cache[$cid][1].''. $data; } while (($cid = $cat_par[$cid]) > 0); if ($fid) { $data .= ' » '.$fn.''; } else if ($fn) { $data .= ' » '.$fn.''; } return 'Home'.$data.($tn ? ' » '.$tn.'' : ''); } ?>get_cur_ppage.inc000064400000002054152346206440010052 0ustar00'Inbox', 2=>'Saved', 4=>'Draft', 3=>'Sent', 5=>'Trash'); function tmpl_cur_ppage($folder_id, $folders, $msg_subject='') { if (!$folder_id || (!$msg_subject && $_GET['t'] == 'ppost')) { $user_action = 'Writing a Private Message'; } else { $user_action = $msg_subject ? ''.$folders[$folder_id].' » '.$msg_subject.'' : 'Browsing '.$folders[$folder_id].' folder'; } return 'Private Messaging » '.$user_action.'

    '; } ?>admincp.inc000064400000010310152346206440006653 0ustar00users_opt & 524288 || $is_a) { // is_mod or admin. if ($is_a) { // Approval of custom Avatars. if ($FUD_OPT_1 & 32 && ($avatar_count = q_singleval('SELECT count(*) FROM fud30_users WHERE users_opt>=16777216 AND '. q_bitand('users_opt', 16777216) .' > 0'))) { $custom_avatar_queue = '| Custom Avatar Queue ('.$avatar_count.')'; } // All reported messages. if ($report_count = q_singleval('SELECT count(*) FROM fud30_msg_report')) { $reported_msgs = '| Reported Messages ('.$report_count.')'; } // All thread exchange requests. if ($thr_exchc = q_singleval('SELECT count(*) FROM fud30_thr_exchange')) { $thr_exch = '| Topic Exchange ('.$thr_exchc.')'; } // All account approvals. if ($FUD_OPT_2 & 1024 && ($accounts_pending_approval = q_singleval('SELECT count(*) FROM fud30_users WHERE users_opt>=2097152 AND '. q_bitand('users_opt', 2097152) .' > 0 AND id > 0'))) { $accounts_pending_approval = '| Accounts Pending Approval ('.$accounts_pending_approval.')'; } else { $accounts_pending_approval = ''; } $q_limit = ''; } else { // Messages reported in moderated forums. if ($report_count = q_singleval('SELECT count(*) FROM fud30_msg_report mr INNER JOIN fud30_msg m ON mr.msg_id=m.id INNER JOIN fud30_thread t ON m.thread_id=t.id INNER JOIN fud30_mod mm ON t.forum_id=mm.forum_id AND mm.user_id='. _uid)) { $reported_msgs = '| Reported Messages ('.$report_count.')'; } // Thread move requests in moderated forums. if ($thr_exchc = q_singleval('SELECT count(*) FROM fud30_thr_exchange te INNER JOIN fud30_mod m ON m.user_id='. _uid .' AND te.frm=m.forum_id')) { $thr_exch = '| Topic Exchange ('.$thr_exchc.')'; } $q_limit = ' INNER JOIN fud30_mod mm ON f.id=mm.forum_id AND mm.user_id='. _uid; } // Messages requiring approval. if ($approve_count = q_singleval('SELECT count(*) FROM fud30_msg m INNER JOIN fud30_thread t ON m.thread_id=t.id INNER JOIN fud30_forum f ON t.forum_id=f.id '. $q_limit .' WHERE m.apr=0 AND f.forum_opt>=2')) { $mod_que = 'Moderation Queue ('.$approve_count.')'; } } else if ($usr->users_opt & 268435456 && $FUD_OPT_2 & 1024 && ($accounts_pending_approval = q_singleval('SELECT count(*) FROM fud30_users WHERE users_opt>=2097152 AND '. q_bitand('users_opt', 2097152) .' > 0 AND id > 0'))) { $accounts_pending_approval = '| Accounts Pending Approval ('.$accounts_pending_approval.')'; } else { $accounts_pending_approval = ''; } if ($is_a || $usr->group_leader_list) { $group_mgr = '| Group Manager'; } if ($thr_exch || $accounts_pending_approval || $group_mgr || $reported_msgs || $custom_avatar_queue || $mod_que) { $admin_cp = '
    Admin: '.$mod_que.' '.$reported_msgs.' '.$thr_exch.' '.$custom_avatar_queue.' '.$group_mgr.' '.$accounts_pending_approval.'
    '; } } else { $admin_cp = ''; } ?> thread_view_common.inc000064400000007166152346206440011130 0ustar00group_cache_opt & 2) && !$res->forum_id)) { return; } return 1; } /* Make sure that we have what appears to be a valid forum id. */ if (!isset($_GET['frm_id']) || (!($frm_id = (int)$_GET['frm_id']))) { invl_inp_err(); } if (!isset($_GET['start']) || ($start = (int)$_GET['start']) < 1) { $start = 0; } /* This query creates frm object that contains info about the current * forum, category & user's subscription status & permissions to the * forum. */ make_perms_query($fields, $join, $frm_id); $frm = db_sab(q_limit('SELECT f.id, f.name, f.thread_count, f.cat_id,'. (_uid ? ' fn.forum_id AS subscribed, m.forum_id AS md, ' : ' 0 AS subscribed, 0 AS md, '). 'a.ann_id AS is_ann, ms.post_stamp, '. $fields .' FROM fud30_forum f INNER JOIN fud30_cat c ON c.id=f.cat_id '. (_uid ? ' LEFT JOIN fud30_forum_notify fn ON fn.user_id='._uid.' AND fn.forum_id='. $frm_id .' LEFT JOIN fud30_mod m ON m.user_id='. _uid .' AND m.forum_id='. $frm_id : ' ') .$join.' LEFT JOIN fud30_ann_forums a ON a.forum_id='. $frm_id .' LEFT JOIN fud30_msg ms ON ms.id=f.last_post_id WHERE f.id='. $frm_id, 1)); if (!$frm) { invl_inp_err(); } $frm->forum_id = $frm->id; $MOD = ($is_a || $frm->md); $lwi = q_singleval(q_limit('SELECT seq FROM fud30_tv_'. $frm_id .' ORDER BY seq DESC', 1)); /* Check that the user has permissions to access this forum. */ if (!($frm->group_cache_opt & 2) && !$MOD) { if (!isset($_GET['logoff'])) { std_error('login'); } if ($FUD_OPT_2 & 32768) { header('Location: [[relativeurl]]/index.php/i/'. _rsidl); } else { header('Location: [[relativeurl]]/index.php?'. _rsidl); } exit; } if ($_GET['t'] == 'threadt') { $cur_frm_page = $start + 1; } else { $cur_frm_page = floor($start / $THREADS_PER_PAGE) + 1; } /* Do various things for registered users. */ if (_uid) { if (isset($_GET['sub']) && sq_check(0, $usr->sq)) { forum_notify_add(_uid, $frm->id); $frm->subscribed = 1; } else if (isset($_GET['unsub']) && sq_check(0, $usr->sq)) { forum_notify_del(_uid, $frm->id); $frm->subscribed = 0; } } else if (__fud_cache((int)$frm->post_stamp)) { return; } $ppg = $usr->posts_ppg ? $usr->posts_ppg : $POSTS_PER_PAGE; /* Handling of forum level announcements (should be merged with non-forum announcements in index.php.t). */ $announcements = ''; if ($frm->is_ann) { $today = gmdate('Ymd', __request_timestamp__); $res = uq('SELECT a.subject, a.text, a.ann_opt FROM fud30_announce a INNER JOIN fud30_ann_forums af ON a.id=af.ann_id AND af.forum_id='. $frm->id .' WHERE a.date_started<='. $today .' AND a.date_ended>='. $today); while ($r = db_rowarr($res)) { if (!_uid && $r[2] & 2) { continue; // Only for logged in users. } if (_uid && $r['2'] & 4) { continue; // Only for anonomous users. } if (defined('plugins')) { list($r[0], $r[1]) = plugin_call_hook('ANNOUNCEMENT', array($r[0], $r[1])); } $announcements .= '
    '.$r[0].' '.$r[1].'
    '; } unset($res); } ?> usercp.inc000064400000002220152346206440006542 0ustar00 You have ('.$c.') unread '.convertPlural($c, array('private message','private messages')).'' : '
  • Private Messaging
  • '; } else { $ucp_private_msg = ''; } ?>errmsg.inc000064400000014270152346206440006550 0ustar00 '.$GLOBALS['DISABLED_REASON'].' '); } else { exit(' '.$GLOBALS['FORUM_TITLE'].$TITLE_EXTRA.' '.$RSS.'
    '.($GLOBALS['FUD_OPT_1'] & 1 && $GLOBALS['FUD_OPT_1'] & 16777216 ? '
    '._hs.'
     
    ' : '' ) .' '.$GLOBALS['FORUM_TITLE'].'
    '.$GLOBALS['FORUM_DESCR'].'


    '.$GLOBALS['DISABLED_REASON'].'


    Administrators can login here.

    '.(!empty($RIGHT_SIDEBAR) ? '
    '); } } /** User is banned. Notify and hang up. */ function exit_user_banned() { $TITLE_EXTRA = $RSS = null; header('HTTP/1.1 403 Forbidden'); header('Status: 403 Forbidden'); header('Connection: Close'); header('Content-type: text/html; charset=utf-8'); exit(' '.$GLOBALS['FORUM_TITLE'].$TITLE_EXTRA.' '.$RSS.'
    '.($GLOBALS['FUD_OPT_1'] & 1 && $GLOBALS['FUD_OPT_1'] & 16777216 ? '
    '._hs.'
     
    ' : '' ) .' '.$GLOBALS['FORUM_TITLE'].'
    '.$GLOBALS['FORUM_DESCR'].'


    Your prior actions have resulted in you being permanently banned from this forum. Goodbye.

    '.(!empty($RIGHT_SIDEBAR) ? '
    '); } ?> return.inc000064400000002211152346206440006560 0ustar00 post_common.inc000064400000011425152346206440007605 0ustar00 $GLOBALS['MAX_SMILIES_SHOWN']) { $limit = $GLOBALS['MAX_SMILIES_SHOWN']; } $smilies = ''; $i = 0; while ($i < $limit) { $smilies .= ''.$PS_SRC[$i++].' '; } return ' Smiley Shortcuts:
    [ list all smilies ] '.$smilies.' '; } function draw_post_icons($msg_icon) { include $GLOBALS['FORUM_SETTINGS_PATH'] .'icon_cache'; /* Nothing to do. */ if (!$ICON_L) { return; } $tmp = $data = ''; $rl = (int) $GLOBALS['POST_ICONS_PER_ROW']; foreach ($ICON_L as $k => $f) { if ($k && !($k % $rl)) { $data .= ''.$tmp.''; $tmp = ''; } $tmp .= ''; } if ($tmp) { $data .= ''.$tmp.''; } return ' Message Icon: '.$data.'
    No Icon
    '; } function draw_post_attachments($al, $max_as, $max_a, $attach_control_error, $private, $msg_id) { $attached_files = ''; $i = 0; if (!empty($al)) { $enc = base64_encode(serialize($al)); ses_putvar((int)$GLOBALS['usr']->sid, md5($enc)); $c = uq('SELECT a.id,a.fsize,a.original_name,m.mime_hdr FROM fud30_attach a LEFT JOIN fud30_mime m ON a.mime_type=m.id WHERE a.id IN('. implode(',', $al) .') AND message_id IN(0, '. $msg_id .') AND attach_opt='. ($private ? 1 : 0)); while ($r = db_rowarr($c)) { $sz = ( $r[1] < 100000 ) ? number_format($r[1]/1024,2) .'KB' : number_format($r[1]/1048576,2) .'MB'; $insert_uploaded_image = strncasecmp('image/', $r[3], 6) ? '' : ' | Insert image into message body'; $attached_files .= ' '.$r[2].' '.$sz.' Delete'.$insert_uploaded_image.' '; $i++; } unset($c); } if (!$private && $GLOBALS['MOD'] && $GLOBALS['frm']->forum_opt & 32) { $allowed_extensions = '(unrestricted)'; } else { include $GLOBALS['FORUM_SETTINGS_PATH'] .'file_filter_regexp'; if (empty($GLOBALS['__FUD_EXT_FILER__'])) { $allowed_extensions = '(unrestricted)'; } else { $allowed_extensions = implode(' ', $GLOBALS['__FUD_EXT_FILER__']); } } $max_as_k = round($max_as / 1024); // We display max attch size in KB. return 'File Attachments: '.($i ? ' '.$attached_files.'
    Name Size Action
    ' : '' ) .' '.(isset($enc) ? '' : '' ) .' '.$attach_control_error.' Allowed File Extensions: '.$allowed_extensions.'
    Maximum File Size: '.$max_as_k.'KB
    Maximum Files Per Message: '.$max_a.($i ? '; currently attached: '.$i.' '.convertPlural($i, array('file','files')).'' : '' ) .'
    '.((($i + 1) <= $max_a) ? ' ' : '' ) .' '; } ?> users.inc000064400000053160152346206440006413 0ustar00id != 1 && (!$GLOBALS['is_post'] || sq_check(1, $u->sq, $u->id, $u->ses_id))) { /* Store the last visit date for registered user. */ q('UPDATE fud30_users SET last_visit='. __request_timestamp__ .' WHERE id='. $u->id); if ($GLOBALS['FUD_OPT_3'] & 1) { // SESSION_COOKIES setcookie($GLOBALS['COOKIE_NAME'], $u->ses_id, 0, $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']); } if (!$u->sq || __request_timestamp__ - $u->last_visit > 180) { // 3 min. $u->sq = $sq = regen_sq($u->id); if (!$GLOBALS['is_post']) { $_GET['SQ'] = $sq; } else { $_POST['SQ'] = $sq; } } else { $sq =& $u->sq; } } // Prevent spiders from doing funny stuff. if (($u->users_opt & 1073741824) && $GLOBALS['is_post']) { // is_spider die('Bad bot!'); } /* Disable caching for registered users and POST requests. */ if ($GLOBALS['is_post'] || $u->id > 1) { header('Cache-Control: no-store, private, must-revalidate, proxy-revalidate, post-check=0, pre-check=0, max-age=0, s-maxage=0'); header('Expires: Mon, 21 Jan 1980 06:01:01 GMT'); header('Pragma: no-cache'); } if ($u->data) { $u->data = unserialize($u->data); } $uo = $u->users_opt = (int)$u->users_opt; /* This should allow path_info & normal themes to work properly within 1 forum. */ if ($o2 & 32768 && !($u->theme_opt & 4)) { $o2 ^= 32768; } /* Handle PM disabling for users. */ if (!($GLOBALS['is_a'] = $uo & 1048576) && $uo & 33554432) { $o1 = $o1 &~ 1024; } /* Set timezone. */ if (empty($u->time_zone) || @date_default_timezone_set($u->time_zone) === FALSE) { date_default_timezone_set($GLOBALS['SERVER_TZ']); } /* Set locale. */ $GLOBALS['good_locale'] = setlocale(LC_ALL, $u->locale); /* Call inituser plugins. */ if (defined('plugins')) { plugin_call_hook('INITUSER', $u); } /* View format for threads & messages. */ define('d_thread_view', $uo & 256 ? 'msg' : 'tree'); define('t_thread_view', $uo & 128 ? 'thread' : 'threadt'); if ($GLOBALS['t'] === 0) { $GLOBALS['t'] = $_GET['t'] = d_thread_view; } else if ($GLOBALS['t'] === 1) { $GLOBALS['t'] = $_GET['t'] = t_thread_view; } /* Define theme path, may already be set by a plugin. */ defined('fud_theme') or define('fud_theme', 'theme/'. ($u->theme_name ? $u->theme_name : 'default') .'/'); /* Define _uid, which, will tell us if this is a 'real' user or not. */ define('__fud_real_user__', ($u->id != 1 ? $u->id : 0)); define('_uid', __fud_real_user__ && ($uo & 131072) && !($uo & 2097152) ? $u->id : 0); /* Allow user to set their own topics per page value, as long as it is smaller then the max. */ if (__fud_real_user__ && $GLOBALS['THREADS_PER_PAGE'] > $u->topics_per_page) { $GLOBALS['THREADS_PER_PAGE'] = (int) $u->topics_per_page; } $GLOBALS['sq'] = $sq; /* Define constants used to track URL sessions & referrals. */ if ($o1 & 128) { define('s', $u->ses_id); define('_hs', ''); if ($o2 & 8192) { if ($o2 & 32768) { define('_rsid', __fud_real_user__ .'/'. s .'/'); } else { define('_rsid', 'rid='. __fud_real_user__ .'&S='. s); } } else { if ($o2 & 32768) { define('_rsid', s .'/'); } else { define('_rsid', 'S='. s); } } } else { define('s', ''); define('_hs', ''); if ($o2 & 8192) { if ($o2 & 32768) { define('_rsid', __fud_real_user__ .'/'); } else { define('_rsid', 'rid='. __fud_real_user__); } } else { define('_rsid', ''); } } define('_rsidl', ($o2 & 32768 ? _rsid : str_replace('&', '&', _rsid))); return $u; } function user_register_forum_view($frm_id) { if (__dbtype__ == 'mysql') { // MySQL optimization. q('INSERT INTO fud30_forum_read (forum_id, user_id, last_view) VALUES ('. $frm_id .', '. _uid .', '. __request_timestamp__ .') ON DUPLICATE KEY UPDATE last_view=VALUES(last_view)'); return; } if (!db_li('INSERT INTO fud30_forum_read (forum_id, user_id, last_view) VALUES ('. $frm_id .', '. _uid .', '. __request_timestamp__ .')', $ef)) { q('UPDATE fud30_forum_read SET last_view='. __request_timestamp__ .' WHERE forum_id='. $frm_id .' AND user_id='. _uid); } } function user_register_thread_view($thread_id, $tm=__request_timestamp__, $msg_id=0) { if (__dbtype__ == 'mysql') { // MySQL optimization. q('INSERT INTO fud30_read (last_view, msg_id, thread_id, user_id) VALUES('. $tm .', '. $msg_id .', '. $thread_id .', '. _uid .') ON DUPLICATE KEY UPDATE last_view=VALUES(last_view), msg_id=VALUES(msg_id)'); return; } if (!db_li('INSERT INTO fud30_read (last_view, msg_id, thread_id, user_id) VALUES('. $tm .', '. $msg_id .', '. $thread_id .', '. _uid .')', $ef)) { q('UPDATE fud30_read SET last_view='. $tm .', msg_id='. $msg_id .' WHERE thread_id='. $thread_id .' AND user_id='. _uid); } } function user_set_post_count($uid) { $pd = db_saq('SELECT MAX(id), count(*) FROM fud30_msg WHERE poster_id='. $uid .' AND apr=1'); $level_id = (int) q_singleval(q_limit('SELECT id FROM fud30_level WHERE post_count <= '. $pd[1] .' ORDER BY post_count DESC', 1)); q('UPDATE fud30_users SET u_last_post_id='. (int)$pd[0] .', posted_msg_count='. (int)$pd[1] .', level_id='. $level_id .' WHERE id='. $uid); } function user_mark_all_read($id) { q('UPDATE fud30_users SET last_read='. __request_timestamp__ .' WHERE id='. $id); q('DELETE FROM fud30_read WHERE user_id='. $id); q('DELETE FROM fud30_forum_read WHERE user_id='. $id); } function user_mark_forum_read($id, $fid, $last_view) { if (__dbtype__ == 'mysql') { // MySQL optimization. q('INSERT INTO fud30_read (user_id, thread_id, msg_id, last_view) SELECT '. $id .', id, last_post_id, '. __request_timestamp__ .' FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view .' ON DUPLICATE KEY UPDATE last_view=VALUES(last_view), msg_id=VALUES(msg_id)'); } else if (__dbtype__ == 'sqlite') { // SQLite optimization. q('REPLACE INTO fud30_read (user_id, thread_id, msg_id, last_view) SELECT '. $id .', id, last_post_id, '. __request_timestamp__ .' FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view); } else { // Other databases. if (!db_li('INSERT INTO fud30_read (user_id, thread_id, msg_id, last_view) SELECT '. $id .', id, last_post_id, '. __request_timestamp__ .' FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view, $ef)) { q('UPDATE fud30_read SET user_id='. $id .', msg_id=t.last_post_id, last_view='. __request_timestamp__ .' FROM (SELECT id, last_post_id FROM fud30_thread WHERE forum_id='. $fid .' AND last_post_date > '. $last_view .') t WHERE user_id='. $id .' AND thread_id=t.id'); } } user_register_forum_view($fid); } function sq_check($post, &$sq, $uid=__fud_real_user__, $ses=s) { /* No sequence # check for anonymous users. */ if (!$uid) { return 1; } if ($post && isset($_POST['SQ'])) { $s = $_POST['SQ']; } else if (!$post && isset($_GET['SQ'])) { $s = $_GET['SQ']; } else { $s = 0; } if ($sq !== $s) { if ($GLOBALS['t'] == 'post' || $GLOBALS['t'] == 'ppost') { define('fud_bad_sq', 1); $sq = regen_sq($uid); return 1; } header('Location: [[relativeurl]]/index.php?S='. $ses); exit; } return 1; } function regen_sq($uid=__fud_real_user__) { $sq = md5(get_random_value(128)); q('UPDATE fud30_users SET sq=\''. $sq .'\' WHERE id='. $uid); return $sq; } // Initialize user session. if (isset($_SERVER['REMOTE_ADDR']) && !defined('no_session')) { $GLOBALS['usr'] = init_user(); } ?> private.inc000064400000016361152346206440006726 0ustar00post_stamp = __request_timestamp__; $this->ip_addr = get_ip(); $this->host_name = $GLOBALS['FUD_OPT_1'] & 268435456 ? _esc(get_host($this->ip_addr)) : 'NULL'; if ($this->fldr != 1) { $this->read_stamp = $this->post_stamp; } if ($GLOBALS['FUD_OPT_3'] & 32768) { $this->foff = $this->length = -1; } else { list($this->foff, $this->length) = write_pmsg_body($this->body); } $this->id = db_qid('INSERT INTO fud30_pmsg ( ouser_id, duser_id, pdest, to_list, ip_addr, host_name, post_stamp, icon, fldr, subject, attach_cnt, read_stamp, ref_msg_id, foff, length, pmsg_opt ) VALUES( '. $this->ouser_id .', '. ($this->duser_id ? $this->duser_id : $this->ouser_id) .', '. (isset($GLOBALS['recv_user_id'][0]) ? (int)$GLOBALS['recv_user_id'][0] : '0') .', '. ssn($this->to_list) .', \''. $this->ip_addr .'\', '. $this->host_name .', '. $this->post_stamp .', '. ssn($this->icon) .', '. $this->fldr .', '. _esc($this->subject) .', '. (int)$this->attach_cnt .', '. $this->read_stamp .', '. ssn($this->ref_msg_id) .', '. (int)$this->foff .', '. (int)$this->length .', '. $this->pmsg_opt .' )'); if ($GLOBALS['FUD_OPT_3'] & 32768 && $this->body) { $fid = db_qid('INSERT INTO fud30_msg_store (data) VALUES('. _esc($this->body) .')'); q('UPDATE fud30_pmsg SET length='. $fid .' WHERE id='. $this->id); } if ($this->fldr == 3 && !$track) { $this->send_pmsg(); } } function send_pmsg() { $this->pmsg_opt |= 16|32; $this->pmsg_opt &= 16|32|1|2|4; foreach($GLOBALS['recv_user_id'] as $v) { $id = db_qid('INSERT INTO fud30_pmsg ( to_list, ouser_id, ip_addr, host_name, post_stamp, icon, fldr, subject, attach_cnt, foff, length, duser_id, ref_msg_id, pmsg_opt ) VALUES ( '. ssn($this->to_list).', '. $this->ouser_id .', \''. $this->ip_addr .'\', '. $this->host_name .', '. $this->post_stamp .', '. ssn($this->icon) .', 1, '. _esc($this->subject) .', '. (int)$this->attach_cnt .', '. $this->foff .', '. $this->length .', '. $v .', '. ssn($this->ref_msg_id) .', '. $this->pmsg_opt .')'); if ($GLOBALS['FUD_OPT_3'] & 32768 && $this->body) { $fid = db_qid('INSERT INTO fud30_msg_store (data) VALUES('. _esc($this->body) .')'); q('UPDATE fud30_pmsg SET length='. $fid .' WHERE id='. $id); } $GLOBALS['send_to_array'][] = array($v, $id); $um[$v] = $id; } $c = uq('SELECT id, email FROM fud30_users WHERE id IN('. implode(',', $GLOBALS['recv_user_id']) .') AND users_opt>=64 AND '. q_bitand('users_opt', 64) .' > 0'); $from = reverse_fmt($GLOBALS['usr']->alias); $subject = reverse_fmt($this->subject); while ($r = db_rowarr($c)) { /* Do not send notifications about messages sent to self. */ if ($r[0] == $this->ouser_id) { continue; } send_pm_notification($r[1], $um[$r[0]], $subject, $from); } unset($c); } function sync() { $this->post_stamp = __request_timestamp__; $this->ip_addr = get_ip(); $this->host_name = $GLOBALS['FUD_OPT_1'] & 268435456 ? _esc(get_host($this->ip_addr)) : 'NULL'; if ($GLOBALS['FUD_OPT_3'] & 32768) { // DB_MESSAGE_STORAGE if ($fid = q_singleval('SELECT length FROM fud30_pmsg WHERE id='. $this->id .' AND foff!=-1')) { q('DELETE FROM fud30_msg_store WHERE id='. $this->length); } $this->foff = $this->length = -1; } else { list($this->foff, $this->length) = write_pmsg_body($this->body); } q('UPDATE fud30_pmsg SET to_list='. ssn($this->to_list) .', icon='. ssn($this->icon) .', ouser_id='. $this->ouser_id .', duser_id='. $this->ouser_id .', post_stamp='. $this->post_stamp .', subject='. _esc($this->subject) .', ip_addr=\''. $this->ip_addr .'\', host_name='. $this->host_name .', attach_cnt='. (int)$this->attach_cnt .', fldr='. $this->fldr .', foff='. (int)$this->foff .', length='. (int)$this->length .', pmsg_opt='. $this->pmsg_opt .' WHERE id='. $this->id); if ($GLOBALS['FUD_OPT_3'] & 32768 && $this->body) { $fid = db_qid('INSERT INTO fud30_msg_store (data) VALUES('. _esc($this->body) .')'); q('UPDATE fud30_pmsg SET length='. $fid .' WHERE id='. $this->id); } if ($this->fldr == 3) { $this->send_pmsg(); } } } function write_pmsg_body($text) { if (($ll = !db_locked())) { db_lock('fud30_fl_pm WRITE'); } $fp = fopen($GLOBALS['MSG_STORE_DIR'] .'private', 'ab'); if (!$fp) { exit("FATAL ERROR: cannot open private message store
    \n"); } fseek($fp, 0, SEEK_END); if (!($s = ftell($fp))) { $s = __ffilesize($fp); } if (($len = fwrite($fp, $text)) !== strlen($text)) { exit("FATAL ERROR: system has ran out of disk space
    \n"); } fclose($fp); if ($ll) { db_unlock(); } if (!$s) { @chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0644)); } return array($s, $len); } function read_pmsg_body($offset, $length) { if ($length < 1) { return; } if ($GLOBALS['FUD_OPT_3'] & 32768 && $offset == -1) { return q_singleval('SELECT data FROM fud30_msg_store WHERE id='. $length); } $fp = fopen($GLOBALS['MSG_STORE_DIR'].'private', 'rb'); fseek($fp, $offset, SEEK_SET); $str = fread($fp, $length); fclose($fp); return $str; } function pmsg_move($mid, $fid, $validate) { if (!$validate && !q_singleval('SELECT id FROM fud30_pmsg WHERE duser_id='. _uid .' AND id='. $mid)) { return; } q('UPDATE fud30_pmsg SET fldr='. $fid .' WHERE duser_id='. _uid .' AND id='. $mid); } function pmsg_del($mid, $fldr=0) { if (!$fldr && !($fldr = q_singleval('SELECT fldr FROM fud30_pmsg WHERE duser_id='. _uid .' AND id='. $mid))) { return; } if ($fldr != 5) { pmsg_move($mid, 5, 0); } else { if ($GLOBALS['FUD_OPT_3'] & 32768 && ($fid = q_singleval('SELECT length FROM fud30_pmsg WHERE id='. $mid .' AND foff=-1'))) { q('DELETE FROM fud30_msg_store WHERE id='. $fid); } q('DELETE FROM fud30_pmsg WHERE id='.$mid); $c = uq('SELECT id FROM fud30_attach WHERE message_id='. $mid .' AND attach_opt=1'); while ($r = db_rowarr($c)) { @unlink($GLOBALS['FILE_STORE'] . $r[0] .'.atch'); } unset($c); q('DELETE FROM fud30_attach WHERE message_id='. $mid .' AND attach_opt=1'); } } function send_pm_notification($email, $pid, $subject, $from) { send_email($GLOBALS['NOTIFY_FROM'], $email, '['.$GLOBALS['FORUM_TITLE'].'] New Private Message Notification', 'You have a new private message titled "'.$subject.'", from "'.$from.'", in the forum "'.$GLOBALS['FORUM_TITLE'].'".\nTo view the message, click here: [[softurl]]/index.php?t=pmsg_view&id='.$pid.'\n\nTo stop future notifications, disable "Private Message Notification" in your profile.'); } ?> tabs.inc000064400000003210152346206440006172 0ustar00'uc', 'Account Settings'=>'register', 'Subscriptions'=>'subscribed', 'Bookmarks'=>'bookmarked', 'Referrals'=>'referals', 'Buddy List'=>'buddy_list', 'Ignore List'=>'ignore_list', 'Show Own Posts'=>'showposts' ); if (!($FUD_OPT_2 & 8192)) { unset($tablist['Referrals']); } if (isset($_POST['mod_id'])) { $mod_id_chk = $_POST['mod_id']; } else if (isset($_GET['mod_id'])) { $mod_id_chk = $_GET['mod_id']; } else { $mod_id_chk = null; } if (!$mod_id_chk) { if ($FUD_OPT_1 & 1024) { $tablist['Private Messaging'] = 'pmsg'; } $pg = ($_GET['t'] == 'pmsg_view' || $_GET['t'] == 'ppost') ? 'pmsg' : $_GET['t']; foreach($tablist as $tab_name => $tab) { $tab_url = '[[relativeurl]]/index.php?t='. $tab . (s ? '&S='. s : ''); if ($tab == 'referals') { if (!($FUD_OPT_2 & 8192)) { continue; } $tab_url .= '&id='. _uid; } else if ($tab == 'showposts') { $tab_url .= '&id='. _uid; } $tabs .= $pg == $tab ? '' : ''; } $tabs = ' '.$tabs.'
    '; } } ?> logedin.inc000064400000013661152346206440006675 0ustar00last_user_id, $obj->user_count) = db_saq('SELECT MAX(id), count(*)-1 FROM fud30_users'); $obj->online_users_anon = q_singleval('SELECT count(*) FROM fud30_ses s WHERE time_sec>'. $tm_expire .' AND user_id>2000000000'); $obj->online_users_hidden = q_singleval('SELECT count(*) FROM fud30_ses s INNER JOIN fud30_users u ON u.id=s.user_id WHERE s.time_sec>'. $tm_expire .' AND '. q_bitand('u.users_opt', 32768) .'>0'); $obj->online_users_reg = q_singleval('SELECT count(*) FROM fud30_ses s INNER JOIN fud30_users u ON u.id=s.user_id WHERE s.time_sec>'. $tm_expire .' AND '. q_bitand('u.users_opt', 32768) .'=0'); $c = uq(q_limit('SELECT u.id, u.alias, u.users_opt, u.custom_color FROM fud30_ses s INNER JOIN fud30_users u ON u.id=s.user_id WHERE s.time_sec>'. $tm_expire .' AND '. q_bitand('u.users_opt', 32768) .'=0 ORDER BY s.time_sec DESC', $GLOBALS['MAX_LOGGEDIN_USERS'])); $obj->online_users_text = array(); while ($r = db_rowarr($c)) { $obj->online_users_text[$r[0]] = draw_user_link($r[1], $r[2], $r[3]); } unset($c); q('UPDATE fud30_stats_cache SET cache_age='. __request_timestamp__ .', last_user_id='. (int)$obj->last_user_id .', user_count='. (int)$obj->user_count .', online_users_anon='. (int)$obj->online_users_anon .', online_users_hidden='. (int)$obj->online_users_hidden .', online_users_reg='. (int)$obj->online_users_reg .', online_users_text='. ssn(serialize($obj->online_users_text))); $obj->last_user_alias = q_singleval('SELECT alias FROM fud30_users WHERE id='. $obj->last_user_id); $obj->last_msg_subject = q_singleval('SELECT subject FROM fud30_msg WHERE id='. $last_msg_id); list($obj->most_online,$obj->most_online_time) = db_saq('SELECT most_online, most_online_time FROM fud30_stats_cache'); /* Update most online users stats if needed. */ if (($obj->online_users_reg + $obj->online_users_hidden + $obj->online_users_anon) > $obj->most_online) { $obj->most_online = $obj->online_users_reg + $obj->online_users_hidden + $obj->online_users_anon; $obj->most_online_time = __request_timestamp__; q('UPDATE fud30_stats_cache SET most_online='. $obj->most_online .', most_online_time='. $obj->most_online_time); } else if (!$obj->most_online_time) { $obj->most_online_time = __request_timestamp__; } return $obj; } $logedin = $forum_info = ''; if ($FUD_OPT_1 & 1073741824 || $FUD_OPT_2 & 16) { if (!($st_obj = db_sab('SELECT sc.*, m.subject AS last_msg_subject, u.alias AS last_user_alias FROM fud30_stats_cache sc INNER JOIN fud30_users u ON u.id=sc.last_user_id LEFT JOIN fud30_msg m ON m.id='. $last_msg_id .' WHERE sc.cache_age>'. (__request_timestamp__ - $STATS_CACHE_AGE)))) { $st_obj = rebuild_stats_cache($last_msg_id); } else if ($st_obj->online_users_text && (_uid || !($FUD_OPT_3 & 262144))) { $st_obj->online_users_text = unserialize($st_obj->online_users_text); } if (!$st_obj->most_online_time) { $st_obj->most_online_time = __request_timestamp__; } if ($FUD_OPT_1 & 1073741824 && (_uid || !($FUD_OPT_3 & 262144))) { if (!empty($st_obj->online_users_text)) { foreach($st_obj->online_users_text as $k => $v) { $logedin .= ''.$v.' '; } } $logedin = ' Logged in users list '.(($FUD_OPT_1 & 536870912) ? ''.(_uid || !($FUD_OPT_3 & 131072) ? '[ User Activity ]' : '' ) .' '.(_uid || !($FUD_OPT_3 & 262144) ? '[ Today's Visitors ]' : '' ) .'' : '' ) .' There are '.convertPlural($st_obj->online_users_reg, array(''.$st_obj->online_users_reg.' member',''.$st_obj->online_users_reg.' members')).', '.convertPlural($st_obj->online_users_hidden, array(''.$st_obj->online_users_hidden.' invisible member',''.$st_obj->online_users_hidden.' invisible members')).' and '.convertPlural($st_obj->online_users_anon, array(''.$st_obj->online_users_anon.' guest',''.$st_obj->online_users_anon.' guests')).' visiting this board.    [Administrator]   [Moderator]
    '.$logedin.' '; } if ($FUD_OPT_2 & 16) { $forum_info = ' Our users have posted a total of '.convertPlural($post_count, array(''.$post_count.' message',''.$post_count.' messages')).' inside '.convertPlural($thread_count, array(''.$thread_count.' topic',''.$thread_count.' topics')).'.
    Most users ever online was '.$st_obj->most_online.' on '.print_date('%a, %d %B %Y %H:%M', $st_obj->most_online_time).'
    We have '.$st_obj->user_count.' registered '.convertPlural($st_obj->user_count, array('user','users')).'.
    The newest registered user is '.htmlspecialchars($st_obj->last_user_alias, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, null, false).' '.($last_msg_id ? '
    Last message on the forum: '.htmlspecialchars($st_obj->last_msg_subject, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, null, false).'' : '' ) .' '; } } ?> captcha.inc000064400000012553152346206440006656 0ustar00'; $text .= ''; if (($GLOBALS['FUD_OPT_3'] & 33554432) && extension_loaded('gd') && function_exists('imagecreate') ) { // Graphical captcha. ses_putvar((int)$GLOBALS['usr']->sid, $captcha); return $text .'
    Captcha Verification: you will need to recognize the text in this image.'; } else { // Text based captcha. $bg_fill_chars = array(' ', '.', ',', '`', '_', '\''); $bg_fill = $bg_fill_chars[array_rand($bg_fill_chars)]; $fg_fill_chars = array('#', '@', '$', '*', 'X'); $fg_fill = $fg_fill_chars[array_rand($fg_fill_chars)]; $text .= '
    ';
    		// Generate turing text.
    		for ($i = 0; $i < 7; $i++) {
    			foreach ($rv as $v) {
    				$text .= str_replace('#', $fg_fill, str_replace('.', $bg_fill, $t[$i][$v]));
    			}
    			$text .= '
    '; } return $text .'
    '; } } /* Test if user entered a valid response to the CAPTCHA test. */ // function test_turing_answer($test, $res) function test_turing_answer() { if (defined('plugins')) { $ok = plugin_call_hook('CAPTCHA_VALIDATE'); if ($ok == 0) { return false; } elseif ($ok == 1) { return true; } } $test = $_POST['turing_test']; $res = $_POST['turing_res']; if (empty($test) || empty($res)) { return false; } if (md5(strtoupper(trim($test))) != $res) { return false; } else { return true; } } ?> draw_forum_list.inc000064400000022665152346206440010460 0ustar00cat_collapse_status ? unserialize($usr->cat_collapse_status) : array(); $cat_id = !empty($_GET['cat']) ? (int) $_GET['cat'] : 0; $frm_id = !empty($_GET['frm_id']) ? (int) $_GET['frm_id'] : 0; if ($cat_id && !empty($collapse[$cat_id])) { $collapse[$cat_id] = 0; } require $FORUM_SETTINGS_PATH .'idx.inc'; if (!isset($cidxc[$cat_id])) { $cat_id = 0; } $cbuf = $forum_list_table_data = $cat_path = ''; if ($cat_id) { $cid = $cat_id; while (($cid = $cidxc[$cid][4]) > 0) { $cat_path = ' » '.$cidxc[$cid][1].''. $cat_path; } $cat_path = '
    Home '.$cat_path.' » '.$cidxc[$cat_id][1].''; } /* List of fetched fields & their ids 0 msg.subject, 1 msg.id AS msg_id, 2 msg.post_stamp, 3 users.id AS user_id, 4 users.alias 5 forum.cat_id, 6 forum.forum_icon 7 forum.id 8 forum.last_post_id 9 forum.moderators 10 forum.name 11 forum.descr 12 forum.url_redirect 13 forum.post_count 14 forum.thread_count 15 forum_read.last_view 16 is_moderator 17 read perm 18 is the category using compact view */ $c = uq('SELECT m.subject, m.id, m.post_stamp, u.id, u.alias, f.cat_id, f.forum_icon, f.id, f.last_post_id, f.moderators, f.name, f.descr, f.url_redirect, f.post_count, f.thread_count, '. (_uid ? 'fr.last_view, mo.id, COALESCE(g2.group_cache_opt, g1.group_cache_opt) AS group_cache_opt' : '0,0,g1.group_cache_opt') .', c.cat_opt FROM fud30_fc_view v INNER JOIN fud30_cat c ON c.id=v.c INNER JOIN fud30_forum f ON f.id=v.f INNER JOIN fud30_group_cache g1 ON g1.user_id='. (_uid ? 2147483647 : 0) .' AND g1.resource_id=f.id LEFT JOIN fud30_msg m ON f.last_post_id=m.id LEFT JOIN fud30_users u ON u.id=m.poster_id '. (_uid ? ' LEFT JOIN fud30_forum_read fr ON fr.forum_id=f.id AND fr.user_id='. _uid .' LEFT JOIN fud30_mod mo ON mo.user_id='. _uid .' AND mo.forum_id=f.id LEFT JOIN fud30_group_cache g2 ON g2.user_id='. _uid .' AND g2.resource_id=f.id' : ''). ' WHERE f.parent = '. $frm_id . ((!$is_a || $cat_id) ? ' AND ' : '') . ($is_a ? '' : (_uid ? ' (mo.id IS NOT NULL OR ('. q_bitand('COALESCE(g2.group_cache_opt, g1.group_cache_opt)', 1) .' > 0))' : ' ('. q_bitand('g1.group_cache_opt', 1) .' > 0)')) . ($cat_id ? ($is_a ? '' : ' AND ') .' v.c IN('. implode(',', ($cf = $cidxc[$cat_id][5])) .') ' : '') .' ORDER BY v.id'); $post_count = $thread_count = $last_msg_id = $cat = 0; while ($r = db_rowarr($c)) { /* Increase thread & post count. */ $post_count += $r[13]; $thread_count += $r[14]; $cid = (int) $r[5]; if ($cat != $cid && !$frm_id) { if ($cbuf) { /* If previous category was using compact view, print forum row. */ if (empty($collapse[$i[4]])) { /* Only show if parent is not collapsed as well. */ $forum_list_table_data .= '     Available Forums:'.$cbuf.' '; } $cbuf = ''; } foreach ($cidxc as $k => $i) { /* 2nd check ensures that we don't end up displaying categories without any children. */ if (($cat_id && !isset($cf[$k])) || ($cid != $k && $i[4] >= $cidxc[$cid][4])) { continue; } /* If parent category is collapsed, hide child category. */ if ($i[4] && !empty($collapse[$i[4]])) { $collapse[$k] = 1; } if ($k == $cid) { break; // Got it! } } $cat = $cid; if ($i[3] & 1 && $k != $cat_id && !($i[3] & 4)) { if (!isset($collapse[$k])) { $collapse[$k] = !($i[3] & 2); } $forum_list_table_data .= ' '.$i[1].' '.$i[2].' '.(key($cidxc) ? '' : '' ) .' '.($cat ? '' : '' ) .' '; } else { if ($i[3] & 4) { ++$i[0]; } $forum_list_table_data .= ' '.$i[1].' '.$i[2].' '.(key($cidxc) ? '' : '' ) .' '.($cat ? '' : '' ) .' '; } } /* Compact category view (ignore when expanded). */ if ($r[18] & 4 && $cat_id != $cid) { $cbuf .= '  '.(_uid && $r[15] < $r[2] && $usr->last_read < $r[2] ? '**' : '' ) .' '.$r[10].''; continue; } /* Visible forum with no 'read' permission. */ if (!($r[17] & 2) && !$is_a && !$r[16]) { $forum_list_table_data .= ' '.$r[10].($r[11] ? '
    '.$r[11] : '').' '; continue; } /* Code to determine the last post id for 'latest' forum message. */ if ($r[8] > $last_msg_id) { $last_msg_id = $r[8]; } if (!_uid) { /* Anon user. */ $forum_read_indicator = 'Only registered forum members can track read & unread messages'; } else if ($r[15] < $r[2] && $usr->last_read < $r[2]) { $forum_read_indicator = 'New messages'; } else { $forum_read_indicator = 'No new messages'; } if ($r[9] && ($mods = unserialize($r[9]))) { $moderators = ''; // List of forum moderators. $modcount = 0; // Use singular or plural message form. foreach($mods as $k => $v) { $moderators .= ''.$v.'  '; $modcount++; } $moderators = '
    '.convertPlural($modcount, array('Moderator','Moderators')).': '.$moderators.'
    '; } else { $moderators = ' '; } $forum_list_table_data .= ' '.($r[6] ? 'Forum Icon' : ' ' ) .' '.(empty($r[12]) ? ''.$forum_read_indicator.'' : '' ) .' '.$r[10].''.($r[11] ? '
    '.$r[11] : '').$moderators.' '.(empty($r[12]) ? ''.$r[13].'' : '--' ) .' '.(empty($r[12]) ? ''.$r[14].'' : '--' ) .' '.(empty($r[12]) ? ''.($r[8] ? ''.print_date('%a, %d %B %Y', $r[2]).'
    By: '.($r[3] ? ''.$r[4].'' : ''.$GLOBALS['ANON_NICK'].'' ) .' '.$r[0].'' : 'n/a' ) .'' : '--' ) .' '; } unset($c); if ($cbuf) { /* If previous category was using compact view, print forum row. */ $forum_list_table_data .= '     Available Forums:'.$cbuf.' '; } ?> imsg_edt.inc000064400000100721152346206440007041 0ustar00reply_to = $reply_to; $fd = db_saq('SELECT t.forum_id, f.message_threshold, f.forum_opt FROM fud30_msg m INNER JOIN fud30_thread t ON m.thread_id=t.id INNER JOIN fud30_forum f ON f.id=t.forum_id WHERE m.id='. $reply_to); } else { $fd = db_saq('SELECT t.forum_id, f.message_threshold, f.forum_opt FROM fud30_thread t INNER JOIN fud30_forum f ON f.id=t.forum_id WHERE t.id='. $th_id); } return $this->add($fd[0], $fd[1], $fd[2], $perm, $autoapprove); } function add($forum_id, $message_threshold, $forum_opt, $perm, $autoapprove=1, $msg_tdescr='') { if (!$this->post_stamp) { $this->post_stamp = __request_timestamp__; } if (!isset($this->ip_addr)) { $this->ip_addr = get_ip(); } $this->host_name = $GLOBALS['FUD_OPT_1'] & 268435456 ? _esc(get_host($this->ip_addr)) : 'NULL'; $this->thread_id = isset($this->thread_id) ? $this->thread_id : 0; $this->reply_to = isset($this->reply_to) ? $this->reply_to : 0; $this->subject = substr($this->subject, 0, 255); // Subject col is VARCHAR(255). if ($GLOBALS['FUD_OPT_3'] & 32768) { // DB_MESSAGE_STORAGE $file_id = $file_id_preview = $length_preview = 0; $offset = $offset_preview = -1; $length = strlen($this->body); } else { $file_id = write_body($this->body, $length, $offset, $forum_id); /* Determine if preview needs building. */ if ($message_threshold && $message_threshold < strlen($this->body)) { $thres_body = trim_html($this->body, $message_threshold); $file_id_preview = write_body($thres_body, $length_preview, $offset_preview, $forum_id); } else { $file_id_preview = $offset_preview = $length_preview = 0; } } /* Lookup country and flag. */ if ($GLOBALS['FUD_OPT_3'] & 524288) { // ENABLE_GEO_LOCATION. $flag = db_saq('SELECT cc, country FROM fud30_geoip WHERE '. sprintf('%u', ip2long($this->ip_addr)) .' BETWEEN ips AND ipe'); } if (empty($flag)) { $flag = array(null, null); } $this->id = db_qid('INSERT INTO fud30_msg ( thread_id, poster_id, reply_to, ip_addr, host_name, post_stamp, subject, attach_cnt, poll_id, icon, msg_opt, file_id, foff, length, file_id_preview, offset_preview, length_preview, mlist_msg_id, poll_cache, flag_cc, flag_country ) VALUES( '. $this->thread_id .', '. $this->poster_id .', '. (int)$this->reply_to .', \''. $this->ip_addr .'\', '. $this->host_name .', '. $this->post_stamp .', '. ssn($this->subject) .', '. (int)$this->attach_cnt .', '. (int)$this->poll_id .', '. ssn($this->icon) .', '. $this->msg_opt .', '. $file_id .', '. (int)$offset .', '. (int)$length .', '. $file_id_preview .', '. $offset_preview .', '. $length_preview .', '. ssn($this->mlist_msg_id) .', '. ssn(poll_cache_rebuild($this->poll_id)) .', '. ssn($flag[0]) .', '. ssn($flag[1]) .' )'); if ($GLOBALS['FUD_OPT_3'] & 32768) { // DB_MESSAGE_STORAGE $file_id = db_qid('INSERT INTO fud30_msg_store (data) VALUES('. _esc($this->body) .')'); if ($message_threshold && $length > $message_threshold) { $file_id_preview = db_qid('INSERT INTO fud30_msg_store (data) VALUES('. _esc(trim_html($this->body, $message_threshold)) .')'); } q('UPDATE fud30_msg SET file_id='. $file_id .', file_id_preview='. $file_id_preview .' WHERE id='. $this->id); } $thread_opt = (int) ($perm & 4096 && isset($_POST['thr_locked'])); if (!$this->thread_id) { /* New thread. */ if ($perm & 64) { if (isset($_POST['thr_ordertype'], $_POST['thr_orderexpiry']) && (int)$_POST['thr_ordertype']) { $thread_opt |= (int)$_POST['thr_ordertype']; $thr_orderexpiry = (int)$_POST['thr_orderexpiry']; } if (!empty($_POST['thr_always_on_top'])) { $thread_opt |= 8; } } $this->thread_id = th_add($this->id, $forum_id, $this->post_stamp, $thread_opt, (isset($thr_orderexpiry) ? $thr_orderexpiry : 0), 0, 0, 0, $msg_tdescr); q('UPDATE fud30_msg SET thread_id='. $this->thread_id .' WHERE id='. $this->id); } else { th_lock($this->thread_id, $thread_opt & 1); } if ($autoapprove && $forum_opt & 2) { $this->approve($this->id); } return $this->id; } function sync($id, $frm_id, $message_threshold, $perm, $msg_tdescr='') { $this->subject = substr($this->subject, 0, 255); // Subject col is VARCHAR(255). if ($GLOBALS['FUD_OPT_3'] & 32768) { // DB_MESSAGE_STORAGE $file_id = $file_id_preview = $length_preview = 0; $offset = $offset_preview = -1; $length = strlen($this->body); } else { $file_id = write_body($this->body, $length, $offset, $frm_id); /* Determine if preview needs building. */ if ($message_threshold && $message_threshold < strlen($this->body)) { $thres_body = trim_html($this->body, $message_threshold); $file_id_preview = write_body($thres_body, $length_preview, $offset_preview, $frm_id); } else { $file_id_preview = $offset_preview = $length_preview = 0; } } q('UPDATE fud30_msg SET file_id='. $file_id .', foff='. (int)$offset .', length='. (int)$length .', mlist_msg_id='. ssn($this->mlist_msg_id) .', file_id_preview='. $file_id_preview .', offset_preview='. $offset_preview .', length_preview='. $length_preview .', updated_by='. $id .', msg_opt='. $this->msg_opt .', attach_cnt='. (int)$this->attach_cnt .', poll_id='. (int)$this->poll_id .', update_stamp='. __request_timestamp__ .', icon='. ssn($this->icon) .' , poll_cache='. ssn(poll_cache_rebuild($this->poll_id)) .', subject='. ssn($this->subject) .' WHERE id='. $this->id); if ($GLOBALS['FUD_OPT_3'] & 32768) { // DB_MESSAGE_STORAGE //TODO: Why DELETE? Can't we just UPDATE the DB? q('DELETE FROM fud30_msg_store WHERE id IN('. $this->file_id .','. $this->file_id_preview .')'); $file_id = db_qid('INSERT INTO fud30_msg_store (data) VALUES('. _esc($this->body) .')'); if ($message_threshold && $length > $message_threshold) { $file_id_preview = db_qid('INSERT INTO fud30_msg_store (data) VALUES('. _esc(trim_html($this->body, $message_threshold)) .')'); } q('UPDATE fud30_msg SET file_id='. $file_id .', file_id_preview='. $file_id_preview .' WHERE id='. $this->id); } /* Determine wether or not we should deal with locked & sticky stuff * current approach may seem a little redundant, but for (most) users who * do not have access to locking & sticky this eliminated a query. */ $th_data = db_saq('SELECT orderexpiry, thread_opt, root_msg_id, tdescr FROM fud30_thread WHERE id='. $this->thread_id); $locked = (int) isset($_POST['thr_locked']); if (isset($_POST['thr_ordertype'], $_POST['thr_orderexpiry']) || (($th_data[1] ^ $locked) & 1)) { $thread_opt = (int) $th_data[1]; $orderexpiry = isset($_POST['thr_orderexpiry']) ? (int) $_POST['thr_orderexpiry'] : 0; /* Confirm that user has ability to change lock status of the thread. */ if ($perm & 4096) { if ($locked && !($thread_opt & $locked)) { $thread_opt |= 1; } else if (!$locked && $thread_opt & 1) { $thread_opt &= ~1; } } /* Confirm that user has ability to change sticky status of the thread. */ if ($th_data[2] == $this->id && isset($_POST['thr_ordertype'], $_POST['thr_orderexpiry']) && $perm & 64) { if (!$_POST['thr_ordertype'] && $thread_opt > 1) { $orderexpiry = 0; $thread_opt &= ~6; } else if ($thread_opt < 2 && (int) $_POST['thr_ordertype']) { $thread_opt |= $_POST['thr_ordertype']; } else if (!($thread_opt & (int) $_POST['thr_ordertype'])) { $thread_opt = $_POST['thr_ordertype'] | ($thread_opt & 1); } } if ($perm & 64) { if (!empty($_POST['thr_always_on_top'])) { $thread_opt |= 8; } else { $thread_opt &= ~8; } } /* Determine if any work needs to be done. */ if ($thread_opt != $th_data[1] || $orderexpiry != $th_data[0]) { q('UPDATE fud30_thread SET '. ($th_data[2] == $this->id ? 'tdescr='. _esc($msg_tdescr) .',' : '') .' thread_opt='.$thread_opt.', orderexpiry='. $orderexpiry .' WHERE id='. $this->thread_id); /* Avoid rebuilding the forum view whenever possible, since it's a rather slow process. * Only rebuild if expiry time has changed or message gained/lost sticky status. */ $diff = $thread_opt ^ $th_data[1]; if (($diff > 1 && $diff & 14) || $orderexpiry != $th_data[0]) { rebuild_forum_view_ttl($frm_id); } } else if ($msg_tdescr != $th_data[3] && $th_data[2] == $this->id) { q('UPDATE fud30_thread SET tdescr='. _esc($msg_tdescr) .' WHERE id='. $this->thread_id); } } else if ($msg_tdescr != $th_data[3] && $th_data[2] == $this->id) { q('UPDATE fud30_thread SET tdescr='. _esc($msg_tdescr) .' WHERE id='. $this->thread_id); } if ($GLOBALS['FUD_OPT_1'] & 16777216) { // FORUM_SEARCH enabled? If so, reindex message. q('DELETE FROM fud30_index WHERE msg_id='. $this->id); q('DELETE FROM fud30_title_index WHERE msg_id='. $this->id); index_text((!strncasecmp('Re: ', $this->subject, 4) ? '' : $this->subject), $this->body, $this->id); } } /** Delete a message & cleanup. */ static function delete($rebuild_view=1, $mid=0, $th_rm=0) { if (!$mid) { $mid = $this->id; } if (!($del = db_sab('SELECT m.file_id, m.file_id_preview, m.id, m.attach_cnt, m.poll_id, m.thread_id, m.reply_to, m.apr, m.poster_id, t.replies, t.root_msg_id AS root_msg_id, t.last_post_id AS thread_lip, t.forum_id, f.last_post_id AS forum_lip FROM fud30_msg m LEFT JOIN fud30_thread t ON m.thread_id=t.id LEFT JOIN fud30_forum f ON t.forum_id=f.id WHERE m.id='. $mid))) { return; } if (!db_locked()) { db_lock('fud30_msg_store WRITE, fud30_forum f WRITE, fud30_thr_exchange WRITE, fud30_tv_'. $del->forum_id .' WRITE, fud30_tv_'. $del->forum_id .' tv WRITE, fud30_msg m WRITE, fud30_thread t WRITE, fud30_level WRITE, fud30_forum WRITE, fud30_forum_read WRITE, fud30_thread WRITE, fud30_msg WRITE, fud30_attach WRITE, fud30_poll WRITE, fud30_poll_opt WRITE, fud30_poll_opt_track WRITE, fud30_users WRITE, fud30_thread_notify WRITE, fud30_bookmarks WRITE, fud30_msg_report WRITE, fud30_thread_rate_track WRITE, fud30_index WRITE, fud30_title_index WRITE, fud30_search_cache WRITE'); $ll = 1; } q('DELETE FROM fud30_msg WHERE id='. $mid); /* Remove attachments. */ if ($del->attach_cnt) { $res = q('SELECT location FROM fud30_attach WHERE message_id='. $mid .' AND attach_opt=0'); while ($loc = db_rowarr($res)) { @unlink($loc[0]); } unset($res); q('DELETE FROM fud30_attach WHERE message_id='. $mid .' AND attach_opt=0'); } /* Remove message reports. */ q('DELETE FROM fud30_msg_report WHERE msg_id='. $mid); /* Cleanup index entries. */ if ($GLOBALS['FUD_OPT_1'] & 16777216) { // FORUM_SEARCH enabled? q('DELETE FROM fud30_index WHERE msg_id='. $mid); q('DELETE FROM fud30_title_index WHERE msg_id='. $mid); q('DELETE FROM fud30_search_cache WHERE msg_id='. $mid); } /* Remove poll. */ if ($del->poll_id) { poll_delete($del->poll_id); } /* Check if thread. */ if ($del->root_msg_id == $del->id) { $th_rm = 1; /* Delete all messages in the thread if there is more than 1 message. */ if ($del->replies) { $rmsg = q('SELECT id FROM fud30_msg WHERE thread_id='. $del->thread_id .' AND id != '. $del->id); while ($dim = db_rowarr($rmsg)) { fud_msg_edit::delete(0, $dim[0], 1); } unset($rmsg); } q('DELETE FROM fud30_thread_notify WHERE thread_id='. $del->thread_id); q('DELETE FROM fud30_bookmarks WHERE thread_id='. $del->thread_id); q('DELETE FROM fud30_thread WHERE id='. $del->thread_id); q('DELETE FROM fud30_thread_rate_track WHERE thread_id='. $del->thread_id); q('DELETE FROM fud30_thr_exchange WHERE th='. $del->thread_id); if ($del->apr) { /* We need to determine the last post id for the forum, it can be null. */ $lpi = (int) q_singleval(q_limit('SELECT t.last_post_id FROM fud30_thread t INNER JOIN fud30_msg m ON t.last_post_id=m.id AND m.apr=1 WHERE t.forum_id='.$del->forum_id.' AND t.moved_to=0 ORDER BY m.post_stamp DESC', 1)); q('UPDATE fud30_forum SET last_post_id='. $lpi .', thread_count=thread_count-1, post_count=post_count-'. $del->replies .'-1 WHERE id='. $del->forum_id); } } else if (!$th_rm && $del->apr) { q('UPDATE fud30_msg SET reply_to='. $del->reply_to .' WHERE thread_id='. $del->thread_id .' AND reply_to='. $mid); /* Check if the message is the last in thread. */ if ($del->thread_lip == $del->id) { list($lpi, $lpd) = db_saq(q_limit('SELECT id, post_stamp FROM fud30_msg WHERE thread_id='. $del->thread_id .' AND apr=1 ORDER BY post_stamp DESC', 1)); q('UPDATE fud30_thread SET last_post_id='. $lpi .', last_post_date='. $lpd .', replies=replies-1 WHERE id='. $del->thread_id); } else { q('UPDATE fud30_thread SET replies=replies-1 WHERE id='. $del->thread_id); } /* Check if the message is the last in the forum. */ if ($del->forum_lip == $del->id) { $page = q_singleval('SELECT seq FROM fud30_tv_'. $del->forum_id .' WHERE thread_id='. $del->thread_id); $lp = db_saq(q_limit('SELECT t.last_post_id, t.last_post_date FROM fud30_tv_'. $del->forum_id .' tv INNER JOIN fud30_thread t ON tv.thread_id=t.id WHERE tv.seq IN('. $page .','. ($page - 1) .') AND t.moved_to=0 ORDER BY t.last_post_date DESC', 1)); if (!isset($lpd) || $lp[1] > $lpd) { $lpi = $lp[0]; } q('UPDATE fud30_forum SET post_count=post_count-1, last_post_id='. $lpi .' WHERE id='. $del->forum_id); } else { q('UPDATE fud30_forum SET post_count=post_count-1 WHERE id='. $del->forum_id); } } if ($del->apr) { if ($del->poster_id) { user_set_post_count($del->poster_id); } if ($rebuild_view) { if ($th_rm) { th_delete_rebuild($del->forum_id, $del->thread_id); } else if ($del->thread_lip == $del->id) { rebuild_forum_view_ttl($del->forum_id); } } } if (isset($ll)) { db_unlock(); } if ($GLOBALS['FUD_OPT_3'] & 32768) { // DB_MESSAGE_STORAGE q('DELETE FROM fud30_msg_store WHERE id IN('. $del->file_id .','. $del->file_id_preview .')'); } if (!$del->apr || !$th_rm || ($del->root_msg_id != $del->id)) { return; } /* Needed for moved thread pointers. */ $r = q('SELECT forum_id, id FROM fud30_thread WHERE root_msg_id='. $del->root_msg_id); while (($res = db_rowarr($r))) { q('DELETE FROM fud30_thread WHERE id='. $res[1]); q('UPDATE fud30_forum SET thread_count=thread_count-1 WHERE id='. $res[0]); th_delete_rebuild($res[0], $res[1]); } unset($r); } static function approve($id) { /* Fetch info about the message, poll (if one exists), thread & forum. */ $mtf = db_sab('SELECT /* USE MASTER */ m.id, m.poster_id, m.apr, m.subject, m.foff, m.length, m.file_id, m.thread_id, m.poll_id, m.attach_cnt, m.post_stamp, m.reply_to, m.mlist_msg_id, m.msg_opt, t.forum_id, t.last_post_id, t.root_msg_id, t.last_post_date, t.thread_opt, m2.post_stamp AS frm_last_post_date, f.name AS frm_name, f.forum_opt, u.alias, u.email, u.sig, u.name as real_name, n.id AS nntp_id, ml.id AS mlist_id FROM fud30_msg m INNER JOIN fud30_thread t ON m.thread_id=t.id INNER JOIN fud30_forum f ON t.forum_id=f.id LEFT JOIN fud30_msg m2 ON f.last_post_id=m2.id LEFT JOIN fud30_users u ON m.poster_id=u.id LEFT JOIN fud30_mlist ml ON ml.forum_id=f.id AND '. q_bitand('ml.mlist_opt', 2) .' > 0 LEFT JOIN fud30_nntp n ON n.forum_id=f.id AND '. q_bitand('n.nntp_opt', 2) .' > 0 WHERE m.id='. $id .' AND m.apr=0'); /* Nothing to do or bad message id. */ if (!$mtf) { return; } if ($mtf->alias) { $mtf->alias = reverse_fmt($mtf->alias); } else { $mtf->alias = $GLOBALS['ANON_NICK']; } q('UPDATE fud30_msg SET apr=1 WHERE id='.$mtf->id); if ($mtf->poster_id) { user_set_post_count($mtf->poster_id); } if ($mtf->post_stamp > $mtf->frm_last_post_date) { $mtf->last_post_id = $mtf->id; } if ($mtf->root_msg_id == $mtf->id) { /* New thread. */ th_new_rebuild($mtf->forum_id, $mtf->thread_id, $mtf->thread_opt & (2|4|8)); $threads = 1; } else { /* Reply to thread. */ if ($mtf->post_stamp > $mtf->last_post_date) { th_inc_post_count($mtf->thread_id, 1, $mtf->id, $mtf->post_stamp); } else { th_inc_post_count($mtf->thread_id, 1); } th_reply_rebuild($mtf->forum_id, $mtf->thread_id, $mtf->thread_opt & (2|4|8)); $threads = 0; } /* Update forum thread & post count as well as last_post_id field. */ q('UPDATE fud30_forum SET post_count=post_count+1, thread_count=thread_count+'. $threads .', last_post_id='. $mtf->last_post_id .' WHERE id='. $mtf->forum_id); if ($mtf->poll_id) { poll_activate($mtf->poll_id, $mtf->forum_id); } $mtf->body = read_msg_body($mtf->foff, $mtf->length, $mtf->file_id); if ($GLOBALS['FUD_OPT_1'] & 16777216) { // FORUM_SEARCH enabled? index_text((strncasecmp($mtf->subject, 'Re: ', 4) ? $mtf->subject : ''), $mtf->body, $mtf->id); } /* Handle notifications. */ if (!($GLOBALS['FUD_OPT_3'] & 1048576)) { // not DISABLE_NOTIFICATION_EMAIL if ($mtf->root_msg_id == $mtf->id || $GLOBALS['FUD_OPT_3'] & 16384) { // FORUM_NOTIFY_ALL if (empty($mtf->frm_last_post_date)) { $mtf->frm_last_post_date = 0; } /* Send new thread notifications to forum subscribers. */ $to = db_all('SELECT u.email FROM fud30_forum_notify fn INNER JOIN fud30_users u ON fn.user_id=u.id AND '. q_bitand('u.users_opt', 134217728) .' = 0 INNER JOIN fud30_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id='. $mtf->forum_id . ($GLOBALS['FUD_OPT_3'] & 64 ? ' LEFT JOIN fud30_forum_read r ON r.forum_id=fn.forum_id AND r.user_id=fn.user_id ' : ''). ' LEFT JOIN fud30_group_cache g2 ON g2.user_id=fn.user_id AND g2.resource_id='. $mtf->forum_id . ' LEFT JOIN fud30_mod mm ON mm.forum_id='. $mtf->forum_id .' AND mm.user_id=u.id WHERE fn.forum_id='. $mtf->forum_id .' AND fn.user_id!='. (int)$mtf->poster_id . ($GLOBALS['FUD_OPT_3'] & 64 ? ' AND (CASE WHEN (r.last_view IS NULL AND (u.last_read=0 OR u.last_read >= '. $mtf->frm_last_post_date .')) OR r.last_view > '. $mtf->frm_last_post_date .' THEN 1 ELSE 0 END)=1 ' : ''). ' AND ('. q_bitand('COALESCE(g2.group_cache_opt, g1.group_cache_opt)', 2) .' > 0 OR '. q_bitand('u.users_opt', 1048576) .' > 0 OR mm.id IS NOT NULL)'. ' AND '. q_bitand('u.users_opt', 65536) .' = 0'); if ($GLOBALS['FUD_OPT_3'] & 16384) { $notify_type = 'thr'; } else { $notify_type = 'frm'; } } else { $to = array(); } if ($mtf->root_msg_id != $mtf->id) { /* Send new reply notifications to thread subscribers. */ $tmp = db_all('SELECT u.email FROM fud30_thread_notify tn INNER JOIN fud30_users u ON tn.user_id=u.id AND '. q_bitand('u.users_opt', 134217728) .' = 0 INNER JOIN fud30_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id='. $mtf->forum_id . ($GLOBALS['FUD_OPT_3'] & 64 ? ' LEFT JOIN fud30_read r ON r.thread_id=tn.thread_id AND r.user_id=tn.user_id ' : ''). ' LEFT JOIN fud30_group_cache g2 ON g2.user_id=tn.user_id AND g2.resource_id='. $mtf->forum_id . ' LEFT JOIN fud30_mod mm ON mm.forum_id='. $mtf->forum_id .' AND mm.user_id=u.id WHERE tn.thread_id='. $mtf->thread_id .' AND tn.user_id!='. (int)$mtf->poster_id . ($GLOBALS['FUD_OPT_3'] & 64 ? ' AND (r.msg_id='. $mtf->last_post_id .' OR (r.msg_id IS NULL AND '. $mtf->post_stamp .' > u.last_read)) ' : ''). ' AND ('. q_bitand('COALESCE(g2.group_cache_opt, g1.group_cache_opt)', 2) .' > 0 OR '. q_bitand('u.users_opt', 1048576) .' > 0 OR mm.id IS NOT NULL)'. ' AND '. q_bitand('u.users_opt', 65536) .' = 0'); $to = !$to ? $tmp : array_unique(array_merge($to, $tmp)); $notify_type = 'thr'; } if ($mtf->forum_opt & 64) { // always_notify_mods $tmp = db_all('SELECT u.email FROM fud30_mod mm INNER JOIN fud30_users u ON u.id=mm.user_id WHERE mm.forum_id='. $mtf->forum_id); $to = !$to ? $tmp : array_unique(array_merge($to, $tmp)); } if ($to) { send_notifications($to, $mtf->id, $mtf->subject, $mtf->alias, $notify_type, ($notify_type == 'thr' ? $mtf->thread_id : $mtf->forum_id), $mtf->frm_name, $mtf->forum_id); } } // Handle Mailing List and/or Newsgroup syncronization. if (($mtf->nntp_id || $mtf->mlist_id) && !$mtf->mlist_msg_id) { fud_use('email_msg_format.inc', 1); $from = $mtf->poster_id ? reverse_fmt($mtf->real_name) .' <'. $mtf->email .'>' : $GLOBALS['ANON_NICK'] .' <'. $GLOBALS['NOTIFY_FROM'] .'>'; $body = $mtf->body . (($mtf->msg_opt & 1 && $mtf->sig) ? "\n-- \n" . $mtf->sig : ''); $body = plain_text($body, '', '
    ', '
    '); $mtf->subject = reverse_fmt($mtf->subject); if ($mtf->reply_to) { // Get the parent message's Message-ID: if ( !($replyto_id = q_singleval('SELECT mlist_msg_id FROM fud30_msg WHERE id='. $mtf->reply_to))) { fud_logerror('WARNING: Send reply with no Message-ID. The import script is not running or may be lagging.', 'fud_errors'); } } else { $replyto_id = 0; } if ($mtf->attach_cnt) { $r = uq('SELECT a.id, a.original_name, COALESCE(m.mime_hdr, \'application/octet-stream\') FROM fud30_attach a LEFT JOIN fud30_mime m ON a.mime_type=m.id WHERE a.message_id='. $mtf->id .' AND a.attach_opt=0'); while ($ent = db_rowarr($r)) { $attach[$ent[1]] = file_get_contents($GLOBALS['FILE_STORE'] . $ent[0] .'.atch'); $attach_mime[$ent[1]] = $ent[2]; } unset($r); } else { $attach_mime = $attach = null; } if ($mtf->nntp_id) { // Push out to usenet group. fud_use('nntp.inc', true); $nntp_adm = db_sab('SELECT * FROM fud30_nntp WHERE id='. $mtf->nntp_id); if (!empty($nntp_adm->custom_sig)) { // Add signature marker. $nntp_adm->custom_sig = "\n-- \n". $nntp_adm->custom_sig; } $nntp = new fud_nntp; $nntp->server = $nntp_adm->server; $nntp->newsgroup = $nntp_adm->newsgroup; $nntp->port = $nntp_adm->port; $nntp->timeout = $nntp_adm->timeout; $nntp->nntp_opt = $nntp_adm->nntp_opt; $nntp->user = $nntp_adm->login; $nntp->pass = $nntp_adm->pass; define('sql_p', 'fud30_'); $lock = $nntp->get_lock(); $nntp->post_message($mtf->subject, $body . $nntp_adm->custom_sig, $from, $mtf->id, $replyto_id, $attach, $attach_mime); $nntp->close_connection(); $nntp->release_lock($lock); } else { // Push out to mailing list. fud_use('mlist_post.inc', true); $r = db_saq('SELECT name, additional_headers, custom_sig, fixed_from_address FROM fud30_mlist WHERE id='. $mtf->mlist_id); // Add forum's signature to the messages. if (!empty($r[2])) { $body .= "\n-- \n". $r[2]; } if (!empty($r[3])) { // Use the forum's fixed "From:" address. mail_list_post($r[0], $r[3], $mtf->subject, $body, $mtf->id, $replyto_id, $attach, $attach_mime, $r[1]); } else { // Use poster's e-mail as the "From" address. mail_list_post($r[0], $from, $mtf->subject, $body, $mtf->id, $replyto_id, $attach, $attach_mime, $r[1]); } } } // Message Approved plugins. if (defined('plugins')) { plugin_call_hook('POST_APPROVE', $mtf); } } } function write_body($data, &$len, &$offset, $fid) { $MAX_FILE_SIZE = 2140000000; $len = strlen($data); $i = 1; db_lock('fud30_fl_'. $fid .' WRITE'); $s = $fid * 10000; $e = $s + 100; while ($s < $e) { $fp = fopen($GLOBALS['MSG_STORE_DIR'] .'msg_'. $s, 'ab'); if (!$fp) { exit('FATAL ERROR: could not open message store for forum id#'. $s ."
    \n"); } fseek($fp, 0, SEEK_END); if (!($off = ftell($fp))) { $off = __ffilesize($fp); } if (!$off || ($off + $len) < $MAX_FILE_SIZE) { break; } fclose($fp); $s++; } if (fwrite($fp, $data) !== $len) { if ($fid) { db_unlock(); } exit("FATAL ERROR: system has ran out of disk space.
    \n"); } fclose($fp); db_unlock(); if (!$off) { @chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0644)); } $offset = $off; return $s; } function trim_html($str, $maxlen) { $n = strlen($str); $ln = 0; $tree = array(); for ($i = 0; $i < $n; $i++) { if ($str[$i] != '<') { $ln++; if ($ln > $maxlen) { break; } continue; } if (($p = strpos($str, '>', $i)) === false) { break; } for ($k = $i; $k < $p; $k++) { switch ($str[$k]) { case ' ': case "\r": case "\n": case "\t": case '>': break 2; } } if ($str[$i+1] == '/') { $tagname = strtolower(substr($str, $i+2, $k-$i-2)); if (@end($tagindex[$tagname])) { $k = key($tagindex[$tagname]); unset($tagindex[$tagname][$k], $tree[$k]); } } else { $tagname = strtolower(substr($str, $i+1, $k-$i-1)); switch ($tagname) { case 'br': case 'img': case 'meta': break; default: $tree[] = $tagname; end($tree); $tagindex[$tagname][key($tree)] = 1; } } $i = $p; } $data = substr($str, 0, $i); if ($tree) { foreach (array_reverse($tree) as $v) { $data .= ''; } } return $data; } function make_email_message(&$body, &$obj, $iemail_unsub) { $TITLE_EXTRA = $iemail_poll = $iemail_attach = ''; if ($obj->poll_cache) { $pl = unserialize($obj->poll_cache); if (!empty($pl)) { foreach ($pl as $k => $v) { $length = ($v[1] && $obj->total_votes) ? round($v[1] / $obj->total_votes * 100) : 0; $iemail_poll .= ' '.$k.'. '.$v[0].' '.$v[1].' / '.$length.'% '; } $iemail_poll = ' '.$iemail_poll.'
    '.$obj->poll_name.' [ '.$obj->total_votes.' '.convertPlural($obj->total_votes, array('vote','votes')).' ]


    '; } } if ($obj->attach_cnt && $obj->attach_cache) { $atch = unserialize($obj->attach_cache); if (!empty($atch)) { foreach ($atch as $v) { $sz = $v[2] / 1024; $sz = $sz < 1000 ? number_format($sz, 2) .'KB' : number_format($sz/1024, 2) .'MB'; $iemail_attach .= ' Attachment: '.$v[1].'
    (Size: '.$sz.', Downloaded '.convertPlural($v[3], array(''.$v[3].' time',''.$v[3].' times')).') '; } $iemail_attach = '

    '.$iemail_attach.'
    '; } } if ($GLOBALS['FUD_OPT_2'] & 32768 && defined('_rsid')) { $pfx = str_repeat('/', substr_count(_rsid, '/')); } // Remove all JavaScript. Spam filters like SpamAssassin don't like them. return preg_replace('#]*>.*?#is', '', ' '.$GLOBALS['FORUM_TITLE'].$TITLE_EXTRA.'
    Subject: '.$obj->subject.' Author: '.$obj->alias.' Date: '.print_date('%a, %d %B %Y %H:%M', $obj->post_stamp).'
    '.$iemail_poll.' '.$body.' '.$iemail_attach.'
    [ Reply ][ Quote ][ View Topic/Message ]'.$iemail_unsub.'
    '); } function poll_cache_rebuild($poll_id) { if (!$poll_id) { return; } $data = array(); $c = uq('SELECT id, name, votes FROM fud30_poll_opt WHERE poll_id='. $poll_id); while ($r = db_rowarr($c)) { $data[$r[0]] = array($r[1], $r[2]); } unset($c); if ($data) { return serialize($data); } else { return; } } function send_notifications($to, $msg_id, $thr_subject, $poster_login, $id_type, $id, $frm_name, $frm_id) { if (!$to) { return; } $goto_url['email'] = ''.$GLOBALS['WWW_ROOT'].'?t=rview&goto='. $msg_id .'#msg_'. $msg_id; $CHARSET = $GLOBALS['CHARSET']; if ($GLOBALS['FUD_OPT_2'] & 64) { // NOTIFY_WITH_BODY $munge_newlines = 0; $obj = db_sab('SELECT p.total_votes, p.name AS poll_name, m.reply_to, m.subject, m.id, m.post_stamp, m.poster_id, m.foff, m.length, m.file_id, u.alias, m.attach_cnt, m.attach_cache, m.poll_cache FROM fud30_msg m LEFT JOIN fud30_users u ON m.poster_id=u.id LEFT JOIN fud30_poll p ON m.poll_id=p.id WHERE m.id='. $msg_id .' AND m.apr=1'); if (!$obj->alias) { /* anon user */ $obj->alias = htmlspecialchars($GLOBALS['ANON_NICK']); } $headers = "MIME-Version: 1.0\r\n"; if ($obj->reply_to) { $headers .= 'In-Reply-To: '. $obj->reply_to ."\r\n"; } $headers .= 'List-Id: '. $frm_id .'.'. (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost') ."\r\n"; $split = get_random_value(128); $headers .= "Content-Type: multipart/alternative;\n boundary=\"------------". $split ."\"\r\n"; $boundry = "\r\n--------------". $split ."\r\n"; $pfx = ''; if ($GLOBALS['FUD_OPT_2'] & 32768 && !empty($_SERVER['PATH_INFO'])) { if ($GLOBALS['FUD_OPT_1'] & 128) { $pfx .= '0/'; } if ($GLOBALS['FUD_OPT_2'] & 8192) { $pfx .= '0/'; } } $plain_text = read_msg_body($obj->foff, $obj->length, $obj->file_id); $iemail_unsub = html_entity_decode($id_type == 'thr' ? '[ Unsubscribe from this topic ]' : '[ Unsubscribe from this forum ]'); $body_email = $boundry .'Content-Type: text/plain; charset='. $CHARSET ."; format=flowed\r\nContent-Transfer-Encoding: 8bit\r\n\r\n" . html_entity_decode(strip_tags($plain_text)) . "\r\n\r\n" . html_entity_decode('To participate in the discussion, go here:') .' '. ''.$GLOBALS['WWW_ROOT'].'?t=rview&'. ($id_type == 'thr' ? 'th' : 'frm_id') .'='. $id ."\r\n". $boundry .'Content-Type: text/html; charset='. $CHARSET ."\r\nContent-Transfer-Encoding: 8bit\r\n\r\n". make_email_message($plain_text, $obj, $iemail_unsub) ."\r\n". substr($boundry, 0, -2) ."--\r\n"; } else { $munge_newlines = 1; $headers = ''; } $thr_subject = reverse_fmt($thr_subject); $poster_login = reverse_fmt($poster_login); if ($id_type == 'thr') { $subj = html_entity_decode('New reply to '.$thr_subject.' by '.$poster_login.''); if (!isset($body_email)) { $unsub_url['email'] = ''.$GLOBALS['WWW_ROOT'].'?t=rview&th='. $id .'¬ify=1&opt=off'; $body_email = html_entity_decode('To view unread replies go to '.$goto_url['email'].'\n\nIf you do not wish to receive further notifications about replies in this topic, please go here: '.$unsub_url['email'].''); } } else if ($id_type == 'frm') { $frm_name = reverse_fmt($frm_name); $subj = html_entity_decode('New topic in forum '.$frm_name.', called '.$thr_subject.', by '.$poster_login.''); if (!isset($body_email)) { $unsub_url['email'] = ''.$GLOBALS['WWW_ROOT'].'?t=rview&unsub=1&frm_id='. $id; $body_email = html_entity_decode('To view the topic go to:\n'.$goto_url['email'].'\n\nTo stop receiving notifications about new topics in this forum, please go here: '.$unsub_url['email'].''); } } send_email($GLOBALS['NOTIFY_FROM'], $to, $subj, $body_email, $headers, $munge_newlines); } ?> th_nav.inc000064400000004553152346206440006533 0ustar00 Previous Topic: '.$r[1].' '; } else { if ($r[3]) { /* Moved topic, let's try to find another, */ $nn = 1; continue; } $next = ' Next Topic: '.$r[1].' '; } } unset($c); if ($np) { $r = db_saq(q_limit('SELECT m.id, m.subject FROM fud30_tv_'. $frm_id .' tv INNER JOIN fud30_thread t ON tv.thread_id=t.id INNER JOIN fud30_msg m ON t.root_msg_id=m.id WHERE tv.seq IN('. ($id - 10) .', '. ($id - 2) .') ORDER BY tv.seq ASC', 1)); $prev = ' Previous Topic: '.$r[1].' '; } if ($nn) { $r = db_saq(q_limit('SELECT m.id, m.subject FROM fud30_tv_'. $frm_id .' tv INNER JOIN fud30_thread t ON tv.thread_id=t.id INNER JOIN fud30_msg m ON t.root_msg_id=m.id WHERE tv.seq IN('. ($id + 2) .', '. ($id + 10) .') ORDER BY tv.seq DESC', 1)); $next = ' Next Topic: '.$r[1].' '; } } ?>drawpmsg.inc000064400000023017152346206440007074 0ustar00users_opt; $b =& $usr->users_opt; if (!$mini) { $custom_tag = $obj->custom_status ? '
    '.$obj->custom_status.'' : ''; $c = (int) $obj->level_opt; if ($obj->avatar_loc && $a & 8388608 && $b & 8192 && $o1 & 28 && !($c & 2)) { if (!($c & 1)) { $level_name =& $obj->level_name; $level_image = $obj->level_img ? ' ' : ''; } else { $level_name = $level_image = ''; } } else { $level_image = $obj->level_img ? ' ' : ''; $obj->avatar_loc = ''; $level_name =& $obj->level_name; } $avatar = ($obj->avatar_loc || $level_image) ? ''.$obj->avatar_loc.$level_image.'' : ''; $dmsg_tags = ($custom_tag || $level_name) ? '
    '.$level_name.$custom_tag.'
    ' : ''; if (($o2 & 32 && !($a & 32768)) || $b & 1048576) { $obj->login = $obj->alias; $online_indicator = (($obj->last_visit + $GLOBALS['LOGEDIN_TIMEOUT'] * 60) > __request_timestamp__) ? ''.$obj->login.' is currently online' : ''.$obj->login.' is currently offline'; } else { $online_indicator = ''; } if ($obj->location) { if (strlen($obj->location) > $GLOBALS['MAX_LOCATION_SHOW']) { $location = substr($obj->location, 0, $GLOBALS['MAX_LOCATION_SHOW']) .'...'; } else { $location = $obj->location; } $location = '
    Location: '.$location; } else { $location = ''; } $usr->buddy_list = $usr->buddy_list ? unserialize($usr->buddy_list) : array(); if ($obj->user_id != _uid && $obj->user_id > 0) { $buddy_link = !isset($usr->buddy_list[$obj->user_id]) ? 'add to buddy list
    ' : '
    [remove from buddy list]'; } else { $buddy_link = ''; } /* Show im buttons if need be. */ if ($b & 16384) { $im = ''; if ($obj->icq) { $im .= ' '; } if ($obj->facebook) { $im .= ' '; } if ($obj->yahoo) { $im .= ' '; } if ($obj->jabber) { $im .= ''; } if ($obj->google) { $im .= ''; } if ($obj->skype) { $im .= ''; } if ($obj->twitter) { $im .= ''; } if ($im) { $dmsg_im_row = ''.$im.'
    '; } else { $dmsg_im_row = ''; } } else { $dmsg_im_row = ''; } if ($obj->ouser_id != _uid) { $user_profile = ''; $email_link = ($o1 & 4194304 && $a & 16) ? '' : ''; $private_msg_link = ''; } else { $user_profile = $email_link = $private_msg_link = ''; } $msg_toolbar = ''; } else { $dmsg_tags = $dmsg_im_row = $user_profile = $msg_toolbar = $buddy_link = $avatar = $online_indicator = $host_name = $location = ''; } if ($obj->length > 0) { $msg_body = read_pmsg_body($obj->foff, $obj->length); } else { $msg_body = 'No Message Body'; } $msg_body = $obj->length ? read_pmsg_body($obj->foff, $obj->length) : 'No Message Body'; $file_attachments = ''; if ($obj->attach_cnt) { $c = uq('SELECT a.id, a.original_name, a.dlcount, m.icon, a.fsize FROM fud30_attach a LEFT JOIN fud30_mime m ON a.mime_type=m.id WHERE a.message_id='. $obj->id .' AND attach_opt=1'); while ($r = db_rowobj($c)) { $sz = $r->fsize/1024; $sz = $sz<1000 ? number_format($sz, 2) .'KB' : number_format($sz / 1024 ,2) .'MB'; if(!$r->icon) { $r->icon = 'unknown.gif'; } $file_attachments .= '
  • Attachment: '.$r->original_name.'
    (Size: '.$sz.', Downloaded '.convertPlural($r->dlcount, array(''.$r->dlcount.' time',''.$r->dlcount.' times')).')
  • '; } unset($c); if ($file_attachments) { $file_attachments = '
      '.$file_attachments.'
    '; /* Append session to getfile. */ if ($o1 & 128 && !isset($_COOKIE[$GLOBALS['COOKIE_NAME']])) { $msg_body = str_replace(' '.$msg_toolbar.'
    '.(!$mini && $obj->icon ? '  ' : '' ) .''.$obj->subject.' '.print_date('%a, %d %B %Y %H:%M', $obj->post_stamp).'
    '.$avatar.'
    '.$online_indicator.(!$mini ? ''.htmlspecialchars($obj->alias, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, null, false).'' : ''.htmlspecialchars($obj->alias, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, null, false).'' ) .(!$mini ? '
    Messages: '.$obj->posted_msg_count.'
    Registered: '.print_date('%B %Y', $obj->join_date).' '.$location.'' : '' ) .'
    '.$dmsg_tags.' '.$buddy_link.$dmsg_im_row.(!$mini && $obj->host_name && $o1 & 268435456 ? 'From: '.$obj->host_name.'
    ' : '' ) .'
    '.$msg_body.' '.$file_attachments.' '.(($obj->sig && $o1 & 32768 && $obj->pmsg_opt & 1 && $b & 4096) ? '

    '.$obj->sig.'
    ' : '' ) .'
    '.$GLOBALS['dpmsg_prev_message'].' '.$GLOBALS['dpmsg_next_message'].'
    '; } ?> cookies.inc000064400000020603152346206440006702 0ustar00 '. (__request_timestamp__ - $GLOBALS['SESSION_TIMEOUT']); } else { /* Unknown user, maybe a bot? */ // Auto login authorized bots. // To test: wget --user-agent="Googlebot 1.2" http://127.0.0.1:8080/forum $spider_session = 0; $my_ip = get_ip(); include $GLOBALS['FORUM_SETTINGS_PATH'] .'spider_cache'; foreach ($spider_cache as $spider_id => $spider) { if (preg_match('/'. $spider['useragent'] .'/i', $HTTP_USER_AGENT)) { if (empty($spider['bot_ip'])) { $spider_session = 1; // Agent matched, no IPs to check. break; } else { foreach (explode(',', $spider['bot_ip']) as $bot_ip) { if (!($bot_ip = trim($bot_ip))) { continue; } if (strpos($bot_ip, $my_ip) === 0) { $spider_session = 1; // Agent and an IP matched. break 2; } } } } } if ($spider_session) { if ($spider['bot_opts'] & 2) { // Access blocked. header('HTTP/1.1 403 Forbidden', true, 403); echo 'Go away!'; exit; } if ($id = db_li('INSERT INTO fud30_ses (ses_id, time_sec, sys_id, ip_addr, useragent, user_id) VALUES (\''. $spider['botname'] .'\', '. __request_timestamp__ .', '. _esc(ses_make_sysid()) .', '. _esc($my_ip) .', '. _esc(substr($HTTP_USER_AGENT, 0, 64)) .', '. $spider['user_id'] .')', $ef, 1)) { $q_opt = 's.id='. $id; } else { $q_opt = 's.ses_id='. _esc($spider['botname']); } $GLOBALS['FUD_OPT_1'] ^= 128; // Disable URL sessions for user. } else { /* NeXuS: What is this? Return if user unknown? Function should return only after the query is run. */ //return; // Check sys_id, ip_addr and useragent for a possible match $q_opt = 's.sys_id= '._esc(ses_make_sysid()). ' AND s.ip_addr='._esc(get_ip()). ' AND s.useragent='._esc(substr($HTTP_USER_AGENT, 0, 64)); } } /* ENABLE_REFERRER_CHECK */ if ($GLOBALS['FUD_OPT_3'] & 4 && strncmp($HTTP_REFERER, $GLOBALS['WWW_ROOT'], strlen($GLOBALS['WWW_ROOT']))) { /* More checks, we need those because some proxies mangle referer field. */ $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; /* $p > 8 https:// or http:// */ if (($p = strpos($HTTP_REFERER, $host)) === false || $p > 8) { $q_opt .= ' AND s.user_id > 2000000000 '; // Different referrer, force anonymous. } } } else { $q_opt = 's.id='. $id; } $u = db_sab('SELECT s.id AS sid, s.ses_id, s.data, s.returnto, s.sys_id, t.id AS theme_id, t.lang, t.name AS theme_name, t.locale, t.theme, t.pspell_lang, t.theme_opt, u.alias, u.posts_ppg, u.time_zone, u.sig, u.last_visit, u.last_read, u.cat_collapse_status, u.users_opt, u.posted_msg_count, u.topics_per_page, u.ignore_list, u.buddy_list, u.id, u.group_leader_list, u.email, u.login, u.sq, u.ban_expiry, u.ban_reason, u.flag_cc FROM fud30_ses s INNER JOIN fud30_users u ON u.id=(CASE WHEN s.user_id>2000000000 THEN 1 ELSE s.user_id END) LEFT OUTER JOIN fud30_themes t ON t.id=u.theme WHERE '. $q_opt); /* Anon user, no session or login. */ if (!$u || $u->id == 1 || $id) { return $u; } if ($u->sys_id == ses_make_sysid()) { return $u; } else if ($GLOBALS['FUD_OPT_3'] & 16 || isset($url_session)) { /* URL sessions must validate sys_id check and SESSION_IP_CHECK must be disabled */ return; } /* Try doing a strict SQ match in last-ditch effort to make things 'work'. */ if (isset($_POST['SQ']) && $_POST['SQ'] == $u->sq) { return $u; } return; } /** Create an anonymous session. */ function ses_anon_make() { $HTTP_USER_AGENT = substr($_SERVER['HTTP_USER_AGENT'] ?? '', 0, 64); // Prevent forum scraping and brute force attacks. if ($GLOBALS['MAX_CALLS_FROM_IP'] > 0) { $ip_count = q_singleval('SELECT count(ip_addr) FROM fud30_ses WHERE ip_addr = '. _esc(get_ip())); if ($ip_count > $GLOBALS['MAX_CALLS_FROM_IP']) { header('HTTP/1.1 429 Too Many Requests', true, 429); echo 'Too Many Requests'; exit; } } do { $uid = 2000000000 + mt_rand(1, 147483647); $ses_id = md5($uid . __request_timestamp__ . getmypid()); } while (!($id = db_li('INSERT INTO fud30_ses (ses_id, time_sec, sys_id, ip_addr, useragent, user_id) VALUES (\''. $ses_id .'\', '. __request_timestamp__ .', '. _esc(ses_make_sysid()) .', '. _esc(get_ip()) .', '. _esc($HTTP_USER_AGENT) .', '. $uid .')', $ef, 1))); /* When we have an anon user, we set a special cookie allowing us to see who referred this user. */ if (isset($_GET['rid']) && !isset($_COOKIE['frm_referer_id']) && $GLOBALS['FUD_OPT_2'] & 8192) { setcookie($GLOBALS['COOKIE_NAME'] .'_referer_id', $_GET['rid'], __request_timestamp__+31536000, $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']); } if ($GLOBALS['FUD_OPT_3'] & 1) { // SESSION_COOKIES setcookie($GLOBALS['COOKIE_NAME'], $ses_id, 0, $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']); } else { setcookie($GLOBALS['COOKIE_NAME'], $ses_id, __request_timestamp__+$GLOBALS['COOKIE_TIMEOUT'], $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']); } return ses_get($id); } /** Update session status to indicate last known action. */ function ses_update_status($ses_id, $action=null, $forum_id=0, $ret='') { if (empty($ses_id)) { header('HTTP/1.1 400 Bad Request', true, 400); echo 'FATAL ERROR: No session, check your forum\'s URL and COOKIE settings.'; exit; } if (strlen($_SERVER['QUERY_STRING'] ?? '') > 255) { // Query string exceeds 'returnto' column length. header('HTTP/1.1 414 URI Too Long', true, 414); echo 'FATAL ERROR: QUERY_STRING too long!'; exit; } $sys_id = ses_make_sysid(); q('UPDATE fud30_ses SET sys_id=\''. $sys_id .'\', forum_id='. (int)$forum_id .', time_sec='. __request_timestamp__ .', action='. ($action ? _esc($action) : 'NULL') .', returnto='. (!is_int($ret) ? (isset($_SERVER['QUERY_STRING']) ? _esc($_SERVER['QUERY_STRING']) : 'NULL') : 'returnto') .' WHERE id='. $ses_id); } /** Save or clear a session variable. */ function ses_putvar($ses_id, $data) { $cond = is_int($ses_id) ? 'id='. (int)$ses_id : 'ses_id=\''. $ses_id .'\''; if (empty($data)) { q('UPDATE fud30_ses SET data=NULL WHERE '. $cond); } else { q('UPDATE fud30_ses SET data='. _esc(serialize($data)) .' WHERE '. $cond); } } /** Destroy a session. */ function ses_delete($ses_id) { // Delete all forum sessions. // Regardless of MULTI_HOST_LOGIN, all sessions will be terminated. q('DELETE FROM fud30_ses WHERE id='. (int)$ses_id); setcookie($GLOBALS['COOKIE_NAME'], '', __request_timestamp__-100000, $GLOBALS['COOKIE_PATH'], $GLOBALS['COOKIE_DOMAIN']); return 1; } function ses_anonuser_auth($id, $error) { if (!empty($_POST)) { $_SERVER['QUERY_STRING'] = ''; } q('UPDATE fud30_ses SET data='. _esc(serialize($error)) .', returnto='. ssn($_SERVER['QUERY_STRING']) .' WHERE id='. $id); if ($GLOBALS['FUD_OPT_2'] & 32768) { // USE_PATH_INFO header('Location: [[relativeurl]]/index.php/l/'. _rsidl); } else { header('Location: [[relativeurl]]/index.php?t=login&'. _rsidl); } exit; } ?> settings_theme.php000064400000016366152347514360010325 0ustar00

    '.$l['title_settings'].'


    '; error_handle($error, '100%'); if(!empty($done)){ echo '
      '.$done['msg'].'
    '; } echo'
    '.$l['choose_lang_exp'].'
    '.$l['timezone_exp'].'



    '; echo ' '; softfooter(); } new_ai_site_theme.php000064400000064362152347514360010752 0ustar00user['plan_active']) && !empty($nupanel->user['plan']['newsites']) && $nupanel->user['plan']['newsites'] <= count($user['ins']) ){ echo '

      '.$l['title_new_site'].'


      '.$l['max_site_err'].'

    '.$l['return_all_site'].'
    '; return false; } $steps = array( 'start' => $l['nav_start'], 'contact' => $l['nav_contact'], 'features' => $l['nav_features'], 'images' => $l['nav_images'], 'import_theme' => $l['nav_import'], ); // Option table values $setup_info = softaculous_pro_get_option_setup_info(); // r_print($setup_info); $setup_info = empty($setup_info) ? [] : $setup_info; $business_type = !empty($setup_info['business_type']) ? $setup_info['business_type'] : ''; $business_descriptions = isset($setup_info['business_description']) && is_array($setup_info['business_description']) ? $setup_info['business_description'] : ['']; $active_desc_index = isset($setup_info['active_desc']) ? $setup_info['active_desc'] : 0; $total_descriptions = count($business_descriptions); $selected_images = !empty($setup_info) && !empty($setup_info['selected_images']) ? $setup_info['selected_images'] : []; $selected_images_count = !empty($setup_info) && !empty($setup_info['selected_images']) ? count($selected_images) : 0; $suggested_tags = !empty($setup_info) && !empty($setup_info['image_suggestions']) ? $setup_info['image_suggestions'] : (!empty($business_type) ? [$business_type] : ''); $template_mode = !empty($setup_info['mode']) ? $setup_info['mode']: 'manual'; $business_lang = !empty($setup_info) && !empty($setup_info['business_lang']) ? $setup_info['business_lang'] : ''; $active_step = isset($_GET['step']) && array_key_exists($_GET['step'], $steps) ? $_GET['step'] : 'start'; $business_email = !empty($setup_info['business_email']) ? $setup_info['business_email'] : ''; $business_phone = !empty($setup_info['business_phone']) ? $setup_info['business_phone'] : ''; $business_address = !empty($setup_info['business_address']) ? $setup_info['business_address'] : ''; // Social accounts $social_facebook = !empty($setup_info['business_social_facebook']) ? $setup_info['business_social_facebook'] : ''; $social_twitter = !empty($setup_info['business_social_twitter']) ? $setup_info['business_social_twitter'] : ''; $social_instagram = !empty($setup_info['business_social_instagram']) ? $setup_info['business_social_instagram'] : ''; $social_linkedin = !empty($setup_info['business_social_linkedin']) ? $setup_info['business_social_linkedin'] : ''; $social_youtube = !empty($setup_info['business_social_youtube']) ? $setup_info['business_social_youtube'] : ''; if (empty($business_descriptions)) { $active_step = 'start'; } $softaculous_pro['templates'] = softaculous_pro_get_templates_list(); echo ' '; if(!empty($softaculous_pro['branding']['default_hf_bg'])){ echo ' '; } if(!empty($softaculous_pro['branding']['default_hf_text'])){ echo ' '; } ?>

    />

    /



    +

    domainroots) && is_array($nupanel->domainroots) ? key($nupanel->domainroots) : ''); $domain_php = sphpversion($selected_domain); foreach(spro_get_features_list() as $slug => $feature): $max_req_php = ''; foreach($feature['plugin'] as $info){ if (!empty($info['requires_php'])) { if (empty($max_req_php) || version_compare($info['requires_php'], $max_req_php, '>')) { $max_req_php = $info['requires_php']; } } } ?>


    <?php echo 'image' ?> Selected Image
    #sitepad_div1{ font-size: 11px; padding: 0px; width:500px; font-family: Verdana, Tahoma, Arial, "Trebuchet MS", "Times New Roman", Georgia, sans-serif, serif; } .smush_theme_header{ color: #777; font-size: 18px; text-overflow: ellipsis; padding:5px; } '; if($globals['nupanel'] == 'directadmin'){ $str .= '




    '; } if($globals['nupanel'] == 'plesk'){ $str .= '
    '; } $str .= '
    Left
    '; $i = 0; if(!empty($featured)){ foreach($featured as $k => $v){ // Show only 9 themes if($i >= 9){ break; } // We have to make some changes as per the theme (i.e for x3 and paper_lantern) if(is_cp_theme('paper_lantern')){ $img_path = fastestmirror().'/files/themes/'.$k.'/'.$k.'_275.jpg'; $td_width = 295; $td_height = 315; }else{ $img_path = fastestmirror().'/files/themes/'.$k.'/'.$k.'_275.jpg'; $td_width = 295; $td_height = 315; } $str .= ''; $i++; } }else{ foreach($themes as $k => $v){ // Show only 9 themes if($i >= 9){ break; } // We have to make some changes as per the theme (i.e for x3 and paper_lantern) if(is_cp_theme('paper_lantern')){ $img_path = fastestmirror_img($k).'/'.$k.'_275.jpg'; $td_width = 295; $td_height = 315; }else{ $img_path = fastestmirror_img($k).'/'.$k.'_275.jpg'; $td_width = 295; $td_height = 315; } $str .= ''; $i++; } } $str .= '
    '.$v['name'].'
    '.$v['name'].'
    Right
    '; // If its Dirctadmin than Closing the DIV if($globals['nupanel'] == 'directadmin'){ $str .= '
    '; } echo 'var sitepadOffsets = function(e){ e = e || window.event; var //cache document variables _d = document, _dBody = _d.body, _dDocEl = _d.documentElement, _o = null, //calculate scroll values _scroll_left = _dDocEl.scrollLeft ? _dDocEl.scrollLeft : 0 + _dBody.scrollLeft ? _dBody.scrollLeft : 0, _scroll_top = _dDocEl.scrollTop ? _dDocEl.scrollTop : 0 + _dBody.scrollTop ? _dBody.scrollTop : 0, window_pos = { _x: (e.pageX || e.clientX) + _scroll_left, _y: (e.pageY || e.clientY) + _scroll_top }, viewport_pos = { _x: (e.pageX || e.clientX), _y: (e.pageY || e.clientY) }, _console = function(o, type) { o = (typeof o === "object") ? o : _d.getElementById(o); o.innerHTML = type + " = [ " + " X: " + ((type === "viewport") ? viewport_pos._x : window_pos._x) + " Y: " + ((type === "viewport") ? viewport_pos._y : window_pos._y) + " ] Foo: " + Math.random() }; return { ViewPortX: viewport_pos._x, ViewPortY: viewport_pos._y, WindowX: window_pos._x, WindowY: window_pos._y, ViewPort: [viewport_pos._x, viewport_pos._y], Window: [window_pos._x, window_pos._y], ToString: _console }; }; //Finds the position of the element function sitepad_findelpos(ele){ var curleft = 0; var curtop = 0; if(ele.offsetParent){ while(1){ curleft += ele.offsetLeft; curtop += ele.offsetTop; if(!ele.offsetParent){ break; } ele = ele.offsetParent; } }else if(ele.x){ curleft += ele.x; curtop += ele.y; } return [curleft,curtop]; }; function sitepad_mousemove(id, e){ if(typeof sitem[id+"left"] == "undefined"){ sitem[id+"right"] = ""; sitem[id+"left"] = ""; sitem[id+"entered"] = false; } if(sitem[id+"entered"] == true){ return false; } sitem[id+"entered"] = true; var ele = document.getElementById(id); var mouse = sitepadOffsets(e); mouse[0] = mouse.ViewPortX; sitem[id+"elpos"] = sitepad_findelpos(ele); sitem[id+"menuwidth"] = ele.offsetWidth; sitem[id+"leftbound"] =((sitem[id+"menuwidth"]-20)/2) + sitem[id+"elpos"][0]; sitem[id+"rightbound"] =((sitem[id+"menuwidth"]+20)/2) + sitem[id+"elpos"][0]; //alert(sitem[id+"leftbound"]+" "+sitem[id+"rightbound"]+" "+mouse[0]); //document.getElementById("aaa").innerHTML = mouse[0]+"
    "+document.getElementById("aaa").innerHTML; if (mouse[0]>sitem[id+"rightbound"]){ sitepad_Left(id); }else if (mouse[0]"+document.getElementById("secondary").innerHTML;'; }else{ echo 'function show_top_themes(){'; if(!empty($globals['show_top_themes'])){ echo 'document.getElementById("sitepad_div-body").innerHTML = sitepad_html;'; } echo '}; window.addEventListener("load", function() { //Top Themes were loaded before the div sitepad_div-body creation setTimeout(show_top_themes, 1000); }, false); '; } } ?>new_site_theme.php000064400000065411152347514360010275 0ustar00user['plan_active']) && !empty($nupanel->user['plan']['newsites']) && $nupanel->user['plan']['newsites'] <= count($user['ins']) ){ echo '

      '.$l['title_new_site'].'


      '.$l['max_site_err'].'

    '.$l['return_all_site'].'
    '; return false; } echo ' '; ?>
    Overview Theme Details Complete

    '.$l['welcome_new_site'].'


    You are just 3 steps away from creating your awesome website

    1. '.$l['choose_theme'].'
    '.$l['choose_theme_exp'].'
    2. '.$l['site_details'].'
    '.$l['site_details_exp'].'
    3. '.$l['comp_setup'].'
    '.$l['comp_setup_exp'].'

      '.$l['select_theme'].' '.count($themes).'

    '.$l['new_site_details'].'


    '.$l['new_site_details_exp'].'
    '.$l['new_site_details_optional'].'

    '; error_handle($error, '100%'); echo '
    '; echo'

    '.$l['site_details'].'


    '.$l['contact_info'].'




    '.$setup_fields['sitepad_dev_mode']['heading'].'



    '.$l['setup_complete'].'

    '.$l['happy'].'

    ';// End of Setup div echo ' '; softfooter(); }all_sites_theme.php000064400000012753152347514360010440 0ustar00

    '.$l['title_all_sites'].'


    '; error_handle($error, '100%'); if(empty($user['ins'])){ echo '
      '.$l['no_sites'].'
    '; return false; } if(!empty($done['removed'])){ echo '
      '.$done['removed'].'

    '.$l['return_all_site'].'
    '; return true; } echo '

    '; foreach($user['ins'] as $site_id => $site){ // Site URL $siteurl = sitepad_site_url($site_id); $show = true; if(isset($_POST['search']) && !empty($_POST['sites_search'])){ $s_search = $_POST['sites_search']; $show = false; // Check if search string match with title and url if(preg_match('/'.$s_search.'/', $site['title']) || preg_match('/'.$s_search.'/', $siteurl)) { $show = true; } } if(empty($show)) continue; $screenshot = $theme['images'].'no_screenshot.png'; $relative_screenshot = '/sitepad-data/uploads/screenshots/home.jpg'; if(file_exists($site['path'].$relative_screenshot)){ $screenshot = sitepad_site_url($site_id).$relative_screenshot; } echo'
    '.$l['created'].' : '.(!empty($site['ins_time']) ? date('m/d/Y', $site['ins_time']) : '').'
    '.$l['sitepad_path'].' : '. $site['path'].'
    '.$site['title'].'
    '.$l['url'].': '.$siteurl.'
    '; } echo '
    '; softfooter(); } restore_theme.php000064400000010021152347514360010126 0ustar00

    '.$l['title_restore'].'


    '; //To detect in javascript if the process is in background if(!empty($GLOBALS['backgrounding'])){ echo '
    '; } echo error_handle($error, "100%", 0, 1); if(!empty($done)){ echo '
      '.$done['msg'].'

    '.$l['return_all_site'].'
    '; return true; } if(!empty($backupdir)){ echo '

    '.$l['restore_dir_exp'].'


    '.$l['restore_delete_files_exp'].'

    '; } if(!empty($dbexist)){ echo '

    '.$l['restore_db_exp'].'

    '; } echo '


    '; softfooter(); } hf_theme.php000064400000037110152347514360007050 0ustar00 */ $title = ((empty($title)) ? $globals['sn'] : $title); // Is there a Panel Header ? if(!empty($nupanel->pheader)){ echo $nupanel->pheader; } //Lets echo the top headers echo ' '.$title.' '; if(optGET('act') == 'new_site' && empty($globals['old_onboarding'])){ echo ''; } echo ' '; echo ' '; if(optGET('act') == 'new_site' && empty($globals['old_onboarding'])){ echo ''; } echo ''; echo ' '; echo '
    '; $top_bar = (!empty($globals['panel_hf']) && !empty($nupanel->can_shrink_nativeui) ? '' : ''); $pre_selected_ind = array('php', 'perl', 'java', 'python'); $top_bar .= ' '; $top_bar1 = (empty($globals['off_panel_link']) ? '' : '').' '.(!empty($user['apikey']) ? '' : '').' '; echo $top_bar.$top_bar1; echo '
                  '.$l['welcome'].' '.(empty($nupanel->user['displayname']) ? $nupanel->user['name'] : $nupanel->user['displayname']).'
    '; // Body table echo ''; //Bottom Footer echo '
    '; //Everything else will go here echo '
    '; if(!empty($user['apikey']) && empty($user['no_new_editor_alert']) && !empty($globals['sitepad_editor_new'])){ $editor = $globals['sm_brand_editor']; if(empty($editor)){ $editor = (empty($globals['sm_brand']) ? 'SitePad' : '').' Editor'; } echo ' '; } } function softfooter($bottom = false){ global $user, $conn, $dbtables, $logged_in, $globals, $l, $dmenus, $end_time, $start_time, $onload, $theme, $nupanel; if(optGET('jsnohf')){ return true; } $pageinfo = array(); echo '
    '.(!empty($bottom) ? '
     
    ' : '').'
      '.$l['times_are'].(empty($globals['pgtimezone']) ? '' : ' '.($globals['pgtimezone'] > 0 ? '+' : '').$globals['pgtimezone']).'. '.$l['time_is'].' '.datify(time(), false).'.
    '.@$l['back_to_top'].'
     
      '.copyright().'
    '.(empty($pageinfo) ? '' : implode('  |  ', $pageinfo)).'  
    '; if(!empty($theme['copyright'])){ echo unhtmlentities($theme['copyright']); } echo ''; // Is there a Panel Footer ? if(!empty($nupanel->pfooter)){ echo $nupanel->pfooter; } echo ''; echo ' '; } function error_handle($error, $table_width = '100%', $center = false, $return = false){ global $l; $str = ""; $table_width = preg_match('/%/is', $table_width) ? $table_width : $table_width.'px'; //on error call the form if(!empty($error)){ $str .= ''; $str .= '
    ×
    '; $str .= '

      '.$l['following_errors_occured'].' :

      '; foreach($error as $ek => $ev){ $str .= '
    • '.$ev.'
    • '; } $str .= '
    '; if(empty($return)){ echo $str; }else{ return $str; } } } //This will just echo that everything went fine function success_message($message, $table_width = '100%', $center = false){ global $l; //on error call the form if(!empty($message)){ echo '
    '.$l['following_message'].' :
      '; foreach($message as $mk => $mv){ echo '
    • '.$mv.'
    • '; } echo '
    '.(($center) ? '' : '' ).'
    '; } } function majorerror($title, $text, $heading = ''){ global $theme, $globals, $user, $l; softheader(((empty($title)) ? $l['fatal_error'] : $title), false); ?>
      







    favicon.ico000064400000002176152347514360006705 0ustar00 h(    T#OU"b3;g:Tg:Ta29T!PU"X&X'U"iQPQQPRU#e^/D ^.]-!RW%pFl~z[a2QY(g9k>X&W%V$zRIJqU#T"\,\+C S sb4[~W~Xl̽xRT"l1W%T!T"vNZyQŴe8U#~WW%LS QrHc^SqGDb3nS X'ȷ[sɹ^eQe7dd5qQnD;\nCRd6gX'TQvNsg}VbT!U#nCLV$$Rf9`zW%RW%|Uf9U"S zSkwh`v`0RU"W%X' S \,ȸijsIRY(X&f:QW%6S W%}W˻οsg:U#V$0Rb4MX&"T"QQU"U#RPSX&Ol@Z(\*R+W&ae8e7W%_S )[+Y)dashboard_theme.php000064400000015574152347514360010414 0ustar00

    '.$l['dashboard'].'

    '; error_handle($error, '100%'); if(empty($user['ins'])){ echo '
      '.$l['no_sites'].'
    '; } echo '
    '.$l['disk_space'].'

    '.str_replace(',', '', (is_numeric($nupanel->spaceremain) ? number_format($nupanel->spaceremain/1024/1024, 2) : 'unlimited')).'

    '. $l['databases'].'

    '.$nupanel->dbsused().' of '.(is_numeric($nupanel->maxdb()) ? $nupanel->maxdb() : 'unlimited').'

    '.$l['latest_themes'].'
    '.$l['more_features'].'
    '; foreach($features as $k => $v){ echo '
    '.$v['t'].'

    '.$v['e'].'


    '; } echo '
    '.$l['need_support'].'

    '.$l['need_support_desc'].'

    '.$l['support'].'
    '.$l['found_bug'].'

    '.$l['found_bug_desc'].'

    '.$l['found_bug_btn'].'
    '; softfooter(); } theme_settings.php000064400000003056152347514360010315 0ustar00theme['url'].'/default'; $theme['this_url'] = $nupanel->theme['url'].'/default'; }else{ $theme['url'] = $nupanel->theme['admin_url'].'/default'; $theme['this_url'] = $nupanel->theme['admin_url'].'/default'; } $theme['images'] = $theme['url'].'/images/';//Has a Trailing slash $theme['a_images'] = $theme['url'].'/images/'.$globals['nupanel'].'/';//Has a Trailing slash // Images specific to the this THEME $theme['this_images'] = $theme['images'];//Has a Trailing slash // Name of this theme $theme['this_theme'] = 'modern'; sitemush_theme.php000064400000002425152347514360010315 0ustar00
    '.$l['faq'].'

    '; foreach($faq_list as $fk => $fv){ echo '
    '.$fv['question'].'

    '.$fv['answer'].'
    '; } echo ' '; softfooter(); } js/jquery.js000064400000275620152347514360007063 0ustar00/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; }return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="
    a",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:l.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?""!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("' + '' + // Option and demo link '' + // Overlay '
    ' + '' + ''; jQuery('#softaculous-pro-templates').append(html); // Attach an event listener to remove the skeleton loader when iframe loads jQuery('#iframe-' + theme['thid']).on('load', function () { var iframe = jQuery(this); // Prevent load before src var src = iframe.attr('src'); if(!src || src.length < 1 ){ return; } jQuery('#skeleton-' + theme['thid']).remove(); jQuery('.softaculous-pro-ai-theme-name').show(); softaculous_pro_pending_iframeCount--; var parent = iframe.parent(); var overlay = parent.siblings('.softaculous-pro-theme-iframe-overlay'); var pencil_icon = parent.siblings('.softaculous-pro-ai-theme-name').find('.softaculous-pro-ai-show-demo'); overlay.on('mouseenter', function () { iframe[0].contentWindow.postMessage({ action: 'scrollToBottom' }, '*'); }); overlay.on('mouseleave', function () { iframe[0].contentWindow.postMessage({ action: 'scrollToTop' }, '*'); }); pencil_icon.off('click'); pencil_icon.on('click' , function(e){ e.stopPropagation() }) if (softaculous_pro_pending_iframeCount === 0) { clearTimeout(softaculous_pro_iframe_loadtimeout); } }); } var softaculous_pro_current_manual_theme_page = 1; var softaculous_pro_manual_theme_loading = false; var softaculous_pro_total_manual_pages= null; // Show the themes function softaculous_pro_show_manual_themes(cat, search, page){ softaculous_pro_show_themes_loaded = 1; var sortby = 'latest'; jQuery("#softaculous_pro_search").show(); jQuery("#softaculous_pro_theme_title").show(); jQuery("#softaculous-pro-suggestion").hide(); jQuery("#softaculous-pro-single-template").hide(); jQuery("#softaculous-pro-templates").show(); jQuery('.softaculous-pro-single-template-header').show() jQuery('.softaculous-pro-categories').css({'display': 'flex'}); jQuery('.softaculous-pro-ai-search').addClass('manual-mode'); // Blank html if((search && search.length > 0) || (cat && cat.length > 0)){ jQuery('#softaculous-pro-templates').html(''); } var search = search || ""; // var cat = cat || softaculous_pro_setup_info.type || ""; var cat = cat || ""; cat = cat.replace("-", ""); softaculous_pro_setup_info.type = cat; cat = (categories[cat] === undefined && (cat && cat.length) > 0 ? 'others' : cat) || "" ; var num = 30; var page = page || 1; var start = num * (page - 1); var end = num + start; var i = 0; var cat_appender = categories[cat] === undefined ? 'Others' : categories[cat]['en'] if(cat.length > 0){ jQuery('.softaculous-pro-current-cat').html(cat_appender); jQuery('.softaculous-pro-current-cat').data('cat', cat); }else{ jQuery('.softaculous-pro-current-cat').html('All'); jQuery('.softaculous-pro-current-cat').data('cat', ''); } var allowed_list = []; if(search.length > 0){ search = search.toLowerCase(); for(var x in softaculous_pro_templates['tags']){ if(x.toLowerCase().indexOf(search) >= 0){ allowed_list = allowed_list.concat(softaculous_pro_templates['tags'][x]); } } } if(allowed_list.length > 0){ allowed_list = Array.from(new Set(allowed_list)); } var themeids = []; var sorted = {}; var rsorted = {}; themes = softaculous_pro_templates['list']; for(var x in themes){ themeids.push(parseInt(themes[x].thid)); } if(sortby == "latest"){ var datatheme = Object.values(themes); var rsorted_ids = themeids.sort().reverse(); for(var x of rsorted_ids){ for( var y in datatheme){ if(datatheme[y].thid == x){ rsorted[datatheme[y].slug] = datatheme[y]; } } } themes = rsorted; }else if(sortby == "oldest"){ var datatheme = Object.values(themes); var sorted_ids = themeids.sort(); for(var x of sorted_ids){ for( var y in datatheme){ if(datatheme[y].thid == x){ sorted[datatheme[y].slug] = datatheme[y]; } } } themes = sorted; } for(var x in themes){ // Is it same category if(cat.length > 0 && cat != themes[x].category){ continue; } // Is it a searched item if(search.length > 0 && themes[x].name.toLowerCase().indexOf(search) === -1 && allowed_list.indexOf(themes[x].thid) === -1){ continue; } if(i >= start && i < end){ //console.log(x+' '+i+' '+start+' '+end); softaculous_pro_show_manual_theme_tile(themes[x], x); } i++; } jQuery('.softaculous-pro-theme-details').click(function(){ var jEle = jQuery(this); softaculous_pro_show_manual_theme_details(jEle.attr('slug')); }); softaculous_pro_total_manual_pages = Math.ceil(i / num); } function softaculous_pro_show_manual_theme_tile(theme, x){ var html = '
    '+ '
    '+ '
    '+ ''+ '
    '+ '
    '+theme['name']+'
    '+ '
    '+ '
    '; jQuery('#softaculous-pro-templates').append(html); } function softaculous_pro_strip_extension(str){ return str.substr(0,str.lastIndexOf('.')); } function softaculous_pro_scaleSingleTemplate(){ //if( !jQuery('.softaculous-pro-single-template').is(':visible')) return; var iframeParent = jQuery('#softaculous-pro-single-template .softaculous-pro-theme-iframe'); var iframe = iframeParent.children('iframe.softaculous_pro_display_iframe'); var iframeIntrinsicWidth = 1250; var iframeIntrinsicHeight = 650; let scaleX = iframeParent.width() / iframeIntrinsicWidth; let scaleY = iframeParent.height() / iframeIntrinsicHeight; let scale = iframeParent.width() >= iframeIntrinsicWidth ? Math.max(scaleX, scaleY) : Math.min(scaleX, scaleY); iframe.css({ 'transform': `scale(${scale})`, 'transform-origin': 'top left', 'width': iframeIntrinsicWidth + 'px', 'height': (iframeIntrinsicHeight / scale) + 'px' }); } function softaculous_pro_scaleIframe() { jQuery('#softaculous-pro-templates .softaculous-pro-theme-iframe').each(function () { let iframe = jQuery(this).find('iframe'); let parentWidth = jQuery(this).width(); let parentHeight = jQuery(window).height(); let iframeWidth = 1250; let iframeHeight = 1200; // Calculate scale factor to fit within parent container while keeping the aspect ratio let scaleX = parentWidth / iframeWidth; let scaleY = parentHeight / iframeHeight; let scale = Math.min(scaleX, scaleY); // Adjust iframe size and scale iframe.css({ transform: `scale(${scale})`, width: `${iframeWidth}px`, height: `${iframeHeight}px`, }); // Set the parent container height dynamically jQuery(this).css({ height: `${iframeHeight * scale}px`, overflow: 'hidden' }); }); } // Show the theme details function softaculous_pro_show_theme_details(slug, retry = true){ var theme = themes[slug]; jQuery("#softaculous-pro-suggestion").hide(); jQuery("#softaculous_pro_search").hide(); jQuery("#softaculous_pro_theme_title").hide(); jQuery("#softaculous-pro-single-template").show(); jQuery("#softaculous-pro-templates").hide(); jQuery('img#softaculous_pro_display_image').hide(); jQuery('.softaculous-pro-theme-iframe').show(); var hIframe = jQuery('[slug="' + slug + '"]').find('iframe.scaled-iframe').clone(); // Set install value jQuery('#softaculous-pro-template-install').val(slug); // Set name jQuery("#softaculous-pro-template-name").html(theme['name']); // Demo URL jQuery("#softaculous-pro-demo").attr("href", softaculous_pro_demo+(theme['name'].replace(' ', '_'))); // Blank screenshots jQuery("#softaculous_pro_screenshots").html(''); jQuery(".single-templates-content .softaculous-pro-theme-iframe").children().not(':first').remove(); // Is the license PRO ? if(theme['type'] >= 2){ jQuery('#softaculous_pro_license_div').css('display', 'inline-block'); }else{ jQuery('#softaculous_pro_license_div').hide(); } // Show home image jQuery("#softaculous-pro-single-template").find('iframe.scaled-iframe').remove(); jQuery("#softaculous-pro-single-template").find('.softaculous-pro-theme-iframe').append(hIframe); jQuery("#softaculous-pro-single-template").find('iframe.scaled-iframe') .addClass('softaculous_pro_display_iframe softaculous_pro_iframe_inview') .removeAttr('id') .removeAttr('style') .attr('data-page', 'home') .attr('width', '100%'); hIframe.parent().scrollTop(0); hIframe.on('load', function(){ hIframe.addClass('softaculous-pro-is-loaded'); }); // Make the call jQuery.ajax({ url: softaculous_pro_ajax_url+'task=softaculous_pro_template_info', type: 'POST', data: { softaculous_pro_nonce: softaculous_pro_ajax_nonce, slug: slug }, dataType: 'json', success:function(theme) { if(!theme || !('screenshots' in theme)){ if(retry){ softaculous_pro_show_theme_details(slug, false); return; } alert('Something went wrong. Please try again!'); return; } jQuery("#spro_import_single").addClass("hidden"); var sc = ''; var iframe_sc = ''; var iframeUrls = {}; // var test= ''; // Show the screenshots for(var x in theme['screenshots']){ var page_name = softaculous_pro_strip_extension(theme['screenshots'][x]); sc += '
    '+ ''+ ''+ ''+ '
    '; if(page_name == 'home'){ continue; } var iframe_url = ''; if( pid in softaculous_pro_cache_stream_iframes && x in softaculous_pro_cache_stream_iframes[pid] && page_name in softaculous_pro_cache_stream_iframes[pid][x] ){ iframe_url = 'src="'+ softaculous_pro_cache_stream_iframes[pid][x][page_name] +'"'; }else{ iframeUrls[page_name] = slug; } iframe_sc += ''; } var iframeHolder = jQuery('.single-templates-content .softaculous-pro-theme-iframe'); var pid = ('theme_pid' in softaculous_pro_setup_info) ? softaculous_pro_setup_info['theme_pid']: ''; // Get blob URLs softaculous_pro_stream_iframes(iframeUrls, pid, iframeHolder); iframeHolder.append(iframe_sc); jQuery("#softaculous_pro_screenshots").html(sc); jQuery("#spro_import_content").show(); jQuery(".softaculous-pro-back").show(); jQuery('.softaculous_pro_img_screen:first').children('a').addClass('spro_img_inview'); jQuery("#spro_import_content").attr('disabled',true); var all_iframes = jQuery('.single-templates-content .softaculous-pro-theme-iframe').find('iframe'); var loaded = 0; var timeoutReached = false; var timeout = setTimeout(function() { timeoutReached = true; jQuery('.softaculous_pro_img_screen:first').children('a').addClass('spro_img_inview'); }, 300000); // 5 minutes all_iframes.each(function() { var iframe = jQuery(this); iframe.on('load', function () { // Prevent load before src var src = jQuery(this).attr('src'); if(!src || src.length < 1 ){ return; } // Show the pages slug according to which page is loaded var page_slug = jQuery(this).data('page'); var loaded_ele = jQuery('.softaculous_pro_img_screen[page-name="' + page_slug + '"]'); loaded_ele.children('.softaculous-pro-link-skeleton').hide(); loaded_ele.children('.spro_page_selector').show(); loaded_ele.children('a').show(); if (timeoutReached) return; // Skip if timeout already triggered loaded++; if (loaded == all_iframes.length) { clearTimeout(timeout); // Cancel timeout jQuery("#spro_import_content").removeAttr('disabled') } // Scale iframe softaculous_pro_scaleSingleTemplate(); }); // In case any iframe already loaded if(iframe.length > 0 && iframe[0].contentWindow && iframe[0].contentDocument.readyState === 'complete') { iframe.trigger('load'); } }); // Remove loader jQuery('.softaculous_pro_iframe_inview').on('load', function() { jQuery('.softaculous-pro-loader-container').hide(); }); jQuery('#softaculous_pro_screenshots .softaculous_pro_img_views').on('click', function(e){ e.preventDefault(); var jEle = jQuery(this); var page_name = jEle.parent().attr('page-name'); all_iframes.removeClass('softaculous_pro_iframe_inview'); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } var iEle = jQuery('iframe.softaculous_pro_display_iframe[data-page="' + page_name + '"]'); jEle.addClass('spro_img_inview'); // Show iframe if (iEle.length > 0 && iEle[0].contentWindow && iEle[0].contentDocument.readyState === 'complete') { iEle.addClass('softaculous_pro_iframe_inview'); }else{ jQuery(".softaculous-pro-loader-container").show(); iEle.on('load.show_iframe', function(){ jQuery(".softaculous-pro-loader-container").hide(); iEle.addClass('softaculous_pro_iframe_inview'); }); } }); jQuery("#softaculous_pro_screenshots").find('.spro_page_selector').click(function(event){ var jEle = jQuery(this); jEle.siblings('.softaculous_pro_img_views').click(); }); // Change event on the checkbox jQuery("#softaculous_pro_screenshots").find('.checkbox').change(function() { var checked_div = jQuery(this).siblings('.softaculous_pro_img_name'); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } jQuery(this).parent().siblings('.softaculous_pro_img_views').addClass('spro_img_inview'); if (jQuery(this).is(':checked')) { checked_div.addClass("softaculous_pro_img_selected"); } else { checked_div.removeClass("softaculous_pro_img_selected"); } }); } }); } function softaculous_pro_show_manual_theme_details(slug){ var theme = themes[slug]; jQuery("#softaculous-pro-suggestion").hide(); jQuery("#softaculous_pro_search").hide(); jQuery("#softaculous_pro_theme_title").hide(); jQuery("#softaculous-pro-single-template").show(); jQuery("#softaculous-pro-templates").hide(); jQuery('.softaculous-pro-theme-iframe').hide(); jQuery('img#softaculous_pro_display_image').show(); // Set install value jQuery('#softaculous-pro-template-install').val(slug); // Set name jQuery("#softaculous-pro-template-name").html(theme['name']); // Demo URL jQuery("#softaculous-pro-demo").attr("href", softaculous_pro_demo+(theme['name'].replace(' ', '_'))); // Blank screenshots jQuery("#softaculous_pro_screenshots").html(''); // Is the license PRO ? if(theme['type'] >= 2){ jQuery('#softaculous_pro_license_div').css('display', 'inline-block'); }else{ jQuery('#softaculous_pro_license_div').hide(); } var url = mirror+'/'+theme['slug']; // Show home image jQuery("img#softaculous_pro_display_image").attr("src", ""); jQuery("img#softaculous_pro_display_image").attr("src", url+'/screenshots/home.jpg'); jQuery("img#softaculous_pro_display_image").parent().scrollTop(0); // Make the call jQuery.ajax({ url: softaculous_pro_ajax_url+'task=softaculous_pro_template_info', type: 'POST', data: { softaculous_pro_nonce: softaculous_pro_ajax_nonce, slug: slug }, dataType: 'json', success:function(theme) { jQuery("#spro_import_single").addClass("hidden"); var sc = ''; // var test= ''; // Show the screenshots for(var x in theme['screenshots']){ var page_name = softaculous_pro_strip_extension(theme['screenshots'][x]); sc += '
    '+ '
    '+ '
    '+ ''+ '
    '; } jQuery("#softaculous_pro_screenshots").html(sc); jQuery("#spro_import_content").show(); jQuery("#spro_import_content").removeAttr('disabled'); jQuery(".softaculous-pro-back").show(); jQuery('.softaculous_pro_img_screen:first').children('a').addClass('spro_img_inview'); jQuery("img#softaculous_pro_display_image").on('load', function() { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery(this).show(); // Show image }); jQuery("#softaculous_pro_screenshots").find('.softaculous_pro_img_views').click(function(e){ e.preventDefault(); var jEle = jQuery(this); jQuery("img#softaculous_pro_display_image").hide(); jQuery(".softaculous-pro-loader-container").show(); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } var newImageSrc = jEle.attr("href"); jQuery("img#softaculous_pro_display_image").attr("src", newImageSrc); jQuery("img#softaculous_pro_display_image").on('load', function() { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery(this).show(); // Show image }); // In case the image is cached and loads immediately if (jQuery("img#softaculous_pro_display_image")[0].complete) { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery("img#softaculous_pro_display_image").show(); // Show image } jQuery("img#softaculous_pro_display_image").parent().scrollTop(0); jEle.addClass('spro_img_inview'); }); // need to refactor it its create multiple in html jQuery("#softaculous_pro_screenshots").find('.softaculous_pro_img_views').on('mouseenter',function(e){ var imgUrl = jQuery(this).attr('href'); if(!jQuery(this).attr('loaded')){ jQuery('').attr('src', imgUrl).on('load', function() {}).appendTo('body').css('display', 'none'); } jQuery(this).attr('loaded',true); }); jQuery("#softaculous_pro_screenshots").find('.spro_page_selector').click(function(event){ var jEle = jQuery(this); jQuery("img#softaculous_pro_display_image").hide(); jQuery(".softaculous-pro-loader-container").show(); var checkbox = jQuery(this).find('.checkbox'); if (jQuery(event.target).is('.checkbox') || jQuery(event.target).is('.softaculous_pro_img_name')) { return; } jEle.siblings('.softaculous_pro_img_views').trigger('click'); }); // Change event on the checkbox jQuery("#softaculous_pro_screenshots").find('.checkbox').change(function() { var checked_div = jQuery(this).siblings('.softaculous_pro_img_name'); if(jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').hasClass('spro_img_inview')){ jQuery('.softaculous_pro_img_screen .softaculous_pro_img_views').removeClass('spro_img_inview'); } var newImageSrc = jQuery(this).parent().siblings('.softaculous_pro_img_views').attr("href"); jQuery(this).parent().siblings('.softaculous_pro_img_views').addClass('spro_img_inview'); jQuery("img#softaculous_pro_display_image").attr("src", newImageSrc); jQuery("img#softaculous_pro_display_image").on('load', function() { jQuery(".softaculous-pro-loader-container").hide(); // Hide loader jQuery(this).show(); // Show image }); if (jQuery(this).is(':checked')) { checked_div.addClass("softaculous_pro_img_selected"); } else { checked_div.removeClass("softaculous_pro_img_selected"); } }); } }); } function softaculous_pro_import_scroll(){ jQuery("[data-active-panel='import_theme']").on("scroll", function() { var container = jQuery(this); var element_visible = container.find('#softaculous-pro-single-template'); if(element_visible.css('display') == 'block'){ return; } var scrollTop = container.scrollTop(); var containerHeight = container.innerHeight(); var contentHeight = container[0].scrollHeight; if (scrollTop + containerHeight >= contentHeight - 100 ) { if(softaculous_ai_config.template_mode == 'manual' && !softaculous_pro_manual_theme_loading ){ if(softaculous_pro_current_manual_theme_page >= softaculous_pro_total_manual_pages ) return; softaculous_pro_manual_theme_loading = true; softaculous_pro_current_manual_theme_page++; softaculous_pro_show_manual_themes( jQuery('.softaculous-pro-current-cat').data('cat') || "", jQuery("#softaculous_pro_search input").val() || "", softaculous_pro_current_manual_theme_page ); // small delay to avoid multiple calls setTimeout(function(){ softaculous_pro_manual_theme_loading = false; }, 1000); }else if(softaculous_ai_config.template_mode == 'ai' && softaculous_pro_pending_iframeCount < 5 ){ var nextPage = softaculousAiLoadedPages.length + 1; softaculous_pro_show_themes("", "", nextPage); } } }); } function softaculous_pro_stop_progress_calls(){ softaculous_pro_stop_progress = true; if (softaculous_pro_ajax_progress_var && softaculous_pro_ajax_progress_var.readyState !== 4) { softaculous_pro_ajax_progress_var.abort(); console.log("Progress AJAX call is being aborted..."); } } function softaculous_pro_onboarding_progress() { if (softaculous_pro_stop_progress) { return; } const now = Date.now(); const time_since_last_req = now - softaculous_pro_last_req_time; const delay = time_since_last_req < 1000 ? 1000 - time_since_last_req : 0; setTimeout(() => { softaculous_pro_last_req_time = Date.now(); softaculous_pro_ajax_progress_var = jQuery.ajax({ url: softaculous_pro_ajax_url, type: 'POST', dataType: 'json', data: { task: 'softaculous_pro_get_progress', softaculous_pro_nonce: softaculous_pro_ajax_nonce }, success: function (res) { if('error' in res){ // Keep polling until stopped if (!softaculous_pro_stop_progress) { softaculous_pro_onboarding_progress(); } console.log(res['error']); return; } const progress = res.data; // Skip if no change if (JSON.stringify(progress) === JSON.stringify(softaculous_pro_last_progress_cache)) { return softaculous_pro_onboarding_progress(); } softaculous_pro_last_progress_cache = progress; // Update UI if ('data' in progress && progress.data.success) { softaculous_pro_create_html( progress.text, progress.percent, true, progress.data.logs || null ); } // Stop if complete if(progress.percent == 100) { softaculous_pro_stop_progress = true; const modal = jQuery('.spro-progress-bar'); modal.find('.progress-text').text(softwp_onboarding_lang.congratulations + '🎊'); modal.find('.skeleton-loader').hide(); modal.find('.softaculous-pro-done').show(); return; } // Keep polling until stopped if (!softaculous_pro_stop_progress) { softaculous_pro_onboarding_progress(); } }, error: function (xhr, status, error) { console.log("Failed to fetch progress:", error); softaculous_pro_stop_progress_calls(); } }); }, delay); } // Show Number of images function softaculous_pro_update_image_count(){ var image_count = softaculous_ai_config.selected_images.length jQuery('.softaculous-pro-selected-image-count').html(image_count); } function checkhttps(ele){ $.ajax({ type: "POST", url: softaculous_pro_ajax_url + "&checkhttps="+encodeURIComponent($(ele).val()), timeout:10000, dataType: "json", // Checking for success success: function(data){ try{ if('checkhttps' in data && data.checkhttps){ $("#softproto").val("https"); } }catch(e){} } }); } function softaculous_pro_version_compare(v1, v2) { var v1parts = (v1 + '').split('.'), v2parts = (v2 + '').split('.'); var maxLen = Math.max(v1parts.length, v2parts.length); for (var i = 0; i < maxLen; i++) { var num1 = parseInt(v1parts[i] || 0, 10); var num2 = parseInt(v2parts[i] || 0, 10); if (num1 > num2) return 1; if (num1 < num2) return -1; } return 0; } function softaculous_pro_update_features_php(domain_php){ if(!domain_php) return; jQuery('.softaculous-pro-features').each(function(){ var feature_div = jQuery(this); var req_php = feature_div.attr('data-requires-php'); var input = feature_div.find('input'); if(req_php){ if(softaculous_pro_version_compare(domain_php, req_php) < 0){ input.prop('disabled', true); var err_msg = 'Requires PHP version ' + req_php + ' or higher'; input.attr('spro-erro', err_msg); if(!feature_div.hasClass('spro-erro')){ feature_div.addClass('spro-erro'); } } else { input.prop('disabled', false); input.removeAttr('spro-erro'); feature_div.removeClass('spro-erro'); } } }); }js/domdrag.js000064400000007426152347514360007156 0ustar00/************************************************** * dom-drag.js * 09.25.2001 * www.youngpup.net ************************************************** * 10.28.2001 - fixed minor bug where events * sometimes fired off the handle, not the root. **************************************************/ var Drag = { obj : null, init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper) { o.onmousedown = Drag.start; o.hmode = bSwapHorzRef ? false : true ; o.vmode = bSwapVertRef ? false : true ; o.root = oRoot && oRoot != null ? oRoot : o ; if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px"; if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px"; if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px"; if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px"; o.minX = typeof minX != 'undefined' ? minX : null; o.minY = typeof minY != 'undefined' ? minY : null; o.maxX = typeof maxX != 'undefined' ? maxX : null; o.maxY = typeof maxY != 'undefined' ? maxY : null; o.xMapper = fXMapper ? fXMapper : null; o.yMapper = fYMapper ? fYMapper : null; o.root.onDragStart = new Function(); o.root.onDragEnd = new Function(); o.root.onDrag = new Function(); }, start : function(e) { var o = Drag.obj = this; e = Drag.fixE(e); var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); o.root.onDragStart(x, y); o.lastMouseX = e.clientX; o.lastMouseY = e.clientY; if (o.hmode) { if (o.minX != null) o.minMouseX = e.clientX - x + o.minX; if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX; } else { if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x; if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x; } if (o.vmode) { if (o.minY != null) o.minMouseY = e.clientY - y + o.minY; if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY; } else { if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y; if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y; } document.onmousemove = Drag.drag; document.onmouseup = Drag.end; return false; }, drag : function(e) { e = Drag.fixE(e); var o = Drag.obj; var ey = e.clientY; var ex = e.clientX; var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); var nx, ny; if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX); if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX); if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY); if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY); nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1)); ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1)); if (o.xMapper) nx = o.xMapper(y) else if (o.yMapper) ny = o.yMapper(x) Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px"; Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px"; Drag.obj.lastMouseX = ex; Drag.obj.lastMouseY = ey; Drag.obj.root.onDrag(nx, ny); return false; }, end : function() { document.onmousemove = null; document.onmouseup = null; Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]), parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"])); Drag.obj = null; }, fixE : function(e) { if (typeof e == 'undefined') e = window.event; if (typeof e.layerX == 'undefined') e.layerX = e.offsetX; if (typeof e.layerY == 'undefined') e.layerY = e.offsetY; return e; } };js/jquery.flot.pie.min.js000064400000024351152347514360011355 0ustar00/* Flot plugin for rendering pie charts. Copyright (c) 2007-2013 IOLA and Ole Laursen. Licensed under the MIT license. The plugin assumes that each series has a single data value, and that each value is a positive integer or zero. Negative numbers don't make sense for a pie chart, and have unpredictable results. The values do NOT need to be passed in as percentages; the plugin will calculate the total and per-slice percentages internally. * Created by Brian Medendorp * Updated with contributions from btburnett3, Anthony Aragues and Xavi Ivars The plugin supports these options: series: { pie: { show: true/false radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto' innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show) offset: { top: integer value to move the pie up or down left: integer value to move the pie left or right, or 'auto' }, stroke: { color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF') width: integer pixel width of the stroke }, label: { show: true/false, or 'auto' formatter: a user-defined function that modifies the text/style of the label text radius: 0-1 for percentage of fullsize, or a specified pixel length background: { color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000') opacity: 0-1 }, threshold: 0-1 for the percentage value at which to hide labels (if they're too small) }, combine: { threshold: 0-1 for the percentage value at which to combine slices (if they're too small) color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined label: any text value of what the combined slice should be labeled } highlight: { opacity: 0-1 } } } More detail and specific examples can be found in the included HTML file. */(function(e){function r(r){function p(t,n,r){l||(l=!0,s=t.getCanvas(),o=e(s).parent(),i=t.getOptions(),t.setData(d(t.getData())))}function d(t){var n=0,r=0,s=0,o=i.series.pie.combine.color,u=[];for(var a=0;ai.series.pie.combine.threshold)&&u.push({data:[[1,f]],color:t[a].color,label:t[a].label,angle:f*Math.PI*2/n,percent:f/(n/100)})}return s>1&&u.push({data:[[1,r]],color:o,label:i.series.pie.combine.label,angle:r*Math.PI*2/n,percent:r/(n/100)}),u}function v(r,s){function y(){c.clearRect(0,0,h,p),o.children().filter(".pieLabel, .pieLabelBackground").remove()}function b(){var e=i.series.pie.shadow.left,t=i.series.pie.shadow.top,n=10,r=i.series.pie.shadow.alpha,s=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius;if(s>=h/2-e||s*i.series.pie.tilt>=p/2-t||s<=n)return;c.save(),c.translate(e,t),c.globalAlpha=r,c.fillStyle="#000",c.translate(a,f),c.scale(1,i.series.pie.tilt);for(var o=1;o<=n;o++)c.beginPath(),c.arc(0,0,s,0,Math.PI*2,!1),c.fill(),s-=o;c.restore()}function w(){function l(e,t,i){if(e<=0||isNaN(e))return;i?c.fillStyle=t:(c.strokeStyle=t,c.lineJoin="round"),c.beginPath(),Math.abs(e-Math.PI*2)>1e-9&&c.moveTo(0,0),c.arc(0,0,n,r,r+e/2,!1),c.arc(0,0,n,r+e/2,r+e,!1),c.closePath(),r+=e,i?c.fill():c.stroke()}function d(){function l(t,n,s){if(t.data[0][1]==0)return!0;var u=i.legend.labelFormatter,l,c=i.series.pie.label.formatter;u?l=u(t.label,t):l=t.label,c&&(l=c(l,t));var d=(n+t.angle+n)/2,v=a+Math.round(Math.cos(d)*r),m=f+Math.round(Math.sin(d)*r)*i.series.pie.tilt,g=""+l+"";o.append(g);var y=o.children("#pieLabel"+s),b=m-y.height()/2,w=v-y.width()/2;y.css("top",b),y.css("left",w);if(0-b>0||0-w>0||p-(b+y.height())<0||h-(w+y.width())<0)return!1;if(i.series.pie.label.background.opacity!=0){var E=i.series.pie.label.background.color;E==null&&(E=t.color);var S="top:"+b+"px;left:"+w+"px;";e("
    ").css("opacity",i.series.pie.label.background.opacity).insertBefore(y)}return!0}var n=t,r=i.series.pie.label.radius>1?i.series.pie.label.radius:u*i.series.pie.label.radius;for(var s=0;s=i.series.pie.label.threshold*100&&!l(v[s],n,s))return!1;n+=v[s].angle}return!0}var t=Math.PI*i.series.pie.startAngle,n=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius;c.save(),c.translate(a,f),c.scale(1,i.series.pie.tilt),c.save();var r=t;for(var s=0;s0){c.save(),c.lineWidth=i.series.pie.stroke.width,r=t;for(var s=0;sh-u&&(a=h-u);var v=r.getData(),g=0;do g>0&&(u*=n),g+=1,y(),i.series.pie.tilt<=.8&&b();while(!w()&&g=t&&(y(),o.prepend("
    Could not draw pie with labels contained inside canvas
    ")),r.setSeries&&r.insertLegend&&(r.setSeries(v),r.insertLegend())}function m(e){if(i.series.pie.innerRadius>0){e.save();var t=i.series.pie.innerRadius>1?i.series.pie.innerRadius:u*i.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=i.series.pie.stroke.color,e.arc(0,0,t,0,Math.PI*2,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=i.series.pie.stroke.color,e.arc(0,0,t,0,Math.PI*2,!1),e.stroke(),e.closePath(),e.restore()}}function g(e,t){for(var n=!1,r=-1,i=e.length,s=i-1;++r1?i.series.pie.radius:u*i.series.pie.radius,o,l;for(var h=0;h1e-9&&t.moveTo(0,0),t.arc(0,0,r,e.startAngle,e.startAngle+e.angle/2,!1),t.arc(0,0,r,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),t.closePath(),t.fill()}var n=e.getOptions(),r=n.series.pie.radius>1?n.series.pie.radius:u*n.series.pie.radius;t.save(),t.translate(a,f),t.scale(1,n.series.pie.tilt);for(var i=0;i1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))}),r.hooks.bindEvents.push(function(e,t){var n=e.getOptions();n.series.pie.show&&(n.grid.hoverable&&t.unbind("mousemove").mousemove(b),n.grid.clickable&&t.unbind("click").click(w))}),r.hooks.processDatapoints.push(function(e,t,n,r){var i=e.getOptions();i.series.pie.show&&p(e,t,n,r)}),r.hooks.drawOverlay.push(function(e,t){var n=e.getOptions();n.series.pie.show&&N(e,t)}),r.hooks.draw.push(function(e,t){var n=e.getOptions();n.series.pie.show&&v(e,t)})}var t=10,n=.95,i={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,t){return"
    "+e+"
    "+Math.round(t.percent)+"%
    "},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:r,options:i,name:"pie",version:"1.1"})})(jQuery);js/combined.js000064400000422212152347514360007313 0ustar00/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license */ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="
    ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
    a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
    t
    ",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
    ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("");h.appendTo(a.contentContainer);r=c.outerHeight(!0);s=c.outerWidth(!0);A();h.attr("src",a.loadUrl);k(a.loadCallback);break;case "image":A();b("").load(function(){k(a.loadCallback);G(b(this))}).attr("src",a.loadUrl).hide().appendTo(a.contentContainer);break;default:A(),b('
    ').load(a.loadUrl,a.loadData,function(){k(a.loadCallback);G(b(this))}).hide().appendTo(a.contentContainer)}}function A(){a.modal&&b('
    ').css({backgroundColor:a.modalColor,position:"fixed",top:0,right:0,bottom:0,left:0,opacity:0,zIndex:a.zIndex+t}).appendTo(a.appendTo).fadeTo(a.speed,a.opacity);D();c.data("bPopup",a).data("id",e).css({left:"slideIn"==a.transition||"slideBack"==a.transition?"slideBack"==a.transition?g.scrollLeft()+u:-1*(v+s):l(!(!a.follow[0]&&m||f)),position:a.positionStyle||"absolute",top:"slideDown"==a.transition||"slideUp"==a.transition?"slideUp"==a.transition?g.scrollTop()+w:x+-1*r:n(!(!a.follow[1]&&p||f)),"z-index":a.zIndex+t+1}).each(function(){a.appending&&b(this).appendTo(a.appendTo)});H(!0)}function q(){a.modal&&b(".b-modal."+c.data("id")).fadeTo(a.speed,0,function(){b(this).remove()});a.scrollBar||b("html").css("overflow","auto");b(".b-modal."+e).unbind("click");g.unbind("keydown."+e);d.unbind("."+e).data("bPopup",0=c.height()&&(d.height=c.height());b>=c.width()&&(d.width=c.width());r=c.outerHeight(!0);s=c.outerWidth(!0);D();a.contentContainer.css({height:"auto",width:"auto"});d.left=l(!(!a.follow[0]&&m||f));d.top=n(!(!a.follow[1]&&p||f));c.animate(d,250,function(){h.show();B=E()})}function L(){d.data("bPopup",t);c.delegate(".bClose, ."+a.closeClass,"click."+e,q);a.modalClose&&b(".b-modal."+e).css("cursor","pointer").bind("click",q);M||!a.follow[0]&&!a.follow[1]||d.bind("scroll."+e,function(){B&&c.dequeue().animate({left:a.follow[0]?l(!f):"auto",top:a.follow[1]?n(!f):"auto"},a.followSpeed,a.followEasing)}).bind("resize."+e,function(){w=y.innerHeight||d.height();u=y.innerWidth||d.width();if(B=E())clearTimeout(I),I=setTimeout(function(){D();c.dequeue().each(function(){f?b(this).css({left:v,top:x}):b(this).animate({left:a.follow[0]?l(!0):"auto",top:a.follow[1]?n(!0):"auto"},a.followSpeed,a.followEasing)})},50)});a.escClose&&g.bind("keydown."+e,function(a){27==a.which&&q()})}function H(b){function d(e){c.css({display:"block",opacity:1}).animate(e,a.speed,a.easing,function(){J(b)})}switch(b?a.transition:a.transitionClose||a.transition){case "slideIn":d({left:b?l(!(!a.follow[0]&&m||f)):g.scrollLeft()-(s||c.outerWidth(!0))-C});break;case "slideBack":d({left:b?l(!(!a.follow[0]&&m||f)):g.scrollLeft()+u+C});break;case "slideDown":d({top:b?n(!(!a.follow[1]&&p||f)):g.scrollTop()-(r||c.outerHeight(!0))-C});break;case "slideUp":d({top:b?n(!(!a.follow[1]&&p||f)):g.scrollTop()+w+C});break;default:c.stop().fadeTo(a.speed,b?1:0,function(){J(b)})}}function J(b){b?(L(),k(F),a.autoClose&&setTimeout(q,a.autoClose)):(c.hide(),k(a.onClose),a.loadUrl&&(a.contentContainer.empty(),c.css({height:"auto",width:"auto"})))}function l(a){return a?v+g.scrollLeft():v}function n(a){return a?x+g.scrollTop():x}function k(a){b.isFunction(a)&&a.call(c)}function D(){x=p?a.position[1]:Math.max(0,(w-c.outerHeight(!0))/2-a.amsl);v=m?a.position[0]:(u-c.outerWidth(!0))/2;B=E()}function E(){return w>c.outerHeight(!0)&&u>c.outerWidth(!0)}b.isFunction(z)&&(F=z,z=null);var a=b.extend({},b.fn.bPopup.defaults,z);a.scrollBar||b("html").css("overflow","hidden");var c=this,g=b(document),y=window,d=b(y),w=y.innerHeight||d.height(),u=y.innerWidth||d.width(),M=/OS 6(_\d)+/i.test(navigator.userAgent),C=200,t=0,e,B,p,m,f,x,v,r,s,I;c.close=function(){a=this.data("bPopup");e="__b-popup"+d.data("bPopup")+"__";q()};return c.each(function(){b(this).data("bPopup")||(k(a.onOpen),t=(d.data("bPopup")||0)+1,e="__b-popup"+t+"__",p="auto"!==a.position[1],m="auto"!==a.position[0],f="fixed"===a.positionStyle,r=c.outerHeight(!0),s=c.outerWidth(!0),a.loadUrl?K():A())})};b.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",autoClose:!1,closeClass:"b-close",content:"ajax",contentContainer:!1,easing:"swing",escClose:!0,follow:[!0,!0],followEasing:"swing",followSpeed:500,iframeAttr:'scrolling="no" frameborder="0"',loadCallback:!1,loadData:!1,loadUrl:!1,modal:!0,modalClose:!0,modalColor:"#000",onClose:!1,onOpen:!1,opacity:0.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,speed:250,transition:"fadeIn",transitionClose:!1,zIndex:9997}})(jQuery); function goto_id(id){ // Scroll $('html,body').animate({ scrollTop: $("#"+id).offset().top}, 'slow'); } function dotweet(ele){ window.open($("#"+ele.id).attr("action")+"?"+$("#"+ele.id).serialize(), "_blank", "scrollbars=no, menubar=no, height=400, width=500, resizable=yes, toolbar=no, status=no"); return false; } function new_theme_funcs_init(){ $(".sai_exp").each(function(){ $(this).hide(); var txt = $(this).text(); var saihead = $(this).parent().html(); var str = $(this).parent().find(".sai_head").text(); if(str){ var str1 = str + " "; var str2 = saihead.replace(str,str1); $(this).parent().html(str2); } }); $(".sai-info").mouseover(function() { $(this).parent().parent().find(".sai_exp").fadeIn(5); }); $( ".sai-info,.sai_exp" ).mouseout(function() { $(this).parent().parent().find(".sai_exp").fadeOut(); $(".sai_exp").mouseover(function(){ $(".sai_exp").stop(); }); }); }; $(document).ready(function(){ new_theme_funcs_init(); }); /*TIP TIP*/ (function(x$){x$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=x$.extend(defaults,options);if(x$("#tiptip_holder").length<=0){var tiptip_holder=x$('
    ');var tiptip_content=x$('
    ');var tiptip_arrow=x$('
    ');x$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('
    ')));}else{var tiptip_holder=x$("#tiptip_holder");var tiptip_content=x$("#tiptip_content");var tiptip_arrow=x$("#tiptip_arrow");}return this.each(function(){var org_elem=x$(this);if(opts.content){var org_title=opts.content;}else{var org_title=org_elem.attr(opts.attribute);}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute);}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip();},function(){if(!opts.keepAlive){deactive_tiptip();}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip();});}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip();}).blur(function(){deactive_tiptip();});}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false;}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip();}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip();});}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom";}else if(opts.defaultPosition=="top"){t_class="_top";}else if(opts.defaultPosition=="left"){t_class="_left";}else if(opts.defaultPosition=="right"){t_class="_right";}var right_compare=(w_compare+left)parseInt(x$(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare);}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare);}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt(x$(window).height()+x$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top";}else{t_class=t_class+"_top";}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset));}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom";}else{t_class=t_class+"_bottom";}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset);}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5;}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5;}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5;}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout);}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn);},opts.delay);}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout);}tiptip_holder.fadeOut(opts.fadeOut);}}});}})(jQuery); function val_count(array, value) { var counter = 0; for(var i=0;i').css({"background-color":a.modalColor,height:"100%",left:0,opacity:0,position:"fixed",top:0,width:"100%","z-index":a.zIndex+k}).each(function(){a.appending&&b(this).appendTo(a.appendTo)}).animate({opacity:a.opacity},a.fadeSpeed);c.data("bPopup",a).data("id",d).css({left:!a.follow[0]&&m||i?g:h.scrollLeft()+g,position:a.positionStyle||"absolute",top:!a.follow[1]&&l||i?f:h.scrollTop()+f,"z-index":a.zIndex+k+1}).each(function(){a.appending&&b(this).appendTo(a.appendTo);if(null!=a.loadUrl)switch(a.contentContainer=b(a.contentContainer||c),a.content){case "iframe":b('').attr("src",a.loadUrl).appendTo(a.contentContainer);break;default:a.contentContainer.load(a.loadUrl)}}).fadeIn(a.fadeSpeed,function(){b.isFunction(p)&&p.call(c);u()})}function o(){a.modal&&b(".bModal."+c.data("id")).fadeOut(a.fadeSpeed,function(){b(this).remove()});c.stop().fadeOut(a.fadeSpeed,function(){null!=a.loadUrl&&a.contentContainer.empty()});e.data("bPopup",0d?20:d]}function s(){return e.height()>c.outerHeight(!0)+20&&e.width()>c.outerWidth(!0)+20}b.isFunction(n)&&(p=n,n=null);var a=b.extend({},b.fn.bPopup.defaults,n);a.scrollBar||b("html").css("overflow","hidden");var c=this,h=b(document),e=b(window),k,d,q,l,m,i,j,f,g;this.close=function(){a=c.data("bPopup");o()};return this.each(function(){c.data("bPopup")||t()})};b.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",closeClass:"bClose",content:"ajax",contentContainer:null,escClose:!0,fadeSpeed:250,follow:[!0,!0],followSpeed:500,loadUrl:null,modal:!0,modalClose:!0,modalColor:"#000",onClose:null,onOpen:null,opacity:0.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,zIndex:9997}})(jQuery);js/jquery.flot.min.js000064400000107451152347514360010604 0ustar00/* Javascript plotting library for jQuery, version 0.8.1. Copyright (c) 2007-2013 IOLA and Ole Laursen. Licensed under the MIT license. */// first an inline dependency, jquery.colorhelpers.js, we inline it here // for convenience /* Plugin for jQuery for working with colors. * * Version 1.1. * * Inspiration from jQuery color animation plugin by John Resig. * * Released under the MIT license by Ole Laursen, October 2009. * * Examples: * * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString() * var c = $.color.extract($("#mydiv"), 'background-color'); * console.log(c.r, c.g, c.b, c.a); * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)" * * Note that .scale() and .add() return the same modified object * instead of making a new one. * * V. 1.1: Fix error handling so e.g. parsing an empty string does * produce a color rather than just crashing. */(function(e){e.color={},e.color.make=function(t,n,r,i){var s={};return s.r=t||0,s.g=n||0,s.b=r||0,s.a=i!=null?i:1,s.add=function(e,t){for(var n=0;n=1?"rgb("+[s.r,s.g,s.b].join(",")+")":"rgba("+[s.r,s.g,s.b,s.a].join(",")+")"},s.normalize=function(){function e(e,t,n){return tn?n:t}return s.r=e(0,parseInt(s.r),255),s.g=e(0,parseInt(s.g),255),s.b=e(0,parseInt(s.b),255),s.a=e(0,s.a,1),s},s.clone=function(){return e.color.make(s.r,s.b,s.g,s.a)},s.normalize()},e.color.extract=function(t,n){var r;do{r=t.css(n).toLowerCase();if(r!=""&&r!="transparent")break;t=t.parent()}while(!e.nodeName(t.get(0),"body"));return r=="rgba(0, 0, 0, 0)"&&(r="transparent"),e.color.parse(r)},e.color.parse=function(n){var r,i=e.color.make;if(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10));if(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4]));if(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55);if(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4]));if(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return i(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16));if(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return i(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16));var s=e.trim(n).toLowerCase();return s=="transparent"?i(255,255,255,0):(r=t[s]||[0,0,0],i(r[0],r[1],r[2]))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery),function(e){function n(t,n){var r=n.children("."+t)[0];if(r==null){r=document.createElement("canvas"),r.className=t,e(r).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(n);if(!r.getContext){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");r=window.G_vmlCanvasManager.initElement(r)}}this.element=r;var i=this.context=r.getContext("2d"),s=window.devicePixelRatio||1,o=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;this.pixelRatio=s/o,this.resize(n.width(),n.height()),this.textContainer=null,this.text={},this._textCache={}}function r(t,r,s,o){function E(e,t){t=[w].concat(t);for(var n=0;nn&&(n=i))}t<=n&&(t=n+1);var s,o=[],f=a.colors,l=f.length,c=0;for(r=0;r=0?c<.5?c=-c-.2:c=0:c=-c),o[r]=s.scale("rgb",1+c);var h=0,p;for(r=0;re.datamax&&n!=r&&(e.datamax=n)}var t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=Number.MAX_VALUE,i,s,o,a,f,l,c,h,p,d,v,m,g,y,w,S;e.each(k(),function(e,r){r.datamin=t,r.datamax=n,r.used=!1});for(i=0;i0&&c[o-h]!=null&&c[o-h]!=c[o]&&c[o-h+1]!=c[o+1]){for(a=0;aO&&(O=m)),g.y&&(mM&&(M=m))}}if(l.bars.show){var _;switch(l.bars.align){case"left":_=0;break;case"right":_=-l.bars.barWidth;break;case"center":_=-l.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+l.bars.align)}l.bars.horizontal?(A+=_,M+=_+l.bars.barWidth):(L+=_,O+=_+l.bars.barWidth)}x(l.xaxis,L,O),x(l.yaxis,A,M)}e.each(k(),function(e,r){r.datamin==t&&(r.datamin=null),r.datamax==n&&(r.datamax=null)})}function D(){t.css("padding",0).children(":not(.flot-base,.flot-overlay)").remove(),t.css("position")=="static"&&t.css("position","relative"),f=new n("flot-base",t),l=new n("flot-overlay",t),h=f.context,p=l.context,c=e(l.element).unbind();var r=t.data("plot");r&&(r.shutdown(),l.clear()),t.data("plot",w)}function P(){a.grid.hoverable&&(c.mousemove(at),c.bind("mouseleave",ft)),a.grid.clickable&&c.click(lt),E(b.bindEvents,[c])}function H(){ot&&clearTimeout(ot),c.unbind("mousemove",at),c.unbind("mouseleave",ft),c.unbind("click",lt),E(b.shutdown,[c])}function B(e){function t(e){return e}var n,r,i=e.options.transform||t,s=e.options.inverseTransform;e.direction=="x"?(n=e.scale=g/Math.abs(i(e.max)-i(e.min)),r=Math.min(i(e.max),i(e.min))):(n=e.scale=y/Math.abs(i(e.max)-i(e.min)),n=-n,r=Math.max(i(e.max),i(e.min))),i==t?e.p2c=function(e){return(e-r)*n}:e.p2c=function(e){return(i(e)-r)*n},s?e.c2p=function(e){return s(r+e/n)}:e.c2p=function(e){return r+e/n}}function j(e){var t=e.options,n=e.ticks||[],r=t.labelWidth||0,i=t.labelHeight||0,s=r||e.direction=="x"?Math.floor(f.width/(n.length||1)):null;legacyStyles=e.direction+"Axis "+e.direction+e.n+"Axis",layer="flot-"+e.direction+"-axis flot-"+e.direction+e.n+"-axis "+legacyStyles,font=t.font||"flot-tick-label tickLabel";for(var o=0;o=0;--t)F(o[t]);q(),e.each(o,function(e,t){I(t)})}g=f.width-m.left-m.right,y=f.height-m.bottom-m.top,e.each(n,function(e,t){B(t)}),r&&G(),it()}function U(e){var t=e.options,n=+(t.min!=null?t.min:e.datamin),r=+(t.max!=null?t.max:e.datamax),i=r-n;if(i==0){var s=r==0?1:.01;t.min==null&&(n-=s);if(t.max==null||t.min!=null)r+=s}else{var o=t.autoscaleMargin;o!=null&&(t.min==null&&(n-=i*o,n<0&&e.datamin!=null&&e.datamin>=0&&(n=0)),t.max==null&&(r+=i*o,r>0&&e.datamax!=null&&e.datamax<=0&&(r=0)))}e.min=n,e.max=r}function z(t){var n=t.options,r;typeof n.ticks=="number"&&n.ticks>0?r=n.ticks:r=.3*Math.sqrt(t.direction=="x"?f.width:f.height);var s=(t.max-t.min)/r,o=-Math.floor(Math.log(s)/Math.LN10),u=n.tickDecimals;u!=null&&o>u&&(o=u);var a=Math.pow(10,-o),l=s/a,c;l<1.5?c=1:l<3?(c=2,l>2.25&&(u==null||o+1<=u)&&(c=2.5,++o)):l<7.5?c=5:c=10,c*=a,n.minTickSize!=null&&c0&&(n.min==null&&(t.min=Math.min(t.min,p[0])),n.max==null&&p.length>1&&(t.max=Math.max(t.max,p[p.length-1]))),t.tickGenerator=function(e){var t=[],n,r;for(r=0;r1&&/\..*0$/.test((g[1]-g[0]).toFixed(m))||(t.tickDecimals=m)}}}}function W(t){var n=t.options.ticks,r=[];n==null||typeof n=="number"&&n>0?r=t.tickGenerator(t):n&&(e.isFunction(n)?r=n(t):r=n);var i,s;t.ticks=[];for(i=0;i1&&(o=u[1])):s=+u,o==null&&(o=t.tickFormatter(s,t)),isNaN(s)||t.ticks.push({v:s,label:o})}}function X(e,t){e.options.autoscaleMargin&&t.length>0&&(e.options.min==null&&(e.min=Math.min(e.min,t[0].v)),e.options.max==null&&t.length>1&&(e.max=Math.max(e.max,t[t.length-1].v)))}function V(){f.clear(),E(b.drawBackground,[h]);var e=a.grid;e.show&&e.backgroundColor&&K(),e.show&&!e.aboveData&&Q();for(var t=0;ti){var a=r;r=i,i=a}return{from:r,to:i,axis:n}}function K(){h.save(),h.translate(m.left,m.top),h.fillStyle=bt(a.grid.backgroundColor,y,0,"rgba(255, 255, 255, 0)"),h.fillRect(0,0,g,y),h.restore()}function Q(){var t,n,r,i;h.save(),h.translate(m.left,m.top);var s=a.grid.markings;if(s){e.isFunction(s)&&(n=w.getAxes(),n.xmin=n.xaxis.min,n.xmax=n.xaxis.max,n.ymin=n.yaxis.min,n.ymax=n.yaxis.max,s=s(n));for(t=0;tu.axis.max||f.tof.axis.max)continue;u.from=Math.max(u.from,u.axis.min),u.to=Math.min(u.to,u.axis.max),f.from=Math.max(f.from,f.axis.min),f.to=Math.min(f.to,f.axis.max);if(u.from==u.to&&f.from==f.to)continue;u.from=u.axis.p2c(u.from),u.to=u.axis.p2c(u.to),f.from=f.axis.p2c(f.from),f.to=f.axis.p2c(f.to),u.from==u.to||f.from==f.to?(h.beginPath(),h.strokeStyle=o.color||a.grid.markingsColor,h.lineWidth=o.lineWidth||a.grid.markingsLineWidth,h.moveTo(u.from,f.from),h.lineTo(u.to,f.to),h.stroke()):(h.fillStyle=o.color||a.grid.markingsColor,h.fillRect(u.from,f.to,u.to-u.from,f.from-f.to))}}n=k(),r=a.grid.borderWidth;for(var l=0;lc.max||d=="full"&&(typeof r=="object"&&r[c.position]>0||r>0)&&(x==c.min||x==c.max))continue;c.direction=="x"?(v=c.p2c(x),S=d=="full"?-y:d,c.position=="top"&&(S=-S)):(b=c.p2c(x),E=d=="full"?-g:d,c.position=="left"&&(E=-E)),h.lineWidth==1&&(c.direction=="x"?v=Math.floor(v)+.5:b=Math.floor(b)+.5),h.moveTo(v,b),h.lineTo(v+E,b+S)}h.stroke()}r&&(i=a.grid.borderColor,typeof r=="object"||typeof i=="object"?(typeof r!="object"&&(r={top:r,right:r,bottom:r,left:r}),typeof i!="object"&&(i={top:i,right:i,bottom:i,left:i}),r.top>0&&(h.strokeStyle=i.top,h.lineWidth=r.top,h.beginPath(),h.moveTo(0-r.left,0-r.top/2),h.lineTo(g,0-r.top/2),h.stroke()),r.right>0&&(h.strokeStyle=i.right,h.lineWidth=r.right,h.beginPath(),h.moveTo(g+r.right/2,0-r.top),h.lineTo(g+r.right/2,y),h.stroke()),r.bottom>0&&(h.strokeStyle=i.bottom,h.lineWidth=r.bottom,h.beginPath(),h.moveTo(g+r.right,y+r.bottom/2),h.lineTo(0,y+r.bottom/2),h.stroke()),r.left>0&&(h.strokeStyle=i.left,h.lineWidth=r.left,h.beginPath(),h.moveTo(0-r.left/2,y+r.bottom),h.lineTo(0-r.left/2,0),h.stroke())):(h.lineWidth=r,h.strokeStyle=a.grid.borderColor,h.strokeRect(-r/2,-r/2,g+r,y+r))),h.restore()}function G(){e.each(k(),function(e,t){if(!t.show||t.ticks.length==0)return;var n=t.box,r=t.direction+"Axis "+t.direction+t.n+"Axis",i="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=t.options.font||"flot-tick-label tickLabel",o,u,a,l,c;f.removeText(i);for(var h=0;ht.max)continue;t.direction=="x"?(l="center",u=m.left+t.p2c(o.v),t.position=="bottom"?a=n.top+n.padding:(a=n.top+n.height-n.padding,c="bottom")):(c="middle",a=m.top+t.p2c(o.v),t.position=="left"?(u=n.left+n.width-n.padding,l="right"):u=n.left+n.padding),f.addText(i,u,a,o.label,s,null,null,l,c)}})}function Y(e){e.lines.show&&Z(e),e.bars.show&&nt(e),e.points.show&&et(e)}function Z(e){function t(e,t,n,r,i){var s=e.points,o=e.pointsize,u=null,a=null;h.beginPath();for(var f=o;f=d&&c>i.max){if(d>i.max)continue;l=(i.max-c)/(d-c)*(p-l)+l,c=i.max}else if(d>=c&&d>i.max){if(c>i.max)continue;p=(i.max-c)/(d-c)*(p-l)+l,d=i.max}if(l<=p&&l=p&&l>r.max){if(p>r.max)continue;c=(r.max-l)/(p-l)*(d-c)+c,l=r.max}else if(p>=l&&p>r.max){if(l>r.max)continue;d=(r.max-l)/(p-l)*(d-c)+c,p=r.max}(l!=u||c!=a)&&h.moveTo(r.p2c(l)+t,i.p2c(c)+n),u=p,a=d,h.lineTo(r.p2c(p)+t,i.p2c(d)+n)}h.stroke()}function n(e,t,n){var r=e.points,i=e.pointsize,s=Math.min(Math.max(0,n.min),n.max),o=0,u,a=!1,f=1,l=0,c=0;for(;;){if(i>0&&o>r.length+i)break;o+=i;var p=r[o-i],d=r[o-i+f],v=r[o],m=r[o+f];if(a){if(i>0&&p!=null&&v==null){c=o,i=-i,f=2;continue}if(i<0&&o==l+i){h.fill(),a=!1,i=-i,f=1,o=l=c+i;continue}}if(p==null||v==null)continue;if(p<=v&&p=v&&p>t.max){if(v>t.max)continue;d=(t.max-p)/(v-p)*(m-d)+d,p=t.max}else if(v>=p&&v>t.max){if(p>t.max)continue;m=(t.max-p)/(v-p)*(m-d)+d,v=t.max}a||(h.beginPath(),h.moveTo(t.p2c(p),n.p2c(s)),a=!0);if(d>=n.max&&m>=n.max){h.lineTo(t.p2c(p),n.p2c(n.max)),h.lineTo(t.p2c(v),n.p2c(n.max));continue}if(d<=n.min&&m<=n.min){h.lineTo(t.p2c(p),n.p2c(n.min)),h.lineTo(t.p2c(v),n.p2c(n.min));continue}var g=p,y=v;d<=m&&d=n.min?(p=(n.min-d)/(m-d)*(v-p)+p,d=n.min):m<=d&&m=n.min&&(v=(n.min-d)/(m-d)*(v-p)+p,m=n.min),d>=m&&d>n.max&&m<=n.max?(p=(n.max-d)/(m-d)*(v-p)+p,d=n.max):m>=d&&m>n.max&&d<=n.max&&(v=(n.max-d)/(m-d)*(v-p)+p,m=n.max),p!=g&&h.lineTo(t.p2c(g),n.p2c(d)),h.lineTo(t.p2c(p),n.p2c(d)),h.lineTo(t.p2c(v),n.p2c(m)),v!=y&&(h.lineTo(t.p2c(v),n.p2c(m)),h.lineTo(t.p2c(y),n.p2c(m)))}}h.save(),h.translate(m.left,m.top),h.lineJoin="round";var r=e.lines.lineWidth,i=e.shadowSize;if(r>0&&i>0){h.lineWidth=i,h.strokeStyle="rgba(0,0,0,0.1)";var s=Math.PI/18;t(e.datapoints,Math.sin(s)*(r/2+i/2),Math.cos(s)*(r/2+i/2),e.xaxis,e.yaxis),h.lineWidth=i/2,t(e.datapoints,Math.sin(s)*(r/2+i/4),Math.cos(s)*(r/2+i/4),e.xaxis,e.yaxis)}h.lineWidth=r,h.strokeStyle=e.color;var o=rt(e.lines,e.color,0,y);o&&(h.fillStyle=o,n(e.datapoints,e.xaxis,e.yaxis)),r>0&&t(e.datapoints,0,0,e.xaxis,e.yaxis),h.restore()}function et(e){function t(e,t,n,r,i,s,o,u){var a=e.points,f=e.pointsize;for(var l=0;ls.max||po.max)continue;h.beginPath(),c=s.p2c(c),p=o.p2c(p)+r,u=="circle"?h.arc(c,p,t,0,i?Math.PI:Math.PI*2,!1):u(h,c,p,t,i),h.closePath(),n&&(h.fillStyle=n,h.fill()),h.stroke()}}h.save(),h.translate(m.left,m.top);var n=e.points.lineWidth,r=e.shadowSize,i=e.points.radius,s=e.points.symbol;n==0&&(n=1e-4);if(n>0&&r>0){var o=r/2;h.lineWidth=o,h.strokeStyle="rgba(0,0,0,0.1)",t(e.datapoints,i,null,o+o/2,!0,e.xaxis,e.yaxis,s),h.strokeStyle="rgba(0,0,0,0.2)",t(e.datapoints,i,null,o/2,!0,e.xaxis,e.yaxis,s)}h.lineWidth=n,h.strokeStyle=e.color,t(e.datapoints,i,rt(e.points,e.color),0,!1,e.xaxis,e.yaxis,s),h.restore()}function tt(e,t,n,r,i,s,o,u,a,f,l,c){var h,p,d,v,m,g,y,b,w;l?(b=g=y=!0,m=!1,h=n,p=e,v=t+r,d=t+i,pu.max||va.max)return;hu.max&&(p=u.max,g=!1),da.max&&(v=a.max,y=!1),h=u.p2c(h),d=a.p2c(d),p=u.p2c(p),v=a.p2c(v),o&&(f.beginPath(),f.moveTo(h,d),f.lineTo(h,v),f.lineTo(p,v),f.lineTo(p,d),f.fillStyle=o(d,v),f.fill()),c>0&&(m||g||y||b)&&(f.beginPath(),f.moveTo(h,d+s),m?f.lineTo(h,v+s):f.moveTo(h,v+s),y?f.lineTo(p,v+s):f.moveTo(p,v+s),g?f.lineTo(p,d+s):f.moveTo(p,d+s),b?f.lineTo(h,d+s):f.moveTo(h,d+s),f.stroke())}function nt(e){function t(t,n,r,i,s,o,u){var a=t.points,f=t.pointsize;for(var l=0;l"),n.push("
    "),i=!0),n.push(''+'")}i&&n.push("");if(n.length==0)return;var p='
    '+h.label+"
    '+n.join("")+"
    ";if(a.legend.container!=null)e(a.legend.container).html(p);else{var d="",v=a.legend.position,g=a.legend.margin;g[0]==null&&(g=[g,g]),v.charAt(0)=="n"?d+="top:"+(g[1]+m.top)+"px;":v.charAt(0)=="s"&&(d+="bottom:"+(g[1]+m.bottom)+"px;"),v.charAt(1)=="e"?d+="right:"+(g[0]+m.right)+"px;":v.charAt(1)=="w"&&(d+="left:"+(g[0]+m.left)+"px;");var y=e('
    '+p.replace('style="','style="position:absolute;'+d+";")+"
    ").appendTo(t);if(a.legend.backgroundOpacity!=0){var b=a.legend.backgroundColor;b==null&&(b=a.grid.backgroundColor,b&&typeof b=="string"?b=e.color.parse(b):b=e.color.extract(y,"background-color"),b.a=1,b=b.toString());var w=y.children();e('
    ').prependTo(y).css("opacity",a.legend.backgroundOpacity)}}}function ut(e,t,n){var r=a.grid.mouseActiveRadius,i=r*r+1,s=null,o=!1,f,l,c;for(f=u.length-1;f>=0;--f){if(!n(u[f]))continue;var h=u[f],p=h.xaxis,d=h.yaxis,v=h.datapoints.points,m=p.c2p(e),g=d.c2p(t),y=r/p.scale,b=r/d.scale;c=h.datapoints.pointsize,p.options.inverseTransform&&(y=Number.MAX_VALUE),d.options.inverseTransform&&(b=Number.MAX_VALUE);if(h.lines.show||h.points.show)for(l=0;ly||w-m<-y||E-g>b||E-g<-b)continue;var S=Math.abs(p.p2c(w)-e),x=Math.abs(d.p2c(E)-t),T=S*S+x*x;T=Math.min(k,w)&&g>=E+N&&g<=E+C:m>=w+N&&m<=w+C&&g>=Math.min(k,E)&&g<=Math.max(k,E))s=[f,l/c]}}}return s?(f=s[0],l=s[1],c=u[f].datapoints.pointsize,{datapoint:u[f].datapoints.points.slice(l*c,(l+1)*c),dataIndex:l,series:u[f],seriesIndex:f}):null}function at(e){a.grid.hoverable&&ct("plothover",e,function(e){return e["hoverable"]!=0})}function ft(e){a.grid.hoverable&&ct("plothover",e,function(e){return!1})}function lt(e){ct("plotclick",e,function(e){return e["clickable"]!=0})}function ct(e,n,r){var i=c.offset(),s=n.pageX-i.left-m.left,o=n.pageY-i.top-m.top,u=L({left:s,top:o});u.pageX=n.pageX,u.pageY=n.pageY;var f=ut(s,o,r);f&&(f.pageX=parseInt(f.series.xaxis.p2c(f.datapoint[0])+i.left+m.left,10),f.pageY=parseInt(f.series.yaxis.p2c(f.datapoint[1])+i.top+m.top,10));if(a.grid.autoHighlight){for(var l=0;ls.max||io.max)return;var a=t.points.radius+t.points.lineWidth/2;p.lineWidth=a,p.strokeStyle=u;var f=1.5*a;r=s.p2c(r),i=o.p2c(i),p.beginPath(),t.points.symbol=="circle"?p.arc(r,i,f,0,2*Math.PI,!1):t.points.symbol(p,r,i,f,!1),p.closePath(),p.stroke()}function yt(t,n){var r=typeof t.highlightColor=="string"?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),i=r,s=t.bars.align=="left"?0:-t.bars.barWidth/2;p.lineWidth=t.bars.lineWidth,p.strokeStyle=r,tt(n[0],n[1],n[2]||0,s,s+t.bars.barWidth,0,function(){return i},t.xaxis,t.yaxis,p,t.bars.horizontal,t.bars.lineWidth)}function bt(t,n,r,i){if(typeof t=="string")return t;var s=h.createLinearGradient(0,r,0,n);for(var o=0,u=t.colors.length;o").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),n=this.text[t]=e("
    ").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),n},n.prototype.getTextInfo=function(t,n,r,i,s){var o,u,a,f;n=""+n,typeof r=="object"?o=r.style+" "+r.variant+" "+r.weight+" "+r.size+"px/"+r.lineHeight+"px "+r.family:o=r,u=this._textCache[t],u==null&&(u=this._textCache[t]={}),a=u[o],a==null&&(a=u[o]={}),f=a[n];if(f==null){var l=e("
    ").html(n).css({position:"absolute","max-width":s,top:-9999}).appendTo(this.getTextLayer(t));typeof r=="object"?l.css({font:o,color:r.color}):typeof r=="string"&&l.addClass(r),f=a[n]={width:l.outerWidth(!0),height:l.outerHeight(!0),element:l,positions:[]},l.detach()}return f},n.prototype.addText=function(e,t,n,r,i,s,o,u,a){var f=this.getTextInfo(e,r,i,s,o),l=f.positions;u=="center"?t-=f.width/2:u=="right"&&(t-=f.width),a=="middle"?n-=f.height/2:a=="bottom"&&(n-=f.height);for(var c=0,h;h=l[c];c++)if(h.x==t&&h.y==n){h.active=!0;return}h={active:!0,rendered:!1,element:l.length?f.element.clone():f.element,x:t,y:n},l.push(h),h.element.css({top:Math.round(n),left:Math.round(t),"text-align":u})},n.prototype.removeText=function(e,n,r,i,s,o){if(i==null){var u=this._textCache[e];if(u!=null)for(var a in u)if(t.call(u,a)){var f=u[a];for(var l in f)if(t.call(f,l)){var c=f[l].positions;for(var h=0,p;p=c[h];h++)p.active=!1}}}else{var c=this.getTextInfo(e,i,s,o).positions;for(var h=0,p;p=c[h];h++)p.x==n&&p.y==r&&(p.active=!1)}},e.plot=function(t,n,i){var s=new r(e(t),n,i,e.plot.plugins);return s},e.plot.version="0.8.1",e.plot.plugins=[],e.fn.plot=function(t,n){return this.each(function(){e.plot(this,t,n)})}}(jQuery);js/jquery-ui.custom.min.js000064400000073533152347514360011570 0ustar00/*! jQuery UI - v1.10.4 - 2014-04-24 * http://jqueryui.com * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.tabs.js * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ (function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("
    "),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widths?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("
    ").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("
    ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("
    ").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);js/spectrum.js000064400000205045152347514360007400 0ustar00// Spectrum Colorpicker v1.2.0 // https://github.com/bgrins/spectrum // Author: Brian Grinstead // License: MIT (function (window, $, undefined) { var defaultOpts = { // Callbacks beforeShow: noop, move: noop, change: noop, show: noop, hide: noop, // Options color: false, flat: false, showInput: false, allowEmpty: false, showButtons: true, clickoutFiresChange: false, showInitial: false, showPalette: false, showPaletteOnly: false, showSelectionPalette: true, localStorageKey: false, appendTo: "body", maxSelectionSize: 7, cancelText: "cancel", chooseText: "choose", preferredFormat: false, className: "", showAlpha: false, theme: "sp-light", palette: ['fff', '000'], selectionPalette: [], disabled: false }, spectrums = [], IE = !!/msie/i.exec( window.navigator.userAgent ), rgbaSupport = (function() { function contains( str, substr ) { return !!~('' + str).indexOf(substr); } var elem = document.createElement('div'); var style = elem.style; style.cssText = 'background-color:rgba(0,0,0,.5)'; return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); })(), inputTypeColorSupport = (function() { var colorInput = $("")[0]; return colorInput.type === "color" && colorInput.value !== "!"; })(), replaceInput = [ "
    ", "
    ", "
    ", "
    " ].join(''), markup = (function () { // IE does not support gradients with multiple stops, so we need to simulate // that for the rainbow slider with 8 divs that each have a single gradient var gradientFix = ""; if (IE) { for (var i = 1; i <= 6; i++) { gradientFix += "
    "; } } return [ "
    " ].join(""); })(); function paletteTemplate (p, color, className) { var html = []; for (var i = 0; i < p.length; i++) { var current = p[i]; if(current) { var tiny = tinycolor(current); var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : ""; var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); html.push(''); } else { var cls = 'sp-clear-display'; html.push(''); } } return "
    " + html.join('') + "
    "; } function hideAll() { for (var i = 0; i < spectrums.length; i++) { if (spectrums[i]) { spectrums[i].hide(); } } } function instanceOptions(o, callbackContext) { var opts = $.extend({}, defaultOpts, o); opts.callbacks = { 'move': bind(opts.move, callbackContext), 'change': bind(opts.change, callbackContext), 'show': bind(opts.show, callbackContext), 'hide': bind(opts.hide, callbackContext), 'beforeShow': bind(opts.beforeShow, callbackContext) }; return opts; } function spectrum(element, o) { var opts = instanceOptions(o, element), flat = opts.flat, showSelectionPalette = opts.showSelectionPalette, localStorageKey = opts.localStorageKey, theme = opts.theme, callbacks = opts.callbacks, resize = throttle(reflow, 10), visible = false, dragWidth = 0, dragHeight = 0, dragHelperHeight = 0, slideHeight = 0, slideWidth = 0, alphaWidth = 0, alphaSlideHelperWidth = 0, slideHelperHeight = 0, currentHue = 0, currentSaturation = 0, currentValue = 0, currentAlpha = 1, palette = opts.palette.slice(0), paletteArray = $.isArray(palette[0]) ? palette : [palette], selectionPalette = opts.selectionPalette.slice(0), maxSelectionSize = opts.maxSelectionSize, draggingClass = "sp-dragging", shiftMovementDirection = null; var doc = element.ownerDocument, body = doc.body, boundElement = $(element), disabled = false, container = $(markup, doc).addClass(theme), dragger = container.find(".sp-color"), dragHelper = container.find(".sp-dragger"), slider = container.find(".sp-hue"), slideHelper = container.find(".sp-slider"), alphaSliderInner = container.find(".sp-alpha-inner"), alphaSlider = container.find(".sp-alpha"), alphaSlideHelper = container.find(".sp-alpha-handle"), textInput = container.find(".sp-input"), paletteContainer = container.find(".sp-palette"), initialColorContainer = container.find(".sp-initial"), cancelButton = container.find(".sp-cancel"), clearButton = container.find(".sp-clear"), chooseButton = container.find(".sp-choose"), isInput = boundElement.is("input"), isInputTypeColor = isInput && inputTypeColorSupport && boundElement.attr("type") === "color", shouldReplace = isInput && !flat, replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className) : $([]), offsetElement = (shouldReplace) ? replacer : boundElement, previewElement = replacer.find(".sp-preview-inner"), initialColor = opts.color || (isInput && boundElement.val()), colorOnShow = false, preferredFormat = opts.preferredFormat, currentPreferredFormat = preferredFormat, clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange, isEmpty = !initialColor, allowEmpty = opts.allowEmpty && !isInputTypeColor; function applyOptions() { if (opts.showPaletteOnly) { opts.showPalette = true; } container.toggleClass("sp-flat", flat); container.toggleClass("sp-input-disabled", !opts.showInput); container.toggleClass("sp-alpha-enabled", opts.showAlpha); container.toggleClass("sp-clear-enabled", allowEmpty); container.toggleClass("sp-buttons-disabled", !opts.showButtons); container.toggleClass("sp-palette-disabled", !opts.showPalette); container.toggleClass("sp-palette-only", opts.showPaletteOnly); container.toggleClass("sp-initial-disabled", !opts.showInitial); container.addClass(opts.className); reflow(); } function initialize() { if (IE) { container.find("*:not(input)").attr("unselectable", "on"); } applyOptions(); if (shouldReplace) { boundElement.after(replacer).hide(); } if (!allowEmpty) { clearButton.hide(); } if (flat) { boundElement.after(container).hide(); } else { var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); if (appendTo.length !== 1) { appendTo = $("body"); } appendTo.append(container); } if (localStorageKey && window.localStorage) { // Migrate old palettes over to new format. May want to remove this eventually. try { var oldPalette = window.localStorage[localStorageKey].split(",#"); if (oldPalette.length > 1) { delete window.localStorage[localStorageKey]; $.each(oldPalette, function(i, c) { addColorToSelectionPalette(c); }); } } catch(e) { } try { selectionPalette = window.localStorage[localStorageKey].split(";"); } catch (e) { } } offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { if (!disabled) { toggle(); } e.stopPropagation(); if (!$(e.target).is("input")) { e.preventDefault(); } }); if(boundElement.is(":disabled") || (opts.disabled === true)) { disable(); } // Prevent clicks from bubbling up to document. This would cause it to be hidden. container.click(stopPropagation); // Handle user typed input textInput.change(setFromTextInput); textInput.bind("paste", function () { setTimeout(setFromTextInput, 1); }); textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); cancelButton.text(opts.cancelText); cancelButton.bind("click.spectrum", function (e) { e.stopPropagation(); e.preventDefault(); hide("cancel"); }); clearButton.bind("click.spectrum", function (e) { e.stopPropagation(); e.preventDefault(); isEmpty = true; move(); if(flat) { //for the flat style, this is a change event updateOriginalInput(true); } }); chooseButton.text(opts.chooseText); chooseButton.bind("click.spectrum", function (e) { e.stopPropagation(); e.preventDefault(); if (isValid()) { updateOriginalInput(true); hide(); } }); draggable(alphaSlider, function (dragX, dragY, e) { currentAlpha = (dragX / alphaWidth); isEmpty = false; if (e.shiftKey) { currentAlpha = Math.round(currentAlpha * 10) / 10; } move(); }); draggable(slider, function (dragX, dragY) { currentHue = parseFloat(dragY / slideHeight); isEmpty = false; move(); }, dragStart, dragStop); draggable(dragger, function (dragX, dragY, e) { // shift+drag should snap the movement to either the x or y axis. if (!e.shiftKey) { shiftMovementDirection = null; } else if (!shiftMovementDirection) { var oldDragX = currentSaturation * dragWidth; var oldDragY = dragHeight - (currentValue * dragHeight); var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); shiftMovementDirection = furtherFromX ? "x" : "y"; } var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; if (setSaturation) { currentSaturation = parseFloat(dragX / dragWidth); } if (setValue) { currentValue = parseFloat((dragHeight - dragY) / dragHeight); } isEmpty = false; move(); }, dragStart, dragStop); if (!!initialColor) { set(initialColor); // In case color was black - update the preview UI and set the format // since the set function will not run (default color is black). updateUI(); currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; addColorToSelectionPalette(initialColor); } else { updateUI(); } if (flat) { show(); } function palletElementClick(e) { if (e.data && e.data.ignore) { set($(this).data("color")); move(); } else { set($(this).data("color")); updateOriginalInput(true); move(); hide(); } return false; } var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); } function addColorToSelectionPalette(color) { if (showSelectionPalette) { var colorRgb = tinycolor(color).toRgbString(); if ($.inArray(colorRgb, selectionPalette) === -1) { selectionPalette.push(colorRgb); while(selectionPalette.length > maxSelectionSize) { selectionPalette.shift(); } } if (localStorageKey && window.localStorage) { try { window.localStorage[localStorageKey] = selectionPalette.join(";"); } catch(e) { } } } } function getUniqueSelectionPalette() { var unique = []; var p = selectionPalette; var paletteLookup = {}; var rgb; if (opts.showPalette) { for (var i = 0; i < paletteArray.length; i++) { for (var j = 0; j < paletteArray[i].length; j++) { rgb = tinycolor(paletteArray[i][j]).toRgbString(); paletteLookup[rgb] = true; } } for (i = 0; i < p.length; i++) { rgb = tinycolor(p[i]).toRgbString(); if (!paletteLookup.hasOwnProperty(rgb)) { unique.push(p[i]); paletteLookup[rgb] = true; } } } return unique.reverse().slice(0, opts.maxSelectionSize); } function drawPalette() { var currentColor = get(); var html = $.map(paletteArray, function (palette, i) { return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i); }); if (selectionPalette) { html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection")); } paletteContainer.html(html.join("")); } function drawInitial() { if (opts.showInitial) { var initial = colorOnShow; var current = get(); initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial")); } } function dragStart() { if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { reflow(); } container.addClass(draggingClass); shiftMovementDirection = null; } function dragStop() { container.removeClass(draggingClass); } function setFromTextInput() { var value = textInput.val(); if ((value === null || value === "") && allowEmpty) { set(null); } else { var tiny = tinycolor(value); if (tiny.ok) { set(tiny); } else { textInput.addClass("sp-validation-error"); } } } function toggle() { if (visible) { hide(); } else { show(); } } function show() { var event = $.Event('beforeShow.spectrum'); if (visible) { reflow(); return; } boundElement.trigger(event, [ get() ]); if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) { return; } hideAll(); visible = true; $(doc).bind("click.spectrum", hide); $(window).bind("resize.spectrum", resize); replacer.addClass("sp-active"); container.removeClass("sp-hidden"); if (opts.showPalette) { drawPalette(); } reflow(); updateUI(); colorOnShow = get(); drawInitial(); callbacks.show(colorOnShow); boundElement.trigger('show.spectrum', [ colorOnShow ]); } function hide(e) { // Return on right click if (e && e.type == "click" && e.button == 2) { return; } // Return if hiding is unnecessary if (!visible || flat) { return; } visible = false; $(doc).unbind("click.spectrum", hide); $(window).unbind("resize.spectrum", resize); replacer.removeClass("sp-active"); container.addClass("sp-hidden"); var colorHasChanged = !tinycolor.equals(get(), colorOnShow); if (colorHasChanged) { if (clickoutFiresChange && e !== "cancel") { updateOriginalInput(true); } else { revert(); } } callbacks.hide(get()); boundElement.trigger('hide.spectrum', [ get() ]); } function revert() { set(colorOnShow, true); } function set(color, ignoreFormatChange) { if (tinycolor.equals(color, get())) { return; } var newColor; if (!color && allowEmpty) { isEmpty = true; } else { isEmpty = false; newColor = tinycolor(color); var newHsv = newColor.toHsv(); currentHue = (newHsv.h % 360) / 360; currentSaturation = newHsv.s; currentValue = newHsv.v; currentAlpha = newHsv.a; } updateUI(); if (newColor && newColor.ok && !ignoreFormatChange) { currentPreferredFormat = preferredFormat || newColor.format; } } function get(opts) { opts = opts || { }; if (allowEmpty && isEmpty) { return null; } return tinycolor.fromRatio({ h: currentHue, s: currentSaturation, v: currentValue, a: Math.round(currentAlpha * 100) / 100 }, { format: opts.format || currentPreferredFormat }); } function isValid() { return !textInput.hasClass("sp-validation-error"); } function move() { updateUI(); callbacks.move(get()); boundElement.trigger('move.spectrum', [ get() ]); } function updateUI() { textInput.removeClass("sp-validation-error"); updateHelperLocations(); // Update dragger background color (gradients take care of saturation and value). var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); dragger.css("background-color", flatColor.toHexString()); // Get a format that alpha will be included in (hex and names ignore alpha) var format = currentPreferredFormat; if (currentAlpha < 1) { if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { format = "rgb"; } } var realColor = get({ format: format }), displayColor = ''; //reset background info for preview element previewElement.removeClass("sp-clear-display"); previewElement.css('background-color', 'transparent'); if (!realColor && allowEmpty) { // Update the replaced elements background with icon indicating no color selection previewElement.addClass("sp-clear-display"); } else { var realHex = realColor.toHexString(), realRgb = realColor.toRgbString(); // Update the replaced elements background color (with actual selected color) if (rgbaSupport || realColor.alpha === 1) { previewElement.css("background-color", realRgb); } else { previewElement.css("background-color", "transparent"); previewElement.css("filter", realColor.toFilter()); } if (opts.showAlpha) { var rgb = realColor.toRgb(); rgb.a = 0; var realAlpha = tinycolor(rgb).toRgbString(); var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; if (IE) { alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); } else { alphaSliderInner.css("background", "-webkit-" + gradient); alphaSliderInner.css("background", "-moz-" + gradient); alphaSliderInner.css("background", "-ms-" + gradient); alphaSliderInner.css("background", gradient); } } displayColor = realColor.toString(format); } // Update the text entry input as it changes happen if (opts.showInput) { textInput.val(displayColor); } if (opts.showPalette) { drawPalette(); } drawInitial(); } function updateHelperLocations() { var s = currentSaturation; var v = currentValue; if(allowEmpty && isEmpty) { //if selected color is empty, hide the helpers alphaSlideHelper.hide(); slideHelper.hide(); dragHelper.hide(); } else { //make sure helpers are visible alphaSlideHelper.show(); slideHelper.show(); dragHelper.show(); // Where to show the little circle in that displays your current selected color var dragX = s * dragWidth; var dragY = dragHeight - (v * dragHeight); dragX = Math.max( -dragHelperHeight, Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight) ); dragY = Math.max( -dragHelperHeight, Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight) ); dragHelper.css({ "top": dragY, "left": dragX }); var alphaX = currentAlpha * alphaWidth; alphaSlideHelper.css({ "left": alphaX - (alphaSlideHelperWidth / 2) }); // Where to show the bar that displays your current selected hue var slideY = (currentHue) * slideHeight; slideHelper.css({ "top": slideY - slideHelperHeight }); } } function updateOriginalInput(fireCallback) { var color = get(), displayColor = '', hasChanged = !tinycolor.equals(color, colorOnShow); if(color) { displayColor = color.toString(currentPreferredFormat); // Update the selection palette with the current color addColorToSelectionPalette(color); } if (isInput) { boundElement.val(displayColor); } colorOnShow = color; if (fireCallback && hasChanged) { callbacks.change(color); boundElement.trigger('change', [ color ]); } } function reflow() { dragWidth = dragger.width(); dragHeight = dragger.height(); dragHelperHeight = dragHelper.height(); slideWidth = slider.width(); slideHeight = slider.height(); slideHelperHeight = slideHelper.height(); alphaWidth = alphaSlider.width(); alphaSlideHelperWidth = alphaSlideHelper.width(); if (!flat) { container.css("position", "absolute"); container.offset(getOffset(container, offsetElement)); } updateHelperLocations(); } function destroy() { boundElement.show(); offsetElement.unbind("click.spectrum touchstart.spectrum"); container.remove(); replacer.remove(); spectrums[spect.id] = null; } function option(optionName, optionValue) { if (optionName === undefined) { return $.extend({}, opts); } if (optionValue === undefined) { return opts[optionName]; } opts[optionName] = optionValue; applyOptions(); } function enable() { disabled = false; boundElement.attr("disabled", false); offsetElement.removeClass("sp-disabled"); } function disable() { hide(); disabled = true; boundElement.attr("disabled", true); offsetElement.addClass("sp-disabled"); } initialize(); var spect = { show: show, hide: hide, toggle: toggle, reflow: reflow, option: option, enable: enable, disable: disable, set: function (c) { set(c); updateOriginalInput(); }, get: get, destroy: destroy, container: container }; spect.id = spectrums.push(spect) - 1; return spect; } /** * checkOffset - get the offset below/above and left/right element depending on screen position * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js */ function getOffset(picker, input) { var extraY = 0; var dpWidth = picker.outerWidth(); var dpHeight = picker.outerHeight(); var inputHeight = input.outerHeight(); var doc = picker[0].ownerDocument; var docElem = doc.documentElement; var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); var viewHeight = docElem.clientHeight + $(doc).scrollTop(); var offset = input.offset(); offset.top += inputHeight; offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0); offset.top -= Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(dpHeight + inputHeight - extraY) : extraY)); return offset; } /** * noop - do nothing */ function noop() { } /** * stopPropagation - makes the code only doing this a little easier to read in line */ function stopPropagation(e) { e.stopPropagation(); } /** * Create a function bound to a given object * Thanks to underscore.js */ function bind(func, obj) { var slice = Array.prototype.slice; var args = slice.call(arguments, 2); return function () { return func.apply(obj, args.concat(slice.call(arguments))); }; } /** * Lightweight drag helper. Handles containment within the element, so that * when dragging, the x is within [0,element.width] and y is within [0,element.height] */ function draggable(element, onmove, onstart, onstop) { onmove = onmove || function () { }; onstart = onstart || function () { }; onstop = onstop || function () { }; var doc = element.ownerDocument || document; var dragging = false; var offset = {}; var maxHeight = 0; var maxWidth = 0; var hasTouch = ('ontouchstart' in window); var duringDragEvents = {}; duringDragEvents["selectstart"] = prevent; duringDragEvents["dragstart"] = prevent; duringDragEvents["touchmove mousemove"] = move; duringDragEvents["touchend mouseup"] = stop; function prevent(e) { if (e.stopPropagation) { e.stopPropagation(); } if (e.preventDefault) { e.preventDefault(); } e.returnValue = false; } function move(e) { if (dragging) { // Mouseup happened outside of window if (IE && document.documentMode < 9 && !e.button) { return stop(); } var touches = e.originalEvent.touches; var pageX = touches ? touches[0].pageX : e.pageX; var pageY = touches ? touches[0].pageY : e.pageY; var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); if (hasTouch) { // Stop scrolling in iOS prevent(e); } onmove.apply(element, [dragX, dragY, e]); } } function start(e) { var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); var touches = e.originalEvent.touches; if (!rightclick && !dragging) { if (onstart.apply(element, arguments) !== false) { dragging = true; maxHeight = $(element).height(); maxWidth = $(element).width(); offset = $(element).offset(); $(doc).bind(duringDragEvents); $(doc.body).addClass("sp-dragging"); if (!hasTouch) { move(e); } prevent(e); } } } function stop() { if (dragging) { $(doc).unbind(duringDragEvents); $(doc.body).removeClass("sp-dragging"); onstop.apply(element, arguments); } dragging = false; } $(element).bind("touchstart mousedown", start); } function throttle(func, wait, debounce) { var timeout; return function () { var context = this, args = arguments; var throttler = function () { timeout = null; func.apply(context, args); }; if (debounce) clearTimeout(timeout); if (debounce || !timeout) timeout = setTimeout(throttler, wait); }; } function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} /** * Define a jQuery plugin */ var dataID = "spectrum.id"; $.fn.spectrum = function (opts, extra) { if (typeof opts == "string") { var returnValue = this; var args = Array.prototype.slice.call( arguments, 1 ); this.each(function () { var spect = spectrums[$(this).data(dataID)]; if (spect) { var method = spect[opts]; if (!method) { throw new Error( "Spectrum: no such method: '" + opts + "'" ); } if (opts == "get") { returnValue = spect.get(); } else if (opts == "container") { returnValue = spect.container; } else if (opts == "option") { returnValue = spect.option.apply(spect, args); } else if (opts == "destroy") { spect.destroy(); $(this).removeData(dataID); } else { method.apply(spect, args); } } }); return returnValue; } // Initializing a new instance of spectrum return this.spectrum("destroy").each(function () { var spect = spectrum(this, opts); $(this).data(dataID, spect.id); }); }; $.fn.spectrum.load = true; $.fn.spectrum.loadOpts = {}; $.fn.spectrum.draggable = draggable; $.fn.spectrum.defaults = defaultOpts; $.spectrum = { }; $.spectrum.localization = { }; $.spectrum.palettes = { }; $.fn.spectrum.processNativeColorInputs = function () { if (!inputTypeColorSupport) { $("input[type=color]").spectrum({ preferredFormat: "hex6" }); } }; // TinyColor v0.9.16 // https://github.com/bgrins/TinyColor // 2013-08-10, Brian Grinstead, MIT License (function() { var trimLeft = /^[\s,#]+/, trimRight = /\s+$/, tinyCounter = 0, math = Math, mathRound = math.round, mathMin = math.min, mathMax = math.max, mathRandom = math.random; function tinycolor (color, opts) { color = (color) ? color : ''; opts = opts || { }; // If input is already a tinycolor, return itself if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { return color; } var rgb = inputToRGB(color); var r = rgb.r, g = rgb.g, b = rgb.b, a = rgb.a, roundA = mathRound(100*a) / 100, format = opts.format || rgb.format; // Don't let the range of [0,255] come back in [0,1]. // Potentially lose a little bit of precision here, but will fix issues where // .5 gets interpreted as half of the total, instead of half of 1 // If it was supposed to be 128, this was already taken care of by `inputToRgb` if (r < 1) { r = mathRound(r); } if (g < 1) { g = mathRound(g); } if (b < 1) { b = mathRound(b); } return { ok: rgb.ok, format: format, _tc_id: tinyCounter++, alpha: a, getAlpha: function() { return a; }, setAlpha: function(value) { a = boundAlpha(value); roundA = mathRound(100*a) / 100; }, toHsv: function() { var hsv = rgbToHsv(r, g, b); return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; }, toHsvString: function() { var hsv = rgbToHsv(r, g, b); var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); return (a == 1) ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; }, toHsl: function() { var hsl = rgbToHsl(r, g, b); return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; }, toHslString: function() { var hsl = rgbToHsl(r, g, b); var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); return (a == 1) ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; }, toHex: function(allow3Char) { return rgbToHex(r, g, b, allow3Char); }, toHexString: function(allow3Char) { return '#' + rgbToHex(r, g, b, allow3Char); }, toRgb: function() { return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; }, toRgbString: function() { return (a == 1) ? "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; }, toPercentageRgb: function() { return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; }, toPercentageRgbString: function() { return (a == 1) ? "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; }, toName: function() { if (a === 0) { return "transparent"; } return hexNames[rgbToHex(r, g, b, true)] || false; }, toFilter: function(secondColor) { var hex = rgbToHex(r, g, b); var secondHex = hex; var alphaHex = Math.round(parseFloat(a) * 255).toString(16); var secondAlphaHex = alphaHex; var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; if (secondColor) { var s = tinycolor(secondColor); secondHex = s.toHex(); secondAlphaHex = Math.round(parseFloat(s.alpha) * 255).toString(16); } return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")"; }, toString: function(format) { var formatSet = !!format; format = format || this.format; var formattedString = false; var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); if (format === "rgb") { formattedString = this.toRgbString(); } if (format === "prgb") { formattedString = this.toPercentageRgbString(); } if (format === "hex" || format === "hex6") { formattedString = this.toHexString(); } if (format === "hex3") { formattedString = this.toHexString(true); } if (format === "name") { formattedString = this.toName(); } if (format === "hsl") { formattedString = this.toHslString(); } if (format === "hsv") { formattedString = this.toHsvString(); } if (formatWithAlpha) { return this.toRgbString(); } return formattedString || this.toHexString(); } }; } // If input is an object, force 1 into "1.0" to handle ratios properly // String input requires "1.0" as input, so 1 will be treated as 1 tinycolor.fromRatio = function(color, opts) { if (typeof color == "object") { var newColor = {}; for (var i in color) { if (color.hasOwnProperty(i)) { if (i === "a") { newColor[i] = color[i]; } else { newColor[i] = convertToPercentage(color[i]); } } } color = newColor; } return tinycolor(color, opts); }; // Given a string or object, convert that input to RGB // Possible string inputs: // // "red" // "#f00" or "f00" // "#ff0000" or "ff0000" // "rgb 255 0 0" or "rgb (255, 0, 0)" // "rgb 1.0 0 0" or "rgb (1, 0, 0)" // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" // function inputToRGB(color) { var rgb = { r: 0, g: 0, b: 0 }; var a = 1; var ok = false; var format = false; if (typeof color == "string") { color = stringInputToObject(color); } if (typeof color == "object") { if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { rgb = rgbToRgb(color.r, color.g, color.b); ok = true; format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; } else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { color.s = convertToPercentage(color.s); color.v = convertToPercentage(color.v); rgb = hsvToRgb(color.h, color.s, color.v); ok = true; format = "hsv"; } else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { color.s = convertToPercentage(color.s); color.l = convertToPercentage(color.l); rgb = hslToRgb(color.h, color.s, color.l); ok = true; format = "hsl"; } if (color.hasOwnProperty("a")) { a = color.a; } } a = boundAlpha(a); return { ok: ok, format: color.format || format, r: mathMin(255, mathMax(rgb.r, 0)), g: mathMin(255, mathMax(rgb.g, 0)), b: mathMin(255, mathMax(rgb.b, 0)), a: a }; } // Conversion Functions // -------------------- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: // // `rgbToRgb` // Handle bounds / percentage checking to conform to CSS color spec // // *Assumes:* r, g, b in [0, 255] or [0, 1] // *Returns:* { r, g, b } in [0, 255] function rgbToRgb(r, g, b){ return { r: bound01(r, 255) * 255, g: bound01(g, 255) * 255, b: bound01(b, 255) * 255 }; } // `rgbToHsl` // Converts an RGB color value to HSL. // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] // *Returns:* { h, s, l } in [0,1] function rgbToHsl(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, l = (max + min) / 2; if(max == min) { h = s = 0; // achromatic } else { var d = max - min; s = l > 0.5 ? d / (2 - max - min) : d / (max + min); switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, l: l }; } // `hslToRgb` // Converts an HSL color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hslToRgb(h, s, l) { var r, g, b; h = bound01(h, 360); s = bound01(s, 100); l = bound01(l, 100); function hue2rgb(p, q, t) { if(t < 0) t += 1; if(t > 1) t -= 1; if(t < 1/6) return p + (q - p) * 6 * t; if(t < 1/2) return q; if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; return p; } if(s === 0) { r = g = b = l; // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = hue2rgb(p, q, h + 1/3); g = hue2rgb(p, q, h); b = hue2rgb(p, q, h - 1/3); } return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHsv` // Converts an RGB color value to HSV // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] // *Returns:* { h, s, v } in [0,1] function rgbToHsv(r, g, b) { r = bound01(r, 255); g = bound01(g, 255); b = bound01(b, 255); var max = mathMax(r, g, b), min = mathMin(r, g, b); var h, s, v = max; var d = max - min; s = max === 0 ? 0 : d / max; if(max == min) { h = 0; // achromatic } else { switch(max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return { h: h, s: s, v: v }; } // `hsvToRgb` // Converts an HSV color value to RGB. // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] // *Returns:* { r, g, b } in the set [0, 255] function hsvToRgb(h, s, v) { h = bound01(h, 360) * 6; s = bound01(s, 100); v = bound01(v, 100); var i = math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; return { r: r * 255, g: g * 255, b: b * 255 }; } // `rgbToHex` // Converts an RGB color to hex // Assumes r, g, and b are contained in the set [0, 255] // Returns a 3 or 6 character hex function rgbToHex(r, g, b, allow3Char) { var hex = [ pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)) ]; // Return a 3 character hex if possible if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); } return hex.join(""); } // `equals` // Can be called with any tinycolor input tinycolor.equals = function (color1, color2) { if (!color1 || !color2) { return false; } return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); }; tinycolor.random = function() { return tinycolor.fromRatio({ r: mathRandom(), g: mathRandom(), b: mathRandom() }); }; // Modification Functions // ---------------------- // Thanks to less.js for some of the basics here // tinycolor.desaturate = function (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s -= amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); }; tinycolor.saturate = function (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.s += amount / 100; hsl.s = clamp01(hsl.s); return tinycolor(hsl); }; tinycolor.greyscale = function(color) { return tinycolor.desaturate(color, 100); }; tinycolor.lighten = function(color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l += amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); }; tinycolor.darken = function (color, amount) { amount = (amount === 0) ? 0 : (amount || 10); var hsl = tinycolor(color).toHsl(); hsl.l -= amount / 100; hsl.l = clamp01(hsl.l); return tinycolor(hsl); }; tinycolor.complement = function(color) { var hsl = tinycolor(color).toHsl(); hsl.h = (hsl.h + 180) % 360; return tinycolor(hsl); }; // Combination Functions // --------------------- // Thanks to jQuery xColor for some of the ideas behind these // tinycolor.triad = function(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) ]; }; tinycolor.tetrad = function(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) ]; }; tinycolor.splitcomplement = function(color) { var hsl = tinycolor(color).toHsl(); var h = hsl.h; return [ tinycolor(color), tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) ]; }; tinycolor.analogous = function(color, results, slices) { results = results || 6; slices = slices || 30; var hsl = tinycolor(color).toHsl(); var part = 360 / slices; var ret = [tinycolor(color)]; for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { hsl.h = (hsl.h + part) % 360; ret.push(tinycolor(hsl)); } return ret; }; tinycolor.monochromatic = function(color, results) { results = results || 6; var hsv = tinycolor(color).toHsv(); var h = hsv.h, s = hsv.s, v = hsv.v; var ret = []; var modification = 1 / results; while (results--) { ret.push(tinycolor({ h: h, s: s, v: v})); v = (v + modification) % 1; } return ret; }; // Readability Functions // --------------------- // // `readability` // Analyze the 2 colors and returns an object with the following properties: // `brightness`: difference in brightness between the two colors // `color`: difference in color/hue between the two colors tinycolor.readability = function(color1, color2) { var a = tinycolor(color1).toRgb(); var b = tinycolor(color2).toRgb(); var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; var colorDiff = ( Math.max(a.r, b.r) - Math.min(a.r, b.r) + Math.max(a.g, b.g) - Math.min(a.g, b.g) + Math.max(a.b, b.b) - Math.min(a.b, b.b) ); return { brightness: Math.abs(brightnessA - brightnessB), color: colorDiff }; }; // `readable` // http://www.w3.org/TR/AERT#color-contrast // Ensure that foreground and background color combinations provide sufficient contrast. // *Example* // tinycolor.readable("#000", "#111") => false tinycolor.readable = function(color1, color2) { var readability = tinycolor.readability(color1, color2); return readability.brightness > 125 && readability.color > 500; }; // `mostReadable` // Given a base color and a list of possible foreground or background // colors for that base, returns the most readable color. // *Example* // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" tinycolor.mostReadable = function(baseColor, colorList) { var bestColor = null; var bestScore = 0; var bestIsReadable = false; for (var i=0; i < colorList.length; i++) { // We normalize both around the "acceptable" breaking point, // but rank brightness constrast higher than hue. var readability = tinycolor.readability(baseColor, colorList[i]); var readable = readability.brightness > 125 && readability.color > 500; var score = 3 * (readability.brightness / 125) + (readability.color / 500); if ((readable && ! bestIsReadable) || (readable && bestIsReadable && score > bestScore) || ((! readable) && (! bestIsReadable) && score > bestScore)) { bestIsReadable = readable; bestScore = score; bestColor = tinycolor(colorList[i]); } } return bestColor; }; // Big List of Colors // ------------------ // var names = tinycolor.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }; // Make it easy to access colors via `hexNames[hex]` var hexNames = tinycolor.hexNames = flip(names); // Utilities // --------- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` function flip(o) { var flipped = { }; for (var i in o) { if (o.hasOwnProperty(i)) { flipped[o[i]] = i; } } return flipped; } // Return a valid alpha value [0,1] with all invalid values being set to 1 function boundAlpha(a) { a = parseFloat(a); if (isNaN(a) || a < 0 || a > 1) { a = 1; } return a; } // Take input from [0, n] and return it as [0, 1] function bound01(n, max) { if (isOnePointZero(n)) { n = "100%"; } var processPercent = isPercentage(n); n = mathMin(max, mathMax(0, parseFloat(n))); // Automatically convert percentage into number if (processPercent) { n = parseInt(n * max, 10) / 100; } // Handle floating point rounding errors if ((math.abs(n - max) < 0.000001)) { return 1; } // Convert into [0, 1] range if it isn't already return (n % max) / parseFloat(max); } // Force a number between 0 and 1 function clamp01(val) { return mathMin(1, mathMax(0, val)); } // Parse an integer into hex function parseHex(val) { return parseInt(val, 16); } // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 // function isOnePointZero(n) { return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; } // Check to see if string passed in is a percentage function isPercentage(n) { return typeof n === "string" && n.indexOf('%') != -1; } // Force a hex value to have 2 characters function pad2(c) { return c.length == 1 ? '0' + c : '' + c; } // Replace a decimal with it's percentage value function convertToPercentage(n) { if (n <= 1) { n = (n * 100) + "%"; } return n; } var matchers = (function() { // var CSS_INTEGER = "[-\\+]?\\d+%?"; // var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; // Actual matching. // Parentheses and commas are optional, but not required. // Whitespace can take the place of commas or opening paren var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; return { rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ }; })(); // `stringInputToObject` // Permissive string parsing. Take in a number of formats, and output an object // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` function stringInputToObject(color) { color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); var named = false; if (names[color]) { color = names[color]; named = true; } else if (color == 'transparent') { return { r: 0, g: 0, b: 0, a: 0, format: "name" }; } // Try to match string input using regular expressions. // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] // Just return an object and let the conversion functions handle that. // This way the result will be the same whether the tinycolor is initialized with string or object. var match; if ((match = matchers.rgb.exec(color))) { return { r: match[1], g: match[2], b: match[3] }; } if ((match = matchers.rgba.exec(color))) { return { r: match[1], g: match[2], b: match[3], a: match[4] }; } if ((match = matchers.hsl.exec(color))) { return { h: match[1], s: match[2], l: match[3] }; } if ((match = matchers.hsla.exec(color))) { return { h: match[1], s: match[2], l: match[3], a: match[4] }; } if ((match = matchers.hsv.exec(color))) { return { h: match[1], s: match[2], v: match[3] }; } if ((match = matchers.hex6.exec(color))) { return { r: parseHex(match[1]), g: parseHex(match[2]), b: parseHex(match[3]), format: named ? "name" : "hex" }; } if ((match = matchers.hex3.exec(color))) { return { r: parseHex(match[1] + '' + match[1]), g: parseHex(match[2] + '' + match[2]), b: parseHex(match[3] + '' + match[3]), format: named ? "name" : "hex" }; } return false; } // Expose tinycolor to window, does not need to run in non-browser context. window.tinycolor = tinycolor; })(); $(function () { if ($.fn.spectrum.load) { $.fn.spectrum.processNativeColorInputs(); } }); })(window, jQuery); js/jquery.tablesorter.min.js000064400000040276152347514360012167 0ustar00/* * Examples and docs at: http://tablesorter.com */ (function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((ab)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((ba)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; }; output += params.b64Str.charAt(enc1) + params.b64Str.charAt(enc2) + params.b64Str.charAt(enc3) + params.b64Str.charAt(enc4); } while (i < params.source.length); return output; }; function b64dec(params) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; // remove all characters that are not A-Z, a-z, 0-9, !, -, or _ // remove all characters that are not A-Z, a-z, 0-9, !, -, or _ // params.source = params.source.replace(/[^A-Za-z0-9!_-]/g, ""); var re = new RegExp ('[^A-Za-z0-9' + params.b64Str.substr(-3) + ']', 'g'); params.source = params.source.replace(re, ""); do { enc1 = params.b64Str.indexOf(params.source.charAt(i++)); enc2 = params.b64Str.indexOf(params.source.charAt(i++)); enc3 = params.b64Str.indexOf(params.source.charAt(i++)); enc4 = params.b64Str.indexOf(params.source.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } while (i < params.source.length); return output; }; function md5(params) { /* This is a trimmed version of Paul Johnsons JavaScript * * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. */ //var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ //var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ return binl2hex(core_md5(str2binl(params.source), params.source.length * params.chrsz)); /* * Convert an array of little-endian words to a hex string. */ function binl2hex(binarray) { var hex_tab = params.hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for(var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); }; return str; }; /* * Calculate the HMAC-MD5, of a key and some data */ function core_hmac_md5(key, data) { var bkey = str2binl(key); if(bkey.length > 16) bkey = core_md5(bkey, key.length * params.chrsz); var ipad = Array(16), opad = Array(16); for(var i = 0; i < 16; i++) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; }; var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * params.chrsz); return core_md5(opad.concat(hash), 512 + 128); }; /* * Convert a string to an array of little-endian words * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. */ function str2binl(str) { var bin = Array(); var mask = (1 << params.chrsz) - 1; for(var i = 0; i < str.length * params.chrsz; i += params.chrsz) bin[i>>5] |= (str.charCodeAt(i / params.chrsz) & mask) << (i%32); return bin; } /* * Bitwise rotate a 32-bit number to the left. */ function bit_rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } /* * These functions implement the four basic operations the algorithm uses. */ function md5_cmn(q, a, b, x, s, t) { return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); } function md5_ff(a, b, c, d, x, s, t) { return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); } function md5_gg(a, b, c, d, x, s, t) { return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); } function md5_hh(a, b, c, d, x, s, t) { return md5_cmn(b ^ c ^ d, a, b, x, s, t); } function md5_ii(a, b, c, d, x, s, t) { return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); } /* * Calculate the MD5 of an array of little-endian words, and a bit length */ function core_md5(x, len) { /* append padding */ x[len >> 5] |= 0x80 << ((len) % 32); x[(((len + 64) >>> 9) << 4) + 14] = len; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for(var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = md5_ff(c, d, a, b, x[i+10], 17, -42063); b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); }; return Array(a, b, c, d); }; }; /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. (used by md5 and sha1) */ function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }; function sha1(params) { return binb2hex(core_sha1(str2binb(params.source),params.source.length * params.chrsz)); /* * Calculate the SHA-1 of an array of big-endian words, and a bit length */ function core_sha1(x, len) { /* append padding */ x[len >> 5] |= 0x80 << (24 - len % 32); x[((len + 64 >> 9) << 4) + 15] = len; var w = Array(80); var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; var e = -1009589776; for(var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; var olde = e; for(var j = 0; j < 80; j++) { if(j < 16) w[j] = x[i + j]; else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j))); e = d; d = c; c = rol(b, 30); b = a; a = t; } a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); e = safe_add(e, olde); } return Array(a, b, c, d, e); } /* * Bitwise rotate a 32-bit number to the left. */ function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } /* * Determine the appropriate additive constant for the current iteration */ function sha1_kt(t) { return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514; } /* * Perform the appropriate triplet combination function for the current * iteration */ function sha1_ft(t, b, c, d) { if(t < 20) return (b & c) | ((~b) & d); if(t < 40) return b ^ c ^ d; if(t < 60) return (b & c) | (b & d) | (c & d); return b ^ c ^ d; } /* * Convert an array of big-endian words to a hex string. */ function binb2hex(binarray) { var hex_tab = params.hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for(var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); } return str; } /* * Convert an 8-bit or 16-bit string to an array of big-endian words * In 8-bit function, characters >255 have their hi-byte silently ignored. */ function str2binb(str) { var bin = Array(); var mask = (1 << params.chrsz) - 1; for(var i = 0; i < str.length * params.chrsz; i += params.chrsz) bin[i>>5] |= (str.charCodeAt(i / params.chrsz) & mask) << (32 - params.chrsz - i%32); return bin; } }; function xteaenc(params) { var v = new Array(2), k = new Array(4), s = "", i; params.source = escape(params.source); // use escape() so only have single-byte chars to encode // build key directly from 1st 16 chars of strKey for (var i=0; i<4; i++) k[i] = Str4ToLong(params.strKey.slice(i*4,(i+1)*4)); for (i=0; i>>5)+z ^ sum+k[sum & 3]; sum += delta; z += (y<<4 ^ y>>>5)+y ^ sum+k[sum>>>11 & 3]; // note: unsigned right-shift '>>>' is used in place of original '>>', due to lack // of 'unsigned' type declaration in JavaScript (thanks to Karsten Kraus for this) } v[0] = y;v[1] = z; } }; function xteadec(params) { var v = new Array(2), k = new Array(4), s = "", i; for (var i=0; i<4; i++) k[i] = Str4ToLong(params.strKey.slice(i*4,(i+1)*4)); ciphertext = unescCtrlCh(params.source); for (i=0; i>>5)+y ^ sum+k[sum>>>11 & 3]; sum -= delta; y -= (z<<4 ^ z>>>5)+z ^ sum+k[sum & 3]; } v[0] = y;v[1] = z; } }; // xtea supporting functions function Str4ToLong(s) { // convert 4 chars of s to a numeric long var v = 0; for (var i=0; i<4; i++) v |= s.charCodeAt(i) << i*8; return isNaN(v) ? 0 : v; }; function LongToStr4(v) { // convert a numeric long to 4 char string var s = String.fromCharCode(v & 0xFF, v>>8 & 0xFF, v>>16 & 0xFF, v>>24 & 0xFF); return s; }; function escCtrlCh(str) { // escape control chars which might cause problems with encrypted texts return str.replace(/[\0\t\n\v\f\r\xa0'"!]/g, function(c) {return '!' + c.charCodeAt(0) + '!';}); }; function unescCtrlCh(str) { // unescape potentially problematic nulls and control characters return str.replace(/!\d\d?\d?!/g, function(c) {return String.fromCharCode(c.slice(1,-1));}); }; }; })(jQuery); js/universal.js000064400000045461152347514360007552 0ustar00////////////////////////////////////////////////////////////// // universal.js - Simple JS functions that make JS easy // Inspired by Alons // ---------------------------------------------------------- // Please Read the Terms of use at http://www.softaculous.com // ---------------------------------------------------------- // (c)Softaculous Inc. ////////////////////////////////////////////////////////////// ua = navigator.userAgent.toLowerCase(); isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1)); isFF = (ua.indexOf("firefox") != -1); isGecko = (ua.indexOf("gecko") != -1); isSafari = (ua.indexOf("safari") != -1); isKonqueror = (ua.indexOf("konqueror") != -1); var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i endop){ setTimeout(slowopacity, 1); } } setopacity(el, op); }; }; //Cookie setter function setcookie(name, value, duration){ value = escape(value); if(duration){ var date = new Date(); date.setTime(date.getTime() + (duration * 86400000)); value += "; expires=" + date.toGMTString(); } document.cookie = name + "=" + value; }; //Gets the cookie value function getcookie(name){ value = document.cookie.match('(?:^|;)\\s*'+name+'=([^;]*)'); return value ? unescape(value[1]) : false; }; //Removes the cookies function removecookie(name){ setcookie(name, '', -1); }; function AJAX(url, evalthis){ req = false; toeval = evalthis; // branch for native XMLHttpRequest object if(window.XMLHttpRequest){ try{ req = new XMLHttpRequest(); }catch(e){ req = false; } // branch for IE/Windows ActiveX version }else if(window.ActiveXObject){ try{ req = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ req = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ req = false; } } } if(req){ try{ req.onreadystatechange = function(){ // only if req shows "loaded" if (req.readyState==4) { //only if OK if (req.status == 200) { // only if "OK"...processing statements go here.. var re = req.responseText // result of the req object if(re.length > 0){ return eval(toeval); }else{ return false; } } } }; req.open("GET", url, true); req.send(null); }catch(e){ return false; } }else{ return false; } return true; }; //Finds the position of the element function findelpos(ele){ var curleft = 0; var curtop = 0; if(ele.offsetParent){ while(1){ curleft += ele.offsetLeft; curtop += ele.offsetTop; if(!ele.offsetParent){ break; } ele = ele.offsetParent; } }else if(ele.x){ curleft += ele.x; curtop += ele.y; } return [curleft,curtop]; }; function getAttributeByName(node, attribute){ if(typeof NamedNodeMap != "undefined"){ if(node.attributes.getNamedItem(attribute)){ return node.attributes.getNamedItem(attribute).value; } }else{ return node.getAttribute(attribute); } }; //With ';' function addonload(js){ aefonload += js; }; function randstr(length, special, strength){ $randstr = ""; $specialchars = new Array('&', '#', '$', '%', '@'); //alert(special); for($i = 0; $i < length; $i++){ $randnum = Math.floor(Math.random()*61); if($randnum < 10){ $randstr = $randstr + String.fromCharCode($randnum+48); }else if($randnum < 36){ $randstr = $randstr + String.fromCharCode($randnum+55); }else if(special > 0){ var tmp = Math.floor(Math.random() * $specialchars.length); $randstr = $randstr + $specialchars[tmp]; }else{ $randstr = $randstr + String.fromCharCode($randnum+61); } } // Do we have to meet the strength set by admin ? if(strength > 0){ $cur_strength = passwordStrength($randstr); if($cur_strength[1] < strength){ while ($cur_strength[1] < strength) { $randnum = Math.floor(Math.random()*61); $randstr = $randstr + String.fromCharCode($randnum+55); $cur_strength = passwordStrength($randstr); } } } if(special > 0){ return $randstr; }else{ return $randstr.toLowerCase(); } }; function randstr_wuzo(length) { var chars = "abcdefghijklmnopqrstuvwxyz!@#$%&ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; var pass = ""; for (var x = 0; x < length; x++) { var i = Math.floor(Math.random() * chars.length); pass += chars.charAt(i); } return pass; }; function change_image(span_obj, elementid){ var ip_obj = document.getElementById(elementid); var img_obj = span_obj.firstChild; if(ip_obj.type == "password") { img_obj.src = theme+"noeye.png" ip_obj.type = "text"; } else { img_obj.src = theme+"eye.png" ip_obj.type = "password"; } }; /******************************************************/ /******** PUNYCODE CONVERSION CODE *******************/ /******** FOR IDN (Internationalized Domain Name) *****/ /******************************************************/ /*! http://mths.be/punycode v1.2.0 by @mathias */ ;(function(u){var I,e=typeof define=='function'&&typeof define.amd=='object'&&define.amd&&define,J=typeof exports=='object'&&exports,q=typeof module=='object'&&module,h=typeof require=='function'&&require,o=2147483647,p=36,i=1,H=26,B=38,b=700,m=72,G=128,C='-',E=/^xn--/,t=/[^ -~]/,l=/\x2E|\u3002|\uFF0E|\uFF61/g,s={overflow:'Overflow: input needs wider integers to process','not-basic':'Illegal input >= 0x80 (not a basic code point)','invalid-input':'Invalid input'},v=p-i,g=Math.floor,j=String.fromCharCode,n;function y(K){throw RangeError(s[K])}function z(M,K){var L=M.length;while(L--){M[L]=K(M[L])}return M}function f(K,L){return z(K.split(l),L).join('.')}function D(N){var M=[],L=0,O=N.length,P,K;while(L65535){M-=65536;L+=j(M>>>10&1023|55296);M=56320|M&1023}L+=j(M);return L}).join('')}function c(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:p}function A(L,K){return L+22+75*(L<26)-((K!=0)<<5)}function w(N,L,M){var K=0;N=M?g(N/b):N>>1;N+=g(N/L);for(;N>v*H>>1;K+=p){N=g(N/v)}return g(K+(v+1)*N/(N+B))}function k(L,K){L-=(L-97<26)<<5;return L+(!K&&L-65<26)<<5}function a(X){var N=[],Q=X.length,S,T=0,M=G,U=m,P,R,V,L,Y,O,W,aa,K,Z;P=X.lastIndexOf(C);if(P<0){P=0}for(R=0;R=128){y('not-basic')}N.push(X.charCodeAt(R))}for(V=P>0?P+1:0;V=Q){y('invalid-input')}W=c(X.charCodeAt(V++));if(W>=p||W>g((o-T)/Y)){y('overflow')}T+=W*Y;aa=O<=U?i:(O>=U+H?H:O-U);if(Wg(o/Z)){y('overflow')}Y*=Z}S=N.length+1;U=w(T-L,S,L==0);if(g(T/S)>o-M){y('overflow')}M+=g(T/S);T%=S;N.splice(T++,0,M)}return F(N)}function d(W){var N,Y,T,L,U,S,O,K,R,aa,X,M=[],Q,P,Z,V;W=D(W);Q=W.length;N=G;Y=0;U=m;for(S=0;S=N&&Xg((o-Y)/P)){y('overflow')}Y+=(O-N)*P;N=O;for(S=0;So){y('overflow')}if(X==N){for(K=Y,R=p;;R+=p){aa=R<=U?i:(R>=U+H?H:R-U);if(K 0){ var tmp_array = text.split("@"); var out = []; for (var i=0; i < tmp_array.length; ++i) { var s = tmp_array[i]; out.push(punycode.toASCII(s)); } var encoded_email = out.join("@"); if(!(/^([a-zA-Z0-9+])+([a-zA-Z0-9+\._-])*@([a-zA-Z0-9+_-])+([.])+([a-zA-Z0-9\._-]+)+$/.test(encoded_email))){ return false; } return true; } return text; }; function randomstring(L){ var str= ""; var randomchar=function(){ var n= Math.floor(Math.random()*62); if(n<10) return n; //1-10 if(n<36) return String.fromCharCode(n+55); //A-Z return String.fromCharCode(n+61); //a-z } while(str.length< L) str+= randomchar(); return str; } /////////////////////////////// ////// Password strength meter /////////////////////////////// function passwordStrength(password1) { var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, mismatch = 5, symbolSize = 0, natLog, score = 0; var pass_strength = Array(); //password < 4 if ( password1.length < 4 ){ score = 9; pass_strength = [shortPass, parseInt(score)]; return pass_strength; } if ( password1.match(/[0-9]/) ) symbolSize +=10; if ( password1.match(/[a-z]/) ) symbolSize +=26; if ( password1.match(/[A-Z]/) ) symbolSize +=26; if ( password1.match(/[^a-zA-Z0-9]/) ) symbolSize +=31; natLog = Math.log( Math.pow(symbolSize, password1.length) ); score = natLog / Math.LN2; if (score < 40 ){ pass_strength = [badPass, parseInt(score)]; return pass_strength; } if (score < 56 ){ pass_strength = [goodPass, parseInt(score)]; return pass_strength; } pass_strength = [strongPass, parseInt(score)]; return pass_strength; } function check_pass_strength() { var pass1 = $("#admin_pass").val(); var strength = Array(); //alert(pass1); $("#pass-strength-result").removeClass("short bad good strong"); if (!pass1) { display_pass_strength("strength_indicator"); return; } try{ strength = passwordStrength(pass1); if(strength[1] > 100) strength[1] = 100; $("#pass-strength-hidden").val(strength[1]); switch ( strength[0] ) { case 2: score = "bad";// For Bad password display_pass_strength(score, strength[1]); break; case 3: score = "good"; // For Good password display_pass_strength(score, strength[1]); break; case 4: score = "strong";// For Strong password display_pass_strength(score, strength[1]); break; default: score = "short";// For Bad password display_pass_strength(score, strength[1]); } }catch(e){ } } function check_pass_str_wuzo(ev, pb) { // less than 8 characters var worst = 7, // minimum 8 characters bad = /(?=.{8,}).*/, //Alpha Numeric plus minimum 8 good = /^(?=\S*?[a-z])(?=\S*?[0-9])\S{8,}$/, //Must contain at least one upper case letter, one lower case letter and (one number OR one special char). better = /^(?=\S*?[A-Z])(?=\S*?[a-z])((?=\S*?[0-9])|(?=\S*?[^\w\*]))\S{8,}$/, //Must contain at least one upper case letter, one lower case letter and (one number AND one special char). best = /^(?=\S*?[A-Z])(?=\S*?[a-z])(?=\S*?[0-9])(?=\S*?[^\w\*])\S{8,}$/, password = ev.val(), strength = '0', progressClass = 'progress-bar progress-bar-', ariaMsg = '0% Complete (danger)', $progressBarElement = pb; if (best.test(password) === true) { strength = '100%'; progressClass += 'success'; ariaMsg = '100% Complete (success)'; } else if (better.test(password) === true) { strength = '80%'; progressClass += 'info'; ariaMsg = '80% Complete (info)'; } else if (good.test(password) === true) { strength = '50%'; progressClass += 'warning'; ariaMsg = '50% Complete (warning)'; } else if (bad.test(password) === true) { strength = '30%'; progressClass += 'warning'; ariaMsg = '30% Complete (warning)'; } else if (password.length >= 1 && password.length <= worst) { strength = '10%'; progressClass += 'danger'; ariaMsg = '10% Complete (danger)'; } else if (password.length < 1) { strength = '0'; progressClass += 'danger'; ariaMsg = '0% Complete (danger)'; } $progressBarElement.removeClass().addClass(progressClass); $progressBarElement.attr('aria-valuenow', strength); $progressBarElement.css('width', strength); $progressBarElement.find('span.sr-only').text(ariaMsg); } // Functions For tooltip function hidetip(){ $_("stooltip").style.display = "none"; } function showtip(txt, el){ $_("stooltip").innerHTML = txt; var pos = findelpos(el); $_("stooltip").style.display = ""; var tipheight = parseInt($_("stooltip").offsetHeight); var tipwidth = parseInt($_("stooltip").offsetWidth); //alert(tipheight+" "+tipwidth); var abody = findelpos($_("abody")); var bodyWidth = abody[0] + $_("abody").offsetWidth if((pos[0] + tipwidth) > bodyWidth){ pos[0] = pos[0] - (pos[0] + tipwidth - bodyWidth) + 15; } $_("stooltip").style.left = pos[0]+"px"; $_("stooltip").style.top = (pos[1]-5-tipheight)+"px"; el.onmouseout = function(){ hidetip(); }; }; function goto_id(id){ // Scroll $('html,body').animate({ scrollTop: $("#"+id).offset().top}, 'slow'); } function dotweet(ele){ window.open($("#"+ele.id).attr("action")+"?"+$("#"+ele.id).serialize(), "_blank", "scrollbars=no, menubar=no, height=400, width=500, resizable=yes, toolbar=no, status=no"); return false; } function new_theme_funcs_init(){ $(".sai_exp").each(function(){ $(this).hide(); var txt = $(this).text(); var saihead = $(this).parent().html(); var str = $(this).parent().find(".sai_head").text(); if(str){ var str1 = str + " "; var str2 = saihead.replace(str,str1); $(this).parent().html(str2); } }); $(".sai-info").mouseover(function() { $(this).parent().parent().find(".sai_exp").fadeIn(5); }); $( ".sai-info,.sai_exp" ).mouseout(function() { $(this).parent().parent().find(".sai_exp").fadeOut(); $(".sai_exp").mouseover(function(){ $(".sai_exp").stop(); }); }); }; function toggle_pass(toggle_button, pass_field) { if($("#"+pass_field).attr('type') == "text"){ $("#"+toggle_button).text("Show"); $("#"+pass_field).prop("type", "password"); } else{ $("#"+toggle_button).text("Hide"); $("#"+pass_field).prop("type", "text"); } }js/smoothscroll.js000064400000002031152347514360010254 0ustar00var goto_top_type = -1; var goto_top_itv = 0; var last_scrolltop = 0; function goto_top_timer() { var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop; //alert(y+' - '+last_scrolltop); if(y == last_scrolltop){ var moveby = 10; // set this to control scroll seed. minimum is fast y -= Math.ceil(y * moveby / 100); if (y < 0) y = 0; if (goto_top_type == 1) document.documentElement.scrollTop = y; else document.body.scrollTop = y; last_scrolltop = y; }else{ y = 0; } if (y == 0) { clearInterval(goto_top_itv); goto_top_itv = 0; } } function goto_top() { if (goto_top_itv == 0) { if (document.documentElement && document.documentElement.scrollTop) goto_top_type = 1; else if (document.body && document.body.scrollTop) goto_top_type = 2; else goto_top_type = 0; if (goto_top_type > 0){ last_scrolltop = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop; goto_top_itv = setInterval('goto_top_timer()', 25); } } }font-awesome.css000064400000016076152347514360007706 0ustar00/* FONT PATH * -------------------------- */ @font-face { font-family: 'soft'; src:url('fonts/soft.eot?mje4hl'); src:url('fonts/soft.eot?#iefixmje4hl') format('embedded-opentype'), url('fonts/soft.woff?mje4hl') format('woff'), url('fonts/soft.ttf?mje4hl') format('truetype'), url('fonts/soft.svg?mje4hl#soft') format('svg'); font-weight: normal; font-style: normal; } [class^="sai-"], [class*=" sai-"] { font-family: 'soft'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .fa { display: inline-block; font: normal normal normal 14px/1 soft; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .fa-lg { font-size: 1.333333em; line-height: 0.75em; vertical-align: -15%; } .fa-1x { font-size: 1.5em; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-fw { width: 1.28571429em; text-align: center; } .fa-ul { padding-left: 0; margin-left: 2.14285714em; list-style-type: none; } .fa-ul > li { position: relative; } .fa-li { position: absolute; left: -2.14285714em; width: 2.14285714em; top: 0.14285714em; text-align: center; } .fa-li.fa-lg { left: -1.85714286em; } .fa-border { padding: .2em .25em .15em; border: solid 0.08em #eeeeee; border-radius: .1em; } .pull-right { float: right; } .pull-left { float: left; } .fa.pull-left { margin-right: .3em; } .fa.pull-right { margin-left: .3em; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear; } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .fa-rotate-90 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); -webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); -webkit-transform: scale(1, -1); -ms-transform: scale(1, -1); transform: scale(1, -1); } :root .fa-rotate-90, :root .fa-rotate-180, :root .fa-rotate-270, :root .fa-flip-horizontal, :root .fa-flip-vertical { filter: none; } .fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .fa-stack-1x, .fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center; } .fa-stack-1x { line-height: inherit; } .fa-stack-2x { font-size: 2em; } .fa-inverse { color: #ffffff; } .sai-www:before{content: "\e63d";} .sai-dbtools:before{content: "\e64f";} .sai-mail:before{content: "\e650";} .sai-settings:before{content: "\e651";} .sai-polls:before{content: "\e652";} .sai-customersupport:before{content: "\e600";} .sai-dashboard:before{content: "\e601";} .sai-databases:before{content: "\e602";} .sai-delete:before{content: "\e603";} .sai-demo:before{content: "\e604";} .sai-disk:before{content: "\e605";} .sai-download:before{content: "\e606";} .sai-ecommerce:before{content: "\e607";} .sai-educational:before{content: "\e608";} .sai-emptystar:before{content: "\e609";} .sai-erp:before{content: "\e60a";} .sai-external:before{content: "\e60b";} .sai-file:before{content: "\e60c";} .sai-files:before{content: "\e60d";} .sai-film:before{content: "\e60e";} .sai-firstpage:before{content: "\e60f";} .sai-folder:before{content: "\e610";} .sai-forums:before{content: "\e611";} .sai-frameworks:before{content: "\e612";} .sai-fullstar:before{content: "\e613";} .sai-galleries:before{content: "\e614";} .sai-games:before{content: "\e615";} .sai-graph:before{content: "\e616";} .sai-gridview:before{content: "\e617";} .sai-guestbooks:before{content: "\e618";} .sai-halfstar:before{content: "\e619";} .sai-home:before{content: "\e61a";} .sai-info:before{content: "\e61b";} .sai-installations:before{content: "\e61c";} .sai-lastpage:before{content: "\e61d";} .sai-leftarrow:before{content: "\e61e";} .sai-list:before{content: "\e61f";} .sai-logout:before{content: "\e620";} .sai-message_queue:before{content: "\e621";} .sai-menu:before{content: "\e622";} .sai-microblogs:before{content: "\e623";} .sai-music:before{content: "\e624";} .sai-others:before{content: "\e625";} .sai-pen:before{content: "\e626";} .sai-pfx_icon:before{content: "\e627";} .sai-statistics:before{content: "\e628";} .sai-print:before{content: "\e629";} .sai-process:before{content: "\e62a";} .sai-projectman:before{content: "\e62b";} .sai-question:before{content: "\e62c";} .sai-remove:before{content: "\e62d";} .sai-restore:before{content: "\e62e";} .sai-rightarrow:before{content: "\e62f";} .sai-rss:before{content: "\e630";} .sai-search:before{content: "\e631";} .sai-settinground:before{content: "\e632";} .sai-utilities:before{content: "\e633";} .sai-shuffle:before{content: "\e634";} .sai-socialnetworking:before{content: "\e635";} .sai-success:before{content: "\e636";} .sai-sync:before{content: "\e637";} .sai-twitch:before{content: "\e638";} .sai-upload:before{content: "\e639";} .sai-video:before{content: "\e63a";} .sai-warning:before{content: "\e63b";} .sai-wikis:before{content: "\e63c";} .sai-admanager:before{content: "\e63e";} .sai-apps:before{content: "\e63f";} .sai-java_containers:before{content: "\e640";} .sai-java_tools:before{content: "\e641";} .sai-modules:before{content: "\e642";} .sai-server_side_scripting:before{content: "\e643";} .sai-stacks:before{content: "\e644";} .sai-version_control:before{content: "\e645";} .sai-backup:before{content: "\e646";} .sai-bell:before{content: "\e647";} .sai-blogs:before{content: "\e648";} .sai-calendars:before{content: "\e649";} .sai-cms:before{content: "\e64a";} .sai-comment:before{content: "\e64b";} .sai-control_panel:before{content: "\e64c";} .sai-copy:before{content: "\e64d";} .sai-security:before{content: "\e653";} .sai-web_servers:before{content: "\e64e";} .sai-widgets:before{content: "\e612";} .sai-libraries:before{content: "\e618";} .sai-user:before{content: "\e648";} .sai-expand:before{content: "\e989";} .sai-contract:before{content: "\e98c";} .sai-visibility:before{content: "\e9ce";} .sai-arrow_right2:before{content: "\ea3c";} .sai-arrow_left2:before{content: "\ea40";}css/onboarding.css000064400000131623152347514360010210 0ustar00*, *::before, *::after { box-sizing: border-box !important; } a:hover{ color: inherit; text-decoration: none; } ol{ padding: 0px; } label{ margin: 0px; } label[for]{ cursor:pointer; } .soft_nav{ display: none; } .site-menu-header-td{ display: none; } #softcontent{ padding: 0px; } html.wp-toolbar { padding: 0px !important; } .folded #wpcontent{ margin-left:0px; } ::placeholder, ::-moz-placeholder, ::-webkit-input-placeholder { color: #ccc; } #wpcontent, #wpfooter, #wpbody-content, ol { margin: 0; padding: 0; } li { margin: 0px; } a { text-decoration: none; } a:focus { box-shadow: none; } body { background-color: #f6f7f7; } input[type="button"] { margin: 0px; border: none; font-size: 16px; cursor: pointer; } input[type=checkbox]:focus { box-shadow: none; } #wpbody-content { height: 100%; } .softaculous-pro-wizard { display: flex; height: 100vh; width: 100vw; overflow: hidden; } /* sidebar */ .softaculous-pro-setup-logo { position: relative; display: flex; justify-content: center; align-items: center; padding: 15px 15px; min-width: 200px; } .softaculous-pro-wizard-sidebar { height: 100%; box-shadow: rgba(0, 0, 0, 0.12) 4px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px; display: flex; flex-direction: column; justify-content: start; background-color: #070F2B; } .softaculous-pro-steps-holder { padding: 10px 15px; flex: 1; } .softaculous-pro-wizard-steps { list-style: none; counter-reset: step-counter; } .softaculous-pro-wizard-steps li { display: flex; align-items: center; padding: 20px 0px; font-size: 16px; position: relative; color: #fff; transition: all 200ms ease-in-out; } .softaculous-pro-wizard-steps li > a { position: relative; } .softaculous-pro-wizard-steps li > a::after { position: absolute; content: ''; width: 0%; background: white; height: 1px; top: 25px; left: 0px; transition: width 0.5s ease-in-out; } .softaculous-pro-wizard-steps li.active_step > a::after { width: 100%; } .softaculous-pro-wizard-steps li::before { content: counter(step-counter); counter-increment: step-counter; border: 1px solid #4511b1; color: #fff; border-radius: 50%; width: 25px; height: 25px; line-height: 22px; display: inline-block; text-align: center; margin-right: 20px; transition: border 200ms ease-in-out, color 200ms ease-in-out; } .softaculous-pro-wizard-steps li.active_step { font-weight: 500; } .softaculous-pro-wizard-steps li:not(:last-child)::after { content: ""; position: absolute; width: 1px; background: linear-gradient(to bottom, #532dc4, transparent); height: 40px; top: calc(100% - 20px); left: 12px; transition: border 200ms ease-in-out; } .softaculous-pro-wizard-content { width: 100%; padding: 30px 60px 0px 60px; overflow: auto; } .softaculous-pro-wizard-inner, .softaculous-pro-social-links-profile { display: none; } [data-active-panel="welcome"] [data-panel="welcome"], [data-active-panel="type"] [data-panel="type"], [data-active-panel="title"] [data-panel="title"], [data-active-panel="features"] [data-panel="features"], [data-active-panel="import_theme"] [data-panel="import_theme"], [data-active-panel="select_theme"] [data-panel="select_theme"], [data-active-panel="start"] [data-panel="start"], [data-active-panel="description"] [data-panel="description"], [data-active-panel="contact"] [data-panel="contact"], [data-active-panel="images"] [data-panel="images"], [data-active-panel="templates"] [data-panel="templates"]{ display: block; } .softaculous-pro-wizard-inner-content h1, .softaculous-pro-modal-header h1 { font-size: 25px; margin-bottom: 10px; } .softaculous-pro-wizard-inner-content p { font-size: 16px; margin-bottom: 30px; } .softaculous-pro-wizard-buttons { display: flex; position: sticky; bottom: 0; left: 0; padding: 10px 0; background-color: #f6f7f7; /* border-top: 1px solid #ddd; */ } .softaculous-pro-wizard-buttons .step_btn, .softaculous-pro-import { padding: 10px 25px; font-size: 16px; outline: none; border: none; background-color: #28527A; color: #fff; display: flex; justify-content: center; align-items: center; cursor: pointer; border-radius: 5px; margin: 0px 5px; } .softaculous-pro-wizard-buttons .step_btn:hover, .softaculous_pro_return_btn:hover, .softaculous-pro-import:hover { background-color: #28527A !important; color: #fff; } .step_dismiss_btn { background-color: #6D6D6D !important; color: #fff; } .step_dismiss_btn:hover { background-color: #373737 !important; color: #fff; } .step_btn span { line-height: initial; margin-left: 5px; } .softaculous-pro-category-input, .softaculous-pro-title-input, .softaculous-pro-theme-input { width: 60%; margin-bottom: 30px; position: relative; } .softaculous-pro-category-holder { margin-bottom: 30px; } .softaculous-pro-categories-list { display: flex; flex-wrap: wrap; gap: 20px 30px; } .softaculous-pro-category-input .softaculous_pro_input, .softaculous-pro-title-input .softaculous_pro_input, .softaculous-pro-theme-input .softaculous_pro_input { width: 100%; padding: 8px 20px; border-color: #28527A; box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px; border-radius: 5px; font-size: 16px; } .category_btn { padding: 13px 25px; text-align:center; min-width:110px; font-size: 16px; background-color: #3c434a; box-shadow: 0px 4px 6px -2px rgba(0, 0, 0, 0.03), 0px 8px 10px -4px rgba(0, 0, 0, 0.08); border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: all 200ms ease-in-out; } .softaculous-pro-features-container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column-gap: 30px; grid-row-gap: 15px; margin-bottom: 30px; } .softaculous-pro-features { display: flex; justify-content: flex-start; align-items: center; gap: 20px; background: #fff; padding: 10px 15px; border-radius: 10px; border: 1px solid transparent; transition: all 200ms ease-in-out; border-radius: 13px; box-shadow: 0 0 #0000, 0 0 rgba(0, 0, 0, 0), 0 0 #0000, 0 0 rgba(0, 0, 0, 0), 0px 8px 6px 4px rgba(0, 0, 0, 0.05); } .category_btn input { background-color: inherit; color: #ffffff; } .softaculous-pro-features-text { flex: 1; } .softaculous-pro-features-text h3 { font-size: 17px; margin: 5px 0px; } .softaculous-pro-features-text p { font-size: 13px; margin: 5px 0px; } .softaculous-pro-themes-holder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column-gap: 30px; grid-row-gap: 15px; margin-bottom: 30px; } .softaculous-pro-themes-row { padding: 15px; border: 1px solid #ccc; cursor: pointer; transition: all 200ms ease-in-out; } .softaculous-pro-theme-screenshot img { width: 100%; } .softaculous-pro-theme-name { padding: 10px 10px; background: #fff; border-top: 1px solid #ccc; text-align: left; } .active_category { border-color: #013601 !important; background-color: green; } .softaculous-pro-features-input input, .spro_page_selector input { border-color: #28527A; } .softaculous-pro-features-input input[type=checkbox]:checked::before, .spro_page_selector input[type=checkbox]:checked::before { border-color: #28527A; filter: hue-rotate(56deg); } .softaculous-pro-features-icon span { font-size: 24px; color: #28527A; } .feature-border { border: 1px solid #28527A; } .feature-border { border: 1px solid #28527A; } .softaculous-pro-features-input input:focus, .spro_page_selector input:focus { border-color: #28527A; box-shadow: 0 0 0 1px #28527A; } .active_step>span { font-size: 17px; border-bottom: 3px solid #28527a; padding-bottom:10px; min-width:40%; } .active_step~li::before { border-color: #ffffff !important; } .active_step~li::after { background: linear-gradient(to bottom, #757575, transparent) !important; } .softaculous_pro_return_btn { padding: 10px 20px; background-color: #28527A; margin: 10px 35px; text-align: center; font-size: 16px; border-radius: 5px; color: #fff !important; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; } .softaculous-pro-wizard-buttons .step_btn:hover { background-color: #28527A !important; } .softaculous-pro-themes-row:hover { margin-top: -2px; box-shadow: 0 2px 40px 0 rgba(0, 0, 0, 0.1), 0 3px 20px 0 rgba(0, 0, 0, 0.1); } #softaculous_pro_search { width: 100%; } #softaculous_pro_search .softaculous-pro-search-field, #softaculous_pro_search .softaculous-pro-categories, #softaculous_pro_search .softaculous-pro-sortby { padding: 7px 15px; border: 1px solid #28527A; box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px; border-radius: 5px; font-size: 16px; } .softaculous-pro-search { margin-right: 20px; flex: 2; } .softaculous-pro-ai-search { margin-right: 20px; width: 100%; max-width: 450px; } .softaculous-pro-search-field { width: 100%; } .softaculous-pro-categories { display: flex; align-items: center; justify-content: space-between; cursor: pointer; min-width: 100px; margin-right: 20px; flex: 1; } .softaculous-pro-sortby { flex: 1; } .softaculous-pro-sort label { font-size: 16px; } .softaculous-pro-dropdown-content { display: none; position: absolute; background-color: #f9f9f9; min-width: 420px; box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); padding: 12px 16px; z-index: 1; color: #111; top: 48px; left: -1px; } .softaculous-pro-page { width: 100%; margin-bottom: 80px; text-align: center; margin: 0px; position: relative; } #softaculous-pro-pagination { width: fit-content; margin: 30px auto; } #softaculous-pro-pagination ul { display: flex; justify-content: center; align-items: center; border-radius: 0.6rem; background: #ffffff; box-shadow: 0 0.8rem 2rem rgba(90, 97, 129, 0.05); padding: 4px; } #softaculous-pro-ai-pagination ul { display: flex; justify-content: flex-end; align-items: center; border-radius: 0.6rem; } #softaculous-pro-pagination ul li { cursor: pointer; } #softaculous-pro-pagination ul li a{ padding: 10px; background-color: #fff; color: #000; } #softaculous-pro-pagination ul li:last-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } #softaculous-pro-pagination ul li:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; } #softaculous-pro-pagination ul li.active a { color: #fff; background: #28527A; } #softaculous-pro-ai-pagination ul li.active a { color: #fff; border-bottom: 1px solid grey; background: #007bff; border-radius: 50px; } #softaculous-pro-pagination ul li a:focus { box-shadow: none; } .softaculous-pro-row { box-sizing: border-box; display: flex; flex: 1 0 auto; flex-direction: row; flex-wrap: wrap; width: 100%; align-content: stretch; position: relative; justify-content: center; } .softaculous-pro-md-3 { width: 33%; } .softaculous-pro-md-4 { width: 25%; } .softaculous-pro-theme-details { margin-right: 30px; margin-bottom: 30px; border-radius: 2px; border: 1px solid #ccc; cursor: pointer; transition: all 200ms ease-in-out; position: relative; } .softaculous-pro-theme-details:hover { margin-top: -2px; box-shadow: 0 2px 40px 0 rgba(0, 0, 0, 0.1), 0 3px 20px 0 rgba(0, 0, 0, 0.1); } .softaculous-pro-theme-screenshot img { max-width: 100%; } .softaculous-pro-theme-screenshot { position: relative; } .softaculous-pro-theme-name { background: #1D2327; color: #fff; padding: 15px; font-size: 16px; font-weight: 500; } .softaculous-pro-ai-theme-name { background: #f6f7f7; color: black; padding: 18px 15px; font-size: 16px; border-top: 1px solid #ccc; text-align: left; font-weight: 500; display: flex; justify-content: space-between; align-items: center; } .softaculous-pro-premium-themes { position: absolute; right: -10px; top: 10px; font-size: 14px; background: red; color: #fff; padding: 5px 12px; border-radius: 3px; font-weight: bold; } #softaculous-pro-demo { display: inline-block; vertical-align: middle; margin-left: 40px; } .softaculous-pro-demo-btn { padding: 5px 25px !important; font-size: 15px !important; font-weight: bold; background: #28527A !important; color: #fff !important; border: 1px solid #28527A !important; transition: all .3s linear; border-radius: 4px; } .softaculous-pro-demo-btn:hover { background: #fff !important; color: #28527A !important; } .single-templates-content::-webkit-scrollbar { width: 8px; } .single-templates-content::-webkit-scrollbar-thumb { background: rgba(204, 204, 204, 1); } .button-softaculous-pro { padding: 10px 15px !important; font-size: 15px !important; font-weight: bold; background: #28527A !important; color: #fff !important; border: 1px solid #28527A !important; transition: all .3s linear; cursor: pointer; height: auto !important; } .button-softaculous-pro:disabled{ color: #999 !important; border-color: #999 !important; background: transparent !important; cursor: progress !important; } .button-softaculous-pro:hover { background: #fff !important; color: #28527A !important; } .button-softaculous-pro-single, .button-softaculous-pro-selected { padding: 12px 25px !important; font-size: 15px !important; font-weight: bold; background: #28527A !important; color: #fff !important; border: 1px solid #28527A !important; transition: all .3s linear; cursor: pointer; } .button-softaculous-pro-single:hover { background: #fff !important; color: #28527A !important; } .softaculous-pro-template-screen { padding: 10px 0px; } .single-template-div { position: relative; display: flex; flex-direction: row; gap: 0px 30px; } #softaculous_pro_screenshots { display: flex; vertical-align: top; text-align: left; flex-direction: column; } .softaculous_pro_img_screen { display: flex; align-items: center; justify-content: space-between; border: 1px solid #00000017; margin: 0px 15px 10px 15px; border-radius: 3px; cursor: pointer; align-items: center; } .softaculous_pro_img_screen .softaculous_pro_img_name, .softaculous_pro_img_screen .softaculous_pro_img_views { padding: 10px; margin: 0; } .softaculous_pro_img_screen .spro_page_selector { padding: 0px 10px; } .softaculous_pro_img_screen input { margin: 0px; } .softaculous_pro_img_screen a { position: relative; color: black; background: #00000017; border-left: 1px solid white; } .softaculous_pro_img_screen a::after { content: ""; position: absolute; top: 19px; left: 10px; width: 53%; height: 2px; transform: rotate(47deg); box-sizing: border-box; background: black; } .spro_page_selector { width: 100%; cursor: pointer; } .softaculous_pro_img_name { cursor: pointer; text-transform: capitalize; } .softaculous_pro_img_name:hover { color: #28527A; } .spro_img_inview::after { display: none; } .spro_img_inview:focus { box-shadow: none; } .softaculous_pro_img_screen .spro_img_inview { color: #fff !important; background-color: #28527A; } .softaculous_pro_single_content h1 { font-size: 20px; line-height: 1.30; text-align: center; } .softaculous_pro_import_img_notice{ text-align:left; margin:0px 15px 10px 15px; border: 1px solid #fff3cd; border-radius: 3px; align-items: center; padding: 10px; color: #856404; background-color: #fff3cd; } .softaculous_pro_import_img_notice i{ font-size:11px; } .softaculous_pro_single_content p { font-size: 16px; line-height: 1.30; text-align: center; } .softaculous_pro_single_content{ width: 20%; } .softaculous_pro_img_name input[type=checkbox] { position: relative; border: 2px solid #000; border-radius: 2px; background: none; cursor: pointer; line-height: 0; margin: 0 .6em 0 0; outline: 0; padding: 0 !important; vertical-align: text-top; height: 20px; width: 20px; -webkit-appearance: none; opacity: .5; } .softaculous_pro_img_name input[type=checkbox]:hover { opacity: 1; } .softaculous_pro_img_name input[type=checkbox]:checked { background-color: #000; opacity: 1; } .softaculous_pro_img_name input[type=checkbox]:before { content: ''; position: absolute; right: 50%; top: 50%; width: 4px; height: 10px; border: solid #FFF; border-width: 0 2px 2px 0; margin: -1px -1px 0 -1px; transform: rotate(45deg) translate(-50%, -50%); z-index: 2; } .softaculous-pro-finishing-bar { width: 100%; display: flex; gap: 15px; height: 5px; margin: 20px 0px; } .inner-finishing-bar { width: 25%; height: 100%; background-color: red; } .progress-text { font-size: 30px; } #softaculous-pro-step-progress-txt { font-size: 20px; margin-top: 25px; } .setup-progress-bar { width: 70%; margin: 20px 0px; } .setup-progress-bar>span { font-size: 15px; } .setup-progress-counter { width: 100%; height: 100%; background-color: blue !important; border-radius: 15px; } .progress-bar-par { margin: 11px 0px; width: 100%; height: 15px; background-color: rgba(128, 128, 128, 0.3); border-radius: 10px; } .progress-time { font-size: 14px; } .progress-float-r { float: right; } #softaculous-pro-error-template { display: none; background: #f7dbdb; padding: 1px 10px; margin-bottom: 15px; } .setup-error { padding: 10px 10px; background: #ff000014; border-left: 5px solid red; } .setup-error-message { display: flex; justify-content: flex-start; align-items: center; } .setup-error-message h1 { font-size: 25px; margin-left: 20px; } .setup-error-message span { font-size: 25px; } .spro-full h3 { font-size: 20px; } #softaculous-pro-import-form>div { padding: 10px 0px; font-size: 14px } .spro-full>p { font-size: 14px; } .spro-sub-head, .spro-content { margin: 5px 0px; } .spro-content li { font-size: 14px; margin-bottom: 5px; } .skeleton-loader { height: 235px; overflow: hidden; position: relative; width: 250px; margin: 20px auto; border: 1px solid #8080803f; padding: 20px; z-index: 1; } .skeleton-row { height: 200px; margin-bottom: 60px; animation: skeletonAnimation 6s infinite linear; position: relative; /* Ensure positioning context for z-index to work */ z-index: 0; } .skeleton-row>div { position: relative; margin-bottom: 10px; background-color: #d3cccc; border-radius: 2px; } .skeleton-row .skeleton-img { height: 100px; } .skeleton-loader-shadow { position: absolute; width: 100%; height: 30px; bottom: 0px; left: 0px; background-color: #fff; z-index: 5; filter: blur(4px); } @keyframes skeletonAnimation { 0% { opacity: 0.5; transform: translateY(0%); } 100% { opacity: 1; transform: translateY(-100%); } } .spro-setup-progress-logs{ font-size: 16px; color: brown; margin: 20px 0px; display : none; } .spro-failed-ins-li{ font-size: 0.8rem; color: black; } .softaculous-pro-search .softaculous-pro-sf-empty { right: 0; left: auto; font-weight: bolder; cursor: pointer; } #softaculous-pro-suggestion { display: none; position: absolute; background-color: #f9f9f9; min-width: 420px; box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); padding: 12px 16px; z-index: 1; color: #111; top: 38px; left: -1px; } #softaculous-pro-single-template { display: none; } #softaculous_pro_notification { position: fixed; bottom: 0px; margin-left: -20px; width: 100%; z-index: 10000; background: #F90716; color: #FFF; padding: 10px; } .softaculous-pro-notification-div { width: 90%; } .softaculous-pro-notification-text { text-align: center; } .softaculous-pro-notification-text a { color: #ffffff; font-weight: bold; } .softaculous-pro-cat { padding: 7px 10px; box-sizing: border-box; cursor: pointer; } .softaculous-pro-modal { display: none; } .softaculous-pro-modal-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; } .softaculous-pro-modal-close:hover, .softaculous-pro-modal-close:focus { color: black; text-decoration: none; cursor: pointer; } .softaculous-pro-modal-header, .softaculous-pro-modal-content, .softaculous-pro-modal-footer { width: 100%; box-sizing: border-box; } .softaculous-pro-exp { font-size: 12px; } #softaculous_pro_license_div { display: none; } #softaculous-pro-progress-template { display: none; background: #dcf1f9; padding: 10px; margin-bottom: 15px; } #softaculous-pro-progress-template img { vertical-align: middle; margin-right: 10px; } #wpbody div#setting-error-tgmpa, #wpbody .update-nag, #wpbody .notice, #wpbody div.error { display: none; } #wpfooter { position: relative; } #softaculous-pro-sortby { height: 100%; } /* compact sidebar */ .other_suggestions { max-height: 150px; overflow: auto; border-radius: 5px; position: absolute; width: 100%; top: 100%; z-index: 1000; background: white; } .other_suggestions * { font-size: 16px; margin: 10px 0px; padding: 10px; cursor: pointer; } /* changes */ .softaculous-pro-wizard-sidebar.compact .softaculous-pro-setup-logo { padding: 10px; transition: padding 0.8s ease-in-out; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-setup-logo h1 { font-size: 0; display: none; transition: font-size 1s ease-in-out; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li { padding-left: 0; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li span { font-size: 0; opacity: 0; transition: opacity 0.5s ease-in-out; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-steps-holder { padding: 10px 25px; transition: padding 0.8s ease-in-out; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li::before { margin-right: 0; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li::after { left: 13px; } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn { padding: 0px; background-color: transparent; margin: 10px 30px; font-size: 16px; border-radius: 5px; } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn:hover { padding: 0px; background-color: transparent !important; } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn span:first-child { display: block; transform: rotate(180deg); font-size: 1.2em; } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn span:last-child { display: none; } .loader-container,.softaculous-pro-loader-container { display: flex; justify-content: center; align-items: center; position: absolute; top: 0; left: 0; right: 0; bottom: 0; } .loader,.softaculous-pro-loader { width: 48px; height: 48px; border: 5px solid #FFF; border-bottom-color: #FF3D00; border-radius: 50%; box-sizing: border-box; animation: rotation 1s linear infinite; } @keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* responsive tablet*/ @media screen and (max-width: 768px) { #wpcontent, #wpfooter, #wpbody-content, ol { margin: 0 !important; padding: 0 !important; } .softaculous-pro-wizard{ height: auto; } .softaculous-pro-wizard-content{ padding: 20px 30px 0px 30px; margin-top: 80px; width: auto; } #softaculous-pro-pagination{ margin: 25px auto; } #softaculous-pro-templates .softaculous-pro-md-3, #softaculous-pro-templates .softaculous-pro-md-4{ width:50%; } .softaculous-pro-wizard{ flex-direction: column; } .softaculous-pro-wizard-sidebar{ flex-direction: row; height: 12%; position: relative; justify-content: space-between; align-items: center; } .softaculous-pro-setup-logo{ padding: 10px; } .softaculous-pro-setup-logo::after{ height: 0px; } .softaculous-pro-setup-logo img{ width: 40px; } .softaculous-pro-setup-logo h1{ font-size: 22px; } .softaculous_pro_return_btn{ margin: 0px 20px; text-align: center; font-size: 16px; border-radius: 5px; padding: 0px; background-color: inherit; } .softaculous-pro-steps-holder{ position: absolute; top: 100%; background-color: #f6f7f7; padding: 15px 0px 5px 0px; margin: auto; width: 100%; } .softaculous-pro-wizard-steps li::before{ margin-right:0px; color: #000; background: white; z-index: 2; } .softaculous-pro-wizard-steps li{ color: #000; font-size: 14px; /* margin-right: 10px; */ padding: 10px 5px; flex-direction: column; } .softaculous-pro-steps-holder .softaculous-pro-wizard-steps{ display: flex; justify-content: center; flex-wrap: wrap; } .softaculous-pro-wizard-steps{ justify-content: space-evenly !important; margin: 0px 15px !important; } .softaculous-pro-wizard-steps li span{ margin-top: 5px; text-align: center; } .active_step>span{ font-weight: 500; font-size: 15px ; } .active_step::before{ font-weight: 500; } .softaculous-pro-wizard-inner-content h1, .softaculous-pro-modal-header h1{ font-size: 24px; line-height: 1.2; } .softaculous-pro-wizard-inner-content p{ font-size: 14px; } .softaculous-pro-wizard-buttons .step_btn, .softaculous-pro-import{ padding: 7px 15px; font-size: 14px; } .softaculous-pro-category-input, .softaculous-pro-title-input, .softaculous-pro-theme-input{ width: 100%; } .softaculous-pro-categories-list{ gap: 15px 15px; justify-content: center; } .category_btn{ padding: 10px 20px; font-size: 14px; } /* changes */ .softaculous-pro-wizard-sidebar.compact .softaculous-pro-setup-logo { padding: 10px; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-setup-logo h1 { font-size: 22px; opacity: 100%; display: block; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li { padding: 20px 0px; flex-direction: column; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li span { font-size: 14px; opacity: 100%; color: #000; margin-top: 5px; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-steps-holder { padding: 10px 0px; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li::before { color: #000; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li::after { left: 0px; } .softaculous-pro-ai-wizard .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li::after{ width: calc(100% + 35px); height: 1px; top: 37%; left: 63%; transform: translateY(-50%); background: linear-gradient(to right, #532dc4, transparent); } .softaculous-pro-ai-wizard .softaculous-pro-wizard-steps li:not(:last-child)::after{ width: calc(100% + 35px); height: 1px; top: 37%; left: 63%; transform: translateY(-50%); background: linear-gradient(to right, #532dc4, transparent); } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn { padding: 0px; background-color: transparent; margin: 10px 30px; text-align: center; font-size: 16px; border-radius: 5px; } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn:hover { padding: 0px; background-color: transparent !important; } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn span:first-child { display: inline-block; } .softaculous-pro-wizard-sidebar.compact .softaculous_pro_return_btn span:last-child { display: inline-block; } .single-templates-content{ max-height: 400px !important; } .button-softaculous-pro { padding: 4px 15px !important; font-size: 12px !important; } .softaculous-pro-wizard-steps a:last-child li{ margin-right: 0px !important; } #softaculous-pro-single-template > div:first-child{ margin-bottom: 10px !important; } #softaculous-pro-single-template > div:first-child h1{ font-size: 24px; } #softaculous-pro-single-template > div:last-child{ bottom: 0 !important; } .softaculous-pro-wizard-sidebar.compact .softaculous-pro-wizard-steps li { padding: 10px 5px; flex-direction: column; } .progress-text{ text-align: center; line-height: 1.2; } .setup-progress-bar{ width: 100%; } .skeleton-loader{ width: auto; max-width: 250px; } .softaculous-pro-wizard-steps a{ position: relative; flex: 1; } .softaculous-pro-wizard-steps a:not(:first-child)::before{ content: ""; position: absolute; width: 100%; top: 33%; height: 1.5px; background:linear-gradient(to bottom, #7e5ce7, transparent); right: 61%; /* transform: translateY(-50%); */ } .softaculous_pro_single_content{ margin-bottom: 40px; } .softaculous-pro-ai-wizard .softaculous-form-container{ width: 100% !important; } .softaculous-pro-ai-wizard .softaculous-pro-wizard-steps a { color: #000; } .softaculous-pro-ai-wizard .softaculous-pro-wizard-steps a::after{ background: black; } } /* for resetting wordpress margin and padding */ @media screen and (max-width: 600px) { #wpcontent, #wpfooter, #wpbody-content, #wpbody, ol { margin: 0 !important; padding: 0 !important; } .single-template-div { flex-wrap: wrap; justify-content: center; } #softaculous-pro-single-template > div:last-child{ bottom: 0 !important; z-index: 10; } .softaculous-pro-features-container{ grid-template-columns: repeat(1, minmax(0, 1fr)); } .softaculous-pro-wizard-steps a:not(:first-child)::before{ top: 25%; } .softaculous_pro_single_content{ width: 75% !important; } .softaculous-container-half{ flex-direction: column; } } /* for resetting wordpress margin and padding */ @media screen and (max-width: 960px) { #wpcontent, #wpfooter, #wpbody-content, #wpbody, ol { margin: 0 !important; padding: 0 !important; } .softaculous-pro-features-container{ grid-template-columns: repeat(1, minmax(0, 1fr)); } .button-softaculous-pro{ font-size: 12px !important; } .softaculous-pro-iframe-container{ width: 60% !important; } .softaculous_pro_single_content{ width: 40%; } } /* responsive mobile*/ @media screen and (max-width: 426px) { #wpcontent, #wpfooter, #wpbody-content, #wpbody, ol { margin: 0 !important; padding: 0 !important; } .softaculous-pro-wizard-content{ padding: 30px 15px 0px 15px; } #softaculous-pro-pagination{ margin: 25px auto; } #softaculous-pro-templates .softaculous-pro-md-3, #softaculous-pro-templates .softaculous-pro-md-4{ width:100%; } .softaculous-pro-theme-details{ margin-right: 0px; } .softaculous-pro-search,#softaculous_pro_search .softaculous-pro-search-field, #softaculous_pro_search .softaculous-pro-categories, #softaculous_pro_search .softaculous-pro-sortby{ margin-right: 0px; } .softaculous-pro-categories{ padding: 12px 15px !important; } #softaculous_pro_search{ flex-direction: column; gap: 10px; } .softaculous-pro-dropdown-content{ min-width: 0; top: 100%; } .softaculous-pro-cat-holder .softaculous-pro-md-4{ width: 50%; } .softaculous-pro-ai-wizard .softaculous-pro-wizard-content{ margin-top: 125px; } .softaculous-pro-iframe-container{ width: 80% !important; } } .spro-tool-tip[tooltip-title]:hover:after { content: attr(tooltip-title); position: absolute; padding: 10px; display: block; z-index: 100; background-color: #000000; color: #ffffff; max-width: 200px; text-decoration: none; text-align:center; border-radius: 4px; } /* Softaculous ai css */ .softaculous-content input:focus, .softaculous-content select:focus, .softaculous-ai-description textarea:focus, .softaculous-ai-image-search input:focus, .softaculous-contact-address textarea:focus{ border-color: #4511b1; box-shadow: 0 0 0 1px #4511b1; outline: 2px solid transparent; } .softaculous-content select{ max-width: inherit; } .softaculous-form-container, .softaculous-ai-description, .softaculous-ai-contact{ width: 100%; max-width: 900px; } .softaculous-form-container, .softaculous-ai-contact{ display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; } .softaculous-container-full{ display: flex; flex-direction: column; gap: 20px; } .softaculous-content{ display: flex; flex-direction: column; flex: 1; gap: 10px; } .softaculous-content input, .softaculous-ai-description textarea, .softaculous-contact-address textarea, .softaculous-ai-image-search-input > input{ padding: 5px 20px; border: 1px solid rgba(128, 128, 128, 0.329); width: 100%; font-size: 15px; transition: all 0.2s ease-in; line-height: 2; } .softaculous-ai-image-search-input > input{ margin: 0px; } .softaculous-ai-description textarea,.softaculous-contact-address textarea{ padding: 10px; } .softaculous-form-container select{ height: 100%; border: 1px solid rgba(128, 128, 128, 0.329); padding: 0px 10px; transition: all 0.2s ease-in; } .softaculous-form-container select option{ padding: 10px; } .softaculous-content label{ font-size: 14px; font-weight: 500; } .softaculous-container-half { display: flex; gap: 20px; } .softaculous-ai-description-creation, .softaculous-ai-svg { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; } .softaculous-ai-svg>p { font-weight: 500; cursor: pointer; font-size: 14px; margin-bottom: 0px; } .softaculous-ai-pagination>span { margin: 0px 5px; font-size: 14px; cursor: pointer; font-weight: 500; } .softaculous-ai-images { display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 25px; } .softaculous-ai-image-search { width: 100%; max-width: 500px; } .softaculous-pro-image-buttons { margin-bottom: 5px; position: relative; } .softaculous-ai-images-section { text-align: center; width: 100%; } .softaculous-pro-image-buttons>button { border: none; padding-bottom: 10px; background-color: transparent; font-size: 14px; font-weight: 500; cursor: pointer; } .softaculous-pro-image-buttons > button.active { border-bottom: 1px solid #4511b1; color: #4511b1; } .softaculous-ai-images-rows, .softaculous-selected-images-rows, .softaculous-upload-placeholder { display: none; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; } .softaculous-ai-single-image, .softaculous-selected-image { max-width: 300px; max-height: 220px; cursor: pointer; position: relative; overflow: hidden; } .softaculous-ai-single-image>img, .softaculous-selected-image>img { max-width: 100%; max-height: 100%; object-fit: contain; } .softaculous-dropdown { position: relative; width: 100%; } .softaculous-dropdown-selected { display: flex; flex-wrap: wrap; align-items: center; cursor: pointer; position: relative; } .softaculous_pro_input { border: none; outline: none; flex-grow: 1; padding: 5px; } .softaculous-dropdown-selected-tags { display: flex; flex-wrap: wrap; gap: 5px; } .selected-category { background: #0073aa; color: #fff; padding: 5px 10px; border-radius: 15px; display: flex; align-items: center; } .selected-category .remove-category { margin-left: 8px; cursor: pointer; font-weight: bold; } .softaculous-category-holder { display: none; position: absolute; width: 100%; background: white; border: 1px solid #ccc; border-radius: 5px; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); margin-top: 5px; z-index: 10; } .softaculous-pro-categories-dropdownlist, .softaculous-pro-categories-default-dropdownlist { max-height: 200px; overflow-y: auto; } .softaculous-category_btn { padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; } .softaculous-category_btn:hover { background: #f0f0f0; } .clear-btn { display: none; cursor: pointer; padding: 5px; font-weight: bold; color: #4511b1; position: absolute; right: 5%; } .softaculous-ai-single-image { display: inline-block; cursor: pointer; border: 2px solid transparent; padding: 5px; } .softaculous-ai-single-image.selected { border-color: #1acefb; background-color: rgba(0, 0, 255, 0.1); } .softaculous-ai-single-image > input[type="checkbox"]{ display: none; } .softaculous-ai-single-image.selected:after { content: "✓"; position: absolute; top: 8px; right: 8px; background: #48c; color: white; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px; font-weight: bold; box-shadow: 0 0 5px rgba(0,0,0,0.3); } .softaculous-active-section{ display: flex; } a.softaculous-ai-single-image-credit{ display:block; color:#9ca3af; font-size:10px; text-decoration:none; color:#9ca3af; margin: 0; line-height:12px; } .softaculous-placeholder { text-align: center; color: #888; font-style: italic; margin-top: 10px; width: 100%; padding: 20px; font-size: 16px; border: 2px dashed #aaa; border-radius: 10px; background: #fafafa; transition: 0.3s; } .softaculous-upload-box { padding: 30px; background: white; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); border-radius: 12px; flex: 1; text-align: center; margin-bottom: 20px; } .softaculous-upload-box h2 { margin-bottom: 15px; color: #333; } .softaculous-upload-area { position: relative; border: 2px dashed #aaa; border-radius: 10px; background: #fafafa; cursor: pointer; transition: 0.3s; } .softaculous-upload-area:hover { background: #e9e9e9; } .softaculous-upload-area p { font-size: 16px; color: #555; padding: 50px; margin: 0px; } .softaculous-upload-area input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; } .softaculous-uploaded-file { margin-top: 15px; font-size: 14px; color: #27ae60; } .softaculous-remove-selected{ position: absolute; top: 3%; right: 3%; font-size: 14px; padding: 5px 8px; background: rgb(255 255 255 / 1); border-radius: 50px; color: #4511b1; } .softaculous-img-skeleton-loader { width: 280px; height: 200px; background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%); background-size: 200% 100%; animation: loading 10s infinite; border-radius: 5px; } @keyframes loading { 0% { background-position: -300% 0; } 100% { background-position: 300% 0; } } .hidden { display: none; } .softaculous-pro-description-error{ color: #d44950; font-size: 14px; } .softaculous-ai-loader, .softaculous-next-loading{ width: 20px; height: 20px; border: 3px solid #8c8f94; border-bottom-color: #28527a; border-radius: 50%; display: inline-block; box-sizing: border-box; animation: softailoader 1s linear infinite; display: none; } @keyframes softailoader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .softaculous-ai-loading .softaculous-ai-loader{ display: block; } .softaculous-ai-loading svg{ display: none; } .softaculous-ai-image-search.show_suggestion .softaculous-ai-image-suggestion-list{ display: block; } .softaculous-ai-image-search.show_suggestion .softaculous-ai-image-search-input > input:focus{ border-color: rgba(128, 128, 128, 0.329); box-shadow: none; } .softaculous-ai-image-suggestion-list{ background-color: #fff; border-left: 1px solid; border-right: 1px solid; border-bottom: 1px solid; border-color: rgba(128, 128, 128, 0.329); border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; padding: 0px 20px 5px 20px; } .softaculous-ai-image-suggestion-header > h3, .softaculous-ai-image-suggestion-header> hr{ margin-top: 0px; margin-bottom: 0px } .softaculous-ai-image-suggestion-header > h3{ font-size: 15px; padding: 10px 0px; } .softaculous-ai-image-search.show_suggestion .softaculous-ai-image-search-input > input{ border-bottom: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; } .softaculous-ai-image-suggestions { padding: 10px 0px 20px 0px; white-space: nowrap; overflow: auto; } .softaculous-ai-image-suggestions::-webkit-scrollbar { height: 5px; } .softaculous-ai-image-suggestions::-webkit-scrollbar-thumb { background-color: #888; border-radius: 10px; } .softaculous-ai-image-suggestions::-webkit-scrollbar-track { background: #f1f1f1; } .softaculous-ai-image-suggestions > span{ padding: 5px 10px; border-radius: 20px; border: 1px solid rgba(229 231 235 / 1); background-color: rgba(240 244 250 / 1); box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, .05); margin-right: 5px; font-weight: 400; font-size: 14px; color: rgb(71 85 105/ 1); cursor: pointer; } .softaculous-ai-warning, .softaculous-pro-description-error{ color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; padding: .75rem 1.25rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: .25rem; text-align: start; } .softaculous-pro-theme-skeleton { width: 100%; background-color: #fff; overflow: hidden; height: 100%; display: flex; flex-direction: column; } .softaculous-pro-skeleton-header, .softaculous-pro-skeleton-footer { display: flex; justify-content: space-evenly; align-items: center; background-color: #fff; border-bottom: 1px solid #ededed; gap: 10px; margin: 0px 10px; flex: 1; } .softaculous-pro-skeleton-header > div{ height: 50%; border-radius: 5px; flex: 2; } .softaculous-pro-skeleton-header > div:first-child{ flex: 1; border-radius: 100px; } .softaculous-pro-skeletion-description{ height: 150px; } .softaculous-pro-skeletion-content { padding: 10px; flex: 2; } .softaculous-pro-skeletion-content > h4 { margin: 0 0 5px; } .softaculous-pro-skeleton-footer > div{ height: 60%; border-radius: 5px; flex: 2; } .softaculous-pro-skeleton-loading .softaculous-pro-skeleton-header > div, .softaculous-pro-skeleton-loading h4, .softaculous-pro-skeleton-loading .softaculous-pro-skeletion-description, .softaculous-pro-skeleton-loading .softaculous-pro-skeleton-footer > div { background-color: #ededed; background: linear-gradient(90deg, #ededed 25%, #f5f5f5 50%, #ededed 75%); background-size: 200% 100%; background-position-x: 180%; animation: 1s soft-skeleton-shimmer ease-in-out infinite; } @keyframes soft-skeleton-shimmer { to { background-position-x: -20%; } } .softaculous-pro-skeleton-loading h4:first-child{ width: 40%; } .softaculous-pro-skeleton-loading h4 { min-height: 20%; border-radius: 4px; animation-delay: .05s; } .softaculous-pro-skeleton-loading .softaculous-pro-skeletion-description { height: 100%; border-radius: 4px; animation-delay: .06s; } .softaculous-pro-ai-show-demo{ color:black; z-index: 11; } .softaculous-pro-ai-show-demo:focus{ color:black; } .softaculous-pro-ai-show-demo:hover{ color: #007bff; } .softaculous-pro-ai-wizard #softaculous_pro_display_image{ display: none; } .softaculous-pro-ai-wizard .softaculous_pro_display_iframe{ display:none; position:relative; z-index:2; min-width: 1250px; height: 100%; border: none; transform-origin: top left; } .softaculous_pro_iframe_inview{ display: block !important; } .softaculous-template-mode-ai.active_mode, .softaculous-template-mode-manual.active_mode{ background-color: #ffffff; color: #000; box-shadow: 0 0 5px rgba(0,0,0,0.1); } .softaculous-pro-ai-search.manual-mode { max-width: unset !important; flex: 2 !important; margin-bottom: 0px !important; } .softaculous-pro-alert { padding: 12px 20px; margin-bottom: 16px; border: 1px solid transparent; border-radius: 4px; font-size: 14px; } .softaculous-pro-alert-danger{ color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; } .softaculous-pro-alert-warning{ color: #212529; background-color: #fbc941; border-color: #DBA619; } .softaculous-upload-placeholder.softaculous-active-section{ align-items: unset; flex-direction: column; } .softaculous-pro-image-success{ display: flex; justify-content: space-between; align-items: center; } .softaculous-pro-alert-success{ color: #155724; background-color: #d4edda; border-color: #c3e6cb; } .softaculous-template-mode-ai, .softaculous-template-mode-manual{ position: relative; } .softaculous-template-mode-tooltip { position: absolute; top: 125%; left: 50%; transform: translateX(-50%); background: rgba(33, 33, 33, 0.9); color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 13px; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; pointer-events: none; z-index: 10; } .softaculous-template-mode-ai:hover .softaculous-template-mode-tooltip, .softaculous-template-mode-manual:hover .softaculous-template-mode-tooltip { opacity: 1; visibility: visible; } .softaculous-template-mode-tooltip::after { content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: transparent transparent rgba(33, 33, 33, 0.9) transparent; } .softaculous-template-mode-manual:hover .softaculous-template-mode-tooltip { left: 0; } .softaculous-template-mode-manual:hover .softaculous-template-mode-tooltip::after { left: 65%; } .softaculous-pro-images-end { display: flex; align-items: center; justify-content: center; width: 100%; font-size: 16px; position: relative; color: #3333335c; margin: 20px 0; text-align: center; } .softaculous-pro-images-end::before, .softaculous-pro-images-end::after { content: ''; width: 100px; height: 1px; background-color: #00000026; margin: 0 10px; } .softaculous-pro-wizard-error{ flex: 1; display: flex; justify-content: space-between; align-items: center; } .softaculous-pro-theme-iframe-overlay{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0); /* fully transparent */ cursor: pointer; z-index: 10; } .softaculous-pro-link-skeleton{ padding: 14px; text-transform: capitalize; } .softaculous-pro-selected-image-count { background-color: #4511b1; color: #fff; padding: 3px 5px; border-radius: 50%; border: 1px solid #4511b1; white-space: nowrap; font-size: 12px; position: absolute; top: -10px; right: -20px; font-weight: 700; min-width: 14px; } .softaculous-pro-image-buttons { width: fit-content; margin: auto; position: relative; } .softaculous-pro-add-social { cursor: pointer; font-size: 18px; margin-bottom: 20px; align-items: center; display: flex; gap: 7px; } .softaculous-pro-social-links-profile .softaculous-container-half { margin-bottom: 15px; } .softaculous-pro-add-social>span { padding: 0px 5px; border-radius: 4px; background-color: #4511b1; color: #fff !important; vertical-align: middle; font-size: 26px; } .softaculous-address > div{ max-width: 100%; padding-right: 5px !important; } .softaculous-address select, .softaculous-address input{ padding: 7px 20px; }copy_editor_theme.php000064400000005312152347514360010772 0ustar00
      '.$l['no_sites'].'
    '; return false; } if(!empty($done)){ echo '
      '.$done['msg'].'
    '; return true; } echo '

    '.$l['title_copy_editor'].'


    '.$l['select_site_exp'].'


    '; softfooter(); }bootstrap/js/bootstrap.bundle.min.js000064400000231453152347514360013624 0ustar00/*! * Bootstrap v4.3.1 (https://getbootstrap.com/) * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t=t||self).bootstrap={},t.jQuery)}(this,function(t,p){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)p(this._element).one(q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n=i.clientWidth&&n>=i.clientHeight}),h=0l[t]&&!i.escapeWithReference&&(n=Math.min(h[e],l[t]-("right"===t?h.width:h.height))),Kt({},e,n)}};return c.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";h=Qt({},h,u[e](t))}),t.offsets.popper=h,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!fe(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",h=l?"Top":"Left",u=h.toLowerCase(),f=l?"left":"top",d=l?"bottom":"right",p=Zt(i)[c];a[d]-ps[d]&&(t.offsets.popper[u]+=a[u]+p-s[d]),t.offsets.popper=Vt(t.offsets.popper);var m=a[u]+a[c]/2-p/2,g=Nt(t.instance.popper),_=parseFloat(g["margin"+h],10),v=parseFloat(g["border"+h+"Width"],10),y=m-t.offsets.popper[u]-_-v;return y=Math.max(Math.min(s[c]-p,y),0),t.arrowElement=i,t.offsets.arrow=(Kt(n={},u,Math.round(y)),Kt(n,f,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(p,m){if(oe(p.instance.modifiers,"inner"))return p;if(p.flipped&&p.placement===p.originalPlacement)return p;var g=Gt(p.instance.popper,p.instance.reference,m.padding,m.boundariesElement,p.positionFixed),_=p.placement.split("-")[0],v=te(_),y=p.placement.split("-")[1]||"",E=[];switch(m.behavior){case ge:E=[_,v];break;case _e:E=me(_);break;case ve:E=me(_,!0);break;default:E=m.behavior}return E.forEach(function(t,e){if(_!==t||E.length===e+1)return p;_=p.placement.split("-")[0],v=te(_);var n,i=p.offsets.popper,o=p.offsets.reference,r=Math.floor,s="left"===_&&r(i.right)>r(o.left)||"right"===_&&r(i.left)r(o.top)||"bottom"===_&&r(i.top)r(g.right),c=r(i.top)r(g.bottom),u="left"===_&&a||"right"===_&&l||"top"===_&&c||"bottom"===_&&h,f=-1!==["top","bottom"].indexOf(_),d=!!m.flipVariations&&(f&&"start"===y&&a||f&&"end"===y&&l||!f&&"start"===y&&c||!f&&"end"===y&&h);(s||u||d)&&(p.flipped=!0,(s||u)&&(_=E[e+1]),d&&(y="end"===(n=y)?"start":"start"===n?"end":n),p.placement=_+(y?"-"+y:""),p.offsets.popper=Qt({},p.offsets.popper,ee(p.instance.popper,p.offsets.reference,p.placement)),p=ie(p.instance.modifiers,p,"flip"))}),p},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=te(e),t.offsets.popper=Vt(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!fe(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=ne(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottomn.right||e.top>n.bottom||e.rightdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
    ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:vn},Ln="show",xn="out",Pn={HIDE:"hide"+Tn,HIDDEN:"hidden"+Tn,SHOW:"show"+Tn,SHOWN:"shown"+Tn,INSERTED:"inserted"+Tn,CLICK:"click"+Tn,FOCUSIN:"focusin"+Tn,FOCUSOUT:"focusout"+Tn,MOUSEENTER:"mouseenter"+Tn,MOUSELEAVE:"mouseleave"+Tn},Hn="fade",jn="show",Rn=".tooltip-inner",Fn=".arrow",Mn="hover",Wn="focus",Un="click",Bn="manual",qn=function(){function i(t,e){if("undefined"==typeof be)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=p(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(p(this.getTipElement()).hasClass(jn))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),p.removeData(this.element,this.constructor.DATA_KEY),p(this.element).off(this.constructor.EVENT_KEY),p(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&p(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===p(this.element).css("display"))throw new Error("Please use show on visible elements");var t=p.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){p(this.element).trigger(t);var n=m.findShadowRoot(this.element),i=p.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=m.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&p(o).addClass(Hn);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();p(o).data(this.constructor.DATA_KEY,this),p.contains(this.element.ownerDocument.documentElement,this.tip)||p(o).appendTo(l),p(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new be(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Fn},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),p(o).addClass(jn),"ontouchstart"in document.documentElement&&p(document.body).children().on("mouseover",null,p.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,p(e.element).trigger(e.constructor.Event.SHOWN),t===xn&&e._leave(null,e)};if(p(this.tip).hasClass(Hn)){var h=m.getTransitionDurationFromElement(this.tip);p(this.tip).one(m.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=p.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==Ln&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),p(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(p(this.element).trigger(i),!i.isDefaultPrevented()){if(p(n).removeClass(jn),"ontouchstart"in document.documentElement&&p(document.body).children().off("mouseover",null,p.noop),this._activeTrigger[Un]=!1,this._activeTrigger[Wn]=!1,this._activeTrigger[Mn]=!1,p(this.tip).hasClass(Hn)){var r=m.getTransitionDurationFromElement(n);p(n).one(m.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){p(this.getTipElement()).addClass(Dn+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||p(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(p(t.querySelectorAll(Rn)),this.getTitle()),p(t).removeClass(Hn+" "+jn)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=bn(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?p(e).parent().is(t)||t.empty().append(e):t.text(p(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:m.isElement(this.config.container)?p(this.config.container):p(document).find(this.config.container)},t._getAttachment=function(t){return Nn[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)p(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Bn){var e=t===Mn?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===Mn?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;p(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),p(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||p(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Wn:Mn]=!0),p(e.getTipElement()).hasClass(jn)||e._hoverState===Ln?e._hoverState=Ln:(clearTimeout(e._timeout),e._hoverState=Ln,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===Ln&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||p(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Wn:Mn]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=xn,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===xn&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=p(this.element).data();return Object.keys(e).forEach(function(t){-1!==An.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),m.typeCheckConfig(wn,t,this.constructor.DefaultType),t.sanitize&&(t.template=bn(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=p(this.getTipElement()),e=t.attr("class").match(In);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(p(t).removeClass(Hn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=p(this).data(Cn),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),p(this).data(Cn,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return kn}},{key:"NAME",get:function(){return wn}},{key:"DATA_KEY",get:function(){return Cn}},{key:"Event",get:function(){return Pn}},{key:"EVENT_KEY",get:function(){return Tn}},{key:"DefaultType",get:function(){return On}}]),i}();p.fn[wn]=qn._jQueryInterface,p.fn[wn].Constructor=qn,p.fn[wn].noConflict=function(){return p.fn[wn]=Sn,qn._jQueryInterface};var Kn="popover",Qn="bs.popover",Vn="."+Qn,Yn=p.fn[Kn],zn="bs-popover",Xn=new RegExp("(^|\\s)"+zn+"\\S+","g"),Gn=l({},qn.Default,{placement:"right",trigger:"click",content:"",template:''}),$n=l({},qn.DefaultType,{content:"(string|element|function)"}),Jn="fade",Zn="show",ti=".popover-header",ei=".popover-body",ni={HIDE:"hide"+Vn,HIDDEN:"hidden"+Vn,SHOW:"show"+Vn,SHOWN:"shown"+Vn,INSERTED:"inserted"+Vn,CLICK:"click"+Vn,FOCUSIN:"focusin"+Vn,FOCUSOUT:"focusout"+Vn,MOUSEENTER:"mouseenter"+Vn,MOUSELEAVE:"mouseleave"+Vn},ii=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){p(this.getTipElement()).addClass(zn+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||p(this.config.template)[0],this.tip},o.setContent=function(){var t=p(this.getTipElement());this.setElementContent(t.find(ti),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(ei),e),t.removeClass(Jn+" "+Zn)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=p(this.getTipElement()),e=t.attr("class").match(Xn);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||tthis._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
    ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Ee},je="show",He="out",Re={HIDE:"hide"+De,HIDDEN:"hidden"+De,SHOW:"show"+De,SHOWN:"shown"+De,INSERTED:"inserted"+De,CLICK:"click"+De,FOCUSIN:"focusin"+De,FOCUSOUT:"focusout"+De,MOUSEENTER:"mouseenter"+De,MOUSELEAVE:"mouseleave"+De},xe="fade",Fe="show",Ue=".tooltip-inner",We=".arrow",qe="hover",Me="focus",Ke="click",Qe="manual",Be=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(xe);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:We},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===He&&e._leave(null,e)};if(g(this.tip).hasClass(xe)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==je&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ke]=!1,this._activeTrigger[Me]=!1,this._activeTrigger[qe]=!1,g(this.tip).hasClass(xe)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Ae+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ue)),this.getTitle()),g(t).removeClass(xe+" "+Fe)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Se(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Pe[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Qe){var e=t===qe?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===qe?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Me:qe]=!0),g(e.getTipElement()).hasClass(Fe)||e._hoverState===je?e._hoverState=je:(clearTimeout(e._timeout),e._hoverState=je,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===je&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Me:qe]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===He&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==Oe.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(be,t,this.constructor.DefaultType),t.sanitize&&(t.template=Se(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ne);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(xe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ie),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ie,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Le}},{key:"NAME",get:function(){return be}},{key:"DATA_KEY",get:function(){return Ie}},{key:"Event",get:function(){return Re}},{key:"EVENT_KEY",get:function(){return De}},{key:"DefaultType",get:function(){return ke}}]),i}();g.fn[be]=Be._jQueryInterface,g.fn[be].Constructor=Be,g.fn[be].noConflict=function(){return g.fn[be]=we,Be._jQueryInterface};var Ve="popover",Ye="bs.popover",ze="."+Ye,Xe=g.fn[Ve],$e="bs-popover",Ge=new RegExp("(^|\\s)"+$e+"\\S+","g"),Je=l({},Be.Default,{placement:"right",trigger:"click",content:"",template:''}),Ze=l({},Be.DefaultType,{content:"(string|element|function)"}),tn="fade",en="show",nn=".popover-header",on=".popover-body",rn={HIDE:"hide"+ze,HIDDEN:"hidden"+ze,SHOW:"show"+ze,SHOWN:"shown"+ze,INSERTED:"inserted"+ze,CLICK:"click"+ze,FOCUSIN:"focusin"+ze,FOCUSOUT:"focusout"+ze,MOUSEENTER:"mouseenter"+ze,MOUSELEAVE:"mouseleave"+ze},sn=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass($e+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(nn),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(on),e),t.removeClass(tn+" "+en)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ge);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b 0; this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); this._addEventListeners(); } // Getters var _proto = Carousel.prototype; // Public _proto.next = function next() { if (!this._isSliding) { this._slide(Direction.NEXT); } }; _proto.nextWhenVisible = function nextWhenVisible() { // Don't call next when the page isn't visible // or the carousel or its parent isn't visible if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') { this.next(); } }; _proto.prev = function prev() { if (!this._isSliding) { this._slide(Direction.PREV); } }; _proto.pause = function pause(event) { if (!event) { this._isPaused = true; } if (this._element.querySelector(Selector$2.NEXT_PREV)) { Util.triggerTransitionEnd(this._element); this.cycle(true); } clearInterval(this._interval); this._interval = null; }; _proto.cycle = function cycle(event) { if (!event) { this._isPaused = false; } if (this._interval) { clearInterval(this._interval); this._interval = null; } if (this._config.interval && !this._isPaused) { this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); } }; _proto.to = function to(index) { var _this = this; this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); var activeIndex = this._getItemIndex(this._activeElement); if (index > this._items.length - 1 || index < 0) { return; } if (this._isSliding) { $(this._element).one(Event$2.SLID, function () { return _this.to(index); }); return; } if (activeIndex === index) { this.pause(); this.cycle(); return; } var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; this._slide(direction, this._items[index]); }; _proto.dispose = function dispose() { $(this._element).off(EVENT_KEY$2); $.removeData(this._element, DATA_KEY$2); this._items = null; this._config = null; this._element = null; this._interval = null; this._isPaused = null; this._isSliding = null; this._activeElement = null; this._indicatorsElement = null; } // Private ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, config); Util.typeCheckConfig(NAME$2, config, DefaultType); return config; }; _proto._handleSwipe = function _handleSwipe() { var absDeltax = Math.abs(this.touchDeltaX); if (absDeltax <= SWIPE_THRESHOLD) { return; } var direction = absDeltax / this.touchDeltaX; // swipe left if (direction > 0) { this.prev(); } // swipe right if (direction < 0) { this.next(); } }; _proto._addEventListeners = function _addEventListeners() { var _this2 = this; if (this._config.keyboard) { $(this._element).on(Event$2.KEYDOWN, function (event) { return _this2._keydown(event); }); } if (this._config.pause === 'hover') { $(this._element).on(Event$2.MOUSEENTER, function (event) { return _this2.pause(event); }).on(Event$2.MOUSELEAVE, function (event) { return _this2.cycle(event); }); } if (this._config.touch) { this._addTouchEventListeners(); } }; _proto._addTouchEventListeners = function _addTouchEventListeners() { var _this3 = this; if (!this._touchSupported) { return; } var start = function start(event) { if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { _this3.touchStartX = event.originalEvent.clientX; } else if (!_this3._pointerEvent) { _this3.touchStartX = event.originalEvent.touches[0].clientX; } }; var move = function move(event) { // ensure swiping with one touch and not pinching if (event.originalEvent.touches && event.originalEvent.touches.length > 1) { _this3.touchDeltaX = 0; } else { _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX; } }; var end = function end(event) { if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX; } _this3._handleSwipe(); if (_this3._config.pause === 'hover') { // If it's a touch-enabled device, mouseenter/leave are fired as // part of the mouse compatibility events on first tap - the carousel // would stop cycling until user tapped out of it; // here, we listen for touchend, explicitly pause the carousel // (as if it's the second time we tap on it, mouseenter compat event // is NOT fired) and after a timeout (to allow for mouse compatibility // events to fire) we explicitly restart cycling _this3.pause(); if (_this3.touchTimeout) { clearTimeout(_this3.touchTimeout); } _this3.touchTimeout = setTimeout(function (event) { return _this3.cycle(event); }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval); } }; $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) { return e.preventDefault(); }); if (this._pointerEvent) { $(this._element).on(Event$2.POINTERDOWN, function (event) { return start(event); }); $(this._element).on(Event$2.POINTERUP, function (event) { return end(event); }); this._element.classList.add(ClassName$2.POINTER_EVENT); } else { $(this._element).on(Event$2.TOUCHSTART, function (event) { return start(event); }); $(this._element).on(Event$2.TOUCHMOVE, function (event) { return move(event); }); $(this._element).on(Event$2.TOUCHEND, function (event) { return end(event); }); } }; _proto._keydown = function _keydown(event) { if (/input|textarea/i.test(event.target.tagName)) { return; } switch (event.which) { case ARROW_LEFT_KEYCODE: event.preventDefault(); this.prev(); break; case ARROW_RIGHT_KEYCODE: event.preventDefault(); this.next(); break; default: } }; _proto._getItemIndex = function _getItemIndex(element) { this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : []; return this._items.indexOf(element); }; _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { var isNextDirection = direction === Direction.NEXT; var isPrevDirection = direction === Direction.PREV; var activeIndex = this._getItemIndex(activeElement); var lastItemIndex = this._items.length - 1; var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; if (isGoingToWrap && !this._config.wrap) { return activeElement; } var delta = direction === Direction.PREV ? -1 : 1; var itemIndex = (activeIndex + delta) % this._items.length; return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; }; _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { var targetIndex = this._getItemIndex(relatedTarget); var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM)); var slideEvent = $.Event(Event$2.SLIDE, { relatedTarget: relatedTarget, direction: eventDirectionName, from: fromIndex, to: targetIndex }); $(this._element).trigger(slideEvent); return slideEvent; }; _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { if (this._indicatorsElement) { var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE)); $(indicators).removeClass(ClassName$2.ACTIVE); var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; if (nextIndicator) { $(nextIndicator).addClass(ClassName$2.ACTIVE); } } }; _proto._slide = function _slide(direction, element) { var _this4 = this; var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); var activeElementIndex = this._getItemIndex(activeElement); var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); var nextElementIndex = this._getItemIndex(nextElement); var isCycling = Boolean(this._interval); var directionalClassName; var orderClassName; var eventDirectionName; if (direction === Direction.NEXT) { directionalClassName = ClassName$2.LEFT; orderClassName = ClassName$2.NEXT; eventDirectionName = Direction.LEFT; } else { directionalClassName = ClassName$2.RIGHT; orderClassName = ClassName$2.PREV; eventDirectionName = Direction.RIGHT; } if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) { this._isSliding = false; return; } var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); if (slideEvent.isDefaultPrevented()) { return; } if (!activeElement || !nextElement) { // Some weirdness is happening, so we bail return; } this._isSliding = true; if (isCycling) { this.pause(); } this._setActiveIndicatorElement(nextElement); var slidEvent = $.Event(Event$2.SLID, { relatedTarget: nextElement, direction: eventDirectionName, from: activeElementIndex, to: nextElementIndex }); if ($(this._element).hasClass(ClassName$2.SLIDE)) { $(nextElement).addClass(orderClassName); Util.reflow(nextElement); $(activeElement).addClass(directionalClassName); $(nextElement).addClass(directionalClassName); var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10); if (nextElementInterval) { this._config.defaultInterval = this._config.defaultInterval || this._config.interval; this._config.interval = nextElementInterval; } else { this._config.interval = this._config.defaultInterval || this._config.interval; } var transitionDuration = Util.getTransitionDurationFromElement(activeElement); $(activeElement).one(Util.TRANSITION_END, function () { $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE); $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName); _this4._isSliding = false; setTimeout(function () { return $(_this4._element).trigger(slidEvent); }, 0); }).emulateTransitionEnd(transitionDuration); } else { $(activeElement).removeClass(ClassName$2.ACTIVE); $(nextElement).addClass(ClassName$2.ACTIVE); this._isSliding = false; $(this._element).trigger(slidEvent); } if (isCycling) { this.cycle(); } } // Static ; Carousel._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { var data = $(this).data(DATA_KEY$2); var _config = _objectSpread({}, Default, $(this).data()); if (typeof config === 'object') { _config = _objectSpread({}, _config, config); } var action = typeof config === 'string' ? config : _config.slide; if (!data) { data = new Carousel(this, _config); $(this).data(DATA_KEY$2, data); } if (typeof config === 'number') { data.to(config); } else if (typeof action === 'string') { if (typeof data[action] === 'undefined') { throw new TypeError("No method named \"" + action + "\""); } data[action](); } else if (_config.interval && _config.ride) { data.pause(); data.cycle(); } }); }; Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { var selector = Util.getSelectorFromElement(this); if (!selector) { return; } var target = $(selector)[0]; if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) { return; } var config = _objectSpread({}, $(target).data(), $(this).data()); var slideIndex = this.getAttribute('data-slide-to'); if (slideIndex) { config.interval = false; } Carousel._jQueryInterface.call($(target), config); if (slideIndex) { $(target).data(DATA_KEY$2).to(slideIndex); } event.preventDefault(); }; _createClass(Carousel, null, [{ key: "VERSION", get: function get() { return VERSION$2; } }, { key: "Default", get: function get() { return Default; } }]); return Carousel; }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ $(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler); $(window).on(Event$2.LOAD_DATA_API, function () { var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE)); for (var i = 0, len = carousels.length; i < len; i++) { var $carousel = $(carousels[i]); Carousel._jQueryInterface.call($carousel, $carousel.data()); } }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ $.fn[NAME$2] = Carousel._jQueryInterface; $.fn[NAME$2].Constructor = Carousel; $.fn[NAME$2].noConflict = function () { $.fn[NAME$2] = JQUERY_NO_CONFLICT$2; return Carousel._jQueryInterface; }; /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME$3 = 'collapse'; var VERSION$3 = '4.3.1'; var DATA_KEY$3 = 'bs.collapse'; var EVENT_KEY$3 = "." + DATA_KEY$3; var DATA_API_KEY$3 = '.data-api'; var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3]; var Default$1 = { toggle: true, parent: '' }; var DefaultType$1 = { toggle: 'boolean', parent: '(string|element)' }; var Event$3 = { SHOW: "show" + EVENT_KEY$3, SHOWN: "shown" + EVENT_KEY$3, HIDE: "hide" + EVENT_KEY$3, HIDDEN: "hidden" + EVENT_KEY$3, CLICK_DATA_API: "click" + EVENT_KEY$3 + DATA_API_KEY$3 }; var ClassName$3 = { SHOW: 'show', COLLAPSE: 'collapse', COLLAPSING: 'collapsing', COLLAPSED: 'collapsed' }; var Dimension = { WIDTH: 'width', HEIGHT: 'height' }; var Selector$3 = { ACTIVES: '.show, .collapsing', DATA_TOGGLE: '[data-toggle="collapse"]' /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ }; var Collapse = /*#__PURE__*/ function () { function Collapse(element, config) { this._isTransitioning = false; this._element = element; this._config = this._getConfig(config); this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE)); for (var i = 0, len = toggleList.length; i < len; i++) { var elem = toggleList[i]; var selector = Util.getSelectorFromElement(elem); var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) { return foundElem === element; }); if (selector !== null && filterElement.length > 0) { this._selector = selector; this._triggerArray.push(elem); } } this._parent = this._config.parent ? this._getParent() : null; if (!this._config.parent) { this._addAriaAndCollapsedClass(this._element, this._triggerArray); } if (this._config.toggle) { this.toggle(); } } // Getters var _proto = Collapse.prototype; // Public _proto.toggle = function toggle() { if ($(this._element).hasClass(ClassName$3.SHOW)) { this.hide(); } else { this.show(); } }; _proto.show = function show() { var _this = this; if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) { return; } var actives; var activesData; if (this._parent) { actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) { if (typeof _this._config.parent === 'string') { return elem.getAttribute('data-parent') === _this._config.parent; } return elem.classList.contains(ClassName$3.COLLAPSE); }); if (actives.length === 0) { actives = null; } } if (actives) { activesData = $(actives).not(this._selector).data(DATA_KEY$3); if (activesData && activesData._isTransitioning) { return; } } var startEvent = $.Event(Event$3.SHOW); $(this._element).trigger(startEvent); if (startEvent.isDefaultPrevented()) { return; } if (actives) { Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide'); if (!activesData) { $(actives).data(DATA_KEY$3, null); } } var dimension = this._getDimension(); $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING); this._element.style[dimension] = 0; if (this._triggerArray.length) { $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true); } this.setTransitioning(true); var complete = function complete() { $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW); _this._element.style[dimension] = ''; _this.setTransitioning(false); $(_this._element).trigger(Event$3.SHOWN); }; var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); var scrollSize = "scroll" + capitalizedDimension; var transitionDuration = Util.getTransitionDurationFromElement(this._element); $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); this._element.style[dimension] = this._element[scrollSize] + "px"; }; _proto.hide = function hide() { var _this2 = this; if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) { return; } var startEvent = $.Event(Event$3.HIDE); $(this._element).trigger(startEvent); if (startEvent.isDefaultPrevented()) { return; } var dimension = this._getDimension(); this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; Util.reflow(this._element); $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW); var triggerArrayLength = this._triggerArray.length; if (triggerArrayLength > 0) { for (var i = 0; i < triggerArrayLength; i++) { var trigger = this._triggerArray[i]; var selector = Util.getSelectorFromElement(trigger); if (selector !== null) { var $elem = $([].slice.call(document.querySelectorAll(selector))); if (!$elem.hasClass(ClassName$3.SHOW)) { $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false); } } } } this.setTransitioning(true); var complete = function complete() { _this2.setTransitioning(false); $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN); }; this._element.style[dimension] = ''; var transitionDuration = Util.getTransitionDurationFromElement(this._element); $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); }; _proto.setTransitioning = function setTransitioning(isTransitioning) { this._isTransitioning = isTransitioning; }; _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY$3); this._config = null; this._parent = null; this._element = null; this._triggerArray = null; this._isTransitioning = null; } // Private ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default$1, config); config.toggle = Boolean(config.toggle); // Coerce string values Util.typeCheckConfig(NAME$3, config, DefaultType$1); return config; }; _proto._getDimension = function _getDimension() { var hasWidth = $(this._element).hasClass(Dimension.WIDTH); return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; }; _proto._getParent = function _getParent() { var _this3 = this; var parent; if (Util.isElement(this._config.parent)) { parent = this._config.parent; // It's a jQuery object if (typeof this._config.parent.jquery !== 'undefined') { parent = this._config.parent[0]; } } else { parent = document.querySelector(this._config.parent); } var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; var children = [].slice.call(parent.querySelectorAll(selector)); $(children).each(function (i, element) { _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); }); return parent; }; _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { var isOpen = $(element).hasClass(ClassName$3.SHOW); if (triggerArray.length) { $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); } } // Static ; Collapse._getTargetFromElement = function _getTargetFromElement(element) { var selector = Util.getSelectorFromElement(element); return selector ? document.querySelector(selector) : null; }; Collapse._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { var $this = $(this); var data = $this.data(DATA_KEY$3); var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {}); if (!data && _config.toggle && /show|hide/.test(config)) { _config.toggle = false; } if (!data) { data = new Collapse(this, _config); $this.data(DATA_KEY$3, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError("No method named \"" + config + "\""); } data[config](); } }); }; _createClass(Collapse, null, [{ key: "VERSION", get: function get() { return VERSION$3; } }, { key: "Default", get: function get() { return Default$1; } }]); return Collapse; }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ $(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) { // preventDefault only for elements (which change the URL) not inside the collapsible element if (event.currentTarget.tagName === 'A') { event.preventDefault(); } var $trigger = $(this); var selector = Util.getSelectorFromElement(this); var selectors = [].slice.call(document.querySelectorAll(selector)); $(selectors).each(function () { var $target = $(this); var data = $target.data(DATA_KEY$3); var config = data ? 'toggle' : $trigger.data(); Collapse._jQueryInterface.call($target, config); }); }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ $.fn[NAME$3] = Collapse._jQueryInterface; $.fn[NAME$3].Constructor = Collapse; $.fn[NAME$3].noConflict = function () { $.fn[NAME$3] = JQUERY_NO_CONFLICT$3; return Collapse._jQueryInterface; }; /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME$4 = 'dropdown'; var VERSION$4 = '4.3.1'; var DATA_KEY$4 = 'bs.dropdown'; var EVENT_KEY$4 = "." + DATA_KEY$4; var DATA_API_KEY$4 = '.data-api'; var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4]; var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); var Event$4 = { HIDE: "hide" + EVENT_KEY$4, HIDDEN: "hidden" + EVENT_KEY$4, SHOW: "show" + EVENT_KEY$4, SHOWN: "shown" + EVENT_KEY$4, CLICK: "click" + EVENT_KEY$4, CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4, KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4, KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4 }; var ClassName$4 = { DISABLED: 'disabled', SHOW: 'show', DROPUP: 'dropup', DROPRIGHT: 'dropright', DROPLEFT: 'dropleft', MENURIGHT: 'dropdown-menu-right', MENULEFT: 'dropdown-menu-left', POSITION_STATIC: 'position-static' }; var Selector$4 = { DATA_TOGGLE: '[data-toggle="dropdown"]', FORM_CHILD: '.dropdown form', MENU: '.dropdown-menu', NAVBAR_NAV: '.navbar-nav', VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' }; var AttachmentMap = { TOP: 'top-start', TOPEND: 'top-end', BOTTOM: 'bottom-start', BOTTOMEND: 'bottom-end', RIGHT: 'right-start', RIGHTEND: 'right-end', LEFT: 'left-start', LEFTEND: 'left-end' }; var Default$2 = { offset: 0, flip: true, boundary: 'scrollParent', reference: 'toggle', display: 'dynamic' }; var DefaultType$2 = { offset: '(number|string|function)', flip: 'boolean', boundary: '(string|element)', reference: '(string|element)', display: 'string' /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ }; var Dropdown = /*#__PURE__*/ function () { function Dropdown(element, config) { this._element = element; this._popper = null; this._config = this._getConfig(config); this._menu = this._getMenuElement(); this._inNavbar = this._detectNavbar(); this._addEventListeners(); } // Getters var _proto = Dropdown.prototype; // Public _proto.toggle = function toggle() { if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) { return; } var parent = Dropdown._getParentFromElement(this._element); var isActive = $(this._menu).hasClass(ClassName$4.SHOW); Dropdown._clearMenus(); if (isActive) { return; } var relatedTarget = { relatedTarget: this._element }; var showEvent = $.Event(Event$4.SHOW, relatedTarget); $(parent).trigger(showEvent); if (showEvent.isDefaultPrevented()) { return; } // Disable totally Popper.js for Dropdown in Navbar if (!this._inNavbar) { /** * Check for Popper dependency * Popper - https://popper.js.org */ if (typeof Popper === 'undefined') { throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)'); } var referenceElement = this._element; if (this._config.reference === 'parent') { referenceElement = parent; } else if (Util.isElement(this._config.reference)) { referenceElement = this._config.reference; // Check if it's jQuery element if (typeof this._config.reference.jquery !== 'undefined') { referenceElement = this._config.reference[0]; } } // If boundary is not `scrollParent`, then set position to `static` // to allow the menu to "escape" the scroll parent's boundaries // https://github.com/twbs/bootstrap/issues/24251 if (this._config.boundary !== 'scrollParent') { $(parent).addClass(ClassName$4.POSITION_STATIC); } this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); } // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) { $(document.body).children().on('mouseover', null, $.noop); } this._element.focus(); this._element.setAttribute('aria-expanded', true); $(this._menu).toggleClass(ClassName$4.SHOW); $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); }; _proto.show = function show() { if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) { return; } var relatedTarget = { relatedTarget: this._element }; var showEvent = $.Event(Event$4.SHOW, relatedTarget); var parent = Dropdown._getParentFromElement(this._element); $(parent).trigger(showEvent); if (showEvent.isDefaultPrevented()) { return; } $(this._menu).toggleClass(ClassName$4.SHOW); $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); }; _proto.hide = function hide() { if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) { return; } var relatedTarget = { relatedTarget: this._element }; var hideEvent = $.Event(Event$4.HIDE, relatedTarget); var parent = Dropdown._getParentFromElement(this._element); $(parent).trigger(hideEvent); if (hideEvent.isDefaultPrevented()) { return; } $(this._menu).toggleClass(ClassName$4.SHOW); $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); }; _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY$4); $(this._element).off(EVENT_KEY$4); this._element = null; this._menu = null; if (this._popper !== null) { this._popper.destroy(); this._popper = null; } }; _proto.update = function update() { this._inNavbar = this._detectNavbar(); if (this._popper !== null) { this._popper.scheduleUpdate(); } } // Private ; _proto._addEventListeners = function _addEventListeners() { var _this = this; $(this._element).on(Event$4.CLICK, function (event) { event.preventDefault(); event.stopPropagation(); _this.toggle(); }); }; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config); Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); return config; }; _proto._getMenuElement = function _getMenuElement() { if (!this._menu) { var parent = Dropdown._getParentFromElement(this._element); if (parent) { this._menu = parent.querySelector(Selector$4.MENU); } } return this._menu; }; _proto._getPlacement = function _getPlacement() { var $parentDropdown = $(this._element.parentNode); var placement = AttachmentMap.BOTTOM; // Handle dropup if ($parentDropdown.hasClass(ClassName$4.DROPUP)) { placement = AttachmentMap.TOP; if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { placement = AttachmentMap.TOPEND; } } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) { placement = AttachmentMap.RIGHT; } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) { placement = AttachmentMap.LEFT; } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { placement = AttachmentMap.BOTTOMEND; } return placement; }; _proto._detectNavbar = function _detectNavbar() { return $(this._element).closest('.navbar').length > 0; }; _proto._getOffset = function _getOffset() { var _this2 = this; var offset = {}; if (typeof this._config.offset === 'function') { offset.fn = function (data) { data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); return data; }; } else { offset.offset = this._config.offset; } return offset; }; _proto._getPopperConfig = function _getPopperConfig() { var popperConfig = { placement: this._getPlacement(), modifiers: { offset: this._getOffset(), flip: { enabled: this._config.flip }, preventOverflow: { boundariesElement: this._config.boundary } } // Disable Popper.js if we have a static display }; if (this._config.display === 'static') { popperConfig.modifiers.applyStyle = { enabled: false }; } return popperConfig; } // Static ; Dropdown._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { var data = $(this).data(DATA_KEY$4); var _config = typeof config === 'object' ? config : null; if (!data) { data = new Dropdown(this, _config); $(this).data(DATA_KEY$4, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError("No method named \"" + config + "\""); } data[config](); } }); }; Dropdown._clearMenus = function _clearMenus(event) { if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { return; } var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE)); for (var i = 0, len = toggles.length; i < len; i++) { var parent = Dropdown._getParentFromElement(toggles[i]); var context = $(toggles[i]).data(DATA_KEY$4); var relatedTarget = { relatedTarget: toggles[i] }; if (event && event.type === 'click') { relatedTarget.clickEvent = event; } if (!context) { continue; } var dropdownMenu = context._menu; if (!$(parent).hasClass(ClassName$4.SHOW)) { continue; } if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { continue; } var hideEvent = $.Event(Event$4.HIDE, relatedTarget); $(parent).trigger(hideEvent); if (hideEvent.isDefaultPrevented()) { continue; } // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { $(document.body).children().off('mouseover', null, $.noop); } toggles[i].setAttribute('aria-expanded', 'false'); $(dropdownMenu).removeClass(ClassName$4.SHOW); $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); } }; Dropdown._getParentFromElement = function _getParentFromElement(element) { var parent; var selector = Util.getSelectorFromElement(element); if (selector) { parent = document.querySelector(selector); } return parent || element.parentNode; } // eslint-disable-next-line complexity ; Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { // If not input/textarea: // - And not a key in REGEXP_KEYDOWN => not a dropdown command // If input/textarea: // - If space key => not a dropdown command // - If key is other than escape // - If key is not up or down => not a dropdown command // - If trigger inside the menu => not a dropdown command if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { return; } event.preventDefault(); event.stopPropagation(); if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) { return; } var parent = Dropdown._getParentFromElement(this); var isActive = $(parent).hasClass(ClassName$4.SHOW); if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { if (event.which === ESCAPE_KEYCODE) { var toggle = parent.querySelector(Selector$4.DATA_TOGGLE); $(toggle).trigger('focus'); } $(this).trigger('click'); return; } var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)); if (items.length === 0) { return; } var index = items.indexOf(event.target); if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up index--; } if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down index++; } if (index < 0) { index = 0; } items[index].focus(); }; _createClass(Dropdown, null, [{ key: "VERSION", get: function get() { return VERSION$4; } }, { key: "Default", get: function get() { return Default$2; } }, { key: "DefaultType", get: function get() { return DefaultType$2; } }]); return Dropdown; }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ $(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) { event.preventDefault(); event.stopPropagation(); Dropdown._jQueryInterface.call($(this), 'toggle'); }).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) { e.stopPropagation(); }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ $.fn[NAME$4] = Dropdown._jQueryInterface; $.fn[NAME$4].Constructor = Dropdown; $.fn[NAME$4].noConflict = function () { $.fn[NAME$4] = JQUERY_NO_CONFLICT$4; return Dropdown._jQueryInterface; }; /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME$5 = 'modal'; var VERSION$5 = '4.3.1'; var DATA_KEY$5 = 'bs.modal'; var EVENT_KEY$5 = "." + DATA_KEY$5; var DATA_API_KEY$5 = '.data-api'; var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5]; var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key var Default$3 = { backdrop: true, keyboard: true, focus: true, show: true }; var DefaultType$3 = { backdrop: '(boolean|string)', keyboard: 'boolean', focus: 'boolean', show: 'boolean' }; var Event$5 = { HIDE: "hide" + EVENT_KEY$5, HIDDEN: "hidden" + EVENT_KEY$5, SHOW: "show" + EVENT_KEY$5, SHOWN: "shown" + EVENT_KEY$5, FOCUSIN: "focusin" + EVENT_KEY$5, RESIZE: "resize" + EVENT_KEY$5, CLICK_DISMISS: "click.dismiss" + EVENT_KEY$5, KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY$5, MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5, MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5, CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5 }; var ClassName$5 = { SCROLLABLE: 'modal-dialog-scrollable', SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', FADE: 'fade', SHOW: 'show' }; var Selector$5 = { DIALOG: '.modal-dialog', MODAL_BODY: '.modal-body', DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', STICKY_CONTENT: '.sticky-top' /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ }; var Modal = /*#__PURE__*/ function () { function Modal(element, config) { this._config = this._getConfig(config); this._element = element; this._dialog = element.querySelector(Selector$5.DIALOG); this._backdrop = null; this._isShown = false; this._isBodyOverflowing = false; this._ignoreBackdropClick = false; this._isTransitioning = false; this._scrollbarWidth = 0; } // Getters var _proto = Modal.prototype; // Public _proto.toggle = function toggle(relatedTarget) { return this._isShown ? this.hide() : this.show(relatedTarget); }; _proto.show = function show(relatedTarget) { var _this = this; if (this._isShown || this._isTransitioning) { return; } if ($(this._element).hasClass(ClassName$5.FADE)) { this._isTransitioning = true; } var showEvent = $.Event(Event$5.SHOW, { relatedTarget: relatedTarget }); $(this._element).trigger(showEvent); if (this._isShown || showEvent.isDefaultPrevented()) { return; } this._isShown = true; this._checkScrollbar(); this._setScrollbar(); this._adjustDialog(); this._setEscapeEvent(); this._setResizeEvent(); $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) { return _this.hide(event); }); $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () { $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) { if ($(event.target).is(_this._element)) { _this._ignoreBackdropClick = true; } }); }); this._showBackdrop(function () { return _this._showElement(relatedTarget); }); }; _proto.hide = function hide(event) { var _this2 = this; if (event) { event.preventDefault(); } if (!this._isShown || this._isTransitioning) { return; } var hideEvent = $.Event(Event$5.HIDE); $(this._element).trigger(hideEvent); if (!this._isShown || hideEvent.isDefaultPrevented()) { return; } this._isShown = false; var transition = $(this._element).hasClass(ClassName$5.FADE); if (transition) { this._isTransitioning = true; } this._setEscapeEvent(); this._setResizeEvent(); $(document).off(Event$5.FOCUSIN); $(this._element).removeClass(ClassName$5.SHOW); $(this._element).off(Event$5.CLICK_DISMISS); $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS); if (transition) { var transitionDuration = Util.getTransitionDurationFromElement(this._element); $(this._element).one(Util.TRANSITION_END, function (event) { return _this2._hideModal(event); }).emulateTransitionEnd(transitionDuration); } else { this._hideModal(); } }; _proto.dispose = function dispose() { [window, this._element, this._dialog].forEach(function (htmlElement) { return $(htmlElement).off(EVENT_KEY$5); }); /** * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` * Do not move `document` in `htmlElements` array * It will remove `Event.CLICK_DATA_API` event that should remain */ $(document).off(Event$5.FOCUSIN); $.removeData(this._element, DATA_KEY$5); this._config = null; this._element = null; this._dialog = null; this._backdrop = null; this._isShown = null; this._isBodyOverflowing = null; this._ignoreBackdropClick = null; this._isTransitioning = null; this._scrollbarWidth = null; }; _proto.handleUpdate = function handleUpdate() { this._adjustDialog(); } // Private ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default$3, config); Util.typeCheckConfig(NAME$5, config, DefaultType$3); return config; }; _proto._showElement = function _showElement(relatedTarget) { var _this3 = this; var transition = $(this._element).hasClass(ClassName$5.FADE); if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { // Don't move modal's DOM position document.body.appendChild(this._element); } this._element.style.display = 'block'; this._element.removeAttribute('aria-hidden'); this._element.setAttribute('aria-modal', true); if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; } else { this._element.scrollTop = 0; } if (transition) { Util.reflow(this._element); } $(this._element).addClass(ClassName$5.SHOW); if (this._config.focus) { this._enforceFocus(); } var shownEvent = $.Event(Event$5.SHOWN, { relatedTarget: relatedTarget }); var transitionComplete = function transitionComplete() { if (_this3._config.focus) { _this3._element.focus(); } _this3._isTransitioning = false; $(_this3._element).trigger(shownEvent); }; if (transition) { var transitionDuration = Util.getTransitionDurationFromElement(this._dialog); $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); } else { transitionComplete(); } }; _proto._enforceFocus = function _enforceFocus() { var _this4 = this; $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop .on(Event$5.FOCUSIN, function (event) { if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) { _this4._element.focus(); } }); }; _proto._setEscapeEvent = function _setEscapeEvent() { var _this5 = this; if (this._isShown && this._config.keyboard) { $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) { if (event.which === ESCAPE_KEYCODE$1) { event.preventDefault(); _this5.hide(); } }); } else if (!this._isShown) { $(this._element).off(Event$5.KEYDOWN_DISMISS); } }; _proto._setResizeEvent = function _setResizeEvent() { var _this6 = this; if (this._isShown) { $(window).on(Event$5.RESIZE, function (event) { return _this6.handleUpdate(event); }); } else { $(window).off(Event$5.RESIZE); } }; _proto._hideModal = function _hideModal() { var _this7 = this; this._element.style.display = 'none'; this._element.setAttribute('aria-hidden', true); this._element.removeAttribute('aria-modal'); this._isTransitioning = false; this._showBackdrop(function () { $(document.body).removeClass(ClassName$5.OPEN); _this7._resetAdjustments(); _this7._resetScrollbar(); $(_this7._element).trigger(Event$5.HIDDEN); }); }; _proto._removeBackdrop = function _removeBackdrop() { if (this._backdrop) { $(this._backdrop).remove(); this._backdrop = null; } }; _proto._showBackdrop = function _showBackdrop(callback) { var _this8 = this; var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : ''; if (this._isShown && this._config.backdrop) { this._backdrop = document.createElement('div'); this._backdrop.className = ClassName$5.BACKDROP; if (animate) { this._backdrop.classList.add(animate); } $(this._backdrop).appendTo(document.body); $(this._element).on(Event$5.CLICK_DISMISS, function (event) { if (_this8._ignoreBackdropClick) { _this8._ignoreBackdropClick = false; return; } if (event.target !== event.currentTarget) { return; } if (_this8._config.backdrop === 'static') { _this8._element.focus(); } else { _this8.hide(); } }); if (animate) { Util.reflow(this._backdrop); } $(this._backdrop).addClass(ClassName$5.SHOW); if (!callback) { return; } if (!animate) { callback(); return; } var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); } else if (!this._isShown && this._backdrop) { $(this._backdrop).removeClass(ClassName$5.SHOW); var callbackRemove = function callbackRemove() { _this8._removeBackdrop(); if (callback) { callback(); } }; if ($(this._element).hasClass(ClassName$5.FADE)) { var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); } else { callbackRemove(); } } else if (callback) { callback(); } } // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- ; _proto._adjustDialog = function _adjustDialog() { var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; if (!this._isBodyOverflowing && isModalOverflowing) { this._element.style.paddingLeft = this._scrollbarWidth + "px"; } if (this._isBodyOverflowing && !isModalOverflowing) { this._element.style.paddingRight = this._scrollbarWidth + "px"; } }; _proto._resetAdjustments = function _resetAdjustments() { this._element.style.paddingLeft = ''; this._element.style.paddingRight = ''; }; _proto._checkScrollbar = function _checkScrollbar() { var rect = document.body.getBoundingClientRect(); this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; this._scrollbarWidth = this._getScrollbarWidth(); }; _proto._setScrollbar = function _setScrollbar() { var _this9 = this; if (this._isBodyOverflowing) { // Note: DOMNode.style.paddingRight returns the actual value or '' if not set // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding $(fixedContent).each(function (index, element) { var actualPadding = element.style.paddingRight; var calculatedPadding = $(element).css('padding-right'); $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); }); // Adjust sticky content margin $(stickyContent).each(function (index, element) { var actualMargin = element.style.marginRight; var calculatedMargin = $(element).css('margin-right'); $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); }); // Adjust body padding var actualPadding = document.body.style.paddingRight; var calculatedPadding = $(document.body).css('padding-right'); $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); } $(document.body).addClass(ClassName$5.OPEN); }; _proto._resetScrollbar = function _resetScrollbar() { // Restore fixed content padding var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); $(fixedContent).each(function (index, element) { var padding = $(element).data('padding-right'); $(element).removeData('padding-right'); element.style.paddingRight = padding ? padding : ''; }); // Restore sticky content var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT)); $(elements).each(function (index, element) { var margin = $(element).data('margin-right'); if (typeof margin !== 'undefined') { $(element).css('margin-right', margin).removeData('margin-right'); } }); // Restore body padding var padding = $(document.body).data('padding-right'); $(document.body).removeData('padding-right'); document.body.style.paddingRight = padding ? padding : ''; }; _proto._getScrollbarWidth = function _getScrollbarWidth() { // thx d.walsh var scrollDiv = document.createElement('div'); scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER; document.body.appendChild(scrollDiv); var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; } // Static ; Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { return this.each(function () { var data = $(this).data(DATA_KEY$5); var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {}); if (!data) { data = new Modal(this, _config); $(this).data(DATA_KEY$5, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError("No method named \"" + config + "\""); } data[config](relatedTarget); } else if (_config.show) { data.show(relatedTarget); } }); }; _createClass(Modal, null, [{ key: "VERSION", get: function get() { return VERSION$5; } }, { key: "Default", get: function get() { return Default$3; } }]); return Modal; }(); /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) { var _this10 = this; var target; var selector = Util.getSelectorFromElement(this); if (selector) { target = document.querySelector(selector); } var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data()); if (this.tagName === 'A' || this.tagName === 'AREA') { event.preventDefault(); } var $target = $(target).one(Event$5.SHOW, function (showEvent) { if (showEvent.isDefaultPrevented()) { // Only register focus restorer if modal will actually get shown return; } $target.one(Event$5.HIDDEN, function () { if ($(_this10).is(':visible')) { _this10.focus(); } }); }); Modal._jQueryInterface.call($(target), config, this); }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ $.fn[NAME$5] = Modal._jQueryInterface; $.fn[NAME$5].Constructor = Modal; $.fn[NAME$5].noConflict = function () { $.fn[NAME$5] = JQUERY_NO_CONFLICT$5; return Modal._jQueryInterface; }; /** * -------------------------------------------------------------------------- * Bootstrap (v4.3.1): tools/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']; var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; var DefaultWhitelist = { // Global attributes allowed on any supplied element below. '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], a: ['target', 'href', 'title', 'rel'], area: [], b: [], br: [], col: [], code: [], div: [], em: [], hr: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], i: [], img: ['src', 'alt', 'title', 'width', 'height'], li: [], ol: [], p: [], pre: [], s: [], small: [], span: [], sub: [], sup: [], strong: [], u: [], ul: [] /** * A pattern that recognizes a commonly useful subset of URLs that are safe. * * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts */ }; var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi; /** * A pattern that matches safe data URLs. Only matches image, video and audio types. * * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts */ var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i; function allowedAttribute(attr, allowedAttributeList) { var attrName = attr.nodeName.toLowerCase(); if (allowedAttributeList.indexOf(attrName) !== -1) { if (uriAttrs.indexOf(attrName) !== -1) { return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); } return true; } var regExp = allowedAttributeList.filter(function (attrRegex) { return attrRegex instanceof RegExp; }); // Check if a regular expression validates the attribute. for (var i = 0, l = regExp.length; i < l; i++) { if (attrName.match(regExp[i])) { return true; } } return false; } function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { if (unsafeHtml.length === 0) { return unsafeHtml; } if (sanitizeFn && typeof sanitizeFn === 'function') { return sanitizeFn(unsafeHtml); } var domParser = new window.DOMParser(); var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); var whitelistKeys = Object.keys(whiteList); var elements = [].slice.call(createdDocument.body.querySelectorAll('*')); var _loop = function _loop(i, len) { var el = elements[i]; var elName = el.nodeName.toLowerCase(); if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { el.parentNode.removeChild(el); return "continue"; } var attributeList = [].slice.call(el.attributes); var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); attributeList.forEach(function (attr) { if (!allowedAttribute(attr, whitelistedAttributes)) { el.removeAttribute(attr.nodeName); } }); }; for (var i = 0, len = elements.length; i < len; i++) { var _ret = _loop(i, len); if (_ret === "continue") continue; } return createdDocument.body.innerHTML; } /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME$6 = 'tooltip'; var VERSION$6 = '4.3.1'; var DATA_KEY$6 = 'bs.tooltip'; var EVENT_KEY$6 = "." + DATA_KEY$6; var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; var CLASS_PREFIX = 'bs-tooltip'; var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; var DefaultType$4 = { animation: 'boolean', template: 'string', title: '(string|element|function)', trigger: 'string', delay: '(number|object)', html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', offset: '(number|string|function)', container: '(string|element|boolean)', fallbackPlacement: '(string|array)', boundary: '(string|element)', sanitize: 'boolean', sanitizeFn: '(null|function)', whiteList: 'object' }; var AttachmentMap$1 = { AUTO: 'auto', TOP: 'top', RIGHT: 'right', BOTTOM: 'bottom', LEFT: 'left' }; var Default$4 = { animation: true, template: '', trigger: 'hover focus', title: '', delay: 0, html: false, selector: false, placement: 'top', offset: 0, container: false, fallbackPlacement: 'flip', boundary: 'scrollParent', sanitize: true, sanitizeFn: null, whiteList: DefaultWhitelist }; var HoverState = { SHOW: 'show', OUT: 'out' }; var Event$6 = { HIDE: "hide" + EVENT_KEY$6, HIDDEN: "hidden" + EVENT_KEY$6, SHOW: "show" + EVENT_KEY$6, SHOWN: "shown" + EVENT_KEY$6, INSERTED: "inserted" + EVENT_KEY$6, CLICK: "click" + EVENT_KEY$6, FOCUSIN: "focusin" + EVENT_KEY$6, FOCUSOUT: "focusout" + EVENT_KEY$6, MOUSEENTER: "mouseenter" + EVENT_KEY$6, MOUSELEAVE: "mouseleave" + EVENT_KEY$6 }; var ClassName$6 = { FADE: 'fade', SHOW: 'show' }; var Selector$6 = { TOOLTIP: '.tooltip', TOOLTIP_INNER: '.tooltip-inner', ARROW: '.arrow' }; var Trigger = { HOVER: 'hover', FOCUS: 'focus', CLICK: 'click', MANUAL: 'manual' /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ }; var Tooltip = /*#__PURE__*/ function () { function Tooltip(element, config) { /** * Check for Popper dependency * Popper - https://popper.js.org */ if (typeof Popper === 'undefined') { throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)'); } // private this._isEnabled = true; this._timeout = 0; this._hoverState = ''; this._activeTrigger = {}; this._popper = null; // Protected this.element = element; this.config = this._getConfig(config); this.tip = null; this._setListeners(); } // Getters var _proto = Tooltip.prototype; // Public _proto.enable = function enable() { this._isEnabled = true; }; _proto.disable = function disable() { this._isEnabled = false; }; _proto.toggleEnabled = function toggleEnabled() { this._isEnabled = !this._isEnabled; }; _proto.toggle = function toggle(event) { if (!this._isEnabled) { return; } if (event) { var dataKey = this.constructor.DATA_KEY; var context = $(event.currentTarget).data(dataKey); if (!context) { context = new this.constructor(event.currentTarget, this._getDelegateConfig()); $(event.currentTarget).data(dataKey, context); } context._activeTrigger.click = !context._activeTrigger.click; if (context._isWithActiveTrigger()) { context._enter(null, context); } else { context._leave(null, context); } } else { if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) { this._leave(null, this); return; } this._enter(null, this); } }; _proto.dispose = function dispose() { clearTimeout(this._timeout); $.removeData(this.element, this.constructor.DATA_KEY); $(this.element).off(this.constructor.EVENT_KEY); $(this.element).closest('.modal').off('hide.bs.modal'); if (this.tip) { $(this.tip).remove(); } this._isEnabled = null; this._timeout = null; this._hoverState = null; this._activeTrigger = null; if (this._popper !== null) { this._popper.destroy(); } this._popper = null; this.element = null; this.config = null; this.tip = null; }; _proto.show = function show() { var _this = this; if ($(this.element).css('display') === 'none') { throw new Error('Please use show on visible elements'); } var showEvent = $.Event(this.constructor.Event.SHOW); if (this.isWithContent() && this._isEnabled) { $(this.element).trigger(showEvent); var shadowRoot = Util.findShadowRoot(this.element); var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); if (showEvent.isDefaultPrevented() || !isInTheDom) { return; } var tip = this.getTipElement(); var tipId = Util.getUID(this.constructor.NAME); tip.setAttribute('id', tipId); this.element.setAttribute('aria-describedby', tipId); this.setContent(); if (this.config.animation) { $(tip).addClass(ClassName$6.FADE); } var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; var attachment = this._getAttachment(placement); this.addAttachmentClass(attachment); var container = this._getContainer(); $(tip).data(this.constructor.DATA_KEY, this); if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { $(tip).appendTo(container); } $(this.element).trigger(this.constructor.Event.INSERTED); this._popper = new Popper(this.element, tip, { placement: attachment, modifiers: { offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, arrow: { element: Selector$6.ARROW }, preventOverflow: { boundariesElement: this.config.boundary } }, onCreate: function onCreate(data) { if (data.originalPlacement !== data.placement) { _this._handlePopperPlacementChange(data); } }, onUpdate: function onUpdate(data) { return _this._handlePopperPlacementChange(data); } }); $(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html if ('ontouchstart' in document.documentElement) { $(document.body).children().on('mouseover', null, $.noop); } var complete = function complete() { if (_this.config.animation) { _this._fixTransition(); } var prevHoverState = _this._hoverState; _this._hoverState = null; $(_this.element).trigger(_this.constructor.Event.SHOWN); if (prevHoverState === HoverState.OUT) { _this._leave(null, _this); } }; if ($(this.tip).hasClass(ClassName$6.FADE)) { var transitionDuration = Util.getTransitionDurationFromElement(this.tip); $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); } else { complete(); } } }; _proto.hide = function hide(callback) { var _this2 = this; var tip = this.getTipElement(); var hideEvent = $.Event(this.constructor.Event.HIDE); var complete = function complete() { if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { tip.parentNode.removeChild(tip); } _this2._cleanTipClass(); _this2.element.removeAttribute('aria-describedby'); $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); if (_this2._popper !== null) { _this2._popper.destroy(); } if (callback) { callback(); } }; $(this.element).trigger(hideEvent); if (hideEvent.isDefaultPrevented()) { return; } $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { $(document.body).children().off('mouseover', null, $.noop); } this._activeTrigger[Trigger.CLICK] = false; this._activeTrigger[Trigger.FOCUS] = false; this._activeTrigger[Trigger.HOVER] = false; if ($(this.tip).hasClass(ClassName$6.FADE)) { var transitionDuration = Util.getTransitionDurationFromElement(tip); $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); } else { complete(); } this._hoverState = ''; }; _proto.update = function update() { if (this._popper !== null) { this._popper.scheduleUpdate(); } } // Protected ; _proto.isWithContent = function isWithContent() { return Boolean(this.getTitle()); }; _proto.addAttachmentClass = function addAttachmentClass(attachment) { $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); }; _proto.getTipElement = function getTipElement() { this.tip = this.tip || $(this.config.template)[0]; return this.tip; }; _proto.setContent = function setContent() { var tip = this.getTipElement(); this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle()); $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW); }; _proto.setElementContent = function setElementContent($element, content) { if (typeof content === 'object' && (content.nodeType || content.jquery)) { // Content is a DOM node or a jQuery if (this.config.html) { if (!$(content).parent().is($element)) { $element.empty().append(content); } } else { $element.text($(content).text()); } return; } if (this.config.html) { if (this.config.sanitize) { content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); } $element.html(content); } else { $element.text(content); } }; _proto.getTitle = function getTitle() { var title = this.element.getAttribute('data-original-title'); if (!title) { title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; } return title; } // Private ; _proto._getOffset = function _getOffset() { var _this3 = this; var offset = {}; if (typeof this.config.offset === 'function') { offset.fn = function (data) { data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); return data; }; } else { offset.offset = this.config.offset; } return offset; }; _proto._getContainer = function _getContainer() { if (this.config.container === false) { return document.body; } if (Util.isElement(this.config.container)) { return $(this.config.container); } return $(document).find(this.config.container); }; _proto._getAttachment = function _getAttachment(placement) { return AttachmentMap$1[placement.toUpperCase()]; }; _proto._setListeners = function _setListeners() { var _this4 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { return _this4.toggle(event); }); } else if (trigger !== Trigger.MANUAL) { var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; $(_this4.element).on(eventIn, _this4.config.selector, function (event) { return _this4._enter(event); }).on(eventOut, _this4.config.selector, function (event) { return _this4._leave(event); }); } }); $(this.element).closest('.modal').on('hide.bs.modal', function () { if (_this4.element) { _this4.hide(); } }); if (this.config.selector) { this.config = _objectSpread({}, this.config, { trigger: 'manual', selector: '' }); } else { this._fixTitle(); } }; _proto._fixTitle = function _fixTitle() { var titleType = typeof this.element.getAttribute('data-original-title'); if (this.element.getAttribute('title') || titleType !== 'string') { this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); this.element.setAttribute('title', ''); } }; _proto._enter = function _enter(event, context) { var dataKey = this.constructor.DATA_KEY; context = context || $(event.currentTarget).data(dataKey); if (!context) { context = new this.constructor(event.currentTarget, this._getDelegateConfig()); $(event.currentTarget).data(dataKey, context); } if (event) { context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; } if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) { context._hoverState = HoverState.SHOW; return; } clearTimeout(context._timeout); context._hoverState = HoverState.SHOW; if (!context.config.delay || !context.config.delay.show) { context.show(); return; } context._timeout = setTimeout(function () { if (context._hoverState === HoverState.SHOW) { context.show(); } }, context.config.delay.show); }; _proto._leave = function _leave(event, context) { var dataKey = this.constructor.DATA_KEY; context = context || $(event.currentTarget).data(dataKey); if (!context) { context = new this.constructor(event.currentTarget, this._getDelegateConfig()); $(event.currentTarget).data(dataKey, context); } if (event) { context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; } if (context._isWithActiveTrigger()) { return; } clearTimeout(context._timeout); context._hoverState = HoverState.OUT; if (!context.config.delay || !context.config.delay.hide) { context.hide(); return; } context._timeout = setTimeout(function () { if (context._hoverState === HoverState.OUT) { context.hide(); } }, context.config.delay.hide); }; _proto._isWithActiveTrigger = function _isWithActiveTrigger() { for (var trigger in this._activeTrigger) { if (this._activeTrigger[trigger]) { return true; } } return false; }; _proto._getConfig = function _getConfig(config) { var dataAttributes = $(this.element).data(); Object.keys(dataAttributes).forEach(function (dataAttr) { if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { delete dataAttributes[dataAttr]; } }); config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); if (typeof config.delay === 'number') { config.delay = { show: config.delay, hide: config.delay }; } if (typeof config.title === 'number') { config.title = config.title.toString(); } if (typeof config.content === 'number') { config.content = config.content.toString(); } Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType); if (config.sanitize) { config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); } return config; }; _proto._getDelegateConfig = function _getDelegateConfig() { var config = {}; if (this.config) { for (var key in this.config) { if (this.constructor.Default[key] !== this.config[key]) { config[key] = this.config[key]; } } } return config; }; _proto._cleanTipClass = function _cleanTipClass() { var $tip = $(this.getTipElement()); var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); if (tabClass !== null && tabClass.length) { $tip.removeClass(tabClass.join('')); } }; _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { var popperInstance = popperData.instance; this.tip = popperInstance.popper; this._cleanTipClass(); this.addAttachmentClass(this._getAttachment(popperData.placement)); }; _proto._fixTransition = function _fixTransition() { var tip = this.getTipElement(); var initConfigAnimation = this.config.animation; if (tip.getAttribute('x-placement') !== null) { return; } $(tip).removeClass(ClassName$6.FADE); this.config.animation = false; this.hide(); this.show(); this.config.animation = initConfigAnimation; } // Static ; Tooltip._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { var data = $(this).data(DATA_KEY$6); var _config = typeof config === 'object' && config; if (!data && /dispose|hide/.test(config)) { return; } if (!data) { data = new Tooltip(this, _config); $(this).data(DATA_KEY$6, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError("No method named \"" + config + "\""); } data[config](); } }); }; _createClass(Tooltip, null, [{ key: "VERSION", get: function get() { return VERSION$6; } }, { key: "Default", get: function get() { return Default$4; } }, { key: "NAME", get: function get() { return NAME$6; } }, { key: "DATA_KEY", get: function get() { return DATA_KEY$6; } }, { key: "Event", get: function get() { return Event$6; } }, { key: "EVENT_KEY", get: function get() { return EVENT_KEY$6; } }, { key: "DefaultType", get: function get() { return DefaultType$4; } }]); return Tooltip; }(); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ $.fn[NAME$6] = Tooltip._jQueryInterface; $.fn[NAME$6].Constructor = Tooltip; $.fn[NAME$6].noConflict = function () { $.fn[NAME$6] = JQUERY_NO_CONFLICT$6; return Tooltip._jQueryInterface; }; /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME$7 = 'popover'; var VERSION$7 = '4.3.1'; var DATA_KEY$7 = 'bs.popover'; var EVENT_KEY$7 = "." + DATA_KEY$7; var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7]; var CLASS_PREFIX$1 = 'bs-popover'; var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g'); var Default$5 = _objectSpread({}, Tooltip.Default, { placement: 'right', trigger: 'click', content: '', template: '' }); var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, { content: '(string|element|function)' }); var ClassName$7 = { FADE: 'fade', SHOW: 'show' }; var Selector$7 = { TITLE: '.popover-header', CONTENT: '.popover-body' }; var Event$7 = { HIDE: "hide" + EVENT_KEY$7, HIDDEN: "hidden" + EVENT_KEY$7, SHOW: "show" + EVENT_KEY$7, SHOWN: "shown" + EVENT_KEY$7, INSERTED: "inserted" + EVENT_KEY$7, CLICK: "click" + EVENT_KEY$7, FOCUSIN: "focusin" + EVENT_KEY$7, FOCUSOUT: "focusout" + EVENT_KEY$7, MOUSEENTER: "mouseenter" + EVENT_KEY$7, MOUSELEAVE: "mouseleave" + EVENT_KEY$7 /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ }; var Popover = /*#__PURE__*/ function (_Tooltip) { _inheritsLoose(Popover, _Tooltip); function Popover() { return _Tooltip.apply(this, arguments) || this; } var _proto = Popover.prototype; // Overrides _proto.isWithContent = function isWithContent() { return this.getTitle() || this._getContent(); }; _proto.addAttachmentClass = function addAttachmentClass(attachment) { $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); }; _proto.getTipElement = function getTipElement() { this.tip = this.tip || $(this.config.template)[0]; return this.tip; }; _proto.setContent = function setContent() { var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle()); var content = this._getContent(); if (typeof content === 'function') { content = content.call(this.element); } this.setElementContent($tip.find(Selector$7.CONTENT), content); $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW); } // Private ; _proto._getContent = function _getContent() { return this.element.getAttribute('data-content') || this.config.content; }; _proto._cleanTipClass = function _cleanTipClass() { var $tip = $(this.getTipElement()); var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1); if (tabClass !== null && tabClass.length > 0) { $tip.removeClass(tabClass.join('')); } } // Static ; Popover._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { var data = $(this).data(DATA_KEY$7); var _config = typeof config === 'object' ? config : null; if (!data && /dispose|hide/.test(config)) { return; } if (!data) { data = new Popover(this, _config); $(this).data(DATA_KEY$7, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError("No method named \"" + config + "\""); } data[config](); } }); }; _createClass(Popover, null, [{ key: "VERSION", // Getters get: function get() { return VERSION$7; } }, { key: "Default", get: function get() { return Default$5; } }, { key: "NAME", get: function get() { return NAME$7; } }, { key: "DATA_KEY", get: function get() { return DATA_KEY$7; } }, { key: "Event", get: function get() { return Event$7; } }, { key: "EVENT_KEY", get: function get() { return EVENT_KEY$7; } }, { key: "DefaultType", get: function get() { return DefaultType$5; } }]); return Popover; }(Tooltip); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ $.fn[NAME$7] = Popover._jQueryInterface; $.fn[NAME$7].Constructor = Popover; $.fn[NAME$7].noConflict = function () { $.fn[NAME$7] = JQUERY_NO_CONFLICT$7; return Popover._jQueryInterface; }; /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME$8 = 'scrollspy'; var VERSION$8 = '4.3.1'; var DATA_KEY$8 = 'bs.scrollspy'; var EVENT_KEY$8 = "." + DATA_KEY$8; var DATA_API_KEY$6 = '.data-api'; var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8]; var Default$6 = { offset: 10, method: 'auto', target: '' }; var DefaultType$6 = { offset: 'number', method: 'string', target: '(string|element)' }; var Event$8 = { ACTIVATE: "activate" + EVENT_KEY$8, SCROLL: "scroll" + EVENT_KEY$8, LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6 }; var ClassName$8 = { DROPDOWN_ITEM: 'dropdown-item', DROPDOWN_MENU: 'dropdown-menu', ACTIVE: 'active' }; var Selector$8 = { DATA_SPY: '[data-spy="scroll"]', ACTIVE: '.active', NAV_LIST_GROUP: '.nav, .list-group', NAV_LINKS: '.nav-link', NAV_ITEMS: '.nav-item', LIST_ITEMS: '.list-group-item', DROPDOWN: '.dropdown', DROPDOWN_ITEMS: '.dropdown-item', DROPDOWN_TOGGLE: '.dropdown-toggle' }; var OffsetMethod = { OFFSET: 'offset', POSITION: 'position' /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ }; var ScrollSpy = /*#__PURE__*/ function () { function ScrollSpy(element, config) { var _this = this; this._element = element; this._scrollElement = element.tagName === 'BODY' ? window : element; this._config = this._getConfig(config); this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS); this._offsets = []; this._targets = []; this._activeTarget = null; this._scrollHeight = 0; $(this._scrollElement).on(Event$8.SCROLL, function (event) { return _this._process(event); }); this.refresh(); this._process(); } // Getters var _proto = ScrollSpy.prototype; // Public _proto.refresh = function refresh() { var _this2 = this; var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; this._offsets = []; this._targets = []; this._scrollHeight = this._getScrollHeight(); var targets = [].slice.call(document.querySelectorAll(this._selector)); targets.map(function (element) { var target; var targetSelector = Util.getSelectorFromElement(element); if (targetSelector) { target = document.querySelector(targetSelector); } if (target) { var targetBCR = target.getBoundingClientRect(); if (targetBCR.width || targetBCR.height) { // TODO (fat): remove sketch reliance on jQuery position/offset return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; } } return null; }).filter(function (item) { return item; }).sort(function (a, b) { return a[0] - b[0]; }).forEach(function (item) { _this2._offsets.push(item[0]); _this2._targets.push(item[1]); }); }; _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY$8); $(this._scrollElement).off(EVENT_KEY$8); this._element = null; this._scrollElement = null; this._config = null; this._selector = null; this._offsets = null; this._targets = null; this._activeTarget = null; this._scrollHeight = null; } // Private ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {}); if (typeof config.target !== 'string') { var id = $(config.target).attr('id'); if (!id) { id = Util.getUID(NAME$8); $(config.target).attr('id', id); } config.target = "#" + id; } Util.typeCheckConfig(NAME$8, config, DefaultType$6); return config; }; _proto._getScrollTop = function _getScrollTop() { return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; }; _proto._getScrollHeight = function _getScrollHeight() { return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); }; _proto._getOffsetHeight = function _getOffsetHeight() { return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; }; _proto._process = function _process() { var scrollTop = this._getScrollTop() + this._config.offset; var scrollHeight = this._getScrollHeight(); var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); if (this._scrollHeight !== scrollHeight) { this.refresh(); } if (scrollTop >= maxScroll) { var target = this._targets[this._targets.length - 1]; if (this._activeTarget !== target) { this._activate(target); } return; } if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { this._activeTarget = null; this._clear(); return; } var offsetLength = this._offsets.length; for (var i = offsetLength; i--;) { var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); if (isActiveTarget) { this._activate(this._targets[i]); } } }; _proto._activate = function _activate(target) { this._activeTarget = target; this._clear(); var queries = this._selector.split(',').map(function (selector) { return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; }); var $link = $([].slice.call(document.querySelectorAll(queries.join(',')))); if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) { $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE); $link.addClass(ClassName$8.ACTIVE); } else { // Set triggered link as active $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active // With both