jquery-ui.min.js 381 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671
  1. /*! jQuery UI - v1.11.4 - 2015-03-11
  2. * http://jqueryui.com
  3. * Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
  4. * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
  5. (function(e) {
  6. "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery)
  7. }
  8. )(function(e) {
  9. function t(t, s) {
  10. var n, a, o, r = t.nodeName.toLowerCase();
  11. return "area" === r ? (n = t.parentNode,
  12. a = n.name,
  13. t.href && a && "map" === n.nodeName.toLowerCase() ? (o = e("img[usemap='#" + a + "']")[0],
  14. !!o && i(o)) : !1) : (/^(input|select|textarea|button|object)$/.test(r) ? !t.disabled : "a" === r ? t.href || s : s) && i(t)
  15. }
  16. function i(t) {
  17. return e.expr.filters.visible(t) && !e(t).parents().addBack().filter(function() {
  18. return "hidden" === e.css(this, "visibility")
  19. }).length
  20. }
  21. function s(e) {
  22. for (var t, i; e.length && e[0] !== document; ) {
  23. if (t = e.css("position"),
  24. ("absolute" === t || "relative" === t || "fixed" === t) && (i = parseInt(e.css("zIndex"), 10),
  25. !isNaN(i) && 0 !== i))
  26. return i;
  27. e = e.parent()
  28. }
  29. return 0
  30. }
  31. function n() {
  32. this._curInst = null,
  33. this._keyEvent = !1,
  34. this._disabledInputs = [],
  35. this._datepickerShowing = !1,
  36. this._inDialog = !1,
  37. this._mainDivId = "ui-datepicker-div",
  38. this._inlineClass = "ui-datepicker-inline",
  39. this._appendClass = "ui-datepicker-append",
  40. this._triggerClass = "ui-datepicker-trigger",
  41. this._dialogClass = "ui-datepicker-dialog",
  42. this._disableClass = "ui-datepicker-disabled",
  43. this._unselectableClass = "ui-datepicker-unselectable",
  44. this._currentClass = "ui-datepicker-current-day",
  45. this._dayOverClass = "ui-datepicker-days-cell-over",
  46. this.regional = [],
  47. this.regional[""] = {
  48. closeText: "Done",
  49. prevText: "Prev",
  50. nextText: "Next",
  51. currentText: "Today",
  52. monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  53. monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  54. dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  55. dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  56. dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  57. weekHeader: "Wk",
  58. dateFormat: "mm/dd/yy",
  59. firstDay: 0,
  60. isRTL: !1,
  61. showMonthAfterYear: !1,
  62. yearSuffix: ""
  63. },
  64. this._defaults = {
  65. showOn: "focus",
  66. showAnim: "fadeIn",
  67. showOptions: {},
  68. defaultDate: null,
  69. appendText: "",
  70. buttonText: "...",
  71. buttonImage: "",
  72. buttonImageOnly: !1,
  73. hideIfNoPrevNext: !1,
  74. navigationAsDateFormat: !1,
  75. gotoCurrent: !1,
  76. changeMonth: !1,
  77. changeYear: !1,
  78. yearRange: "c-10:c+10",
  79. showOtherMonths: !1,
  80. selectOtherMonths: !1,
  81. showWeek: !1,
  82. calculateWeek: this.iso8601Week,
  83. shortYearCutoff: "+10",
  84. minDate: null,
  85. maxDate: null,
  86. duration: "fast",
  87. beforeShowDay: null,
  88. beforeShow: null,
  89. onSelect: null,
  90. onChangeMonthYear: null,
  91. onClose: null,
  92. numberOfMonths: 1,
  93. showCurrentAtPos: 0,
  94. stepMonths: 1,
  95. stepBigMonths: 12,
  96. altField: "",
  97. altFormat: "",
  98. constrainInput: !0,
  99. showButtonPanel: !1,
  100. autoSize: !1,
  101. disabled: !1
  102. },
  103. e.extend(this._defaults, this.regional[""]),
  104. this.regional.en = e.extend(!0, {}, this.regional[""]),
  105. this.regional["en-US"] = e.extend(!0, {}, this.regional.en),
  106. this.dpDiv = a(e("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))
  107. }
  108. function a(t) {
  109. var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
  110. return t.delegate(i, "mouseout", function() {
  111. e(this).removeClass("ui-state-hover"),
  112. -1 !== this.className.indexOf("ui-datepicker-prev") && e(this).removeClass("ui-datepicker-prev-hover"),
  113. -1 !== this.className.indexOf("ui-datepicker-next") && e(this).removeClass("ui-datepicker-next-hover")
  114. }).delegate(i, "mouseover", o)
  115. }
  116. function o() {
  117. e.datepicker._isDisabledDatepicker(v.inline ? v.dpDiv.parent()[0] : v.input[0]) || (e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),
  118. e(this).addClass("ui-state-hover"),
  119. -1 !== this.className.indexOf("ui-datepicker-prev") && e(this).addClass("ui-datepicker-prev-hover"),
  120. -1 !== this.className.indexOf("ui-datepicker-next") && e(this).addClass("ui-datepicker-next-hover"))
  121. }
  122. function r(t, i) {
  123. e.extend(t, i);
  124. for (var s in i)
  125. null == i[s] && (t[s] = i[s]);
  126. return t
  127. }
  128. function h(e) {
  129. return function() {
  130. var t = this.element.val();
  131. e.apply(this, arguments),
  132. this._refresh(),
  133. t !== this.element.val() && this._trigger("change")
  134. }
  135. }
  136. e.ui = e.ui || {},
  137. e.extend(e.ui, {
  138. version: "1.11.4",
  139. keyCode: {
  140. BACKSPACE: 8,
  141. COMMA: 188,
  142. DELETE: 46,
  143. DOWN: 40,
  144. END: 35,
  145. ENTER: 13,
  146. ESCAPE: 27,
  147. HOME: 36,
  148. LEFT: 37,
  149. PAGE_DOWN: 34,
  150. PAGE_UP: 33,
  151. PERIOD: 190,
  152. RIGHT: 39,
  153. SPACE: 32,
  154. TAB: 9,
  155. UP: 38
  156. }
  157. }),
  158. e.fn.extend({
  159. scrollParent: function(t) {
  160. var i = this.css("position")
  161. , s = "absolute" === i
  162. , n = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/
  163. , a = this.parents().filter(function() {
  164. var t = e(this);
  165. return s && "static" === t.css("position") ? !1 : n.test(t.css("overflow") + t.css("overflow-y") + t.css("overflow-x"))
  166. }).eq(0);
  167. return "fixed" !== i && a.length ? a : e(this[0].ownerDocument || document)
  168. },
  169. uniqueId: function() {
  170. var e = 0;
  171. return function() {
  172. return this.each(function() {
  173. this.id || (this.id = "ui-id-" + ++e)
  174. })
  175. }
  176. }(),
  177. removeUniqueId: function() {
  178. return this.each(function() {
  179. /^ui-id-\d+$/.test(this.id) && e(this).removeAttr("id")
  180. })
  181. }
  182. }),
  183. e.extend(e.expr[":"], {
  184. data: e.expr.createPseudo ? e.expr.createPseudo(function(t) {
  185. return function(i) {
  186. return !!e.data(i, t)
  187. }
  188. }) : function(t, i, s) {
  189. return !!e.data(t, s[3])
  190. }
  191. ,
  192. focusable: function(i) {
  193. return t(i, !isNaN(e.attr(i, "tabindex")))
  194. },
  195. tabbable: function(i) {
  196. var s = e.attr(i, "tabindex")
  197. , n = isNaN(s);
  198. return (n || s >= 0) && t(i, !n)
  199. }
  200. }),
  201. e("<a>").outerWidth(1).jquery || e.each(["Width", "Height"], function(t, i) {
  202. function s(t, i, s, a) {
  203. return e.each(n, function() {
  204. i -= parseFloat(e.css(t, "padding" + this)) || 0,
  205. s && (i -= parseFloat(e.css(t, "border" + this + "Width")) || 0),
  206. a && (i -= parseFloat(e.css(t, "margin" + this)) || 0)
  207. }),
  208. i
  209. }
  210. var n = "Width" === i ? ["Left", "Right"] : ["Top", "Bottom"]
  211. , a = i.toLowerCase()
  212. , o = {
  213. innerWidth: e.fn.innerWidth,
  214. innerHeight: e.fn.innerHeight,
  215. outerWidth: e.fn.outerWidth,
  216. outerHeight: e.fn.outerHeight
  217. };
  218. e.fn["inner" + i] = function(t) {
  219. return void 0 === t ? o["inner" + i].call(this) : this.each(function() {
  220. e(this).css(a, s(this, t) + "px")
  221. })
  222. }
  223. ,
  224. e.fn["outer" + i] = function(t, n) {
  225. return "number" != typeof t ? o["outer" + i].call(this, t) : this.each(function() {
  226. e(this).css(a, s(this, t, !0, n) + "px")
  227. })
  228. }
  229. }),
  230. e.fn.addBack || (e.fn.addBack = function(e) {
  231. return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
  232. }
  233. ),
  234. e("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function(t) {
  235. return function(i) {
  236. return arguments.length ? t.call(this, e.camelCase(i)) : t.call(this)
  237. }
  238. }(e.fn.removeData)),
  239. e.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
  240. e.fn.extend({
  241. focus: function(t) {
  242. return function(i, s) {
  243. return "number" == typeof i ? this.each(function() {
  244. var t = this;
  245. setTimeout(function() {
  246. e(t).focus(),
  247. s && s.call(t)
  248. }, i)
  249. }) : t.apply(this, arguments)
  250. }
  251. }(e.fn.focus),
  252. disableSelection: function() {
  253. var e = "onselectstart"in document.createElement("div") ? "selectstart" : "mousedown";
  254. return function() {
  255. return this.bind(e + ".ui-disableSelection", function(e) {
  256. e.preventDefault()
  257. })
  258. }
  259. }(),
  260. enableSelection: function() {
  261. return this.unbind(".ui-disableSelection")
  262. },
  263. zIndex: function(t) {
  264. if (void 0 !== t)
  265. return this.css("zIndex", t);
  266. if (this.length)
  267. for (var i, s, n = e(this[0]); n.length && n[0] !== document; ) {
  268. if (i = n.css("position"),
  269. ("absolute" === i || "relative" === i || "fixed" === i) && (s = parseInt(n.css("zIndex"), 10),
  270. !isNaN(s) && 0 !== s))
  271. return s;
  272. n = n.parent()
  273. }
  274. return 0
  275. }
  276. }),
  277. e.ui.plugin = {
  278. add: function(t, i, s) {
  279. var n, a = e.ui[t].prototype;
  280. for (n in s)
  281. a.plugins[n] = a.plugins[n] || [],
  282. a.plugins[n].push([i, s[n]])
  283. },
  284. call: function(e, t, i, s) {
  285. var n, a = e.plugins[t];
  286. if (a && (s || e.element[0].parentNode && 11 !== e.element[0].parentNode.nodeType))
  287. for (n = 0; a.length > n; n++)
  288. e.options[a[n][0]] && a[n][1].apply(e.element, i)
  289. }
  290. };
  291. var l = 0
  292. , u = Array.prototype.slice;
  293. e.cleanData = function(t) {
  294. return function(i) {
  295. var s, n, a;
  296. for (a = 0; null != (n = i[a]); a++)
  297. try {
  298. s = e._data(n, "events"),
  299. s && s.remove && e(n).triggerHandler("remove")
  300. } catch (o) {}
  301. t(i)
  302. }
  303. }(e.cleanData),
  304. e.widget = function(t, i, s) {
  305. var n, a, o, r, h = {}, l = t.split(".")[0];
  306. return t = t.split(".")[1],
  307. n = l + "-" + t,
  308. s || (s = i,
  309. i = e.Widget),
  310. e.expr[":"][n.toLowerCase()] = function(t) {
  311. return !!e.data(t, n)
  312. }
  313. ,
  314. e[l] = e[l] || {},
  315. a = e[l][t],
  316. o = e[l][t] = function(e, t) {
  317. return this._createWidget ? (arguments.length && this._createWidget(e, t),
  318. void 0) : new o(e,t)
  319. }
  320. ,
  321. e.extend(o, a, {
  322. version: s.version,
  323. _proto: e.extend({}, s),
  324. _childConstructors: []
  325. }),
  326. r = new i,
  327. r.options = e.widget.extend({}, r.options),
  328. e.each(s, function(t, s) {
  329. return e.isFunction(s) ? (h[t] = function() {
  330. var e = function() {
  331. return i.prototype[t].apply(this, arguments)
  332. }
  333. , n = function(e) {
  334. return i.prototype[t].apply(this, e)
  335. };
  336. return function() {
  337. var t, i = this._super, a = this._superApply;
  338. return this._super = e,
  339. this._superApply = n,
  340. t = s.apply(this, arguments),
  341. this._super = i,
  342. this._superApply = a,
  343. t
  344. }
  345. }(),
  346. void 0) : (h[t] = s,
  347. void 0)
  348. }),
  349. o.prototype = e.widget.extend(r, {
  350. widgetEventPrefix: a ? r.widgetEventPrefix || t : t
  351. }, h, {
  352. constructor: o,
  353. namespace: l,
  354. widgetName: t,
  355. widgetFullName: n
  356. }),
  357. a ? (e.each(a._childConstructors, function(t, i) {
  358. var s = i.prototype;
  359. e.widget(s.namespace + "." + s.widgetName, o, i._proto)
  360. }),
  361. delete a._childConstructors) : i._childConstructors.push(o),
  362. e.widget.bridge(t, o),
  363. o
  364. }
  365. ,
  366. e.widget.extend = function(t) {
  367. for (var i, s, n = u.call(arguments, 1), a = 0, o = n.length; o > a; a++)
  368. for (i in n[a])
  369. s = n[a][i],
  370. n[a].hasOwnProperty(i) && void 0 !== s && (t[i] = e.isPlainObject(s) ? e.isPlainObject(t[i]) ? e.widget.extend({}, t[i], s) : e.widget.extend({}, s) : s);
  371. return t
  372. }
  373. ,
  374. e.widget.bridge = function(t, i) {
  375. var s = i.prototype.widgetFullName || t;
  376. e.fn[t] = function(n) {
  377. var a = "string" == typeof n
  378. , o = u.call(arguments, 1)
  379. , r = this;
  380. return a ? this.each(function() {
  381. var i, a = e.data(this, s);
  382. return "instance" === n ? (r = a,
  383. !1) : a ? e.isFunction(a[n]) && "_" !== n.charAt(0) ? (i = a[n].apply(a, o),
  384. i !== a && void 0 !== i ? (r = i && i.jquery ? r.pushStack(i.get()) : i,
  385. !1) : void 0) : e.error("no such method '" + n + "' for " + t + " widget instance") : e.error("cannot call methods on " + t + " prior to initialization; " + "attempted to call method '" + n + "'")
  386. }) : (o.length && (n = e.widget.extend.apply(null, [n].concat(o))),
  387. this.each(function() {
  388. var t = e.data(this, s);
  389. t ? (t.option(n || {}),
  390. t._init && t._init()) : e.data(this, s, new i(n,this))
  391. })),
  392. r
  393. }
  394. }
  395. ,
  396. e.Widget = function() {}
  397. ,
  398. e.Widget._childConstructors = [],
  399. e.Widget.prototype = {
  400. widgetName: "widget",
  401. widgetEventPrefix: "",
  402. defaultElement: "<div>",
  403. options: {
  404. disabled: !1,
  405. create: null
  406. },
  407. _createWidget: function(t, i) {
  408. i = e(i || this.defaultElement || this)[0],
  409. this.element = e(i),
  410. this.uuid = l++,
  411. this.eventNamespace = "." + this.widgetName + this.uuid,
  412. this.bindings = e(),
  413. this.hoverable = e(),
  414. this.focusable = e(),
  415. i !== this && (e.data(i, this.widgetFullName, this),
  416. this._on(!0, this.element, {
  417. remove: function(e) {
  418. e.target === i && this.destroy()
  419. }
  420. }),
  421. this.document = e(i.style ? i.ownerDocument : i.document || i),
  422. this.window = e(this.document[0].defaultView || this.document[0].parentWindow)),
  423. this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t),
  424. this._create(),
  425. this._trigger("create", null, this._getCreateEventData()),
  426. this._init()
  427. },
  428. _getCreateOptions: e.noop,
  429. _getCreateEventData: e.noop,
  430. _create: e.noop,
  431. _init: e.noop,
  432. destroy: function() {
  433. this._destroy(),
  434. this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),
  435. this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"),
  436. this.bindings.unbind(this.eventNamespace),
  437. this.hoverable.removeClass("ui-state-hover"),
  438. this.focusable.removeClass("ui-state-focus")
  439. },
  440. _destroy: e.noop,
  441. widget: function() {
  442. return this.element
  443. },
  444. option: function(t, i) {
  445. var s, n, a, o = t;
  446. if (0 === arguments.length)
  447. return e.widget.extend({}, this.options);
  448. if ("string" == typeof t)
  449. if (o = {},
  450. s = t.split("."),
  451. t = s.shift(),
  452. s.length) {
  453. for (n = o[t] = e.widget.extend({}, this.options[t]),
  454. a = 0; s.length - 1 > a; a++)
  455. n[s[a]] = n[s[a]] || {},
  456. n = n[s[a]];
  457. if (t = s.pop(),
  458. 1 === arguments.length)
  459. return void 0 === n[t] ? null : n[t];
  460. n[t] = i
  461. } else {
  462. if (1 === arguments.length)
  463. return void 0 === this.options[t] ? null : this.options[t];
  464. o[t] = i
  465. }
  466. return this._setOptions(o),
  467. this
  468. },
  469. _setOptions: function(e) {
  470. var t;
  471. for (t in e)
  472. this._setOption(t, e[t]);
  473. return this
  474. },
  475. _setOption: function(e, t) {
  476. return this.options[e] = t,
  477. "disabled" === e && (this.widget().toggleClass(this.widgetFullName + "-disabled", !!t),
  478. t && (this.hoverable.removeClass("ui-state-hover"),
  479. this.focusable.removeClass("ui-state-focus"))),
  480. this
  481. },
  482. enable: function() {
  483. return this._setOptions({
  484. disabled: !1
  485. })
  486. },
  487. disable: function() {
  488. return this._setOptions({
  489. disabled: !0
  490. })
  491. },
  492. _on: function(t, i, s) {
  493. var n, a = this;
  494. "boolean" != typeof t && (s = i,
  495. i = t,
  496. t = !1),
  497. s ? (i = n = e(i),
  498. this.bindings = this.bindings.add(i)) : (s = i,
  499. i = this.element,
  500. n = this.widget()),
  501. e.each(s, function(s, o) {
  502. function r() {
  503. return t || a.options.disabled !== !0 && !e(this).hasClass("ui-state-disabled") ? ("string" == typeof o ? a[o] : o).apply(a, arguments) : void 0
  504. }
  505. "string" != typeof o && (r.guid = o.guid = o.guid || r.guid || e.guid++);
  506. var h = s.match(/^([\w:-]*)\s*(.*)$/)
  507. , l = h[1] + a.eventNamespace
  508. , u = h[2];
  509. u ? n.delegate(u, l, r) : i.bind(l, r)
  510. })
  511. },
  512. _off: function(t, i) {
  513. i = (i || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace,
  514. t.unbind(i).undelegate(i),
  515. this.bindings = e(this.bindings.not(t).get()),
  516. this.focusable = e(this.focusable.not(t).get()),
  517. this.hoverable = e(this.hoverable.not(t).get())
  518. },
  519. _delay: function(e, t) {
  520. function i() {
  521. return ("string" == typeof e ? s[e] : e).apply(s, arguments)
  522. }
  523. var s = this;
  524. return setTimeout(i, t || 0)
  525. },
  526. _hoverable: function(t) {
  527. this.hoverable = this.hoverable.add(t),
  528. this._on(t, {
  529. mouseenter: function(t) {
  530. e(t.currentTarget).addClass("ui-state-hover")
  531. },
  532. mouseleave: function(t) {
  533. e(t.currentTarget).removeClass("ui-state-hover")
  534. }
  535. })
  536. },
  537. _focusable: function(t) {
  538. this.focusable = this.focusable.add(t),
  539. this._on(t, {
  540. focusin: function(t) {
  541. e(t.currentTarget).addClass("ui-state-focus")
  542. },
  543. focusout: function(t) {
  544. e(t.currentTarget).removeClass("ui-state-focus")
  545. }
  546. })
  547. },
  548. _trigger: function(t, i, s) {
  549. var n, a, o = this.options[t];
  550. if (s = s || {},
  551. i = e.Event(i),
  552. i.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(),
  553. i.target = this.element[0],
  554. a = i.originalEvent)
  555. for (n in a)
  556. n in i || (i[n] = a[n]);
  557. return this.element.trigger(i, s),
  558. !(e.isFunction(o) && o.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented())
  559. }
  560. },
  561. e.each({
  562. show: "fadeIn",
  563. hide: "fadeOut"
  564. }, function(t, i) {
  565. e.Widget.prototype["_" + t] = function(s, n, a) {
  566. "string" == typeof n && (n = {
  567. effect: n
  568. });
  569. var o, r = n ? n === !0 || "number" == typeof n ? i : n.effect || i : t;
  570. n = n || {},
  571. "number" == typeof n && (n = {
  572. duration: n
  573. }),
  574. o = !e.isEmptyObject(n),
  575. n.complete = a,
  576. n.delay && s.delay(n.delay),
  577. o && e.effects && e.effects.effect[r] ? s[t](n) : r !== t && s[r] ? s[r](n.duration, n.easing, a) : s.queue(function(i) {
  578. e(this)[t](),
  579. a && a.call(s[0]),
  580. i()
  581. })
  582. }
  583. }),
  584. e.widget;
  585. var d = !1;
  586. e(document).mouseup(function() {
  587. d = !1
  588. }),
  589. e.widget("ui.mouse", {
  590. version: "1.11.4",
  591. options: {
  592. cancel: "input,textarea,button,select,option",
  593. distance: 1,
  594. delay: 0
  595. },
  596. _mouseInit: function() {
  597. var t = this;
  598. this.element.bind("mousedown." + this.widgetName, function(e) {
  599. return t._mouseDown(e)
  600. }).bind("click." + this.widgetName, function(i) {
  601. return !0 === e.data(i.target, t.widgetName + ".preventClickEvent") ? (e.removeData(i.target, t.widgetName + ".preventClickEvent"),
  602. i.stopImmediatePropagation(),
  603. !1) : void 0
  604. }),
  605. this.started = !1
  606. },
  607. _mouseDestroy: function() {
  608. this.element.unbind("." + this.widgetName),
  609. this._mouseMoveDelegate && this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
  610. },
  611. _mouseDown: function(t) {
  612. if (!d) {
  613. this._mouseMoved = !1,
  614. this._mouseStarted && this._mouseUp(t),
  615. this._mouseDownEvent = t;
  616. var i = this
  617. , s = 1 === t.which
  618. , n = "string" == typeof this.options.cancel && t.target.nodeName ? e(t.target).closest(this.options.cancel).length : !1;
  619. return s && !n && this._mouseCapture(t) ? (this.mouseDelayMet = !this.options.delay,
  620. this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
  621. i.mouseDelayMet = !0
  622. }, this.options.delay)),
  623. this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(t) !== !1,
  624. !this._mouseStarted) ? (t.preventDefault(),
  625. !0) : (!0 === e.data(t.target, this.widgetName + ".preventClickEvent") && e.removeData(t.target, this.widgetName + ".preventClickEvent"),
  626. this._mouseMoveDelegate = function(e) {
  627. return i._mouseMove(e)
  628. }
  629. ,
  630. this._mouseUpDelegate = function(e) {
  631. return i._mouseUp(e)
  632. }
  633. ,
  634. this.document.bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate),
  635. t.preventDefault(),
  636. d = !0,
  637. !0)) : !0
  638. }
  639. },
  640. _mouseMove: function(t) {
  641. if (this._mouseMoved) {
  642. if (e.ui.ie && (!document.documentMode || 9 > document.documentMode) && !t.button)
  643. return this._mouseUp(t);
  644. if (!t.which)
  645. return this._mouseUp(t)
  646. }
  647. return (t.which || t.button) && (this._mouseMoved = !0),
  648. this._mouseStarted ? (this._mouseDrag(t),
  649. t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1,
  650. this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)),
  651. !this._mouseStarted)
  652. },
  653. _mouseUp: function(t) {
  654. return this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate),
  655. this._mouseStarted && (this._mouseStarted = !1,
  656. t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0),
  657. this._mouseStop(t)),
  658. d = !1,
  659. !1
  660. },
  661. _mouseDistanceMet: function(e) {
  662. return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance
  663. },
  664. _mouseDelayMet: function() {
  665. return this.mouseDelayMet
  666. },
  667. _mouseStart: function() {},
  668. _mouseDrag: function() {},
  669. _mouseStop: function() {},
  670. _mouseCapture: function() {
  671. return !0
  672. }
  673. }),
  674. function() {
  675. function t(e, t, i) {
  676. return [parseFloat(e[0]) * (p.test(e[0]) ? t / 100 : 1), parseFloat(e[1]) * (p.test(e[1]) ? i / 100 : 1)]
  677. }
  678. function i(t, i) {
  679. return parseInt(e.css(t, i), 10) || 0
  680. }
  681. function s(t) {
  682. var i = t[0];
  683. return 9 === i.nodeType ? {
  684. width: t.width(),
  685. height: t.height(),
  686. offset: {
  687. top: 0,
  688. left: 0
  689. }
  690. } : e.isWindow(i) ? {
  691. width: t.width(),
  692. height: t.height(),
  693. offset: {
  694. top: t.scrollTop(),
  695. left: t.scrollLeft()
  696. }
  697. } : i.preventDefault ? {
  698. width: 0,
  699. height: 0,
  700. offset: {
  701. top: i.pageY,
  702. left: i.pageX
  703. }
  704. } : {
  705. width: t.outerWidth(),
  706. height: t.outerHeight(),
  707. offset: t.offset()
  708. }
  709. }
  710. e.ui = e.ui || {};
  711. var n, a, o = Math.max, r = Math.abs, h = Math.round, l = /left|center|right/, u = /top|center|bottom/, d = /[\+\-]\d+(\.[\d]+)?%?/, c = /^\w+/, p = /%$/, f = e.fn.position;
  712. e.position = {
  713. scrollbarWidth: function() {
  714. if (void 0 !== n)
  715. return n;
  716. var t, i, s = e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), a = s.children()[0];
  717. return e("body").append(s),
  718. t = a.offsetWidth,
  719. s.css("overflow", "scroll"),
  720. i = a.offsetWidth,
  721. t === i && (i = s[0].clientWidth),
  722. s.remove(),
  723. n = t - i
  724. },
  725. getScrollInfo: function(t) {
  726. var i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x")
  727. , s = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y")
  728. , n = "scroll" === i || "auto" === i && t.width < t.element[0].scrollWidth
  729. , a = "scroll" === s || "auto" === s && t.height < t.element[0].scrollHeight;
  730. return {
  731. width: a ? e.position.scrollbarWidth() : 0,
  732. height: n ? e.position.scrollbarWidth() : 0
  733. }
  734. },
  735. getWithinInfo: function(t) {
  736. var i = e(t || window)
  737. , s = e.isWindow(i[0])
  738. , n = !!i[0] && 9 === i[0].nodeType;
  739. return {
  740. element: i,
  741. isWindow: s,
  742. isDocument: n,
  743. offset: i.offset() || {
  744. left: 0,
  745. top: 0
  746. },
  747. scrollLeft: i.scrollLeft(),
  748. scrollTop: i.scrollTop(),
  749. width: s || n ? i.width() : i.outerWidth(),
  750. height: s || n ? i.height() : i.outerHeight()
  751. }
  752. }
  753. },
  754. e.fn.position = function(n) {
  755. if (!n || !n.of)
  756. return f.apply(this, arguments);
  757. n = e.extend({}, n);
  758. var p, m, g, v, y, b, _ = e(n.of), x = e.position.getWithinInfo(n.within), w = e.position.getScrollInfo(x), k = (n.collision || "flip").split(" "), T = {};
  759. return b = s(_),
  760. _[0].preventDefault && (n.at = "left top"),
  761. m = b.width,
  762. g = b.height,
  763. v = b.offset,
  764. y = e.extend({}, v),
  765. e.each(["my", "at"], function() {
  766. var e, t, i = (n[this] || "").split(" ");
  767. 1 === i.length && (i = l.test(i[0]) ? i.concat(["center"]) : u.test(i[0]) ? ["center"].concat(i) : ["center", "center"]),
  768. i[0] = l.test(i[0]) ? i[0] : "center",
  769. i[1] = u.test(i[1]) ? i[1] : "center",
  770. e = d.exec(i[0]),
  771. t = d.exec(i[1]),
  772. T[this] = [e ? e[0] : 0, t ? t[0] : 0],
  773. n[this] = [c.exec(i[0])[0], c.exec(i[1])[0]]
  774. }),
  775. 1 === k.length && (k[1] = k[0]),
  776. "right" === n.at[0] ? y.left += m : "center" === n.at[0] && (y.left += m / 2),
  777. "bottom" === n.at[1] ? y.top += g : "center" === n.at[1] && (y.top += g / 2),
  778. p = t(T.at, m, g),
  779. y.left += p[0],
  780. y.top += p[1],
  781. this.each(function() {
  782. var s, l, u = e(this), d = u.outerWidth(), c = u.outerHeight(), f = i(this, "marginLeft"), b = i(this, "marginTop"), D = d + f + i(this, "marginRight") + w.width, S = c + b + i(this, "marginBottom") + w.height, M = e.extend({}, y), C = t(T.my, u.outerWidth(), u.outerHeight());
  783. "right" === n.my[0] ? M.left -= d : "center" === n.my[0] && (M.left -= d / 2),
  784. "bottom" === n.my[1] ? M.top -= c : "center" === n.my[1] && (M.top -= c / 2),
  785. M.left += C[0],
  786. M.top += C[1],
  787. a || (M.left = h(M.left),
  788. M.top = h(M.top)),
  789. s = {
  790. marginLeft: f,
  791. marginTop: b
  792. },
  793. e.each(["left", "top"], function(t, i) {
  794. e.ui.position[k[t]] && e.ui.position[k[t]][i](M, {
  795. targetWidth: m,
  796. targetHeight: g,
  797. elemWidth: d,
  798. elemHeight: c,
  799. collisionPosition: s,
  800. collisionWidth: D,
  801. collisionHeight: S,
  802. offset: [p[0] + C[0], p[1] + C[1]],
  803. my: n.my,
  804. at: n.at,
  805. within: x,
  806. elem: u
  807. })
  808. }),
  809. n.using && (l = function(e) {
  810. var t = v.left - M.left
  811. , i = t + m - d
  812. , s = v.top - M.top
  813. , a = s + g - c
  814. , h = {
  815. target: {
  816. element: _,
  817. left: v.left,
  818. top: v.top,
  819. width: m,
  820. height: g
  821. },
  822. element: {
  823. element: u,
  824. left: M.left,
  825. top: M.top,
  826. width: d,
  827. height: c
  828. },
  829. horizontal: 0 > i ? "left" : t > 0 ? "right" : "center",
  830. vertical: 0 > a ? "top" : s > 0 ? "bottom" : "middle"
  831. };
  832. d > m && m > r(t + i) && (h.horizontal = "center"),
  833. c > g && g > r(s + a) && (h.vertical = "middle"),
  834. h.important = o(r(t), r(i)) > o(r(s), r(a)) ? "horizontal" : "vertical",
  835. n.using.call(this, e, h)
  836. }
  837. ),
  838. u.offset(e.extend(M, {
  839. using: l
  840. }))
  841. })
  842. }
  843. ,
  844. e.ui.position = {
  845. fit: {
  846. left: function(e, t) {
  847. var i, s = t.within, n = s.isWindow ? s.scrollLeft : s.offset.left, a = s.width, r = e.left - t.collisionPosition.marginLeft, h = n - r, l = r + t.collisionWidth - a - n;
  848. t.collisionWidth > a ? h > 0 && 0 >= l ? (i = e.left + h + t.collisionWidth - a - n,
  849. e.left += h - i) : e.left = l > 0 && 0 >= h ? n : h > l ? n + a - t.collisionWidth : n : h > 0 ? e.left += h : l > 0 ? e.left -= l : e.left = o(e.left - r, e.left)
  850. },
  851. top: function(e, t) {
  852. var i, s = t.within, n = s.isWindow ? s.scrollTop : s.offset.top, a = t.within.height, r = e.top - t.collisionPosition.marginTop, h = n - r, l = r + t.collisionHeight - a - n;
  853. t.collisionHeight > a ? h > 0 && 0 >= l ? (i = e.top + h + t.collisionHeight - a - n,
  854. e.top += h - i) : e.top = l > 0 && 0 >= h ? n : h > l ? n + a - t.collisionHeight : n : h > 0 ? e.top += h : l > 0 ? e.top -= l : e.top = o(e.top - r, e.top)
  855. }
  856. },
  857. flip: {
  858. left: function(e, t) {
  859. var i, s, n = t.within, a = n.offset.left + n.scrollLeft, o = n.width, h = n.isWindow ? n.scrollLeft : n.offset.left, l = e.left - t.collisionPosition.marginLeft, u = l - h, d = l + t.collisionWidth - o - h, c = "left" === t.my[0] ? -t.elemWidth : "right" === t.my[0] ? t.elemWidth : 0, p = "left" === t.at[0] ? t.targetWidth : "right" === t.at[0] ? -t.targetWidth : 0, f = -2 * t.offset[0];
  860. 0 > u ? (i = e.left + c + p + f + t.collisionWidth - o - a,
  861. (0 > i || r(u) > i) && (e.left += c + p + f)) : d > 0 && (s = e.left - t.collisionPosition.marginLeft + c + p + f - h,
  862. (s > 0 || d > r(s)) && (e.left += c + p + f))
  863. },
  864. top: function(e, t) {
  865. var i, s, n = t.within, a = n.offset.top + n.scrollTop, o = n.height, h = n.isWindow ? n.scrollTop : n.offset.top, l = e.top - t.collisionPosition.marginTop, u = l - h, d = l + t.collisionHeight - o - h, c = "top" === t.my[1], p = c ? -t.elemHeight : "bottom" === t.my[1] ? t.elemHeight : 0, f = "top" === t.at[1] ? t.targetHeight : "bottom" === t.at[1] ? -t.targetHeight : 0, m = -2 * t.offset[1];
  866. 0 > u ? (s = e.top + p + f + m + t.collisionHeight - o - a,
  867. (0 > s || r(u) > s) && (e.top += p + f + m)) : d > 0 && (i = e.top - t.collisionPosition.marginTop + p + f + m - h,
  868. (i > 0 || d > r(i)) && (e.top += p + f + m))
  869. }
  870. },
  871. flipfit: {
  872. left: function() {
  873. e.ui.position.flip.left.apply(this, arguments),
  874. e.ui.position.fit.left.apply(this, arguments)
  875. },
  876. top: function() {
  877. e.ui.position.flip.top.apply(this, arguments),
  878. e.ui.position.fit.top.apply(this, arguments)
  879. }
  880. }
  881. },
  882. function() {
  883. var t, i, s, n, o, r = document.getElementsByTagName("body")[0], h = document.createElement("div");
  884. t = document.createElement(r ? "div" : "body"),
  885. s = {
  886. visibility: "hidden",
  887. width: 0,
  888. height: 0,
  889. border: 0,
  890. margin: 0,
  891. background: "none"
  892. },
  893. r && e.extend(s, {
  894. position: "absolute",
  895. left: "-1000px",
  896. top: "-1000px"
  897. });
  898. for (o in s)
  899. t.style[o] = s[o];
  900. t.appendChild(h),
  901. i = r || document.documentElement,
  902. i.insertBefore(t, i.firstChild),
  903. h.style.cssText = "position: absolute; left: 10.7432222px;",
  904. n = e(h).offset().left,
  905. a = n > 10 && 11 > n,
  906. t.innerHTML = "",
  907. i.removeChild(t)
  908. }()
  909. }(),
  910. e.ui.position,
  911. e.widget("ui.accordion", {
  912. version: "1.11.4",
  913. options: {
  914. active: 0,
  915. animate: {},
  916. collapsible: !1,
  917. event: "click",
  918. header: "> li > :first-child,> :not(li):even",
  919. heightStyle: "auto",
  920. icons: {
  921. activeHeader: "ui-icon-triangle-1-s",
  922. header: "ui-icon-triangle-1-e"
  923. },
  924. activate: null,
  925. beforeActivate: null
  926. },
  927. hideProps: {
  928. borderTopWidth: "hide",
  929. borderBottomWidth: "hide",
  930. paddingTop: "hide",
  931. paddingBottom: "hide",
  932. height: "hide"
  933. },
  934. showProps: {
  935. borderTopWidth: "show",
  936. borderBottomWidth: "show",
  937. paddingTop: "show",
  938. paddingBottom: "show",
  939. height: "show"
  940. },
  941. _create: function() {
  942. var t = this.options;
  943. this.prevShow = this.prevHide = e(),
  944. this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role", "tablist"),
  945. t.collapsible || t.active !== !1 && null != t.active || (t.active = 0),
  946. this._processPanels(),
  947. 0 > t.active && (t.active += this.headers.length),
  948. this._refresh()
  949. },
  950. _getCreateEventData: function() {
  951. return {
  952. header: this.active,
  953. panel: this.active.length ? this.active.next() : e()
  954. }
  955. },
  956. _createIcons: function() {
  957. var t = this.options.icons;
  958. t && (e("<span>").addClass("ui-accordion-header-icon ui-icon " + t.header).prependTo(this.headers),
  959. this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),
  960. this.headers.addClass("ui-accordion-icons"))
  961. },
  962. _destroyIcons: function() {
  963. this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()
  964. },
  965. _destroy: function() {
  966. var e;
  967. this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),
  968. this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),
  969. this._destroyIcons(),
  970. e = this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display", "").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),
  971. "content" !== this.options.heightStyle && e.css("height", "")
  972. },
  973. _setOption: function(e, t) {
  974. return "active" === e ? (this._activate(t),
  975. void 0) : ("event" === e && (this.options.event && this._off(this.headers, this.options.event),
  976. this._setupEvents(t)),
  977. this._super(e, t),
  978. "collapsible" !== e || t || this.options.active !== !1 || this._activate(0),
  979. "icons" === e && (this._destroyIcons(),
  980. t && this._createIcons()),
  981. "disabled" === e && (this.element.toggleClass("ui-state-disabled", !!t).attr("aria-disabled", t),
  982. this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!t)),
  983. void 0)
  984. },
  985. _keydown: function(t) {
  986. if (!t.altKey && !t.ctrlKey) {
  987. var i = e.ui.keyCode
  988. , s = this.headers.length
  989. , n = this.headers.index(t.target)
  990. , a = !1;
  991. switch (t.keyCode) {
  992. case i.RIGHT:
  993. case i.DOWN:
  994. a = this.headers[(n + 1) % s];
  995. break;
  996. case i.LEFT:
  997. case i.UP:
  998. a = this.headers[(n - 1 + s) % s];
  999. break;
  1000. case i.SPACE:
  1001. case i.ENTER:
  1002. this._eventHandler(t);
  1003. break;
  1004. case i.HOME:
  1005. a = this.headers[0];
  1006. break;
  1007. case i.END:
  1008. a = this.headers[s - 1]
  1009. }
  1010. a && (e(t.target).attr("tabIndex", -1),
  1011. e(a).attr("tabIndex", 0),
  1012. a.focus(),
  1013. t.preventDefault())
  1014. }
  1015. },
  1016. _panelKeyDown: function(t) {
  1017. t.keyCode === e.ui.keyCode.UP && t.ctrlKey && e(t.currentTarget).prev().focus()
  1018. },
  1019. refresh: function() {
  1020. var t = this.options;
  1021. this._processPanels(),
  1022. t.active === !1 && t.collapsible === !0 || !this.headers.length ? (t.active = !1,
  1023. this.active = e()) : t.active === !1 ? this._activate(0) : this.active.length && !e.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t.active = !1,
  1024. this.active = e()) : this._activate(Math.max(0, t.active - 1)) : t.active = this.headers.index(this.active),
  1025. this._destroyIcons(),
  1026. this._refresh()
  1027. },
  1028. _processPanels: function() {
  1029. var e = this.headers
  1030. , t = this.panels;
  1031. this.headers = this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),
  1032. this.panels = this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),
  1033. t && (this._off(e.not(this.headers)),
  1034. this._off(t.not(this.panels)))
  1035. },
  1036. _refresh: function() {
  1037. var t, i = this.options, s = i.heightStyle, n = this.element.parent();
  1038. this.active = this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),
  1039. this.active.next().addClass("ui-accordion-content-active").show(),
  1040. this.headers.attr("role", "tab").each(function() {
  1041. var t = e(this)
  1042. , i = t.uniqueId().attr("id")
  1043. , s = t.next()
  1044. , n = s.uniqueId().attr("id");
  1045. t.attr("aria-controls", n),
  1046. s.attr("aria-labelledby", i)
  1047. }).next().attr("role", "tabpanel"),
  1048. this.headers.not(this.active).attr({
  1049. "aria-selected": "false",
  1050. "aria-expanded": "false",
  1051. tabIndex: -1
  1052. }).next().attr({
  1053. "aria-hidden": "true"
  1054. }).hide(),
  1055. this.active.length ? this.active.attr({
  1056. "aria-selected": "true",
  1057. "aria-expanded": "true",
  1058. tabIndex: 0
  1059. }).next().attr({
  1060. "aria-hidden": "false"
  1061. }) : this.headers.eq(0).attr("tabIndex", 0),
  1062. this._createIcons(),
  1063. this._setupEvents(i.event),
  1064. "fill" === s ? (t = n.height(),
  1065. this.element.siblings(":visible").each(function() {
  1066. var i = e(this)
  1067. , s = i.css("position");
  1068. "absolute" !== s && "fixed" !== s && (t -= i.outerHeight(!0))
  1069. }),
  1070. this.headers.each(function() {
  1071. t -= e(this).outerHeight(!0)
  1072. }),
  1073. this.headers.next().each(function() {
  1074. e(this).height(Math.max(0, t - e(this).innerHeight() + e(this).height()))
  1075. }).css("overflow", "auto")) : "auto" === s && (t = 0,
  1076. this.headers.next().each(function() {
  1077. t = Math.max(t, e(this).css("height", "").height())
  1078. }).height(t))
  1079. },
  1080. _activate: function(t) {
  1081. var i = this._findActive(t)[0];
  1082. i !== this.active[0] && (i = i || this.active[0],
  1083. this._eventHandler({
  1084. target: i,
  1085. currentTarget: i,
  1086. preventDefault: e.noop
  1087. }))
  1088. },
  1089. _findActive: function(t) {
  1090. return "number" == typeof t ? this.headers.eq(t) : e()
  1091. },
  1092. _setupEvents: function(t) {
  1093. var i = {
  1094. keydown: "_keydown"
  1095. };
  1096. t && e.each(t.split(" "), function(e, t) {
  1097. i[t] = "_eventHandler"
  1098. }),
  1099. this._off(this.headers.add(this.headers.next())),
  1100. this._on(this.headers, i),
  1101. this._on(this.headers.next(), {
  1102. keydown: "_panelKeyDown"
  1103. }),
  1104. this._hoverable(this.headers),
  1105. this._focusable(this.headers)
  1106. },
  1107. _eventHandler: function(t) {
  1108. var i = this.options
  1109. , s = this.active
  1110. , n = e(t.currentTarget)
  1111. , a = n[0] === s[0]
  1112. , o = a && i.collapsible
  1113. , r = o ? e() : n.next()
  1114. , h = s.next()
  1115. , l = {
  1116. oldHeader: s,
  1117. oldPanel: h,
  1118. newHeader: o ? e() : n,
  1119. newPanel: r
  1120. };
  1121. t.preventDefault(),
  1122. a && !i.collapsible || this._trigger("beforeActivate", t, l) === !1 || (i.active = o ? !1 : this.headers.index(n),
  1123. this.active = a ? e() : n,
  1124. this._toggle(l),
  1125. s.removeClass("ui-accordion-header-active ui-state-active"),
  1126. i.icons && s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),
  1127. a || (n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),
  1128. i.icons && n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),
  1129. n.next().addClass("ui-accordion-content-active")))
  1130. },
  1131. _toggle: function(t) {
  1132. var i = t.newPanel
  1133. , s = this.prevShow.length ? this.prevShow : t.oldPanel;
  1134. this.prevShow.add(this.prevHide).stop(!0, !0),
  1135. this.prevShow = i,
  1136. this.prevHide = s,
  1137. this.options.animate ? this._animate(i, s, t) : (s.hide(),
  1138. i.show(),
  1139. this._toggleComplete(t)),
  1140. s.attr({
  1141. "aria-hidden": "true"
  1142. }),
  1143. s.prev().attr({
  1144. "aria-selected": "false",
  1145. "aria-expanded": "false"
  1146. }),
  1147. i.length && s.length ? s.prev().attr({
  1148. tabIndex: -1,
  1149. "aria-expanded": "false"
  1150. }) : i.length && this.headers.filter(function() {
  1151. return 0 === parseInt(e(this).attr("tabIndex"), 10)
  1152. }).attr("tabIndex", -1),
  1153. i.attr("aria-hidden", "false").prev().attr({
  1154. "aria-selected": "true",
  1155. "aria-expanded": "true",
  1156. tabIndex: 0
  1157. })
  1158. },
  1159. _animate: function(e, t, i) {
  1160. var s, n, a, o = this, r = 0, h = e.css("box-sizing"), l = e.length && (!t.length || e.index() < t.index()), u = this.options.animate || {}, d = l && u.down || u, c = function() {
  1161. o._toggleComplete(i)
  1162. };
  1163. return "number" == typeof d && (a = d),
  1164. "string" == typeof d && (n = d),
  1165. n = n || d.easing || u.easing,
  1166. a = a || d.duration || u.duration,
  1167. t.length ? e.length ? (s = e.show().outerHeight(),
  1168. t.animate(this.hideProps, {
  1169. duration: a,
  1170. easing: n,
  1171. step: function(e, t) {
  1172. t.now = Math.round(e)
  1173. }
  1174. }),
  1175. e.hide().animate(this.showProps, {
  1176. duration: a,
  1177. easing: n,
  1178. complete: c,
  1179. step: function(e, i) {
  1180. i.now = Math.round(e),
  1181. "height" !== i.prop ? "content-box" === h && (r += i.now) : "content" !== o.options.heightStyle && (i.now = Math.round(s - t.outerHeight() - r),
  1182. r = 0)
  1183. }
  1184. }),
  1185. void 0) : t.animate(this.hideProps, a, n, c) : e.animate(this.showProps, a, n, c)
  1186. },
  1187. _toggleComplete: function(e) {
  1188. var t = e.oldPanel;
  1189. t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),
  1190. t.length && (t.parent()[0].className = t.parent()[0].className),
  1191. this._trigger("activate", null, e)
  1192. }
  1193. }),
  1194. e.widget("ui.menu", {
  1195. version: "1.11.4",
  1196. defaultElement: "<ul>",
  1197. delay: 300,
  1198. options: {
  1199. icons: {
  1200. submenu: "ui-icon-carat-1-e"
  1201. },
  1202. items: "> *",
  1203. menus: "ul",
  1204. position: {
  1205. my: "left-1 top",
  1206. at: "right top"
  1207. },
  1208. role: "menu",
  1209. blur: null,
  1210. focus: null,
  1211. select: null
  1212. },
  1213. _create: function() {
  1214. this.activeMenu = this.element,
  1215. this.mouseHandled = !1,
  1216. this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({
  1217. role: this.options.role,
  1218. tabIndex: 0
  1219. }),
  1220. this.options.disabled && this.element.addClass("ui-state-disabled").attr("aria-disabled", "true"),
  1221. this._on({
  1222. "mousedown .ui-menu-item": function(e) {
  1223. e.preventDefault()
  1224. },
  1225. "click .ui-menu-item": function(t) {
  1226. var i = e(t.target);
  1227. !this.mouseHandled && i.not(".ui-state-disabled").length && (this.select(t),
  1228. t.isPropagationStopped() || (this.mouseHandled = !0),
  1229. i.has(".ui-menu").length ? this.expand(t) : !this.element.is(":focus") && e(this.document[0].activeElement).closest(".ui-menu").length && (this.element.trigger("focus", [!0]),
  1230. this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer)))
  1231. },
  1232. "mouseenter .ui-menu-item": function(t) {
  1233. if (!this.previousFilter) {
  1234. var i = e(t.currentTarget);
  1235. i.siblings(".ui-state-active").removeClass("ui-state-active"),
  1236. this.focus(t, i)
  1237. }
  1238. },
  1239. mouseleave: "collapseAll",
  1240. "mouseleave .ui-menu": "collapseAll",
  1241. focus: function(e, t) {
  1242. var i = this.active || this.element.find(this.options.items).eq(0);
  1243. t || this.focus(e, i)
  1244. },
  1245. blur: function(t) {
  1246. this._delay(function() {
  1247. e.contains(this.element[0], this.document[0].activeElement) || this.collapseAll(t)
  1248. })
  1249. },
  1250. keydown: "_keydown"
  1251. }),
  1252. this.refresh(),
  1253. this._on(this.document, {
  1254. click: function(e) {
  1255. this._closeOnDocumentClick(e) && this.collapseAll(e),
  1256. this.mouseHandled = !1
  1257. }
  1258. })
  1259. },
  1260. _destroy: function() {
  1261. this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),
  1262. this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function() {
  1263. var t = e(this);
  1264. t.data("ui-menu-submenu-carat") && t.remove()
  1265. }),
  1266. this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
  1267. },
  1268. _keydown: function(t) {
  1269. var i, s, n, a, o = !0;
  1270. switch (t.keyCode) {
  1271. case e.ui.keyCode.PAGE_UP:
  1272. this.previousPage(t);
  1273. break;
  1274. case e.ui.keyCode.PAGE_DOWN:
  1275. this.nextPage(t);
  1276. break;
  1277. case e.ui.keyCode.HOME:
  1278. this._move("first", "first", t);
  1279. break;
  1280. case e.ui.keyCode.END:
  1281. this._move("last", "last", t);
  1282. break;
  1283. case e.ui.keyCode.UP:
  1284. this.previous(t);
  1285. break;
  1286. case e.ui.keyCode.DOWN:
  1287. this.next(t);
  1288. break;
  1289. case e.ui.keyCode.LEFT:
  1290. this.collapse(t);
  1291. break;
  1292. case e.ui.keyCode.RIGHT:
  1293. this.active && !this.active.is(".ui-state-disabled") && this.expand(t);
  1294. break;
  1295. case e.ui.keyCode.ENTER:
  1296. case e.ui.keyCode.SPACE:
  1297. this._activate(t);
  1298. break;
  1299. case e.ui.keyCode.ESCAPE:
  1300. this.collapse(t);
  1301. break;
  1302. default:
  1303. o = !1,
  1304. s = this.previousFilter || "",
  1305. n = String.fromCharCode(t.keyCode),
  1306. a = !1,
  1307. clearTimeout(this.filterTimer),
  1308. n === s ? a = !0 : n = s + n,
  1309. i = this._filterMenuItems(n),
  1310. i = a && -1 !== i.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : i,
  1311. i.length || (n = String.fromCharCode(t.keyCode),
  1312. i = this._filterMenuItems(n)),
  1313. i.length ? (this.focus(t, i),
  1314. this.previousFilter = n,
  1315. this.filterTimer = this._delay(function() {
  1316. delete this.previousFilter
  1317. }, 1e3)) : delete this.previousFilter
  1318. }
  1319. o && t.preventDefault()
  1320. },
  1321. _activate: function(e) {
  1322. this.active.is(".ui-state-disabled") || (this.active.is("[aria-haspopup='true']") ? this.expand(e) : this.select(e))
  1323. },
  1324. refresh: function() {
  1325. var t, i, s = this, n = this.options.icons.submenu, a = this.element.find(this.options.menus);
  1326. this.element.toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length),
  1327. a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({
  1328. role: this.options.role,
  1329. "aria-hidden": "true",
  1330. "aria-expanded": "false"
  1331. }).each(function() {
  1332. var t = e(this)
  1333. , i = t.parent()
  1334. , s = e("<span>").addClass("ui-menu-icon ui-icon " + n).data("ui-menu-submenu-carat", !0);
  1335. i.attr("aria-haspopup", "true").prepend(s),
  1336. t.attr("aria-labelledby", i.attr("id"))
  1337. }),
  1338. t = a.add(this.element),
  1339. i = t.find(this.options.items),
  1340. i.not(".ui-menu-item").each(function() {
  1341. var t = e(this);
  1342. s._isDivider(t) && t.addClass("ui-widget-content ui-menu-divider")
  1343. }),
  1344. i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({
  1345. tabIndex: -1,
  1346. role: this._itemRole()
  1347. }),
  1348. i.filter(".ui-state-disabled").attr("aria-disabled", "true"),
  1349. this.active && !e.contains(this.element[0], this.active[0]) && this.blur()
  1350. },
  1351. _itemRole: function() {
  1352. return {
  1353. menu: "menuitem",
  1354. listbox: "option"
  1355. }[this.options.role]
  1356. },
  1357. _setOption: function(e, t) {
  1358. "icons" === e && this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),
  1359. "disabled" === e && this.element.toggleClass("ui-state-disabled", !!t).attr("aria-disabled", t),
  1360. this._super(e, t)
  1361. },
  1362. focus: function(e, t) {
  1363. var i, s;
  1364. this.blur(e, e && "focus" === e.type),
  1365. this._scrollIntoView(t),
  1366. this.active = t.first(),
  1367. s = this.active.addClass("ui-state-focus").removeClass("ui-state-active"),
  1368. this.options.role && this.element.attr("aria-activedescendant", s.attr("id")),
  1369. this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),
  1370. e && "keydown" === e.type ? this._close() : this.timer = this._delay(function() {
  1371. this._close()
  1372. }, this.delay),
  1373. i = t.children(".ui-menu"),
  1374. i.length && e && /^mouse/.test(e.type) && this._startOpening(i),
  1375. this.activeMenu = t.parent(),
  1376. this._trigger("focus", e, {
  1377. item: t
  1378. })
  1379. },
  1380. _scrollIntoView: function(t) {
  1381. var i, s, n, a, o, r;
  1382. this._hasScroll() && (i = parseFloat(e.css(this.activeMenu[0], "borderTopWidth")) || 0,
  1383. s = parseFloat(e.css(this.activeMenu[0], "paddingTop")) || 0,
  1384. n = t.offset().top - this.activeMenu.offset().top - i - s,
  1385. a = this.activeMenu.scrollTop(),
  1386. o = this.activeMenu.height(),
  1387. r = t.outerHeight(),
  1388. 0 > n ? this.activeMenu.scrollTop(a + n) : n + r > o && this.activeMenu.scrollTop(a + n - o + r))
  1389. },
  1390. blur: function(e, t) {
  1391. t || clearTimeout(this.timer),
  1392. this.active && (this.active.removeClass("ui-state-focus"),
  1393. this.active = null,
  1394. this._trigger("blur", e, {
  1395. item: this.active
  1396. }))
  1397. },
  1398. _startOpening: function(e) {
  1399. clearTimeout(this.timer),
  1400. "true" === e.attr("aria-hidden") && (this.timer = this._delay(function() {
  1401. this._close(),
  1402. this._open(e)
  1403. }, this.delay))
  1404. },
  1405. _open: function(t) {
  1406. var i = e.extend({
  1407. of: this.active
  1408. }, this.options.position);
  1409. clearTimeout(this.timer),
  1410. this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"),
  1411. t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(i)
  1412. },
  1413. collapseAll: function(t, i) {
  1414. clearTimeout(this.timer),
  1415. this.timer = this._delay(function() {
  1416. var s = i ? this.element : e(t && t.target).closest(this.element.find(".ui-menu"));
  1417. s.length || (s = this.element),
  1418. this._close(s),
  1419. this.blur(t),
  1420. this.activeMenu = s
  1421. }, this.delay)
  1422. },
  1423. _close: function(e) {
  1424. e || (e = this.active ? this.active.parent() : this.element),
  1425. e.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")
  1426. },
  1427. _closeOnDocumentClick: function(t) {
  1428. return !e(t.target).closest(".ui-menu").length
  1429. },
  1430. _isDivider: function(e) {
  1431. return !/[^\-\u2014\u2013\s]/.test(e.text())
  1432. },
  1433. collapse: function(e) {
  1434. var t = this.active && this.active.parent().closest(".ui-menu-item", this.element);
  1435. t && t.length && (this._close(),
  1436. this.focus(e, t))
  1437. },
  1438. expand: function(e) {
  1439. var t = this.active && this.active.children(".ui-menu ").find(this.options.items).first();
  1440. t && t.length && (this._open(t.parent()),
  1441. this._delay(function() {
  1442. this.focus(e, t)
  1443. }))
  1444. },
  1445. next: function(e) {
  1446. this._move("next", "first", e)
  1447. },
  1448. previous: function(e) {
  1449. this._move("prev", "last", e)
  1450. },
  1451. isFirstItem: function() {
  1452. return this.active && !this.active.prevAll(".ui-menu-item").length
  1453. },
  1454. isLastItem: function() {
  1455. return this.active && !this.active.nextAll(".ui-menu-item").length
  1456. },
  1457. _move: function(e, t, i) {
  1458. var s;
  1459. this.active && (s = "first" === e || "last" === e ? this.active["first" === e ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[e + "All"](".ui-menu-item").eq(0)),
  1460. s && s.length && this.active || (s = this.activeMenu.find(this.options.items)[t]()),
  1461. this.focus(i, s)
  1462. },
  1463. nextPage: function(t) {
  1464. var i, s, n;
  1465. return this.active ? (this.isLastItem() || (this._hasScroll() ? (s = this.active.offset().top,
  1466. n = this.element.height(),
  1467. this.active.nextAll(".ui-menu-item").each(function() {
  1468. return i = e(this),
  1469. 0 > i.offset().top - s - n
  1470. }),
  1471. this.focus(t, i)) : this.focus(t, this.activeMenu.find(this.options.items)[this.active ? "last" : "first"]())),
  1472. void 0) : (this.next(t),
  1473. void 0)
  1474. },
  1475. previousPage: function(t) {
  1476. var i, s, n;
  1477. return this.active ? (this.isFirstItem() || (this._hasScroll() ? (s = this.active.offset().top,
  1478. n = this.element.height(),
  1479. this.active.prevAll(".ui-menu-item").each(function() {
  1480. return i = e(this),
  1481. i.offset().top - s + n > 0
  1482. }),
  1483. this.focus(t, i)) : this.focus(t, this.activeMenu.find(this.options.items).first())),
  1484. void 0) : (this.next(t),
  1485. void 0)
  1486. },
  1487. _hasScroll: function() {
  1488. return this.element.outerHeight() < this.element.prop("scrollHeight")
  1489. },
  1490. select: function(t) {
  1491. this.active = this.active || e(t.target).closest(".ui-menu-item");
  1492. var i = {
  1493. item: this.active
  1494. };
  1495. this.active.has(".ui-menu").length || this.collapseAll(t, !0),
  1496. this._trigger("select", t, i)
  1497. },
  1498. _filterMenuItems: function(t) {
  1499. var i = t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
  1500. , s = RegExp("^" + i, "i");
  1501. return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function() {
  1502. return s.test(e.trim(e(this).text()))
  1503. })
  1504. }
  1505. }),
  1506. e.widget("ui.autocomplete", {
  1507. version: "1.11.4",
  1508. defaultElement: "<input>",
  1509. options: {
  1510. appendTo: null,
  1511. autoFocus: !1,
  1512. delay: 300,
  1513. minLength: 1,
  1514. position: {
  1515. my: "left top",
  1516. at: "left bottom",
  1517. collision: "none"
  1518. },
  1519. source: null,
  1520. change: null,
  1521. close: null,
  1522. focus: null,
  1523. open: null,
  1524. response: null,
  1525. search: null,
  1526. select: null
  1527. },
  1528. requestIndex: 0,
  1529. pending: 0,
  1530. _create: function() {
  1531. var t, i, s, n = this.element[0].nodeName.toLowerCase(), a = "textarea" === n, o = "input" === n;
  1532. this.isMultiLine = a ? !0 : o ? !1 : this.element.prop("isContentEditable"),
  1533. this.valueMethod = this.element[a || o ? "val" : "text"],
  1534. this.isNewMenu = !0,
  1535. this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off"),
  1536. this._on(this.element, {
  1537. keydown: function(n) {
  1538. if (this.element.prop("readOnly"))
  1539. return t = !0,
  1540. s = !0,
  1541. i = !0,
  1542. void 0;
  1543. t = !1,
  1544. s = !1,
  1545. i = !1;
  1546. var a = e.ui.keyCode;
  1547. switch (n.keyCode) {
  1548. case a.PAGE_UP:
  1549. t = !0,
  1550. this._move("previousPage", n);
  1551. break;
  1552. case a.PAGE_DOWN:
  1553. t = !0,
  1554. this._move("nextPage", n);
  1555. break;
  1556. case a.UP:
  1557. t = !0,
  1558. this._keyEvent("previous", n);
  1559. break;
  1560. case a.DOWN:
  1561. t = !0,
  1562. this._keyEvent("next", n);
  1563. break;
  1564. case a.ENTER:
  1565. this.menu.active && (t = !0,
  1566. n.preventDefault(),
  1567. this.menu.select(n));
  1568. break;
  1569. case a.TAB:
  1570. this.menu.active && this.menu.select(n);
  1571. break;
  1572. case a.ESCAPE:
  1573. this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term),
  1574. this.close(n),
  1575. n.preventDefault());
  1576. break;
  1577. default:
  1578. i = !0,
  1579. this._searchTimeout(n)
  1580. }
  1581. },
  1582. keypress: function(s) {
  1583. if (t)
  1584. return t = !1,
  1585. (!this.isMultiLine || this.menu.element.is(":visible")) && s.preventDefault(),
  1586. void 0;
  1587. if (!i) {
  1588. var n = e.ui.keyCode;
  1589. switch (s.keyCode) {
  1590. case n.PAGE_UP:
  1591. this._move("previousPage", s);
  1592. break;
  1593. case n.PAGE_DOWN:
  1594. this._move("nextPage", s);
  1595. break;
  1596. case n.UP:
  1597. this._keyEvent("previous", s);
  1598. break;
  1599. case n.DOWN:
  1600. this._keyEvent("next", s)
  1601. }
  1602. }
  1603. },
  1604. input: function(e) {
  1605. return s ? (s = !1,
  1606. e.preventDefault(),
  1607. void 0) : (this._searchTimeout(e),
  1608. void 0)
  1609. },
  1610. focus: function() {
  1611. this.selectedItem = null,
  1612. this.previous = this._value()
  1613. },
  1614. blur: function(e) {
  1615. return this.cancelBlur ? (delete this.cancelBlur,
  1616. void 0) : (clearTimeout(this.searching),
  1617. this.close(e),
  1618. this._change(e),
  1619. void 0)
  1620. }
  1621. }),
  1622. this._initSource(),
  1623. this.menu = e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({
  1624. role: null
  1625. }).hide().menu("instance"),
  1626. this._on(this.menu.element, {
  1627. mousedown: function(t) {
  1628. t.preventDefault(),
  1629. this.cancelBlur = !0,
  1630. this._delay(function() {
  1631. delete this.cancelBlur
  1632. });
  1633. var i = this.menu.element[0];
  1634. e(t.target).closest(".ui-menu-item").length || this._delay(function() {
  1635. var t = this;
  1636. this.document.one("mousedown", function(s) {
  1637. s.target === t.element[0] || s.target === i || e.contains(i, s.target) || t.close()
  1638. })
  1639. })
  1640. },
  1641. menufocus: function(t, i) {
  1642. var s, n;
  1643. return this.isNewMenu && (this.isNewMenu = !1,
  1644. t.originalEvent && /^mouse/.test(t.originalEvent.type)) ? (this.menu.blur(),
  1645. this.document.one("mousemove", function() {
  1646. e(t.target).trigger(t.originalEvent)
  1647. }),
  1648. void 0) : (n = i.item.data("ui-autocomplete-item"),
  1649. !1 !== this._trigger("focus", t, {
  1650. item: n
  1651. }) && t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(n.value),
  1652. s = i.item.attr("aria-label") || n.value,
  1653. s && e.trim(s).length && (this.liveRegion.children().hide(),
  1654. e("<div>").text(s).appendTo(this.liveRegion)),
  1655. void 0)
  1656. },
  1657. menuselect: function(e, t) {
  1658. var i = t.item.data("ui-autocomplete-item")
  1659. , s = this.previous;
  1660. this.element[0] !== this.document[0].activeElement && (this.element.focus(),
  1661. this.previous = s,
  1662. this._delay(function() {
  1663. this.previous = s,
  1664. this.selectedItem = i
  1665. })),
  1666. !1 !== this._trigger("select", e, {
  1667. item: i
  1668. }) && this._value(i.value),
  1669. this.term = this._value(),
  1670. this.close(e),
  1671. this.selectedItem = i
  1672. }
  1673. }),
  1674. this.liveRegion = e("<span>", {
  1675. role: "status",
  1676. "aria-live": "assertive",
  1677. "aria-relevant": "additions"
  1678. }).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),
  1679. this._on(this.window, {
  1680. beforeunload: function() {
  1681. this.element.removeAttr("autocomplete")
  1682. }
  1683. })
  1684. },
  1685. _destroy: function() {
  1686. clearTimeout(this.searching),
  1687. this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),
  1688. this.menu.element.remove(),
  1689. this.liveRegion.remove()
  1690. },
  1691. _setOption: function(e, t) {
  1692. this._super(e, t),
  1693. "source" === e && this._initSource(),
  1694. "appendTo" === e && this.menu.element.appendTo(this._appendTo()),
  1695. "disabled" === e && t && this.xhr && this.xhr.abort()
  1696. },
  1697. _appendTo: function() {
  1698. var t = this.options.appendTo;
  1699. return t && (t = t.jquery || t.nodeType ? e(t) : this.document.find(t).eq(0)),
  1700. t && t[0] || (t = this.element.closest(".ui-front")),
  1701. t.length || (t = this.document[0].body),
  1702. t
  1703. },
  1704. _initSource: function() {
  1705. var t, i, s = this;
  1706. e.isArray(this.options.source) ? (t = this.options.source,
  1707. this.source = function(i, s) {
  1708. s(e.ui.autocomplete.filter(t, i.term))
  1709. }
  1710. ) : "string" == typeof this.options.source ? (i = this.options.source,
  1711. this.source = function(t, n) {
  1712. s.xhr && s.xhr.abort(),
  1713. s.xhr = e.ajax({
  1714. url: i,
  1715. data: t,
  1716. dataType: "json",
  1717. success: function(e) {
  1718. n(e)
  1719. },
  1720. error: function() {
  1721. n([])
  1722. }
  1723. })
  1724. }
  1725. ) : this.source = this.options.source
  1726. },
  1727. _searchTimeout: function(e) {
  1728. clearTimeout(this.searching),
  1729. this.searching = this._delay(function() {
  1730. var t = this.term === this._value()
  1731. , i = this.menu.element.is(":visible")
  1732. , s = e.altKey || e.ctrlKey || e.metaKey || e.shiftKey;
  1733. (!t || t && !i && !s) && (this.selectedItem = null,
  1734. this.search(null, e))
  1735. }, this.options.delay)
  1736. },
  1737. search: function(e, t) {
  1738. return e = null != e ? e : this._value(),
  1739. this.term = this._value(),
  1740. e.length < this.options.minLength ? this.close(t) : this._trigger("search", t) !== !1 ? this._search(e) : void 0
  1741. },
  1742. _search: function(e) {
  1743. this.pending++,
  1744. this.element.addClass("ui-autocomplete-loading"),
  1745. this.cancelSearch = !1,
  1746. this.source({
  1747. term: e
  1748. }, this._response())
  1749. },
  1750. _response: function() {
  1751. var t = ++this.requestIndex;
  1752. return e.proxy(function(e) {
  1753. t === this.requestIndex && this.__response(e),
  1754. this.pending--,
  1755. this.pending || this.element.removeClass("ui-autocomplete-loading")
  1756. }, this)
  1757. },
  1758. __response: function(e) {
  1759. e && (e = this._normalize(e)),
  1760. this._trigger("response", null, {
  1761. content: e
  1762. }),
  1763. !this.options.disabled && e && e.length && !this.cancelSearch ? (this._suggest(e),
  1764. this._trigger("open")) : this._close()
  1765. },
  1766. close: function(e) {
  1767. this.cancelSearch = !0,
  1768. this._close(e)
  1769. },
  1770. _close: function(e) {
  1771. this.menu.element.is(":visible") && (this.menu.element.hide(),
  1772. this.menu.blur(),
  1773. this.isNewMenu = !0,
  1774. this._trigger("close", e))
  1775. },
  1776. _change: function(e) {
  1777. this.previous !== this._value() && this._trigger("change", e, {
  1778. item: this.selectedItem
  1779. })
  1780. },
  1781. _normalize: function(t) {
  1782. return t.length && t[0].label && t[0].value ? t : e.map(t, function(t) {
  1783. return "string" == typeof t ? {
  1784. label: t,
  1785. value: t
  1786. } : e.extend({}, t, {
  1787. label: t.label || t.value,
  1788. value: t.value || t.label
  1789. })
  1790. })
  1791. },
  1792. _suggest: function(t) {
  1793. var i = this.menu.element.empty();
  1794. this._renderMenu(i, t),
  1795. this.isNewMenu = !0,
  1796. this.menu.refresh(),
  1797. i.show(),
  1798. this._resizeMenu(),
  1799. i.position(e.extend({
  1800. of: this.element
  1801. }, this.options.position)),
  1802. this.options.autoFocus && this.menu.next()
  1803. },
  1804. _resizeMenu: function() {
  1805. var e = this.menu.element;
  1806. e.outerWidth(Math.max(e.width("").outerWidth() + 1, this.element.outerWidth()))
  1807. },
  1808. _renderMenu: function(t, i) {
  1809. var s = this;
  1810. e.each(i, function(e, i) {
  1811. s._renderItemData(t, i)
  1812. })
  1813. },
  1814. _renderItemData: function(e, t) {
  1815. return this._renderItem(e, t).data("ui-autocomplete-item", t)
  1816. },
  1817. _renderItem: function(t, i) {
  1818. return e("<li>").text(i.label).appendTo(t)
  1819. },
  1820. _move: function(e, t) {
  1821. return this.menu.element.is(":visible") ? this.menu.isFirstItem() && /^previous/.test(e) || this.menu.isLastItem() && /^next/.test(e) ? (this.isMultiLine || this._value(this.term),
  1822. this.menu.blur(),
  1823. void 0) : (this.menu[e](t),
  1824. void 0) : (this.search(null, t),
  1825. void 0)
  1826. },
  1827. widget: function() {
  1828. return this.menu.element
  1829. },
  1830. _value: function() {
  1831. return this.valueMethod.apply(this.element, arguments)
  1832. },
  1833. _keyEvent: function(e, t) {
  1834. (!this.isMultiLine || this.menu.element.is(":visible")) && (this._move(e, t),
  1835. t.preventDefault())
  1836. }
  1837. }),
  1838. e.extend(e.ui.autocomplete, {
  1839. escapeRegex: function(e) {
  1840. return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
  1841. },
  1842. filter: function(t, i) {
  1843. var s = RegExp(e.ui.autocomplete.escapeRegex(i), "i");
  1844. return e.grep(t, function(e) {
  1845. return s.test(e.label || e.value || e)
  1846. })
  1847. }
  1848. }),
  1849. e.widget("ui.autocomplete", e.ui.autocomplete, {
  1850. options: {
  1851. messages: {
  1852. noResults: "No search results.",
  1853. results: function(e) {
  1854. return e + (e > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate."
  1855. }
  1856. }
  1857. },
  1858. __response: function(t) {
  1859. var i;
  1860. this._superApply(arguments),
  1861. this.options.disabled || this.cancelSearch || (i = t && t.length ? this.options.messages.results(t.length) : this.options.messages.noResults,
  1862. this.liveRegion.children().hide(),
  1863. e("<div>").text(i).appendTo(this.liveRegion))
  1864. }
  1865. }),
  1866. e.ui.autocomplete;
  1867. var c, p = "ui-button ui-widget ui-state-default ui-corner-all", f = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", m = function() {
  1868. var t = e(this);
  1869. setTimeout(function() {
  1870. t.find(":ui-button").button("refresh")
  1871. }, 1)
  1872. }, g = function(t) {
  1873. var i = t.name
  1874. , s = t.form
  1875. , n = e([]);
  1876. return i && (i = i.replace(/'/g, "\\'"),
  1877. n = s ? e(s).find("[name='" + i + "'][type=radio]") : e("[name='" + i + "'][type=radio]", t.ownerDocument).filter(function() {
  1878. return !this.form
  1879. })),
  1880. n
  1881. };
  1882. e.widget("ui.button", {
  1883. version: "1.11.4",
  1884. defaultElement: "<button>",
  1885. options: {
  1886. disabled: null,
  1887. text: !0,
  1888. label: null,
  1889. icons: {
  1890. primary: null,
  1891. secondary: null
  1892. }
  1893. },
  1894. _create: function() {
  1895. this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, m),
  1896. "boolean" != typeof this.options.disabled ? this.options.disabled = !!this.element.prop("disabled") : this.element.prop("disabled", this.options.disabled),
  1897. this._determineButtonType(),
  1898. this.hasTitle = !!this.buttonElement.attr("title");
  1899. var t = this
  1900. , i = this.options
  1901. , s = "checkbox" === this.type || "radio" === this.type
  1902. , n = s ? "" : "ui-state-active";
  1903. null === i.label && (i.label = "input" === this.type ? this.buttonElement.val() : this.buttonElement.html()),
  1904. this._hoverable(this.buttonElement),
  1905. this.buttonElement.addClass(p).attr("role", "button").bind("mouseenter" + this.eventNamespace, function() {
  1906. i.disabled || this === c && e(this).addClass("ui-state-active")
  1907. }).bind("mouseleave" + this.eventNamespace, function() {
  1908. i.disabled || e(this).removeClass(n)
  1909. }).bind("click" + this.eventNamespace, function(e) {
  1910. i.disabled && (e.preventDefault(),
  1911. e.stopImmediatePropagation())
  1912. }),
  1913. this._on({
  1914. focus: function() {
  1915. this.buttonElement.addClass("ui-state-focus")
  1916. },
  1917. blur: function() {
  1918. this.buttonElement.removeClass("ui-state-focus")
  1919. }
  1920. }),
  1921. s && this.element.bind("change" + this.eventNamespace, function() {
  1922. t.refresh()
  1923. }),
  1924. "checkbox" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function() {
  1925. return i.disabled ? !1 : void 0
  1926. }) : "radio" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function() {
  1927. if (i.disabled)
  1928. return !1;
  1929. e(this).addClass("ui-state-active"),
  1930. t.buttonElement.attr("aria-pressed", "true");
  1931. var s = t.element[0];
  1932. g(s).not(s).map(function() {
  1933. return e(this).button("widget")[0]
  1934. }).removeClass("ui-state-active").attr("aria-pressed", "false")
  1935. }) : (this.buttonElement.bind("mousedown" + this.eventNamespace, function() {
  1936. return i.disabled ? !1 : (e(this).addClass("ui-state-active"),
  1937. c = this,
  1938. t.document.one("mouseup", function() {
  1939. c = null
  1940. }),
  1941. void 0)
  1942. }).bind("mouseup" + this.eventNamespace, function() {
  1943. return i.disabled ? !1 : (e(this).removeClass("ui-state-active"),
  1944. void 0)
  1945. }).bind("keydown" + this.eventNamespace, function(t) {
  1946. return i.disabled ? !1 : ((t.keyCode === e.ui.keyCode.SPACE || t.keyCode === e.ui.keyCode.ENTER) && e(this).addClass("ui-state-active"),
  1947. void 0)
  1948. }).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
  1949. e(this).removeClass("ui-state-active")
  1950. }),
  1951. this.buttonElement.is("a") && this.buttonElement.keyup(function(t) {
  1952. t.keyCode === e.ui.keyCode.SPACE && e(this).click()
  1953. })),
  1954. this._setOption("disabled", i.disabled),
  1955. this._resetButton()
  1956. },
  1957. _determineButtonType: function() {
  1958. var e, t, i;
  1959. this.type = this.element.is("[type=checkbox]") ? "checkbox" : this.element.is("[type=radio]") ? "radio" : this.element.is("input") ? "input" : "button",
  1960. "checkbox" === this.type || "radio" === this.type ? (e = this.element.parents().last(),
  1961. t = "label[for='" + this.element.attr("id") + "']",
  1962. this.buttonElement = e.find(t),
  1963. this.buttonElement.length || (e = e.length ? e.siblings() : this.element.siblings(),
  1964. this.buttonElement = e.filter(t),
  1965. this.buttonElement.length || (this.buttonElement = e.find(t))),
  1966. this.element.addClass("ui-helper-hidden-accessible"),
  1967. i = this.element.is(":checked"),
  1968. i && this.buttonElement.addClass("ui-state-active"),
  1969. this.buttonElement.prop("aria-pressed", i)) : this.buttonElement = this.element
  1970. },
  1971. widget: function() {
  1972. return this.buttonElement
  1973. },
  1974. _destroy: function() {
  1975. this.element.removeClass("ui-helper-hidden-accessible"),
  1976. this.buttonElement.removeClass(p + " ui-state-active " + f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),
  1977. this.hasTitle || this.buttonElement.removeAttr("title")
  1978. },
  1979. _setOption: function(e, t) {
  1980. return this._super(e, t),
  1981. "disabled" === e ? (this.widget().toggleClass("ui-state-disabled", !!t),
  1982. this.element.prop("disabled", !!t),
  1983. t && ("checkbox" === this.type || "radio" === this.type ? this.buttonElement.removeClass("ui-state-focus") : this.buttonElement.removeClass("ui-state-focus ui-state-active")),
  1984. void 0) : (this._resetButton(),
  1985. void 0)
  1986. },
  1987. refresh: function() {
  1988. var t = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled");
  1989. t !== this.options.disabled && this._setOption("disabled", t),
  1990. "radio" === this.type ? g(this.element[0]).each(function() {
  1991. e(this).is(":checked") ? e(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") : e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false")
  1992. }) : "checkbox" === this.type && (this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false"))
  1993. },
  1994. _resetButton: function() {
  1995. if ("input" === this.type)
  1996. return this.options.label && this.element.val(this.options.label),
  1997. void 0;
  1998. var t = this.buttonElement.removeClass(f)
  1999. , i = e("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text()
  2000. , s = this.options.icons
  2001. , n = s.primary && s.secondary
  2002. , a = [];
  2003. s.primary || s.secondary ? (this.options.text && a.push("ui-button-text-icon" + (n ? "s" : s.primary ? "-primary" : "-secondary")),
  2004. s.primary && t.prepend("<span class='ui-button-icon-primary ui-icon " + s.primary + "'></span>"),
  2005. s.secondary && t.append("<span class='ui-button-icon-secondary ui-icon " + s.secondary + "'></span>"),
  2006. this.options.text || (a.push(n ? "ui-button-icons-only" : "ui-button-icon-only"),
  2007. this.hasTitle || t.attr("title", e.trim(i)))) : a.push("ui-button-text-only"),
  2008. t.addClass(a.join(" "))
  2009. }
  2010. }),
  2011. e.widget("ui.buttonset", {
  2012. version: "1.11.4",
  2013. options: {
  2014. items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
  2015. },
  2016. _create: function() {
  2017. this.element.addClass("ui-buttonset")
  2018. },
  2019. _init: function() {
  2020. this.refresh()
  2021. },
  2022. _setOption: function(e, t) {
  2023. "disabled" === e && this.buttons.button("option", e, t),
  2024. this._super(e, t)
  2025. },
  2026. refresh: function() {
  2027. var t = "rtl" === this.element.css("direction")
  2028. , i = this.element.find(this.options.items)
  2029. , s = i.filter(":ui-button");
  2030. i.not(":ui-button").button(),
  2031. s.button("refresh"),
  2032. this.buttons = i.map(function() {
  2033. return e(this).button("widget")[0]
  2034. }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(t ? "ui-corner-left" : "ui-corner-right").end().end()
  2035. },
  2036. _destroy: function() {
  2037. this.element.removeClass("ui-buttonset"),
  2038. this.buttons.map(function() {
  2039. return e(this).button("widget")[0]
  2040. }).removeClass("ui-corner-left ui-corner-right").end().button("destroy")
  2041. }
  2042. }),
  2043. e.ui.button,
  2044. e.extend(e.ui, {
  2045. datepicker: {
  2046. version: "1.11.4"
  2047. }
  2048. });
  2049. var v;
  2050. e.extend(n.prototype, {
  2051. markerClassName: "hasDatepicker",
  2052. maxRows: 4,
  2053. _widgetDatepicker: function() {
  2054. return this.dpDiv
  2055. },
  2056. setDefaults: function(e) {
  2057. return r(this._defaults, e || {}),
  2058. this
  2059. },
  2060. _attachDatepicker: function(t, i) {
  2061. var s, n, a;
  2062. s = t.nodeName.toLowerCase(),
  2063. n = "div" === s || "span" === s,
  2064. t.id || (this.uuid += 1,
  2065. t.id = "dp" + this.uuid),
  2066. a = this._newInst(e(t), n),
  2067. a.settings = e.extend({}, i || {}),
  2068. "input" === s ? this._connectDatepicker(t, a) : n && this._inlineDatepicker(t, a)
  2069. },
  2070. _newInst: function(t, i) {
  2071. var s = t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
  2072. return {
  2073. id: s,
  2074. input: t,
  2075. selectedDay: 0,
  2076. selectedMonth: 0,
  2077. selectedYear: 0,
  2078. drawMonth: 0,
  2079. drawYear: 0,
  2080. inline: i,
  2081. dpDiv: i ? a(e("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv
  2082. }
  2083. },
  2084. _connectDatepicker: function(t, i) {
  2085. var s = e(t);
  2086. i.append = e([]),
  2087. i.trigger = e([]),
  2088. s.hasClass(this.markerClassName) || (this._attachments(s, i),
  2089. s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),
  2090. this._autoSize(i),
  2091. e.data(t, "datepicker", i),
  2092. i.settings.disabled && this._disableDatepicker(t))
  2093. },
  2094. _attachments: function(t, i) {
  2095. var s, n, a, o = this._get(i, "appendText"), r = this._get(i, "isRTL");
  2096. i.append && i.append.remove(),
  2097. o && (i.append = e("<span class='" + this._appendClass + "'>" + o + "</span>"),
  2098. t[r ? "before" : "after"](i.append)),
  2099. t.unbind("focus", this._showDatepicker),
  2100. i.trigger && i.trigger.remove(),
  2101. s = this._get(i, "showOn"),
  2102. ("focus" === s || "both" === s) && t.focus(this._showDatepicker),
  2103. ("button" === s || "both" === s) && (n = this._get(i, "buttonText"),
  2104. a = this._get(i, "buttonImage"),
  2105. i.trigger = e(this._get(i, "buttonImageOnly") ? e("<img/>").addClass(this._triggerClass).attr({
  2106. src: a,
  2107. alt: n,
  2108. title: n
  2109. }) : e("<button type='button'></button>").addClass(this._triggerClass).html(a ? e("<img/>").attr({
  2110. src: a,
  2111. alt: n,
  2112. title: n
  2113. }) : n)),
  2114. t[r ? "before" : "after"](i.trigger),
  2115. i.trigger.click(function() {
  2116. return e.datepicker._datepickerShowing && e.datepicker._lastInput === t[0] ? e.datepicker._hideDatepicker() : e.datepicker._datepickerShowing && e.datepicker._lastInput !== t[0] ? (e.datepicker._hideDatepicker(),
  2117. e.datepicker._showDatepicker(t[0])) : e.datepicker._showDatepicker(t[0]),
  2118. !1
  2119. }))
  2120. },
  2121. _autoSize: function(e) {
  2122. if (this._get(e, "autoSize") && !e.inline) {
  2123. var t, i, s, n, a = new Date(2009,11,20), o = this._get(e, "dateFormat");
  2124. o.match(/[DM]/) && (t = function(e) {
  2125. for (i = 0,
  2126. s = 0,
  2127. n = 0; e.length > n; n++)
  2128. e[n].length > i && (i = e[n].length,
  2129. s = n);
  2130. return s
  2131. }
  2132. ,
  2133. a.setMonth(t(this._get(e, o.match(/MM/) ? "monthNames" : "monthNamesShort"))),
  2134. a.setDate(t(this._get(e, o.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - a.getDay())),
  2135. e.input.attr("size", this._formatDate(e, a).length)
  2136. }
  2137. },
  2138. _inlineDatepicker: function(t, i) {
  2139. var s = e(t);
  2140. s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv),
  2141. e.data(t, "datepicker", i),
  2142. this._setDate(i, this._getDefaultDate(i), !0),
  2143. this._updateDatepicker(i),
  2144. this._updateAlternate(i),
  2145. i.settings.disabled && this._disableDatepicker(t),
  2146. i.dpDiv.css("display", "block"))
  2147. },
  2148. _dialogDatepicker: function(t, i, s, n, a) {
  2149. var o, h, l, u, d, c = this._dialogInst;
  2150. return c || (this.uuid += 1,
  2151. o = "dp" + this.uuid,
  2152. this._dialogInput = e("<input type='text' id='" + o + "' style='position: absolute; top: -100px; width: 0px;'/>"),
  2153. this._dialogInput.keydown(this._doKeyDown),
  2154. e("body").append(this._dialogInput),
  2155. c = this._dialogInst = this._newInst(this._dialogInput, !1),
  2156. c.settings = {},
  2157. e.data(this._dialogInput[0], "datepicker", c)),
  2158. r(c.settings, n || {}),
  2159. i = i && i.constructor === Date ? this._formatDate(c, i) : i,
  2160. this._dialogInput.val(i),
  2161. this._pos = a ? a.length ? a : [a.pageX, a.pageY] : null,
  2162. this._pos || (h = document.documentElement.clientWidth,
  2163. l = document.documentElement.clientHeight,
  2164. u = document.documentElement.scrollLeft || document.body.scrollLeft,
  2165. d = document.documentElement.scrollTop || document.body.scrollTop,
  2166. this._pos = [h / 2 - 100 + u, l / 2 - 150 + d]),
  2167. this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"),
  2168. c.settings.onSelect = s,
  2169. this._inDialog = !0,
  2170. this.dpDiv.addClass(this._dialogClass),
  2171. this._showDatepicker(this._dialogInput[0]),
  2172. e.blockUI && e.blockUI(this.dpDiv),
  2173. e.data(this._dialogInput[0], "datepicker", c),
  2174. this
  2175. },
  2176. _destroyDatepicker: function(t) {
  2177. var i, s = e(t), n = e.data(t, "datepicker");
  2178. s.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(),
  2179. e.removeData(t, "datepicker"),
  2180. "input" === i ? (n.append.remove(),
  2181. n.trigger.remove(),
  2182. s.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : ("div" === i || "span" === i) && s.removeClass(this.markerClassName).empty(),
  2183. v === n && (v = null))
  2184. },
  2185. _enableDatepicker: function(t) {
  2186. var i, s, n = e(t), a = e.data(t, "datepicker");
  2187. n.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(),
  2188. "input" === i ? (t.disabled = !1,
  2189. a.trigger.filter("button").each(function() {
  2190. this.disabled = !1
  2191. }).end().filter("img").css({
  2192. opacity: "1.0",
  2193. cursor: ""
  2194. })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass),
  2195. s.children().removeClass("ui-state-disabled"),
  2196. s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)),
  2197. this._disabledInputs = e.map(this._disabledInputs, function(e) {
  2198. return e === t ? null : e
  2199. }))
  2200. },
  2201. _disableDatepicker: function(t) {
  2202. var i, s, n = e(t), a = e.data(t, "datepicker");
  2203. n.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(),
  2204. "input" === i ? (t.disabled = !0,
  2205. a.trigger.filter("button").each(function() {
  2206. this.disabled = !0
  2207. }).end().filter("img").css({
  2208. opacity: "0.5",
  2209. cursor: "default"
  2210. })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass),
  2211. s.children().addClass("ui-state-disabled"),
  2212. s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)),
  2213. this._disabledInputs = e.map(this._disabledInputs, function(e) {
  2214. return e === t ? null : e
  2215. }),
  2216. this._disabledInputs[this._disabledInputs.length] = t)
  2217. },
  2218. _isDisabledDatepicker: function(e) {
  2219. if (!e)
  2220. return !1;
  2221. for (var t = 0; this._disabledInputs.length > t; t++)
  2222. if (this._disabledInputs[t] === e)
  2223. return !0;
  2224. return !1
  2225. },
  2226. _getInst: function(t) {
  2227. try {
  2228. return e.data(t, "datepicker")
  2229. } catch (i) {
  2230. throw "Missing instance data for this datepicker"
  2231. }
  2232. },
  2233. _optionDatepicker: function(t, i, s) {
  2234. var n, a, o, h, l = this._getInst(t);
  2235. return 2 === arguments.length && "string" == typeof i ? "defaults" === i ? e.extend({}, e.datepicker._defaults) : l ? "all" === i ? e.extend({}, l.settings) : this._get(l, i) : null : (n = i || {},
  2236. "string" == typeof i && (n = {},
  2237. n[i] = s),
  2238. l && (this._curInst === l && this._hideDatepicker(),
  2239. a = this._getDateDatepicker(t, !0),
  2240. o = this._getMinMaxDate(l, "min"),
  2241. h = this._getMinMaxDate(l, "max"),
  2242. r(l.settings, n),
  2243. null !== o && void 0 !== n.dateFormat && void 0 === n.minDate && (l.settings.minDate = this._formatDate(l, o)),
  2244. null !== h && void 0 !== n.dateFormat && void 0 === n.maxDate && (l.settings.maxDate = this._formatDate(l, h)),
  2245. "disabled"in n && (n.disabled ? this._disableDatepicker(t) : this._enableDatepicker(t)),
  2246. this._attachments(e(t), l),
  2247. this._autoSize(l),
  2248. this._setDate(l, a),
  2249. this._updateAlternate(l),
  2250. this._updateDatepicker(l)),
  2251. void 0)
  2252. },
  2253. _changeDatepicker: function(e, t, i) {
  2254. this._optionDatepicker(e, t, i)
  2255. },
  2256. _refreshDatepicker: function(e) {
  2257. var t = this._getInst(e);
  2258. t && this._updateDatepicker(t)
  2259. },
  2260. _setDateDatepicker: function(e, t) {
  2261. var i = this._getInst(e);
  2262. i && (this._setDate(i, t),
  2263. this._updateDatepicker(i),
  2264. this._updateAlternate(i))
  2265. },
  2266. _getDateDatepicker: function(e, t) {
  2267. var i = this._getInst(e);
  2268. return i && !i.inline && this._setDateFromField(i, t),
  2269. i ? this._getDate(i) : null
  2270. },
  2271. _doKeyDown: function(t) {
  2272. var i, s, n, a = e.datepicker._getInst(t.target), o = !0, r = a.dpDiv.is(".ui-datepicker-rtl");
  2273. if (a._keyEvent = !0,
  2274. e.datepicker._datepickerShowing)
  2275. switch (t.keyCode) {
  2276. case 9:
  2277. e.datepicker._hideDatepicker(),
  2278. o = !1;
  2279. break;
  2280. case 13:
  2281. return n = e("td." + e.datepicker._dayOverClass + ":not(." + e.datepicker._currentClass + ")", a.dpDiv),
  2282. n[0] && e.datepicker._selectDay(t.target, a.selectedMonth, a.selectedYear, n[0]),
  2283. i = e.datepicker._get(a, "onSelect"),
  2284. i ? (s = e.datepicker._formatDate(a),
  2285. i.apply(a.input ? a.input[0] : null, [s, a])) : e.datepicker._hideDatepicker(),
  2286. !1;
  2287. case 27:
  2288. e.datepicker._hideDatepicker();
  2289. break;
  2290. case 33:
  2291. e.datepicker._adjustDate(t.target, t.ctrlKey ? -e.datepicker._get(a, "stepBigMonths") : -e.datepicker._get(a, "stepMonths"), "M");
  2292. break;
  2293. case 34:
  2294. e.datepicker._adjustDate(t.target, t.ctrlKey ? +e.datepicker._get(a, "stepBigMonths") : +e.datepicker._get(a, "stepMonths"), "M");
  2295. break;
  2296. case 35:
  2297. (t.ctrlKey || t.metaKey) && e.datepicker._clearDate(t.target),
  2298. o = t.ctrlKey || t.metaKey;
  2299. break;
  2300. case 36:
  2301. (t.ctrlKey || t.metaKey) && e.datepicker._gotoToday(t.target),
  2302. o = t.ctrlKey || t.metaKey;
  2303. break;
  2304. case 37:
  2305. (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, r ? 1 : -1, "D"),
  2306. o = t.ctrlKey || t.metaKey,
  2307. t.originalEvent.altKey && e.datepicker._adjustDate(t.target, t.ctrlKey ? -e.datepicker._get(a, "stepBigMonths") : -e.datepicker._get(a, "stepMonths"), "M");
  2308. break;
  2309. case 38:
  2310. (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, -7, "D"),
  2311. o = t.ctrlKey || t.metaKey;
  2312. break;
  2313. case 39:
  2314. (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, r ? -1 : 1, "D"),
  2315. o = t.ctrlKey || t.metaKey,
  2316. t.originalEvent.altKey && e.datepicker._adjustDate(t.target, t.ctrlKey ? +e.datepicker._get(a, "stepBigMonths") : +e.datepicker._get(a, "stepMonths"), "M");
  2317. break;
  2318. case 40:
  2319. (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, 7, "D"),
  2320. o = t.ctrlKey || t.metaKey;
  2321. break;
  2322. default:
  2323. o = !1
  2324. }
  2325. else
  2326. 36 === t.keyCode && t.ctrlKey ? e.datepicker._showDatepicker(this) : o = !1;
  2327. o && (t.preventDefault(),
  2328. t.stopPropagation())
  2329. },
  2330. _doKeyPress: function(t) {
  2331. var i, s, n = e.datepicker._getInst(t.target);
  2332. return e.datepicker._get(n, "constrainInput") ? (i = e.datepicker._possibleChars(e.datepicker._get(n, "dateFormat")),
  2333. s = String.fromCharCode(null == t.charCode ? t.keyCode : t.charCode),
  2334. t.ctrlKey || t.metaKey || " " > s || !i || i.indexOf(s) > -1) : void 0
  2335. },
  2336. _doKeyUp: function(t) {
  2337. var i, s = e.datepicker._getInst(t.target);
  2338. if (s.input.val() !== s.lastVal)
  2339. try {
  2340. i = e.datepicker.parseDate(e.datepicker._get(s, "dateFormat"), s.input ? s.input.val() : null, e.datepicker._getFormatConfig(s)),
  2341. i && (e.datepicker._setDateFromField(s),
  2342. e.datepicker._updateAlternate(s),
  2343. e.datepicker._updateDatepicker(s))
  2344. } catch (n) {}
  2345. return !0
  2346. },
  2347. _showDatepicker: function(t) {
  2348. if (t = t.target || t,
  2349. "input" !== t.nodeName.toLowerCase() && (t = e("input", t.parentNode)[0]),
  2350. !e.datepicker._isDisabledDatepicker(t) && e.datepicker._lastInput !== t) {
  2351. var i, n, a, o, h, l, u;
  2352. i = e.datepicker._getInst(t),
  2353. e.datepicker._curInst && e.datepicker._curInst !== i && (e.datepicker._curInst.dpDiv.stop(!0, !0),
  2354. i && e.datepicker._datepickerShowing && e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),
  2355. n = e.datepicker._get(i, "beforeShow"),
  2356. a = n ? n.apply(t, [t, i]) : {},
  2357. a !== !1 && (r(i.settings, a),
  2358. i.lastVal = null,
  2359. e.datepicker._lastInput = t,
  2360. e.datepicker._setDateFromField(i),
  2361. e.datepicker._inDialog && (t.value = ""),
  2362. e.datepicker._pos || (e.datepicker._pos = e.datepicker._findPos(t),
  2363. e.datepicker._pos[1] += t.offsetHeight),
  2364. o = !1,
  2365. e(t).parents().each(function() {
  2366. return o |= "fixed" === e(this).css("position"),
  2367. !o
  2368. }),
  2369. h = {
  2370. left: e.datepicker._pos[0],
  2371. top: e.datepicker._pos[1]
  2372. },
  2373. e.datepicker._pos = null,
  2374. i.dpDiv.empty(),
  2375. i.dpDiv.css({
  2376. position: "absolute",
  2377. display: "block",
  2378. top: "-1000px"
  2379. }),
  2380. e.datepicker._updateDatepicker(i),
  2381. h = e.datepicker._checkOffset(i, h, o),
  2382. i.dpDiv.css({
  2383. position: e.datepicker._inDialog && e.blockUI ? "static" : o ? "fixed" : "absolute",
  2384. display: "none",
  2385. left: h.left + "px",
  2386. top: h.top + "px"
  2387. }),
  2388. i.inline || (l = e.datepicker._get(i, "showAnim"),
  2389. u = e.datepicker._get(i, "duration"),
  2390. i.dpDiv.css("z-index", s(e(t)) + 1),
  2391. e.datepicker._datepickerShowing = !0,
  2392. e.effects && e.effects.effect[l] ? i.dpDiv.show(l, e.datepicker._get(i, "showOptions"), u) : i.dpDiv[l || "show"](l ? u : null),
  2393. e.datepicker._shouldFocusInput(i) && i.input.focus(),
  2394. e.datepicker._curInst = i))
  2395. }
  2396. },
  2397. _updateDatepicker: function(t) {
  2398. this.maxRows = 4,
  2399. v = t,
  2400. t.dpDiv.empty().append(this._generateHTML(t)),
  2401. this._attachHandlers(t);
  2402. var i, s = this._getNumberOfMonths(t), n = s[1], a = 17, r = t.dpDiv.find("." + this._dayOverClass + " a");
  2403. r.length > 0 && o.apply(r.get(0)),
  2404. t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),
  2405. n > 1 && t.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", a * n + "em"),
  2406. t.dpDiv[(1 !== s[0] || 1 !== s[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"),
  2407. t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"),
  2408. t === e.datepicker._curInst && e.datepicker._datepickerShowing && e.datepicker._shouldFocusInput(t) && t.input.focus(),
  2409. t.yearshtml && (i = t.yearshtml,
  2410. setTimeout(function() {
  2411. i === t.yearshtml && t.yearshtml && t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),
  2412. i = t.yearshtml = null
  2413. }, 0))
  2414. },
  2415. _shouldFocusInput: function(e) {
  2416. return e.input && e.input.is(":visible") && !e.input.is(":disabled") && !e.input.is(":focus")
  2417. },
  2418. _checkOffset: function(t, i, s) {
  2419. var n = t.dpDiv.outerWidth()
  2420. , a = t.dpDiv.outerHeight()
  2421. , o = t.input ? t.input.outerWidth() : 0
  2422. , r = t.input ? t.input.outerHeight() : 0
  2423. , h = document.documentElement.clientWidth + (s ? 0 : e(document).scrollLeft())
  2424. , l = document.documentElement.clientHeight + (s ? 0 : e(document).scrollTop());
  2425. return i.left -= this._get(t, "isRTL") ? n - o : 0,
  2426. i.left -= s && i.left === t.input.offset().left ? e(document).scrollLeft() : 0,
  2427. i.top -= s && i.top === t.input.offset().top + r ? e(document).scrollTop() : 0,
  2428. i.left -= Math.min(i.left, i.left + n > h && h > n ? Math.abs(i.left + n - h) : 0),
  2429. i.top -= Math.min(i.top, i.top + a > l && l > a ? Math.abs(a + r) : 0),
  2430. i
  2431. },
  2432. _findPos: function(t) {
  2433. for (var i, s = this._getInst(t), n = this._get(s, "isRTL"); t && ("hidden" === t.type || 1 !== t.nodeType || e.expr.filters.hidden(t)); )
  2434. t = t[n ? "previousSibling" : "nextSibling"];
  2435. return i = e(t).offset(),
  2436. [i.left, i.top]
  2437. },
  2438. _hideDatepicker: function(t) {
  2439. var i, s, n, a, o = this._curInst;
  2440. !o || t && o !== e.data(t, "datepicker") || this._datepickerShowing && (i = this._get(o, "showAnim"),
  2441. s = this._get(o, "duration"),
  2442. n = function() {
  2443. e.datepicker._tidyDialog(o)
  2444. }
  2445. ,
  2446. e.effects && (e.effects.effect[i] || e.effects[i]) ? o.dpDiv.hide(i, e.datepicker._get(o, "showOptions"), s, n) : o.dpDiv["slideDown" === i ? "slideUp" : "fadeIn" === i ? "fadeOut" : "hide"](i ? s : null, n),
  2447. i || n(),
  2448. this._datepickerShowing = !1,
  2449. a = this._get(o, "onClose"),
  2450. a && a.apply(o.input ? o.input[0] : null, [o.input ? o.input.val() : "", o]),
  2451. this._lastInput = null,
  2452. this._inDialog && (this._dialogInput.css({
  2453. position: "absolute",
  2454. left: "0",
  2455. top: "-100px"
  2456. }),
  2457. e.blockUI && (e.unblockUI(),
  2458. e("body").append(this.dpDiv))),
  2459. this._inDialog = !1)
  2460. },
  2461. _tidyDialog: function(e) {
  2462. e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
  2463. },
  2464. _checkExternalClick: function(t) {
  2465. if (e.datepicker._curInst) {
  2466. var i = e(t.target)
  2467. , s = e.datepicker._getInst(i[0]);
  2468. (i[0].id !== e.datepicker._mainDivId && 0 === i.parents("#" + e.datepicker._mainDivId).length && !i.hasClass(e.datepicker.markerClassName) && !i.closest("." + e.datepicker._triggerClass).length && e.datepicker._datepickerShowing && (!e.datepicker._inDialog || !e.blockUI) || i.hasClass(e.datepicker.markerClassName) && e.datepicker._curInst !== s) && e.datepicker._hideDatepicker()
  2469. }
  2470. },
  2471. _adjustDate: function(t, i, s) {
  2472. var n = e(t)
  2473. , a = this._getInst(n[0]);
  2474. this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(a, i + ("M" === s ? this._get(a, "showCurrentAtPos") : 0), s),
  2475. this._updateDatepicker(a))
  2476. },
  2477. _gotoToday: function(t) {
  2478. var i, s = e(t), n = this._getInst(s[0]);
  2479. this._get(n, "gotoCurrent") && n.currentDay ? (n.selectedDay = n.currentDay,
  2480. n.drawMonth = n.selectedMonth = n.currentMonth,
  2481. n.drawYear = n.selectedYear = n.currentYear) : (i = new Date,
  2482. n.selectedDay = i.getDate(),
  2483. n.drawMonth = n.selectedMonth = i.getMonth(),
  2484. n.drawYear = n.selectedYear = i.getFullYear()),
  2485. this._notifyChange(n),
  2486. this._adjustDate(s)
  2487. },
  2488. _selectMonthYear: function(t, i, s) {
  2489. var n = e(t)
  2490. , a = this._getInst(n[0]);
  2491. a["selected" + ("M" === s ? "Month" : "Year")] = a["draw" + ("M" === s ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10),
  2492. this._notifyChange(a),
  2493. this._adjustDate(n)
  2494. },
  2495. _selectDay: function(t, i, s, n) {
  2496. var a, o = e(t);
  2497. e(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(o[0]) || (a = this._getInst(o[0]),
  2498. a.selectedDay = a.currentDay = e("a", n).html(),
  2499. a.selectedMonth = a.currentMonth = i,
  2500. a.selectedYear = a.currentYear = s,
  2501. this._selectDate(t, this._formatDate(a, a.currentDay, a.currentMonth, a.currentYear)))
  2502. },
  2503. _clearDate: function(t) {
  2504. var i = e(t);
  2505. this._selectDate(i, "")
  2506. },
  2507. _selectDate: function(t, i) {
  2508. var s, n = e(t), a = this._getInst(n[0]);
  2509. i = null != i ? i : this._formatDate(a),
  2510. a.input && a.input.val(i),
  2511. this._updateAlternate(a),
  2512. s = this._get(a, "onSelect"),
  2513. s ? s.apply(a.input ? a.input[0] : null, [i, a]) : a.input && a.input.trigger("change"),
  2514. a.inline ? this._updateDatepicker(a) : (this._hideDatepicker(),
  2515. this._lastInput = a.input[0],
  2516. "object" != typeof a.input[0] && a.input.focus(),
  2517. this._lastInput = null)
  2518. },
  2519. _updateAlternate: function(t) {
  2520. var i, s, n, a = this._get(t, "altField");
  2521. a && (i = this._get(t, "altFormat") || this._get(t, "dateFormat"),
  2522. s = this._getDate(t),
  2523. n = this.formatDate(i, s, this._getFormatConfig(t)),
  2524. e(a).each(function() {
  2525. e(this).val(n)
  2526. }))
  2527. },
  2528. noWeekends: function(e) {
  2529. var t = e.getDay();
  2530. return [t > 0 && 6 > t, ""]
  2531. },
  2532. iso8601Week: function(e) {
  2533. var t, i = new Date(e.getTime());
  2534. return i.setDate(i.getDate() + 4 - (i.getDay() || 7)),
  2535. t = i.getTime(),
  2536. i.setMonth(0),
  2537. i.setDate(1),
  2538. Math.floor(Math.round((t - i) / 864e5) / 7) + 1
  2539. },
  2540. parseDate: function(t, i, s) {
  2541. if (null == t || null == i)
  2542. throw "Invalid arguments";
  2543. if (i = "object" == typeof i ? "" + i : i + "",
  2544. "" === i)
  2545. return null;
  2546. var n, a, o, r, h = 0, l = (s ? s.shortYearCutoff : null) || this._defaults.shortYearCutoff, u = "string" != typeof l ? l : (new Date).getFullYear() % 100 + parseInt(l, 10), d = (s ? s.dayNamesShort : null) || this._defaults.dayNamesShort, c = (s ? s.dayNames : null) || this._defaults.dayNames, p = (s ? s.monthNamesShort : null) || this._defaults.monthNamesShort, f = (s ? s.monthNames : null) || this._defaults.monthNames, m = -1, g = -1, v = -1, y = -1, b = !1, _ = function(e) {
  2547. var i = t.length > n + 1 && t.charAt(n + 1) === e;
  2548. return i && n++,
  2549. i
  2550. }, x = function(e) {
  2551. var t = _(e)
  2552. , s = "@" === e ? 14 : "!" === e ? 20 : "y" === e && t ? 4 : "o" === e ? 3 : 2
  2553. , n = "y" === e ? s : 1
  2554. , a = RegExp("^\\d{" + n + "," + s + "}")
  2555. , o = i.substring(h).match(a);
  2556. if (!o)
  2557. throw "Missing number at position " + h;
  2558. return h += o[0].length,
  2559. parseInt(o[0], 10)
  2560. }, w = function(t, s, n) {
  2561. var a = -1
  2562. , o = e.map(_(t) ? n : s, function(e, t) {
  2563. return [[t, e]]
  2564. }).sort(function(e, t) {
  2565. return -(e[1].length - t[1].length)
  2566. });
  2567. if (e.each(o, function(e, t) {
  2568. var s = t[1];
  2569. return i.substr(h, s.length).toLowerCase() === s.toLowerCase() ? (a = t[0],
  2570. h += s.length,
  2571. !1) : void 0
  2572. }),
  2573. -1 !== a)
  2574. return a + 1;
  2575. throw "Unknown name at position " + h
  2576. }, k = function() {
  2577. if (i.charAt(h) !== t.charAt(n))
  2578. throw "Unexpected literal at position " + h;
  2579. h++
  2580. };
  2581. for (n = 0; t.length > n; n++)
  2582. if (b)
  2583. "'" !== t.charAt(n) || _("'") ? k() : b = !1;
  2584. else
  2585. switch (t.charAt(n)) {
  2586. case "d":
  2587. v = x("d");
  2588. break;
  2589. case "D":
  2590. w("D", d, c);
  2591. break;
  2592. case "o":
  2593. y = x("o");
  2594. break;
  2595. case "m":
  2596. g = x("m");
  2597. break;
  2598. case "M":
  2599. g = w("M", p, f);
  2600. break;
  2601. case "y":
  2602. m = x("y");
  2603. break;
  2604. case "@":
  2605. r = new Date(x("@")),
  2606. m = r.getFullYear(),
  2607. g = r.getMonth() + 1,
  2608. v = r.getDate();
  2609. break;
  2610. case "!":
  2611. r = new Date((x("!") - this._ticksTo1970) / 1e4),
  2612. m = r.getFullYear(),
  2613. g = r.getMonth() + 1,
  2614. v = r.getDate();
  2615. break;
  2616. case "'":
  2617. _("'") ? k() : b = !0;
  2618. break;
  2619. default:
  2620. k()
  2621. }
  2622. if (i.length > h && (o = i.substr(h),
  2623. !/^\s+/.test(o)))
  2624. throw "Extra/unparsed characters found in date: " + o;
  2625. if (-1 === m ? m = (new Date).getFullYear() : 100 > m && (m += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (u >= m ? 0 : -100)),
  2626. y > -1)
  2627. for (g = 1,
  2628. v = y; ; ) {
  2629. if (a = this._getDaysInMonth(m, g - 1),
  2630. a >= v)
  2631. break;
  2632. g++,
  2633. v -= a
  2634. }
  2635. if (r = this._daylightSavingAdjust(new Date(m,g - 1,v)),
  2636. r.getFullYear() !== m || r.getMonth() + 1 !== g || r.getDate() !== v)
  2637. throw "Invalid date";
  2638. return r
  2639. },
  2640. ATOM: "yy-mm-dd",
  2641. COOKIE: "D, dd M yy",
  2642. ISO_8601: "yy-mm-dd",
  2643. RFC_822: "D, d M y",
  2644. RFC_850: "DD, dd-M-y",
  2645. RFC_1036: "D, d M y",
  2646. RFC_1123: "D, d M yy",
  2647. RFC_2822: "D, d M yy",
  2648. RSS: "D, d M y",
  2649. TICKS: "!",
  2650. TIMESTAMP: "@",
  2651. W3C: "yy-mm-dd",
  2652. _ticksTo1970: 1e7 * 60 * 60 * 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)),
  2653. formatDate: function(e, t, i) {
  2654. if (!t)
  2655. return "";
  2656. var s, n = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, a = (i ? i.dayNames : null) || this._defaults.dayNames, o = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, r = (i ? i.monthNames : null) || this._defaults.monthNames, h = function(t) {
  2657. var i = e.length > s + 1 && e.charAt(s + 1) === t;
  2658. return i && s++,
  2659. i
  2660. }, l = function(e, t, i) {
  2661. var s = "" + t;
  2662. if (h(e))
  2663. for (; i > s.length; )
  2664. s = "0" + s;
  2665. return s
  2666. }, u = function(e, t, i, s) {
  2667. return h(e) ? s[t] : i[t]
  2668. }, d = "", c = !1;
  2669. if (t)
  2670. for (s = 0; e.length > s; s++)
  2671. if (c)
  2672. "'" !== e.charAt(s) || h("'") ? d += e.charAt(s) : c = !1;
  2673. else
  2674. switch (e.charAt(s)) {
  2675. case "d":
  2676. d += l("d", t.getDate(), 2);
  2677. break;
  2678. case "D":
  2679. d += u("D", t.getDay(), n, a);
  2680. break;
  2681. case "o":
  2682. d += l("o", Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime() - new Date(t.getFullYear(),0,0).getTime()) / 864e5), 3);
  2683. break;
  2684. case "m":
  2685. d += l("m", t.getMonth() + 1, 2);
  2686. break;
  2687. case "M":
  2688. d += u("M", t.getMonth(), o, r);
  2689. break;
  2690. case "y":
  2691. d += h("y") ? t.getFullYear() : (10 > t.getYear() % 100 ? "0" : "") + t.getYear() % 100;
  2692. break;
  2693. case "@":
  2694. d += t.getTime();
  2695. break;
  2696. case "!":
  2697. d += 1e4 * t.getTime() + this._ticksTo1970;
  2698. break;
  2699. case "'":
  2700. h("'") ? d += "'" : c = !0;
  2701. break;
  2702. default:
  2703. d += e.charAt(s)
  2704. }
  2705. return d
  2706. },
  2707. _possibleChars: function(e) {
  2708. var t, i = "", s = !1, n = function(i) {
  2709. var s = e.length > t + 1 && e.charAt(t + 1) === i;
  2710. return s && t++,
  2711. s
  2712. };
  2713. for (t = 0; e.length > t; t++)
  2714. if (s)
  2715. "'" !== e.charAt(t) || n("'") ? i += e.charAt(t) : s = !1;
  2716. else
  2717. switch (e.charAt(t)) {
  2718. case "d":
  2719. case "m":
  2720. case "y":
  2721. case "@":
  2722. i += "0123456789";
  2723. break;
  2724. case "D":
  2725. case "M":
  2726. return null;
  2727. case "'":
  2728. n("'") ? i += "'" : s = !0;
  2729. break;
  2730. default:
  2731. i += e.charAt(t)
  2732. }
  2733. return i
  2734. },
  2735. _get: function(e, t) {
  2736. return void 0 !== e.settings[t] ? e.settings[t] : this._defaults[t]
  2737. },
  2738. _setDateFromField: function(e, t) {
  2739. if (e.input.val() !== e.lastVal) {
  2740. var i = this._get(e, "dateFormat")
  2741. , s = e.lastVal = e.input ? e.input.val() : null
  2742. , n = this._getDefaultDate(e)
  2743. , a = n
  2744. , o = this._getFormatConfig(e);
  2745. try {
  2746. a = this.parseDate(i, s, o) || n
  2747. } catch (r) {
  2748. s = t ? "" : s
  2749. }
  2750. e.selectedDay = a.getDate(),
  2751. e.drawMonth = e.selectedMonth = a.getMonth(),
  2752. e.drawYear = e.selectedYear = a.getFullYear(),
  2753. e.currentDay = s ? a.getDate() : 0,
  2754. e.currentMonth = s ? a.getMonth() : 0,
  2755. e.currentYear = s ? a.getFullYear() : 0,
  2756. this._adjustInstDate(e)
  2757. }
  2758. },
  2759. _getDefaultDate: function(e) {
  2760. return this._restrictMinMax(e, this._determineDate(e, this._get(e, "defaultDate"), new Date))
  2761. },
  2762. _determineDate: function(t, i, s) {
  2763. var n = function(e) {
  2764. var t = new Date;
  2765. return t.setDate(t.getDate() + e),
  2766. t
  2767. }
  2768. , a = function(i) {
  2769. try {
  2770. return e.datepicker.parseDate(e.datepicker._get(t, "dateFormat"), i, e.datepicker._getFormatConfig(t))
  2771. } catch (s) {}
  2772. for (var n = (i.toLowerCase().match(/^c/) ? e.datepicker._getDate(t) : null) || new Date, a = n.getFullYear(), o = n.getMonth(), r = n.getDate(), h = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, l = h.exec(i); l; ) {
  2773. switch (l[2] || "d") {
  2774. case "d":
  2775. case "D":
  2776. r += parseInt(l[1], 10);
  2777. break;
  2778. case "w":
  2779. case "W":
  2780. r += 7 * parseInt(l[1], 10);
  2781. break;
  2782. case "m":
  2783. case "M":
  2784. o += parseInt(l[1], 10),
  2785. r = Math.min(r, e.datepicker._getDaysInMonth(a, o));
  2786. break;
  2787. case "y":
  2788. case "Y":
  2789. a += parseInt(l[1], 10),
  2790. r = Math.min(r, e.datepicker._getDaysInMonth(a, o))
  2791. }
  2792. l = h.exec(i)
  2793. }
  2794. return new Date(a,o,r)
  2795. }
  2796. , o = null == i || "" === i ? s : "string" == typeof i ? a(i) : "number" == typeof i ? isNaN(i) ? s : n(i) : new Date(i.getTime());
  2797. return o = o && "Invalid Date" == "" + o ? s : o,
  2798. o && (o.setHours(0),
  2799. o.setMinutes(0),
  2800. o.setSeconds(0),
  2801. o.setMilliseconds(0)),
  2802. this._daylightSavingAdjust(o)
  2803. },
  2804. _daylightSavingAdjust: function(e) {
  2805. return e ? (e.setHours(e.getHours() > 12 ? e.getHours() + 2 : 0),
  2806. e) : null
  2807. },
  2808. _setDate: function(e, t, i) {
  2809. var s = !t
  2810. , n = e.selectedMonth
  2811. , a = e.selectedYear
  2812. , o = this._restrictMinMax(e, this._determineDate(e, t, new Date));
  2813. e.selectedDay = e.currentDay = o.getDate(),
  2814. e.drawMonth = e.selectedMonth = e.currentMonth = o.getMonth(),
  2815. e.drawYear = e.selectedYear = e.currentYear = o.getFullYear(),
  2816. n === e.selectedMonth && a === e.selectedYear || i || this._notifyChange(e),
  2817. this._adjustInstDate(e),
  2818. e.input && e.input.val(s ? "" : this._formatDate(e))
  2819. },
  2820. _getDate: function(e) {
  2821. var t = !e.currentYear || e.input && "" === e.input.val() ? null : this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));
  2822. return t
  2823. },
  2824. _attachHandlers: function(t) {
  2825. var i = this._get(t, "stepMonths")
  2826. , s = "#" + t.id.replace(/\\\\/g, "\\");
  2827. t.dpDiv.find("[data-handler]").map(function() {
  2828. var t = {
  2829. prev: function() {
  2830. e.datepicker._adjustDate(s, -i, "M")
  2831. },
  2832. next: function() {
  2833. e.datepicker._adjustDate(s, +i, "M")
  2834. },
  2835. hide: function() {
  2836. e.datepicker._hideDatepicker()
  2837. },
  2838. today: function() {
  2839. e.datepicker._gotoToday(s)
  2840. },
  2841. selectDay: function() {
  2842. return e.datepicker._selectDay(s, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this),
  2843. !1
  2844. },
  2845. selectMonth: function() {
  2846. return e.datepicker._selectMonthYear(s, this, "M"),
  2847. !1
  2848. },
  2849. selectYear: function() {
  2850. return e.datepicker._selectMonthYear(s, this, "Y"),
  2851. !1
  2852. }
  2853. };
  2854. e(this).bind(this.getAttribute("data-event"), t[this.getAttribute("data-handler")])
  2855. })
  2856. },
  2857. _generateHTML: function(e) {
  2858. var t, i, s, n, a, o, r, h, l, u, d, c, p, f, m, g, v, y, b, _, x, w, k, T, D, S, M, C, N, A, P, I, H, z, F, E, O, j, W, L = new Date, R = this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())), Y = this._get(e, "isRTL"), B = this._get(e, "showButtonPanel"), J = this._get(e, "hideIfNoPrevNext"), q = this._get(e, "navigationAsDateFormat"), K = this._getNumberOfMonths(e), V = this._get(e, "showCurrentAtPos"), U = this._get(e, "stepMonths"), Q = 1 !== K[0] || 1 !== K[1], G = this._daylightSavingAdjust(e.currentDay ? new Date(e.currentYear,e.currentMonth,e.currentDay) : new Date(9999,9,9)), X = this._getMinMaxDate(e, "min"), $ = this._getMinMaxDate(e, "max"), Z = e.drawMonth - V, et = e.drawYear;
  2859. if (0 > Z && (Z += 12,
  2860. et--),
  2861. $)
  2862. for (t = this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth() - K[0] * K[1] + 1,$.getDate())),
  2863. t = X && X > t ? X : t; this._daylightSavingAdjust(new Date(et,Z,1)) > t; )
  2864. Z--,
  2865. 0 > Z && (Z = 11,
  2866. et--);
  2867. for (e.drawMonth = Z,
  2868. e.drawYear = et,
  2869. i = this._get(e, "prevText"),
  2870. i = q ? this.formatDate(i, this._daylightSavingAdjust(new Date(et,Z - U,1)), this._getFormatConfig(e)) : i,
  2871. s = this._canAdjustMonth(e, -1, et, Z) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>" : J ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>",
  2872. n = this._get(e, "nextText"),
  2873. n = q ? this.formatDate(n, this._daylightSavingAdjust(new Date(et,Z + U,1)), this._getFormatConfig(e)) : n,
  2874. a = this._canAdjustMonth(e, 1, et, Z) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n + "</span></a>" : J ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n + "</span></a>",
  2875. o = this._get(e, "currentText"),
  2876. r = this._get(e, "gotoCurrent") && e.currentDay ? G : R,
  2877. o = q ? this.formatDate(o, r, this._getFormatConfig(e)) : o,
  2878. h = e.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(e, "closeText") + "</button>",
  2879. l = B ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (Y ? h : "") + (this._isInRange(e, r) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + o + "</button>" : "") + (Y ? "" : h) + "</div>" : "",
  2880. u = parseInt(this._get(e, "firstDay"), 10),
  2881. u = isNaN(u) ? 0 : u,
  2882. d = this._get(e, "showWeek"),
  2883. c = this._get(e, "dayNames"),
  2884. p = this._get(e, "dayNamesMin"),
  2885. f = this._get(e, "monthNames"),
  2886. m = this._get(e, "monthNamesShort"),
  2887. g = this._get(e, "beforeShowDay"),
  2888. v = this._get(e, "showOtherMonths"),
  2889. y = this._get(e, "selectOtherMonths"),
  2890. b = this._getDefaultDate(e),
  2891. _ = "",
  2892. w = 0; K[0] > w; w++) {
  2893. for (k = "",
  2894. this.maxRows = 4,
  2895. T = 0; K[1] > T; T++) {
  2896. if (D = this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),
  2897. S = " ui-corner-all",
  2898. M = "",
  2899. Q) {
  2900. if (M += "<div class='ui-datepicker-group",
  2901. K[1] > 1)
  2902. switch (T) {
  2903. case 0:
  2904. M += " ui-datepicker-group-first",
  2905. S = " ui-corner-" + (Y ? "right" : "left");
  2906. break;
  2907. case K[1] - 1:
  2908. M += " ui-datepicker-group-last",
  2909. S = " ui-corner-" + (Y ? "left" : "right");
  2910. break;
  2911. default:
  2912. M += " ui-datepicker-group-middle",
  2913. S = ""
  2914. }
  2915. M += "'>"
  2916. }
  2917. for (M += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + S + "'>" + (/all|left/.test(S) && 0 === w ? Y ? a : s : "") + (/all|right/.test(S) && 0 === w ? Y ? s : a : "") + this._generateMonthYearHeader(e, Z, et, X, $, w > 0 || T > 0, f, m) + "</div><table class='ui-datepicker-calendar'><thead>" + "<tr>",
  2918. C = d ? "<th class='ui-datepicker-week-col'>" + this._get(e, "weekHeader") + "</th>" : "",
  2919. x = 0; 7 > x; x++)
  2920. N = (x + u) % 7,
  2921. C += "<th scope='col'" + ((x + u + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + "<span title='" + c[N] + "'>" + p[N] + "</span></th>";
  2922. for (M += C + "</tr></thead><tbody>",
  2923. A = this._getDaysInMonth(et, Z),
  2924. et === e.selectedYear && Z === e.selectedMonth && (e.selectedDay = Math.min(e.selectedDay, A)),
  2925. P = (this._getFirstDayOfMonth(et, Z) - u + 7) % 7,
  2926. I = Math.ceil((P + A) / 7),
  2927. H = Q ? this.maxRows > I ? this.maxRows : I : I,
  2928. this.maxRows = H,
  2929. z = this._daylightSavingAdjust(new Date(et,Z,1 - P)),
  2930. F = 0; H > F; F++) {
  2931. for (M += "<tr>",
  2932. E = d ? "<td class='ui-datepicker-week-col'>" + this._get(e, "calculateWeek")(z) + "</td>" : "",
  2933. x = 0; 7 > x; x++)
  2934. O = g ? g.apply(e.input ? e.input[0] : null, [z]) : [!0, ""],
  2935. j = z.getMonth() !== Z,
  2936. W = j && !y || !O[0] || X && X > z || $ && z > $,
  2937. E += "<td class='" + ((x + u + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (j ? " ui-datepicker-other-month" : "") + (z.getTime() === D.getTime() && Z === e.selectedMonth && e._keyEvent || b.getTime() === z.getTime() && b.getTime() === D.getTime() ? " " + this._dayOverClass : "") + (W ? " " + this._unselectableClass + " ui-state-disabled" : "") + (j && !v ? "" : " " + O[1] + (z.getTime() === G.getTime() ? " " + this._currentClass : "") + (z.getTime() === R.getTime() ? " ui-datepicker-today" : "")) + "'" + (j && !v || !O[2] ? "" : " title='" + O[2].replace(/'/g, "&#39;") + "'") + (W ? "" : " data-handler='selectDay' data-event='click' data-month='" + z.getMonth() + "' data-year='" + z.getFullYear() + "'") + ">" + (j && !v ? "&#xa0;" : W ? "<span class='ui-state-default'>" + z.getDate() + "</span>" : "<a class='ui-state-default" + (z.getTime() === R.getTime() ? " ui-state-highlight" : "") + (z.getTime() === G.getTime() ? " ui-state-active" : "") + (j ? " ui-priority-secondary" : "") + "' href='#'>" + z.getDate() + "</a>") + "</td>",
  2938. z.setDate(z.getDate() + 1),
  2939. z = this._daylightSavingAdjust(z);
  2940. M += E + "</tr>"
  2941. }
  2942. Z++,
  2943. Z > 11 && (Z = 0,
  2944. et++),
  2945. M += "</tbody></table>" + (Q ? "</div>" + (K[0] > 0 && T === K[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : ""),
  2946. k += M
  2947. }
  2948. _ += k
  2949. }
  2950. return _ += l,
  2951. e._keyEvent = !1,
  2952. _
  2953. },
  2954. _generateMonthYearHeader: function(e, t, i, s, n, a, o, r) {
  2955. var h, l, u, d, c, p, f, m, g = this._get(e, "changeMonth"), v = this._get(e, "changeYear"), y = this._get(e, "showMonthAfterYear"), b = "<div class='ui-datepicker-title'>", _ = "";
  2956. if (a || !g)
  2957. _ += "<span class='ui-datepicker-month'>" + o[t] + "</span>";
  2958. else {
  2959. for (h = s && s.getFullYear() === i,
  2960. l = n && n.getFullYear() === i,
  2961. _ += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",
  2962. u = 0; 12 > u; u++)
  2963. (!h || u >= s.getMonth()) && (!l || n.getMonth() >= u) && (_ += "<option value='" + u + "'" + (u === t ? " selected='selected'" : "") + ">" + r[u] + "</option>");
  2964. _ += "</select>"
  2965. }
  2966. if (y || (b += _ + (!a && g && v ? "" : "&#xa0;")),
  2967. !e.yearshtml)
  2968. if (e.yearshtml = "",
  2969. a || !v)
  2970. b += "<span class='ui-datepicker-year'>" + i + "</span>";
  2971. else {
  2972. for (d = this._get(e, "yearRange").split(":"),
  2973. c = (new Date).getFullYear(),
  2974. p = function(e) {
  2975. var t = e.match(/c[+\-].*/) ? i + parseInt(e.substring(1), 10) : e.match(/[+\-].*/) ? c + parseInt(e, 10) : parseInt(e, 10);
  2976. return isNaN(t) ? c : t
  2977. }
  2978. ,
  2979. f = p(d[0]),
  2980. m = Math.max(f, p(d[1] || "")),
  2981. f = s ? Math.max(f, s.getFullYear()) : f,
  2982. m = n ? Math.min(m, n.getFullYear()) : m,
  2983. e.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; m >= f; f++)
  2984. e.yearshtml += "<option value='" + f + "'" + (f === i ? " selected='selected'" : "") + ">" + f + "</option>";
  2985. e.yearshtml += "</select>",
  2986. b += e.yearshtml,
  2987. e.yearshtml = null
  2988. }
  2989. return b += this._get(e, "yearSuffix"),
  2990. y && (b += (!a && g && v ? "" : "&#xa0;") + _),
  2991. b += "</div>"
  2992. },
  2993. _adjustInstDate: function(e, t, i) {
  2994. var s = e.drawYear + ("Y" === i ? t : 0)
  2995. , n = e.drawMonth + ("M" === i ? t : 0)
  2996. , a = Math.min(e.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? t : 0)
  2997. , o = this._restrictMinMax(e, this._daylightSavingAdjust(new Date(s,n,a)));
  2998. e.selectedDay = o.getDate(),
  2999. e.drawMonth = e.selectedMonth = o.getMonth(),
  3000. e.drawYear = e.selectedYear = o.getFullYear(),
  3001. ("M" === i || "Y" === i) && this._notifyChange(e)
  3002. },
  3003. _restrictMinMax: function(e, t) {
  3004. var i = this._getMinMaxDate(e, "min")
  3005. , s = this._getMinMaxDate(e, "max")
  3006. , n = i && i > t ? i : t;
  3007. return s && n > s ? s : n
  3008. },
  3009. _notifyChange: function(e) {
  3010. var t = this._get(e, "onChangeMonthYear");
  3011. t && t.apply(e.input ? e.input[0] : null, [e.selectedYear, e.selectedMonth + 1, e])
  3012. },
  3013. _getNumberOfMonths: function(e) {
  3014. var t = this._get(e, "numberOfMonths");
  3015. return null == t ? [1, 1] : "number" == typeof t ? [1, t] : t
  3016. },
  3017. _getMinMaxDate: function(e, t) {
  3018. return this._determineDate(e, this._get(e, t + "Date"), null)
  3019. },
  3020. _getDaysInMonth: function(e, t) {
  3021. return 32 - this._daylightSavingAdjust(new Date(e,t,32)).getDate()
  3022. },
  3023. _getFirstDayOfMonth: function(e, t) {
  3024. return new Date(e,t,1).getDay()
  3025. },
  3026. _canAdjustMonth: function(e, t, i, s) {
  3027. var n = this._getNumberOfMonths(e)
  3028. , a = this._daylightSavingAdjust(new Date(i,s + (0 > t ? t : n[0] * n[1]),1));
  3029. return 0 > t && a.setDate(this._getDaysInMonth(a.getFullYear(), a.getMonth())),
  3030. this._isInRange(e, a)
  3031. },
  3032. _isInRange: function(e, t) {
  3033. var i, s, n = this._getMinMaxDate(e, "min"), a = this._getMinMaxDate(e, "max"), o = null, r = null, h = this._get(e, "yearRange");
  3034. return h && (i = h.split(":"),
  3035. s = (new Date).getFullYear(),
  3036. o = parseInt(i[0], 10),
  3037. r = parseInt(i[1], 10),
  3038. i[0].match(/[+\-].*/) && (o += s),
  3039. i[1].match(/[+\-].*/) && (r += s)),
  3040. (!n || t.getTime() >= n.getTime()) && (!a || t.getTime() <= a.getTime()) && (!o || t.getFullYear() >= o) && (!r || r >= t.getFullYear())
  3041. },
  3042. _getFormatConfig: function(e) {
  3043. var t = this._get(e, "shortYearCutoff");
  3044. return t = "string" != typeof t ? t : (new Date).getFullYear() % 100 + parseInt(t, 10),
  3045. {
  3046. shortYearCutoff: t,
  3047. dayNamesShort: this._get(e, "dayNamesShort"),
  3048. dayNames: this._get(e, "dayNames"),
  3049. monthNamesShort: this._get(e, "monthNamesShort"),
  3050. monthNames: this._get(e, "monthNames")
  3051. }
  3052. },
  3053. _formatDate: function(e, t, i, s) {
  3054. t || (e.currentDay = e.selectedDay,
  3055. e.currentMonth = e.selectedMonth,
  3056. e.currentYear = e.selectedYear);
  3057. var n = t ? "object" == typeof t ? t : this._daylightSavingAdjust(new Date(s,i,t)) : this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));
  3058. return this.formatDate(this._get(e, "dateFormat"), n, this._getFormatConfig(e))
  3059. }
  3060. }),
  3061. e.fn.datepicker = function(t) {
  3062. if (!this.length)
  3063. return this;
  3064. e.datepicker.initialized || (e(document).mousedown(e.datepicker._checkExternalClick),
  3065. e.datepicker.initialized = !0),
  3066. 0 === e("#" + e.datepicker._mainDivId).length && e("body").append(e.datepicker.dpDiv);
  3067. var i = Array.prototype.slice.call(arguments, 1);
  3068. return "string" != typeof t || "isDisabled" !== t && "getDate" !== t && "widget" !== t ? "option" === t && 2 === arguments.length && "string" == typeof arguments[1] ? e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this[0]].concat(i)) : this.each(function() {
  3069. "string" == typeof t ? e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this].concat(i)) : e.datepicker._attachDatepicker(this, t)
  3070. }) : e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this[0]].concat(i))
  3071. }
  3072. ,
  3073. e.datepicker = new n,
  3074. e.datepicker.initialized = !1,
  3075. e.datepicker.uuid = (new Date).getTime(),
  3076. e.datepicker.version = "1.11.4",
  3077. e.datepicker,
  3078. e.widget("ui.draggable", e.ui.mouse, {
  3079. version: "1.11.4",
  3080. widgetEventPrefix: "drag",
  3081. options: {
  3082. addClasses: !0,
  3083. appendTo: "parent",
  3084. axis: !1,
  3085. connectToSortable: !1,
  3086. containment: !1,
  3087. cursor: "auto",
  3088. cursorAt: !1,
  3089. grid: !1,
  3090. handle: !1,
  3091. helper: "original",
  3092. iframeFix: !1,
  3093. opacity: !1,
  3094. refreshPositions: !1,
  3095. revert: !1,
  3096. revertDuration: 500,
  3097. scope: "default",
  3098. scroll: !0,
  3099. scrollSensitivity: 20,
  3100. scrollSpeed: 20,
  3101. snap: !1,
  3102. snapMode: "both",
  3103. snapTolerance: 20,
  3104. stack: !1,
  3105. zIndex: !1,
  3106. drag: null,
  3107. start: null,
  3108. stop: null
  3109. },
  3110. _create: function() {
  3111. "original" === this.options.helper && this._setPositionRelative(),
  3112. this.options.addClasses && this.element.addClass("ui-draggable"),
  3113. this.options.disabled && this.element.addClass("ui-draggable-disabled"),
  3114. this._setHandleClassName(),
  3115. this._mouseInit()
  3116. },
  3117. _setOption: function(e, t) {
  3118. this._super(e, t),
  3119. "handle" === e && (this._removeHandleClassName(),
  3120. this._setHandleClassName())
  3121. },
  3122. _destroy: function() {
  3123. return (this.helper || this.element).is(".ui-draggable-dragging") ? (this.destroyOnClear = !0,
  3124. void 0) : (this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),
  3125. this._removeHandleClassName(),
  3126. this._mouseDestroy(),
  3127. void 0)
  3128. },
  3129. _mouseCapture: function(t) {
  3130. var i = this.options;
  3131. return this._blurActiveElement(t),
  3132. this.helper || i.disabled || e(t.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(t),
  3133. this.handle ? (this._blockFrames(i.iframeFix === !0 ? "iframe" : i.iframeFix),
  3134. !0) : !1)
  3135. },
  3136. _blockFrames: function(t) {
  3137. this.iframeBlocks = this.document.find(t).map(function() {
  3138. var t = e(this);
  3139. return e("<div>").css("position", "absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]
  3140. })
  3141. },
  3142. _unblockFrames: function() {
  3143. this.iframeBlocks && (this.iframeBlocks.remove(),
  3144. delete this.iframeBlocks)
  3145. },
  3146. _blurActiveElement: function(t) {
  3147. var i = this.document[0];
  3148. if (this.handleElement.is(t.target))
  3149. try {
  3150. i.activeElement && "body" !== i.activeElement.nodeName.toLowerCase() && e(i.activeElement).blur()
  3151. } catch (s) {}
  3152. },
  3153. _mouseStart: function(t) {
  3154. var i = this.options;
  3155. return this.helper = this._createHelper(t),
  3156. this.helper.addClass("ui-draggable-dragging"),
  3157. this._cacheHelperProportions(),
  3158. e.ui.ddmanager && (e.ui.ddmanager.current = this),
  3159. this._cacheMargins(),
  3160. this.cssPosition = this.helper.css("position"),
  3161. this.scrollParent = this.helper.scrollParent(!0),
  3162. this.offsetParent = this.helper.offsetParent(),
  3163. this.hasFixedAncestor = this.helper.parents().filter(function() {
  3164. return "fixed" === e(this).css("position")
  3165. }).length > 0,
  3166. this.positionAbs = this.element.offset(),
  3167. this._refreshOffsets(t),
  3168. this.originalPosition = this.position = this._generatePosition(t, !1),
  3169. this.originalPageX = t.pageX,
  3170. this.originalPageY = t.pageY,
  3171. i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt),
  3172. this._setContainment(),
  3173. this._trigger("start", t) === !1 ? (this._clear(),
  3174. !1) : (this._cacheHelperProportions(),
  3175. e.ui.ddmanager && !i.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t),
  3176. this._normalizeRightBottom(),
  3177. this._mouseDrag(t, !0),
  3178. e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t),
  3179. !0)
  3180. },
  3181. _refreshOffsets: function(e) {
  3182. this.offset = {
  3183. top: this.positionAbs.top - this.margins.top,
  3184. left: this.positionAbs.left - this.margins.left,
  3185. scroll: !1,
  3186. parent: this._getParentOffset(),
  3187. relative: this._getRelativeOffset()
  3188. },
  3189. this.offset.click = {
  3190. left: e.pageX - this.offset.left,
  3191. top: e.pageY - this.offset.top
  3192. }
  3193. },
  3194. _mouseDrag: function(t, i) {
  3195. if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()),
  3196. this.position = this._generatePosition(t, !0),
  3197. this.positionAbs = this._convertPositionTo("absolute"),
  3198. !i) {
  3199. var s = this._uiHash();
  3200. if (this._trigger("drag", t, s) === !1)
  3201. return this._mouseUp({}),
  3202. !1;
  3203. this.position = s.position
  3204. }
  3205. return this.helper[0].style.left = this.position.left + "px",
  3206. this.helper[0].style.top = this.position.top + "px",
  3207. e.ui.ddmanager && e.ui.ddmanager.drag(this, t),
  3208. !1
  3209. },
  3210. _mouseStop: function(t) {
  3211. var i = this
  3212. , s = !1;
  3213. return e.ui.ddmanager && !this.options.dropBehaviour && (s = e.ui.ddmanager.drop(this, t)),
  3214. this.dropped && (s = this.dropped,
  3215. this.dropped = !1),
  3216. "invalid" === this.options.revert && !s || "valid" === this.options.revert && s || this.options.revert === !0 || e.isFunction(this.options.revert) && this.options.revert.call(this.element, s) ? e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
  3217. i._trigger("stop", t) !== !1 && i._clear()
  3218. }) : this._trigger("stop", t) !== !1 && this._clear(),
  3219. !1
  3220. },
  3221. _mouseUp: function(t) {
  3222. return this._unblockFrames(),
  3223. e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t),
  3224. this.handleElement.is(t.target) && this.element.focus(),
  3225. e.ui.mouse.prototype._mouseUp.call(this, t)
  3226. },
  3227. cancel: function() {
  3228. return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(),
  3229. this
  3230. },
  3231. _getHandle: function(t) {
  3232. return this.options.handle ? !!e(t.target).closest(this.element.find(this.options.handle)).length : !0
  3233. },
  3234. _setHandleClassName: function() {
  3235. this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element,
  3236. this.handleElement.addClass("ui-draggable-handle")
  3237. },
  3238. _removeHandleClassName: function() {
  3239. this.handleElement.removeClass("ui-draggable-handle")
  3240. },
  3241. _createHelper: function(t) {
  3242. var i = this.options
  3243. , s = e.isFunction(i.helper)
  3244. , n = s ? e(i.helper.apply(this.element[0], [t])) : "clone" === i.helper ? this.element.clone().removeAttr("id") : this.element;
  3245. return n.parents("body").length || n.appendTo("parent" === i.appendTo ? this.element[0].parentNode : i.appendTo),
  3246. s && n[0] === this.element[0] && this._setPositionRelative(),
  3247. n[0] === this.element[0] || /(fixed|absolute)/.test(n.css("position")) || n.css("position", "absolute"),
  3248. n
  3249. },
  3250. _setPositionRelative: function() {
  3251. /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative")
  3252. },
  3253. _adjustOffsetFromHelper: function(t) {
  3254. "string" == typeof t && (t = t.split(" ")),
  3255. e.isArray(t) && (t = {
  3256. left: +t[0],
  3257. top: +t[1] || 0
  3258. }),
  3259. "left"in t && (this.offset.click.left = t.left + this.margins.left),
  3260. "right"in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left),
  3261. "top"in t && (this.offset.click.top = t.top + this.margins.top),
  3262. "bottom"in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top)
  3263. },
  3264. _isRootNode: function(e) {
  3265. return /(html|body)/i.test(e.tagName) || e === this.document[0]
  3266. },
  3267. _getParentOffset: function() {
  3268. var t = this.offsetParent.offset()
  3269. , i = this.document[0];
  3270. return "absolute" === this.cssPosition && this.scrollParent[0] !== i && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(),
  3271. t.top += this.scrollParent.scrollTop()),
  3272. this._isRootNode(this.offsetParent[0]) && (t = {
  3273. top: 0,
  3274. left: 0
  3275. }),
  3276. {
  3277. top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
  3278. left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
  3279. }
  3280. },
  3281. _getRelativeOffset: function() {
  3282. if ("relative" !== this.cssPosition)
  3283. return {
  3284. top: 0,
  3285. left: 0
  3286. };
  3287. var e = this.element.position()
  3288. , t = this._isRootNode(this.scrollParent[0]);
  3289. return {
  3290. top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + (t ? 0 : this.scrollParent.scrollTop()),
  3291. left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + (t ? 0 : this.scrollParent.scrollLeft())
  3292. }
  3293. },
  3294. _cacheMargins: function() {
  3295. this.margins = {
  3296. left: parseInt(this.element.css("marginLeft"), 10) || 0,
  3297. top: parseInt(this.element.css("marginTop"), 10) || 0,
  3298. right: parseInt(this.element.css("marginRight"), 10) || 0,
  3299. bottom: parseInt(this.element.css("marginBottom"), 10) || 0
  3300. }
  3301. },
  3302. _cacheHelperProportions: function() {
  3303. this.helperProportions = {
  3304. width: this.helper.outerWidth(),
  3305. height: this.helper.outerHeight()
  3306. }
  3307. },
  3308. _setContainment: function() {
  3309. var t, i, s, n = this.options, a = this.document[0];
  3310. return this.relativeContainer = null,
  3311. n.containment ? "window" === n.containment ? (this.containment = [e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, e(window).scrollLeft() + e(window).width() - this.helperProportions.width - this.margins.left, e(window).scrollTop() + (e(window).height() || a.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top],
  3312. void 0) : "document" === n.containment ? (this.containment = [0, 0, e(a).width() - this.helperProportions.width - this.margins.left, (e(a).height() || a.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top],
  3313. void 0) : n.containment.constructor === Array ? (this.containment = n.containment,
  3314. void 0) : ("parent" === n.containment && (n.containment = this.helper[0].parentNode),
  3315. i = e(n.containment),
  3316. s = i[0],
  3317. s && (t = /(scroll|auto)/.test(i.css("overflow")),
  3318. this.containment = [(parseInt(i.css("borderLeftWidth"), 10) || 0) + (parseInt(i.css("paddingLeft"), 10) || 0), (parseInt(i.css("borderTopWidth"), 10) || 0) + (parseInt(i.css("paddingTop"), 10) || 0), (t ? Math.max(s.scrollWidth, s.offsetWidth) : s.offsetWidth) - (parseInt(i.css("borderRightWidth"), 10) || 0) - (parseInt(i.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (t ? Math.max(s.scrollHeight, s.offsetHeight) : s.offsetHeight) - (parseInt(i.css("borderBottomWidth"), 10) || 0) - (parseInt(i.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom],
  3319. this.relativeContainer = i),
  3320. void 0) : (this.containment = null,
  3321. void 0)
  3322. },
  3323. _convertPositionTo: function(e, t) {
  3324. t || (t = this.position);
  3325. var i = "absolute" === e ? 1 : -1
  3326. , s = this._isRootNode(this.scrollParent[0]);
  3327. return {
  3328. top: t.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition ? -this.offset.scroll.top : s ? 0 : this.offset.scroll.top) * i,
  3329. left: t.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition ? -this.offset.scroll.left : s ? 0 : this.offset.scroll.left) * i
  3330. }
  3331. },
  3332. _generatePosition: function(e, t) {
  3333. var i, s, n, a, o = this.options, r = this._isRootNode(this.scrollParent[0]), h = e.pageX, l = e.pageY;
  3334. return r && this.offset.scroll || (this.offset.scroll = {
  3335. top: this.scrollParent.scrollTop(),
  3336. left: this.scrollParent.scrollLeft()
  3337. }),
  3338. t && (this.containment && (this.relativeContainer ? (s = this.relativeContainer.offset(),
  3339. i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment,
  3340. e.pageX - this.offset.click.left < i[0] && (h = i[0] + this.offset.click.left),
  3341. e.pageY - this.offset.click.top < i[1] && (l = i[1] + this.offset.click.top),
  3342. e.pageX - this.offset.click.left > i[2] && (h = i[2] + this.offset.click.left),
  3343. e.pageY - this.offset.click.top > i[3] && (l = i[3] + this.offset.click.top)),
  3344. o.grid && (n = o.grid[1] ? this.originalPageY + Math.round((l - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY,
  3345. l = i ? n - this.offset.click.top >= i[1] || n - this.offset.click.top > i[3] ? n : n - this.offset.click.top >= i[1] ? n - o.grid[1] : n + o.grid[1] : n,
  3346. a = o.grid[0] ? this.originalPageX + Math.round((h - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX,
  3347. h = i ? a - this.offset.click.left >= i[0] || a - this.offset.click.left > i[2] ? a : a - this.offset.click.left >= i[0] ? a - o.grid[0] : a + o.grid[0] : a),
  3348. "y" === o.axis && (h = this.originalPageX),
  3349. "x" === o.axis && (l = this.originalPageY)),
  3350. {
  3351. top: l - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.offset.scroll.top : r ? 0 : this.offset.scroll.top),
  3352. left: h - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.offset.scroll.left : r ? 0 : this.offset.scroll.left)
  3353. }
  3354. },
  3355. _clear: function() {
  3356. this.helper.removeClass("ui-draggable-dragging"),
  3357. this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(),
  3358. this.helper = null,
  3359. this.cancelHelperRemoval = !1,
  3360. this.destroyOnClear && this.destroy()
  3361. },
  3362. _normalizeRightBottom: function() {
  3363. "y" !== this.options.axis && "auto" !== this.helper.css("right") && (this.helper.width(this.helper.width()),
  3364. this.helper.css("right", "auto")),
  3365. "x" !== this.options.axis && "auto" !== this.helper.css("bottom") && (this.helper.height(this.helper.height()),
  3366. this.helper.css("bottom", "auto"))
  3367. },
  3368. _trigger: function(t, i, s) {
  3369. return s = s || this._uiHash(),
  3370. e.ui.plugin.call(this, t, [i, s, this], !0),
  3371. /^(drag|start|stop)/.test(t) && (this.positionAbs = this._convertPositionTo("absolute"),
  3372. s.offset = this.positionAbs),
  3373. e.Widget.prototype._trigger.call(this, t, i, s)
  3374. },
  3375. plugins: {},
  3376. _uiHash: function() {
  3377. return {
  3378. helper: this.helper,
  3379. position: this.position,
  3380. originalPosition: this.originalPosition,
  3381. offset: this.positionAbs
  3382. }
  3383. }
  3384. }),
  3385. e.ui.plugin.add("draggable", "connectToSortable", {
  3386. start: function(t, i, s) {
  3387. var n = e.extend({}, i, {
  3388. item: s.element
  3389. });
  3390. s.sortables = [],
  3391. e(s.options.connectToSortable).each(function() {
  3392. var i = e(this).sortable("instance");
  3393. i && !i.options.disabled && (s.sortables.push(i),
  3394. i.refreshPositions(),
  3395. i._trigger("activate", t, n))
  3396. })
  3397. },
  3398. stop: function(t, i, s) {
  3399. var n = e.extend({}, i, {
  3400. item: s.element
  3401. });
  3402. s.cancelHelperRemoval = !1,
  3403. e.each(s.sortables, function() {
  3404. var e = this;
  3405. e.isOver ? (e.isOver = 0,
  3406. s.cancelHelperRemoval = !0,
  3407. e.cancelHelperRemoval = !1,
  3408. e._storedCSS = {
  3409. position: e.placeholder.css("position"),
  3410. top: e.placeholder.css("top"),
  3411. left: e.placeholder.css("left")
  3412. },
  3413. e._mouseStop(t),
  3414. e.options.helper = e.options._helper) : (e.cancelHelperRemoval = !0,
  3415. e._trigger("deactivate", t, n))
  3416. })
  3417. },
  3418. drag: function(t, i, s) {
  3419. e.each(s.sortables, function() {
  3420. var n = !1
  3421. , a = this;
  3422. a.positionAbs = s.positionAbs,
  3423. a.helperProportions = s.helperProportions,
  3424. a.offset.click = s.offset.click,
  3425. a._intersectsWith(a.containerCache) && (n = !0,
  3426. e.each(s.sortables, function() {
  3427. return this.positionAbs = s.positionAbs,
  3428. this.helperProportions = s.helperProportions,
  3429. this.offset.click = s.offset.click,
  3430. this !== a && this._intersectsWith(this.containerCache) && e.contains(a.element[0], this.element[0]) && (n = !1),
  3431. n
  3432. })),
  3433. n ? (a.isOver || (a.isOver = 1,
  3434. s._parent = i.helper.parent(),
  3435. a.currentItem = i.helper.appendTo(a.element).data("ui-sortable-item", !0),
  3436. a.options._helper = a.options.helper,
  3437. a.options.helper = function() {
  3438. return i.helper[0]
  3439. }
  3440. ,
  3441. t.target = a.currentItem[0],
  3442. a._mouseCapture(t, !0),
  3443. a._mouseStart(t, !0, !0),
  3444. a.offset.click.top = s.offset.click.top,
  3445. a.offset.click.left = s.offset.click.left,
  3446. a.offset.parent.left -= s.offset.parent.left - a.offset.parent.left,
  3447. a.offset.parent.top -= s.offset.parent.top - a.offset.parent.top,
  3448. s._trigger("toSortable", t),
  3449. s.dropped = a.element,
  3450. e.each(s.sortables, function() {
  3451. this.refreshPositions()
  3452. }),
  3453. s.currentItem = s.element,
  3454. a.fromOutside = s),
  3455. a.currentItem && (a._mouseDrag(t),
  3456. i.position = a.position)) : a.isOver && (a.isOver = 0,
  3457. a.cancelHelperRemoval = !0,
  3458. a.options._revert = a.options.revert,
  3459. a.options.revert = !1,
  3460. a._trigger("out", t, a._uiHash(a)),
  3461. a._mouseStop(t, !0),
  3462. a.options.revert = a.options._revert,
  3463. a.options.helper = a.options._helper,
  3464. a.placeholder && a.placeholder.remove(),
  3465. i.helper.appendTo(s._parent),
  3466. s._refreshOffsets(t),
  3467. i.position = s._generatePosition(t, !0),
  3468. s._trigger("fromSortable", t),
  3469. s.dropped = !1,
  3470. e.each(s.sortables, function() {
  3471. this.refreshPositions()
  3472. }))
  3473. })
  3474. }
  3475. }),
  3476. e.ui.plugin.add("draggable", "cursor", {
  3477. start: function(t, i, s) {
  3478. var n = e("body")
  3479. , a = s.options;
  3480. n.css("cursor") && (a._cursor = n.css("cursor")),
  3481. n.css("cursor", a.cursor)
  3482. },
  3483. stop: function(t, i, s) {
  3484. var n = s.options;
  3485. n._cursor && e("body").css("cursor", n._cursor)
  3486. }
  3487. }),
  3488. e.ui.plugin.add("draggable", "opacity", {
  3489. start: function(t, i, s) {
  3490. var n = e(i.helper)
  3491. , a = s.options;
  3492. n.css("opacity") && (a._opacity = n.css("opacity")),
  3493. n.css("opacity", a.opacity)
  3494. },
  3495. stop: function(t, i, s) {
  3496. var n = s.options;
  3497. n._opacity && e(i.helper).css("opacity", n._opacity)
  3498. }
  3499. }),
  3500. e.ui.plugin.add("draggable", "scroll", {
  3501. start: function(e, t, i) {
  3502. i.scrollParentNotHidden || (i.scrollParentNotHidden = i.helper.scrollParent(!1)),
  3503. i.scrollParentNotHidden[0] !== i.document[0] && "HTML" !== i.scrollParentNotHidden[0].tagName && (i.overflowOffset = i.scrollParentNotHidden.offset())
  3504. },
  3505. drag: function(t, i, s) {
  3506. var n = s.options
  3507. , a = !1
  3508. , o = s.scrollParentNotHidden[0]
  3509. , r = s.document[0];
  3510. o !== r && "HTML" !== o.tagName ? (n.axis && "x" === n.axis || (s.overflowOffset.top + o.offsetHeight - t.pageY < n.scrollSensitivity ? o.scrollTop = a = o.scrollTop + n.scrollSpeed : t.pageY - s.overflowOffset.top < n.scrollSensitivity && (o.scrollTop = a = o.scrollTop - n.scrollSpeed)),
  3511. n.axis && "y" === n.axis || (s.overflowOffset.left + o.offsetWidth - t.pageX < n.scrollSensitivity ? o.scrollLeft = a = o.scrollLeft + n.scrollSpeed : t.pageX - s.overflowOffset.left < n.scrollSensitivity && (o.scrollLeft = a = o.scrollLeft - n.scrollSpeed))) : (n.axis && "x" === n.axis || (t.pageY - e(r).scrollTop() < n.scrollSensitivity ? a = e(r).scrollTop(e(r).scrollTop() - n.scrollSpeed) : e(window).height() - (t.pageY - e(r).scrollTop()) < n.scrollSensitivity && (a = e(r).scrollTop(e(r).scrollTop() + n.scrollSpeed))),
  3512. n.axis && "y" === n.axis || (t.pageX - e(r).scrollLeft() < n.scrollSensitivity ? a = e(r).scrollLeft(e(r).scrollLeft() - n.scrollSpeed) : e(window).width() - (t.pageX - e(r).scrollLeft()) < n.scrollSensitivity && (a = e(r).scrollLeft(e(r).scrollLeft() + n.scrollSpeed)))),
  3513. a !== !1 && e.ui.ddmanager && !n.dropBehaviour && e.ui.ddmanager.prepareOffsets(s, t)
  3514. }
  3515. }),
  3516. e.ui.plugin.add("draggable", "snap", {
  3517. start: function(t, i, s) {
  3518. var n = s.options;
  3519. s.snapElements = [],
  3520. e(n.snap.constructor !== String ? n.snap.items || ":data(ui-draggable)" : n.snap).each(function() {
  3521. var t = e(this)
  3522. , i = t.offset();
  3523. this !== s.element[0] && s.snapElements.push({
  3524. item: this,
  3525. width: t.outerWidth(),
  3526. height: t.outerHeight(),
  3527. top: i.top,
  3528. left: i.left
  3529. })
  3530. })
  3531. },
  3532. drag: function(t, i, s) {
  3533. var n, a, o, r, h, l, u, d, c, p, f = s.options, m = f.snapTolerance, g = i.offset.left, v = g + s.helperProportions.width, y = i.offset.top, b = y + s.helperProportions.height;
  3534. for (c = s.snapElements.length - 1; c >= 0; c--)
  3535. h = s.snapElements[c].left - s.margins.left,
  3536. l = h + s.snapElements[c].width,
  3537. u = s.snapElements[c].top - s.margins.top,
  3538. d = u + s.snapElements[c].height,
  3539. h - m > v || g > l + m || u - m > b || y > d + m || !e.contains(s.snapElements[c].item.ownerDocument, s.snapElements[c].item) ? (s.snapElements[c].snapping && s.options.snap.release && s.options.snap.release.call(s.element, t, e.extend(s._uiHash(), {
  3540. snapItem: s.snapElements[c].item
  3541. })),
  3542. s.snapElements[c].snapping = !1) : ("inner" !== f.snapMode && (n = m >= Math.abs(u - b),
  3543. a = m >= Math.abs(d - y),
  3544. o = m >= Math.abs(h - v),
  3545. r = m >= Math.abs(l - g),
  3546. n && (i.position.top = s._convertPositionTo("relative", {
  3547. top: u - s.helperProportions.height,
  3548. left: 0
  3549. }).top),
  3550. a && (i.position.top = s._convertPositionTo("relative", {
  3551. top: d,
  3552. left: 0
  3553. }).top),
  3554. o && (i.position.left = s._convertPositionTo("relative", {
  3555. top: 0,
  3556. left: h - s.helperProportions.width
  3557. }).left),
  3558. r && (i.position.left = s._convertPositionTo("relative", {
  3559. top: 0,
  3560. left: l
  3561. }).left)),
  3562. p = n || a || o || r,
  3563. "outer" !== f.snapMode && (n = m >= Math.abs(u - y),
  3564. a = m >= Math.abs(d - b),
  3565. o = m >= Math.abs(h - g),
  3566. r = m >= Math.abs(l - v),
  3567. n && (i.position.top = s._convertPositionTo("relative", {
  3568. top: u,
  3569. left: 0
  3570. }).top),
  3571. a && (i.position.top = s._convertPositionTo("relative", {
  3572. top: d - s.helperProportions.height,
  3573. left: 0
  3574. }).top),
  3575. o && (i.position.left = s._convertPositionTo("relative", {
  3576. top: 0,
  3577. left: h
  3578. }).left),
  3579. r && (i.position.left = s._convertPositionTo("relative", {
  3580. top: 0,
  3581. left: l - s.helperProportions.width
  3582. }).left)),
  3583. !s.snapElements[c].snapping && (n || a || o || r || p) && s.options.snap.snap && s.options.snap.snap.call(s.element, t, e.extend(s._uiHash(), {
  3584. snapItem: s.snapElements[c].item
  3585. })),
  3586. s.snapElements[c].snapping = n || a || o || r || p)
  3587. }
  3588. }),
  3589. e.ui.plugin.add("draggable", "stack", {
  3590. start: function(t, i, s) {
  3591. var n, a = s.options, o = e.makeArray(e(a.stack)).sort(function(t, i) {
  3592. return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(i).css("zIndex"), 10) || 0)
  3593. });
  3594. o.length && (n = parseInt(e(o[0]).css("zIndex"), 10) || 0,
  3595. e(o).each(function(t) {
  3596. e(this).css("zIndex", n + t)
  3597. }),
  3598. this.css("zIndex", n + o.length))
  3599. }
  3600. }),
  3601. e.ui.plugin.add("draggable", "zIndex", {
  3602. start: function(t, i, s) {
  3603. var n = e(i.helper)
  3604. , a = s.options;
  3605. n.css("zIndex") && (a._zIndex = n.css("zIndex")),
  3606. n.css("zIndex", a.zIndex)
  3607. },
  3608. stop: function(t, i, s) {
  3609. var n = s.options;
  3610. n._zIndex && e(i.helper).css("zIndex", n._zIndex)
  3611. }
  3612. }),
  3613. e.ui.draggable,
  3614. e.widget("ui.resizable", e.ui.mouse, {
  3615. version: "1.11.4",
  3616. widgetEventPrefix: "resize",
  3617. options: {
  3618. alsoResize: !1,
  3619. animate: !1,
  3620. animateDuration: "slow",
  3621. animateEasing: "swing",
  3622. aspectRatio: !1,
  3623. autoHide: !1,
  3624. containment: !1,
  3625. ghost: !1,
  3626. grid: !1,
  3627. handles: "e,s,se",
  3628. helper: !1,
  3629. maxHeight: null,
  3630. maxWidth: null,
  3631. minHeight: 10,
  3632. minWidth: 10,
  3633. zIndex: 90,
  3634. resize: null,
  3635. start: null,
  3636. stop: null
  3637. },
  3638. _num: function(e) {
  3639. return parseInt(e, 10) || 0
  3640. },
  3641. _isNumber: function(e) {
  3642. return !isNaN(parseInt(e, 10))
  3643. },
  3644. _hasScroll: function(t, i) {
  3645. if ("hidden" === e(t).css("overflow"))
  3646. return !1;
  3647. var s = i && "left" === i ? "scrollLeft" : "scrollTop"
  3648. , n = !1;
  3649. return t[s] > 0 ? !0 : (t[s] = 1,
  3650. n = t[s] > 0,
  3651. t[s] = 0,
  3652. n)
  3653. },
  3654. _create: function() {
  3655. var t, i, s, n, a, o = this, r = this.options;
  3656. if (this.element.addClass("ui-resizable"),
  3657. e.extend(this, {
  3658. _aspectRatio: !!r.aspectRatio,
  3659. aspectRatio: r.aspectRatio,
  3660. originalElement: this.element,
  3661. _proportionallyResizeElements: [],
  3662. _helper: r.helper || r.ghost || r.animate ? r.helper || "ui-resizable-helper" : null
  3663. }),
  3664. this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
  3665. position: this.element.css("position"),
  3666. width: this.element.outerWidth(),
  3667. height: this.element.outerHeight(),
  3668. top: this.element.css("top"),
  3669. left: this.element.css("left")
  3670. })),
  3671. this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")),
  3672. this.elementIsWrapper = !0,
  3673. this.element.css({
  3674. marginLeft: this.originalElement.css("marginLeft"),
  3675. marginTop: this.originalElement.css("marginTop"),
  3676. marginRight: this.originalElement.css("marginRight"),
  3677. marginBottom: this.originalElement.css("marginBottom")
  3678. }),
  3679. this.originalElement.css({
  3680. marginLeft: 0,
  3681. marginTop: 0,
  3682. marginRight: 0,
  3683. marginBottom: 0
  3684. }),
  3685. this.originalResizeStyle = this.originalElement.css("resize"),
  3686. this.originalElement.css("resize", "none"),
  3687. this._proportionallyResizeElements.push(this.originalElement.css({
  3688. position: "static",
  3689. zoom: 1,
  3690. display: "block"
  3691. })),
  3692. this.originalElement.css({
  3693. margin: this.originalElement.css("margin")
  3694. }),
  3695. this._proportionallyResize()),
  3696. this.handles = r.handles || (e(".ui-resizable-handle", this.element).length ? {
  3697. n: ".ui-resizable-n",
  3698. e: ".ui-resizable-e",
  3699. s: ".ui-resizable-s",
  3700. w: ".ui-resizable-w",
  3701. se: ".ui-resizable-se",
  3702. sw: ".ui-resizable-sw",
  3703. ne: ".ui-resizable-ne",
  3704. nw: ".ui-resizable-nw"
  3705. } : "e,s,se"),
  3706. this._handles = e(),
  3707. this.handles.constructor === String)
  3708. for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"),
  3709. t = this.handles.split(","),
  3710. this.handles = {},
  3711. i = 0; t.length > i; i++)
  3712. s = e.trim(t[i]),
  3713. a = "ui-resizable-" + s,
  3714. n = e("<div class='ui-resizable-handle " + a + "'></div>"),
  3715. n.css({
  3716. zIndex: r.zIndex
  3717. }),
  3718. "se" === s && n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),
  3719. this.handles[s] = ".ui-resizable-" + s,
  3720. this.element.append(n);
  3721. this._renderAxis = function(t) {
  3722. var i, s, n, a;
  3723. t = t || this.element;
  3724. for (i in this.handles)
  3725. this.handles[i].constructor === String ? this.handles[i] = this.element.children(this.handles[i]).first().show() : (this.handles[i].jquery || this.handles[i].nodeType) && (this.handles[i] = e(this.handles[i]),
  3726. this._on(this.handles[i], {
  3727. mousedown: o._mouseDown
  3728. })),
  3729. this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (s = e(this.handles[i], this.element),
  3730. a = /sw|ne|nw|se|n|s/.test(i) ? s.outerHeight() : s.outerWidth(),
  3731. n = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""),
  3732. t.css(n, a),
  3733. this._proportionallyResize()),
  3734. this._handles = this._handles.add(this.handles[i])
  3735. }
  3736. ,
  3737. this._renderAxis(this.element),
  3738. this._handles = this._handles.add(this.element.find(".ui-resizable-handle")),
  3739. this._handles.disableSelection(),
  3740. this._handles.mouseover(function() {
  3741. o.resizing || (this.className && (n = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),
  3742. o.axis = n && n[1] ? n[1] : "se")
  3743. }),
  3744. r.autoHide && (this._handles.hide(),
  3745. e(this.element).addClass("ui-resizable-autohide").mouseenter(function() {
  3746. r.disabled || (e(this).removeClass("ui-resizable-autohide"),
  3747. o._handles.show())
  3748. }).mouseleave(function() {
  3749. r.disabled || o.resizing || (e(this).addClass("ui-resizable-autohide"),
  3750. o._handles.hide())
  3751. })),
  3752. this._mouseInit()
  3753. },
  3754. _destroy: function() {
  3755. this._mouseDestroy();
  3756. var t, i = function(t) {
  3757. e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
  3758. };
  3759. return this.elementIsWrapper && (i(this.element),
  3760. t = this.element,
  3761. this.originalElement.css({
  3762. position: t.css("position"),
  3763. width: t.outerWidth(),
  3764. height: t.outerHeight(),
  3765. top: t.css("top"),
  3766. left: t.css("left")
  3767. }).insertAfter(t),
  3768. t.remove()),
  3769. this.originalElement.css("resize", this.originalResizeStyle),
  3770. i(this.originalElement),
  3771. this
  3772. },
  3773. _mouseCapture: function(t) {
  3774. var i, s, n = !1;
  3775. for (i in this.handles)
  3776. s = e(this.handles[i])[0],
  3777. (s === t.target || e.contains(s, t.target)) && (n = !0);
  3778. return !this.options.disabled && n
  3779. },
  3780. _mouseStart: function(t) {
  3781. var i, s, n, a = this.options, o = this.element;
  3782. return this.resizing = !0,
  3783. this._renderProxy(),
  3784. i = this._num(this.helper.css("left")),
  3785. s = this._num(this.helper.css("top")),
  3786. a.containment && (i += e(a.containment).scrollLeft() || 0,
  3787. s += e(a.containment).scrollTop() || 0),
  3788. this.offset = this.helper.offset(),
  3789. this.position = {
  3790. left: i,
  3791. top: s
  3792. },
  3793. this.size = this._helper ? {
  3794. width: this.helper.width(),
  3795. height: this.helper.height()
  3796. } : {
  3797. width: o.width(),
  3798. height: o.height()
  3799. },
  3800. this.originalSize = this._helper ? {
  3801. width: o.outerWidth(),
  3802. height: o.outerHeight()
  3803. } : {
  3804. width: o.width(),
  3805. height: o.height()
  3806. },
  3807. this.sizeDiff = {
  3808. width: o.outerWidth() - o.width(),
  3809. height: o.outerHeight() - o.height()
  3810. },
  3811. this.originalPosition = {
  3812. left: i,
  3813. top: s
  3814. },
  3815. this.originalMousePosition = {
  3816. left: t.pageX,
  3817. top: t.pageY
  3818. },
  3819. this.aspectRatio = "number" == typeof a.aspectRatio ? a.aspectRatio : this.originalSize.width / this.originalSize.height || 1,
  3820. n = e(".ui-resizable-" + this.axis).css("cursor"),
  3821. e("body").css("cursor", "auto" === n ? this.axis + "-resize" : n),
  3822. o.addClass("ui-resizable-resizing"),
  3823. this._propagate("start", t),
  3824. !0
  3825. },
  3826. _mouseDrag: function(t) {
  3827. var i, s, n = this.originalMousePosition, a = this.axis, o = t.pageX - n.left || 0, r = t.pageY - n.top || 0, h = this._change[a];
  3828. return this._updatePrevProperties(),
  3829. h ? (i = h.apply(this, [t, o, r]),
  3830. this._updateVirtualBoundaries(t.shiftKey),
  3831. (this._aspectRatio || t.shiftKey) && (i = this._updateRatio(i, t)),
  3832. i = this._respectSize(i, t),
  3833. this._updateCache(i),
  3834. this._propagate("resize", t),
  3835. s = this._applyChanges(),
  3836. !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(),
  3837. e.isEmptyObject(s) || (this._updatePrevProperties(),
  3838. this._trigger("resize", t, this.ui()),
  3839. this._applyChanges()),
  3840. !1) : !1
  3841. },
  3842. _mouseStop: function(t) {
  3843. this.resizing = !1;
  3844. var i, s, n, a, o, r, h, l = this.options, u = this;
  3845. return this._helper && (i = this._proportionallyResizeElements,
  3846. s = i.length && /textarea/i.test(i[0].nodeName),
  3847. n = s && this._hasScroll(i[0], "left") ? 0 : u.sizeDiff.height,
  3848. a = s ? 0 : u.sizeDiff.width,
  3849. o = {
  3850. width: u.helper.width() - a,
  3851. height: u.helper.height() - n
  3852. },
  3853. r = parseInt(u.element.css("left"), 10) + (u.position.left - u.originalPosition.left) || null,
  3854. h = parseInt(u.element.css("top"), 10) + (u.position.top - u.originalPosition.top) || null,
  3855. l.animate || this.element.css(e.extend(o, {
  3856. top: h,
  3857. left: r
  3858. })),
  3859. u.helper.height(u.size.height),
  3860. u.helper.width(u.size.width),
  3861. this._helper && !l.animate && this._proportionallyResize()),
  3862. e("body").css("cursor", "auto"),
  3863. this.element.removeClass("ui-resizable-resizing"),
  3864. this._propagate("stop", t),
  3865. this._helper && this.helper.remove(),
  3866. !1
  3867. },
  3868. _updatePrevProperties: function() {
  3869. this.prevPosition = {
  3870. top: this.position.top,
  3871. left: this.position.left
  3872. },
  3873. this.prevSize = {
  3874. width: this.size.width,
  3875. height: this.size.height
  3876. }
  3877. },
  3878. _applyChanges: function() {
  3879. var e = {};
  3880. return this.position.top !== this.prevPosition.top && (e.top = this.position.top + "px"),
  3881. this.position.left !== this.prevPosition.left && (e.left = this.position.left + "px"),
  3882. this.size.width !== this.prevSize.width && (e.width = this.size.width + "px"),
  3883. this.size.height !== this.prevSize.height && (e.height = this.size.height + "px"),
  3884. this.helper.css(e),
  3885. e
  3886. },
  3887. _updateVirtualBoundaries: function(e) {
  3888. var t, i, s, n, a, o = this.options;
  3889. a = {
  3890. minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,
  3891. maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : 1 / 0,
  3892. minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,
  3893. maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : 1 / 0
  3894. },
  3895. (this._aspectRatio || e) && (t = a.minHeight * this.aspectRatio,
  3896. s = a.minWidth / this.aspectRatio,
  3897. i = a.maxHeight * this.aspectRatio,
  3898. n = a.maxWidth / this.aspectRatio,
  3899. t > a.minWidth && (a.minWidth = t),
  3900. s > a.minHeight && (a.minHeight = s),
  3901. a.maxWidth > i && (a.maxWidth = i),
  3902. a.maxHeight > n && (a.maxHeight = n)),
  3903. this._vBoundaries = a
  3904. },
  3905. _updateCache: function(e) {
  3906. this.offset = this.helper.offset(),
  3907. this._isNumber(e.left) && (this.position.left = e.left),
  3908. this._isNumber(e.top) && (this.position.top = e.top),
  3909. this._isNumber(e.height) && (this.size.height = e.height),
  3910. this._isNumber(e.width) && (this.size.width = e.width)
  3911. },
  3912. _updateRatio: function(e) {
  3913. var t = this.position
  3914. , i = this.size
  3915. , s = this.axis;
  3916. return this._isNumber(e.height) ? e.width = e.height * this.aspectRatio : this._isNumber(e.width) && (e.height = e.width / this.aspectRatio),
  3917. "sw" === s && (e.left = t.left + (i.width - e.width),
  3918. e.top = null),
  3919. "nw" === s && (e.top = t.top + (i.height - e.height),
  3920. e.left = t.left + (i.width - e.width)),
  3921. e
  3922. },
  3923. _respectSize: function(e) {
  3924. var t = this._vBoundaries
  3925. , i = this.axis
  3926. , s = this._isNumber(e.width) && t.maxWidth && t.maxWidth < e.width
  3927. , n = this._isNumber(e.height) && t.maxHeight && t.maxHeight < e.height
  3928. , a = this._isNumber(e.width) && t.minWidth && t.minWidth > e.width
  3929. , o = this._isNumber(e.height) && t.minHeight && t.minHeight > e.height
  3930. , r = this.originalPosition.left + this.originalSize.width
  3931. , h = this.position.top + this.size.height
  3932. , l = /sw|nw|w/.test(i)
  3933. , u = /nw|ne|n/.test(i);
  3934. return a && (e.width = t.minWidth),
  3935. o && (e.height = t.minHeight),
  3936. s && (e.width = t.maxWidth),
  3937. n && (e.height = t.maxHeight),
  3938. a && l && (e.left = r - t.minWidth),
  3939. s && l && (e.left = r - t.maxWidth),
  3940. o && u && (e.top = h - t.minHeight),
  3941. n && u && (e.top = h - t.maxHeight),
  3942. e.width || e.height || e.left || !e.top ? e.width || e.height || e.top || !e.left || (e.left = null) : e.top = null,
  3943. e
  3944. },
  3945. _getPaddingPlusBorderDimensions: function(e) {
  3946. for (var t = 0, i = [], s = [e.css("borderTopWidth"), e.css("borderRightWidth"), e.css("borderBottomWidth"), e.css("borderLeftWidth")], n = [e.css("paddingTop"), e.css("paddingRight"), e.css("paddingBottom"), e.css("paddingLeft")]; 4 > t; t++)
  3947. i[t] = parseInt(s[t], 10) || 0,
  3948. i[t] += parseInt(n[t], 10) || 0;
  3949. return {
  3950. height: i[0] + i[2],
  3951. width: i[1] + i[3]
  3952. }
  3953. },
  3954. _proportionallyResize: function() {
  3955. if (this._proportionallyResizeElements.length)
  3956. for (var e, t = 0, i = this.helper || this.element; this._proportionallyResizeElements.length > t; t++)
  3957. e = this._proportionallyResizeElements[t],
  3958. this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(e)),
  3959. e.css({
  3960. height: i.height() - this.outerDimensions.height || 0,
  3961. width: i.width() - this.outerDimensions.width || 0
  3962. })
  3963. },
  3964. _renderProxy: function() {
  3965. var t = this.element
  3966. , i = this.options;
  3967. this.elementOffset = t.offset(),
  3968. this._helper ? (this.helper = this.helper || e("<div style='overflow:hidden;'></div>"),
  3969. this.helper.addClass(this._helper).css({
  3970. width: this.element.outerWidth() - 1,
  3971. height: this.element.outerHeight() - 1,
  3972. position: "absolute",
  3973. left: this.elementOffset.left + "px",
  3974. top: this.elementOffset.top + "px",
  3975. zIndex: ++i.zIndex
  3976. }),
  3977. this.helper.appendTo("body").disableSelection()) : this.helper = this.element
  3978. },
  3979. _change: {
  3980. e: function(e, t) {
  3981. return {
  3982. width: this.originalSize.width + t
  3983. }
  3984. },
  3985. w: function(e, t) {
  3986. var i = this.originalSize
  3987. , s = this.originalPosition;
  3988. return {
  3989. left: s.left + t,
  3990. width: i.width - t
  3991. }
  3992. },
  3993. n: function(e, t, i) {
  3994. var s = this.originalSize
  3995. , n = this.originalPosition;
  3996. return {
  3997. top: n.top + i,
  3998. height: s.height - i
  3999. }
  4000. },
  4001. s: function(e, t, i) {
  4002. return {
  4003. height: this.originalSize.height + i
  4004. }
  4005. },
  4006. se: function(t, i, s) {
  4007. return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, i, s]))
  4008. },
  4009. sw: function(t, i, s) {
  4010. return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, i, s]))
  4011. },
  4012. ne: function(t, i, s) {
  4013. return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, i, s]))
  4014. },
  4015. nw: function(t, i, s) {
  4016. return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, i, s]))
  4017. }
  4018. },
  4019. _propagate: function(t, i) {
  4020. e.ui.plugin.call(this, t, [i, this.ui()]),
  4021. "resize" !== t && this._trigger(t, i, this.ui())
  4022. },
  4023. plugins: {},
  4024. ui: function() {
  4025. return {
  4026. originalElement: this.originalElement,
  4027. element: this.element,
  4028. helper: this.helper,
  4029. position: this.position,
  4030. size: this.size,
  4031. originalSize: this.originalSize,
  4032. originalPosition: this.originalPosition
  4033. }
  4034. }
  4035. }),
  4036. e.ui.plugin.add("resizable", "animate", {
  4037. stop: function(t) {
  4038. var i = e(this).resizable("instance")
  4039. , s = i.options
  4040. , n = i._proportionallyResizeElements
  4041. , a = n.length && /textarea/i.test(n[0].nodeName)
  4042. , o = a && i._hasScroll(n[0], "left") ? 0 : i.sizeDiff.height
  4043. , r = a ? 0 : i.sizeDiff.width
  4044. , h = {
  4045. width: i.size.width - r,
  4046. height: i.size.height - o
  4047. }
  4048. , l = parseInt(i.element.css("left"), 10) + (i.position.left - i.originalPosition.left) || null
  4049. , u = parseInt(i.element.css("top"), 10) + (i.position.top - i.originalPosition.top) || null;
  4050. i.element.animate(e.extend(h, u && l ? {
  4051. top: u,
  4052. left: l
  4053. } : {}), {
  4054. duration: s.animateDuration,
  4055. easing: s.animateEasing,
  4056. step: function() {
  4057. var s = {
  4058. width: parseInt(i.element.css("width"), 10),
  4059. height: parseInt(i.element.css("height"), 10),
  4060. top: parseInt(i.element.css("top"), 10),
  4061. left: parseInt(i.element.css("left"), 10)
  4062. };
  4063. n && n.length && e(n[0]).css({
  4064. width: s.width,
  4065. height: s.height
  4066. }),
  4067. i._updateCache(s),
  4068. i._propagate("resize", t)
  4069. }
  4070. })
  4071. }
  4072. }),
  4073. e.ui.plugin.add("resizable", "containment", {
  4074. start: function() {
  4075. var t, i, s, n, a, o, r, h = e(this).resizable("instance"), l = h.options, u = h.element, d = l.containment, c = d instanceof e ? d.get(0) : /parent/.test(d) ? u.parent().get(0) : d;
  4076. c && (h.containerElement = e(c),
  4077. /document/.test(d) || d === document ? (h.containerOffset = {
  4078. left: 0,
  4079. top: 0
  4080. },
  4081. h.containerPosition = {
  4082. left: 0,
  4083. top: 0
  4084. },
  4085. h.parentData = {
  4086. element: e(document),
  4087. left: 0,
  4088. top: 0,
  4089. width: e(document).width(),
  4090. height: e(document).height() || document.body.parentNode.scrollHeight
  4091. }) : (t = e(c),
  4092. i = [],
  4093. e(["Top", "Right", "Left", "Bottom"]).each(function(e, s) {
  4094. i[e] = h._num(t.css("padding" + s))
  4095. }),
  4096. h.containerOffset = t.offset(),
  4097. h.containerPosition = t.position(),
  4098. h.containerSize = {
  4099. height: t.innerHeight() - i[3],
  4100. width: t.innerWidth() - i[1]
  4101. },
  4102. s = h.containerOffset,
  4103. n = h.containerSize.height,
  4104. a = h.containerSize.width,
  4105. o = h._hasScroll(c, "left") ? c.scrollWidth : a,
  4106. r = h._hasScroll(c) ? c.scrollHeight : n,
  4107. h.parentData = {
  4108. element: c,
  4109. left: s.left,
  4110. top: s.top,
  4111. width: o,
  4112. height: r
  4113. }))
  4114. },
  4115. resize: function(t) {
  4116. var i, s, n, a, o = e(this).resizable("instance"), r = o.options, h = o.containerOffset, l = o.position, u = o._aspectRatio || t.shiftKey, d = {
  4117. top: 0,
  4118. left: 0
  4119. }, c = o.containerElement, p = !0;
  4120. c[0] !== document && /static/.test(c.css("position")) && (d = h),
  4121. l.left < (o._helper ? h.left : 0) && (o.size.width = o.size.width + (o._helper ? o.position.left - h.left : o.position.left - d.left),
  4122. u && (o.size.height = o.size.width / o.aspectRatio,
  4123. p = !1),
  4124. o.position.left = r.helper ? h.left : 0),
  4125. l.top < (o._helper ? h.top : 0) && (o.size.height = o.size.height + (o._helper ? o.position.top - h.top : o.position.top),
  4126. u && (o.size.width = o.size.height * o.aspectRatio,
  4127. p = !1),
  4128. o.position.top = o._helper ? h.top : 0),
  4129. n = o.containerElement.get(0) === o.element.parent().get(0),
  4130. a = /relative|absolute/.test(o.containerElement.css("position")),
  4131. n && a ? (o.offset.left = o.parentData.left + o.position.left,
  4132. o.offset.top = o.parentData.top + o.position.top) : (o.offset.left = o.element.offset().left,
  4133. o.offset.top = o.element.offset().top),
  4134. i = Math.abs(o.sizeDiff.width + (o._helper ? o.offset.left - d.left : o.offset.left - h.left)),
  4135. s = Math.abs(o.sizeDiff.height + (o._helper ? o.offset.top - d.top : o.offset.top - h.top)),
  4136. i + o.size.width >= o.parentData.width && (o.size.width = o.parentData.width - i,
  4137. u && (o.size.height = o.size.width / o.aspectRatio,
  4138. p = !1)),
  4139. s + o.size.height >= o.parentData.height && (o.size.height = o.parentData.height - s,
  4140. u && (o.size.width = o.size.height * o.aspectRatio,
  4141. p = !1)),
  4142. p || (o.position.left = o.prevPosition.left,
  4143. o.position.top = o.prevPosition.top,
  4144. o.size.width = o.prevSize.width,
  4145. o.size.height = o.prevSize.height)
  4146. },
  4147. stop: function() {
  4148. var t = e(this).resizable("instance")
  4149. , i = t.options
  4150. , s = t.containerOffset
  4151. , n = t.containerPosition
  4152. , a = t.containerElement
  4153. , o = e(t.helper)
  4154. , r = o.offset()
  4155. , h = o.outerWidth() - t.sizeDiff.width
  4156. , l = o.outerHeight() - t.sizeDiff.height;
  4157. t._helper && !i.animate && /relative/.test(a.css("position")) && e(this).css({
  4158. left: r.left - n.left - s.left,
  4159. width: h,
  4160. height: l
  4161. }),
  4162. t._helper && !i.animate && /static/.test(a.css("position")) && e(this).css({
  4163. left: r.left - n.left - s.left,
  4164. width: h,
  4165. height: l
  4166. })
  4167. }
  4168. }),
  4169. e.ui.plugin.add("resizable", "alsoResize", {
  4170. start: function() {
  4171. var t = e(this).resizable("instance")
  4172. , i = t.options;
  4173. e(i.alsoResize).each(function() {
  4174. var t = e(this);
  4175. t.data("ui-resizable-alsoresize", {
  4176. width: parseInt(t.width(), 10),
  4177. height: parseInt(t.height(), 10),
  4178. left: parseInt(t.css("left"), 10),
  4179. top: parseInt(t.css("top"), 10)
  4180. })
  4181. })
  4182. },
  4183. resize: function(t, i) {
  4184. var s = e(this).resizable("instance")
  4185. , n = s.options
  4186. , a = s.originalSize
  4187. , o = s.originalPosition
  4188. , r = {
  4189. height: s.size.height - a.height || 0,
  4190. width: s.size.width - a.width || 0,
  4191. top: s.position.top - o.top || 0,
  4192. left: s.position.left - o.left || 0
  4193. };
  4194. e(n.alsoResize).each(function() {
  4195. var t = e(this)
  4196. , s = e(this).data("ui-resizable-alsoresize")
  4197. , n = {}
  4198. , a = t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
  4199. e.each(a, function(e, t) {
  4200. var i = (s[t] || 0) + (r[t] || 0);
  4201. i && i >= 0 && (n[t] = i || null)
  4202. }),
  4203. t.css(n)
  4204. })
  4205. },
  4206. stop: function() {
  4207. e(this).removeData("resizable-alsoresize")
  4208. }
  4209. }),
  4210. e.ui.plugin.add("resizable", "ghost", {
  4211. start: function() {
  4212. var t = e(this).resizable("instance")
  4213. , i = t.options
  4214. , s = t.size;
  4215. t.ghost = t.originalElement.clone(),
  4216. t.ghost.css({
  4217. opacity: .25,
  4218. display: "block",
  4219. position: "relative",
  4220. height: s.height,
  4221. width: s.width,
  4222. margin: 0,
  4223. left: 0,
  4224. top: 0
  4225. }).addClass("ui-resizable-ghost").addClass("string" == typeof i.ghost ? i.ghost : ""),
  4226. t.ghost.appendTo(t.helper)
  4227. },
  4228. resize: function() {
  4229. var t = e(this).resizable("instance");
  4230. t.ghost && t.ghost.css({
  4231. position: "relative",
  4232. height: t.size.height,
  4233. width: t.size.width
  4234. })
  4235. },
  4236. stop: function() {
  4237. var t = e(this).resizable("instance");
  4238. t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0))
  4239. }
  4240. }),
  4241. e.ui.plugin.add("resizable", "grid", {
  4242. resize: function() {
  4243. var t, i = e(this).resizable("instance"), s = i.options, n = i.size, a = i.originalSize, o = i.originalPosition, r = i.axis, h = "number" == typeof s.grid ? [s.grid, s.grid] : s.grid, l = h[0] || 1, u = h[1] || 1, d = Math.round((n.width - a.width) / l) * l, c = Math.round((n.height - a.height) / u) * u, p = a.width + d, f = a.height + c, m = s.maxWidth && p > s.maxWidth, g = s.maxHeight && f > s.maxHeight, v = s.minWidth && s.minWidth > p, y = s.minHeight && s.minHeight > f;
  4244. s.grid = h,
  4245. v && (p += l),
  4246. y && (f += u),
  4247. m && (p -= l),
  4248. g && (f -= u),
  4249. /^(se|s|e)$/.test(r) ? (i.size.width = p,
  4250. i.size.height = f) : /^(ne)$/.test(r) ? (i.size.width = p,
  4251. i.size.height = f,
  4252. i.position.top = o.top - c) : /^(sw)$/.test(r) ? (i.size.width = p,
  4253. i.size.height = f,
  4254. i.position.left = o.left - d) : ((0 >= f - u || 0 >= p - l) && (t = i._getPaddingPlusBorderDimensions(this)),
  4255. f - u > 0 ? (i.size.height = f,
  4256. i.position.top = o.top - c) : (f = u - t.height,
  4257. i.size.height = f,
  4258. i.position.top = o.top + a.height - f),
  4259. p - l > 0 ? (i.size.width = p,
  4260. i.position.left = o.left - d) : (p = l - t.width,
  4261. i.size.width = p,
  4262. i.position.left = o.left + a.width - p))
  4263. }
  4264. }),
  4265. e.ui.resizable,
  4266. e.widget("ui.dialog", {
  4267. version: "1.11.4",
  4268. options: {
  4269. appendTo: "body",
  4270. autoOpen: !0,
  4271. buttons: [],
  4272. closeOnEscape: !0,
  4273. closeText: "Close",
  4274. dialogClass: "",
  4275. draggable: !0,
  4276. hide: null,
  4277. height: "auto",
  4278. maxHeight: null,
  4279. maxWidth: null,
  4280. minHeight: 150,
  4281. minWidth: 150,
  4282. modal: !1,
  4283. position: {
  4284. my: "center",
  4285. at: "center",
  4286. of: window,
  4287. collision: "fit",
  4288. using: function(t) {
  4289. var i = e(this).css(t).offset().top;
  4290. 0 > i && e(this).css("top", t.top - i)
  4291. }
  4292. },
  4293. resizable: !0,
  4294. show: null,
  4295. title: null,
  4296. width: 300,
  4297. beforeClose: null,
  4298. close: null,
  4299. drag: null,
  4300. dragStart: null,
  4301. dragStop: null,
  4302. focus: null,
  4303. open: null,
  4304. resize: null,
  4305. resizeStart: null,
  4306. resizeStop: null
  4307. },
  4308. sizeRelatedOptions: {
  4309. buttons: !0,
  4310. height: !0,
  4311. maxHeight: !0,
  4312. maxWidth: !0,
  4313. minHeight: !0,
  4314. minWidth: !0,
  4315. width: !0
  4316. },
  4317. resizableRelatedOptions: {
  4318. maxHeight: !0,
  4319. maxWidth: !0,
  4320. minHeight: !0,
  4321. minWidth: !0
  4322. },
  4323. _create: function() {
  4324. this.originalCss = {
  4325. display: this.element[0].style.display,
  4326. width: this.element[0].style.width,
  4327. minHeight: this.element[0].style.minHeight,
  4328. maxHeight: this.element[0].style.maxHeight,
  4329. height: this.element[0].style.height
  4330. },
  4331. this.originalPosition = {
  4332. parent: this.element.parent(),
  4333. index: this.element.parent().children().index(this.element)
  4334. },
  4335. this.originalTitle = this.element.attr("title"),
  4336. this.options.title = this.options.title || this.originalTitle,
  4337. this._createWrapper(),
  4338. this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),
  4339. this._createTitlebar(),
  4340. this._createButtonPane(),
  4341. this.options.draggable && e.fn.draggable && this._makeDraggable(),
  4342. this.options.resizable && e.fn.resizable && this._makeResizable(),
  4343. this._isOpen = !1,
  4344. this._trackFocus()
  4345. },
  4346. _init: function() {
  4347. this.options.autoOpen && this.open()
  4348. },
  4349. _appendTo: function() {
  4350. var t = this.options.appendTo;
  4351. return t && (t.jquery || t.nodeType) ? e(t) : this.document.find(t || "body").eq(0)
  4352. },
  4353. _destroy: function() {
  4354. var e, t = this.originalPosition;
  4355. this._untrackInstance(),
  4356. this._destroyOverlay(),
  4357. this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),
  4358. this.uiDialog.stop(!0, !0).remove(),
  4359. this.originalTitle && this.element.attr("title", this.originalTitle),
  4360. e = t.parent.children().eq(t.index),
  4361. e.length && e[0] !== this.element[0] ? e.before(this.element) : t.parent.append(this.element)
  4362. },
  4363. widget: function() {
  4364. return this.uiDialog
  4365. },
  4366. disable: e.noop,
  4367. enable: e.noop,
  4368. close: function(t) {
  4369. var i, s = this;
  4370. if (this._isOpen && this._trigger("beforeClose", t) !== !1) {
  4371. if (this._isOpen = !1,
  4372. this._focusedElement = null,
  4373. this._destroyOverlay(),
  4374. this._untrackInstance(),
  4375. !this.opener.filter(":focusable").focus().length)
  4376. try {
  4377. i = this.document[0].activeElement,
  4378. i && "body" !== i.nodeName.toLowerCase() && e(i).blur()
  4379. } catch (n) {}
  4380. this._hide(this.uiDialog, this.options.hide, function() {
  4381. s._trigger("close", t)
  4382. })
  4383. }
  4384. },
  4385. isOpen: function() {
  4386. return this._isOpen
  4387. },
  4388. moveToTop: function() {
  4389. this._moveToTop()
  4390. },
  4391. _moveToTop: function(t, i) {
  4392. var s = !1
  4393. , n = this.uiDialog.siblings(".ui-front:visible").map(function() {
  4394. return +e(this).css("z-index")
  4395. }).get()
  4396. , a = Math.max.apply(null, n);
  4397. return a >= +this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", a + 1),
  4398. s = !0),
  4399. s && !i && this._trigger("focus", t),
  4400. s
  4401. },
  4402. open: function() {
  4403. var t = this;
  4404. return this._isOpen ? (this._moveToTop() && this._focusTabbable(),
  4405. void 0) : (this._isOpen = !0,
  4406. this.opener = e(this.document[0].activeElement),
  4407. this._size(),
  4408. this._position(),
  4409. this._createOverlay(),
  4410. this._moveToTop(null, !0),
  4411. this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1),
  4412. this._show(this.uiDialog, this.options.show, function() {
  4413. t._focusTabbable(),
  4414. t._trigger("focus")
  4415. }),
  4416. this._makeFocusTarget(),
  4417. this._trigger("open"),
  4418. void 0)
  4419. },
  4420. _focusTabbable: function() {
  4421. var e = this._focusedElement;
  4422. e || (e = this.element.find("[autofocus]")),
  4423. e.length || (e = this.element.find(":tabbable")),
  4424. e.length || (e = this.uiDialogButtonPane.find(":tabbable")),
  4425. e.length || (e = this.uiDialogTitlebarClose.filter(":tabbable")),
  4426. e.length || (e = this.uiDialog),
  4427. e.eq(0).focus()
  4428. },
  4429. _keepFocus: function(t) {
  4430. function i() {
  4431. var t = this.document[0].activeElement
  4432. , i = this.uiDialog[0] === t || e.contains(this.uiDialog[0], t);
  4433. i || this._focusTabbable()
  4434. }
  4435. t.preventDefault(),
  4436. i.call(this),
  4437. this._delay(i)
  4438. },
  4439. _createWrapper: function() {
  4440. this.uiDialog = e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + this.options.dialogClass).hide().attr({
  4441. tabIndex: -1,
  4442. role: "dialog"
  4443. }).appendTo(this._appendTo()),
  4444. this._on(this.uiDialog, {
  4445. keydown: function(t) {
  4446. if (this.options.closeOnEscape && !t.isDefaultPrevented() && t.keyCode && t.keyCode === e.ui.keyCode.ESCAPE)
  4447. return t.preventDefault(),
  4448. this.close(t),
  4449. void 0;
  4450. if (t.keyCode === e.ui.keyCode.TAB && !t.isDefaultPrevented()) {
  4451. var i = this.uiDialog.find(":tabbable")
  4452. , s = i.filter(":first")
  4453. , n = i.filter(":last");
  4454. t.target !== n[0] && t.target !== this.uiDialog[0] || t.shiftKey ? t.target !== s[0] && t.target !== this.uiDialog[0] || !t.shiftKey || (this._delay(function() {
  4455. n.focus()
  4456. }),
  4457. t.preventDefault()) : (this._delay(function() {
  4458. s.focus()
  4459. }),
  4460. t.preventDefault())
  4461. }
  4462. },
  4463. mousedown: function(e) {
  4464. this._moveToTop(e) && this._focusTabbable()
  4465. }
  4466. }),
  4467. this.element.find("[aria-describedby]").length || this.uiDialog.attr({
  4468. "aria-describedby": this.element.uniqueId().attr("id")
  4469. })
  4470. },
  4471. _createTitlebar: function() {
  4472. var t;
  4473. this.uiDialogTitlebar = e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),
  4474. this._on(this.uiDialogTitlebar, {
  4475. mousedown: function(t) {
  4476. e(t.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.focus()
  4477. }
  4478. }),
  4479. this.uiDialogTitlebarClose = e("<button type='button'></button>").button({
  4480. label: this.options.closeText,
  4481. icons: {
  4482. primary: "ui-icon-closethick"
  4483. },
  4484. text: !1
  4485. }).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),
  4486. this._on(this.uiDialogTitlebarClose, {
  4487. click: function(e) {
  4488. e.preventDefault(),
  4489. this.close(e)
  4490. }
  4491. }),
  4492. t = e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),
  4493. this._title(t),
  4494. this.uiDialog.attr({
  4495. "aria-labelledby": t.attr("id")
  4496. })
  4497. },
  4498. _title: function(e) {
  4499. this.options.title || e.html("&#160;"),
  4500. e.text(this.options.title)
  4501. },
  4502. _createButtonPane: function() {
  4503. this.uiDialogButtonPane = e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),
  4504. this.uiButtonSet = e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),
  4505. this._createButtons()
  4506. },
  4507. _createButtons: function() {
  4508. var t = this
  4509. , i = this.options.buttons;
  4510. return this.uiDialogButtonPane.remove(),
  4511. this.uiButtonSet.empty(),
  4512. e.isEmptyObject(i) || e.isArray(i) && !i.length ? (this.uiDialog.removeClass("ui-dialog-buttons"),
  4513. void 0) : (e.each(i, function(i, s) {
  4514. var n, a;
  4515. s = e.isFunction(s) ? {
  4516. click: s,
  4517. text: i
  4518. } : s,
  4519. s = e.extend({
  4520. type: "button"
  4521. }, s),
  4522. n = s.click,
  4523. s.click = function() {
  4524. n.apply(t.element[0], arguments)
  4525. }
  4526. ,
  4527. a = {
  4528. icons: s.icons,
  4529. text: s.showText
  4530. },
  4531. delete s.icons,
  4532. delete s.showText,
  4533. e("<button></button>", s).button(a).appendTo(t.uiButtonSet)
  4534. }),
  4535. this.uiDialog.addClass("ui-dialog-buttons"),
  4536. this.uiDialogButtonPane.appendTo(this.uiDialog),
  4537. void 0)
  4538. },
  4539. _makeDraggable: function() {
  4540. function t(e) {
  4541. return {
  4542. position: e.position,
  4543. offset: e.offset
  4544. }
  4545. }
  4546. var i = this
  4547. , s = this.options;
  4548. this.uiDialog.draggable({
  4549. cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
  4550. handle: ".ui-dialog-titlebar",
  4551. containment: "document",
  4552. start: function(s, n) {
  4553. e(this).addClass("ui-dialog-dragging"),
  4554. i._blockFrames(),
  4555. i._trigger("dragStart", s, t(n))
  4556. },
  4557. drag: function(e, s) {
  4558. i._trigger("drag", e, t(s))
  4559. },
  4560. stop: function(n, a) {
  4561. var o = a.offset.left - i.document.scrollLeft()
  4562. , r = a.offset.top - i.document.scrollTop();
  4563. s.position = {
  4564. my: "left top",
  4565. at: "left" + (o >= 0 ? "+" : "") + o + " " + "top" + (r >= 0 ? "+" : "") + r,
  4566. of: i.window
  4567. },
  4568. e(this).removeClass("ui-dialog-dragging"),
  4569. i._unblockFrames(),
  4570. i._trigger("dragStop", n, t(a))
  4571. }
  4572. })
  4573. },
  4574. _makeResizable: function() {
  4575. function t(e) {
  4576. return {
  4577. originalPosition: e.originalPosition,
  4578. originalSize: e.originalSize,
  4579. position: e.position,
  4580. size: e.size
  4581. }
  4582. }
  4583. var i = this
  4584. , s = this.options
  4585. , n = s.resizable
  4586. , a = this.uiDialog.css("position")
  4587. , o = "string" == typeof n ? n : "n,e,s,w,se,sw,ne,nw";
  4588. this.uiDialog.resizable({
  4589. cancel: ".ui-dialog-content",
  4590. containment: "document",
  4591. alsoResize: this.element,
  4592. maxWidth: s.maxWidth,
  4593. maxHeight: s.maxHeight,
  4594. minWidth: s.minWidth,
  4595. minHeight: this._minHeight(),
  4596. handles: o,
  4597. start: function(s, n) {
  4598. e(this).addClass("ui-dialog-resizing"),
  4599. i._blockFrames(),
  4600. i._trigger("resizeStart", s, t(n))
  4601. },
  4602. resize: function(e, s) {
  4603. i._trigger("resize", e, t(s))
  4604. },
  4605. stop: function(n, a) {
  4606. var o = i.uiDialog.offset()
  4607. , r = o.left - i.document.scrollLeft()
  4608. , h = o.top - i.document.scrollTop();
  4609. s.height = i.uiDialog.height(),
  4610. s.width = i.uiDialog.width(),
  4611. s.position = {
  4612. my: "left top",
  4613. at: "left" + (r >= 0 ? "+" : "") + r + " " + "top" + (h >= 0 ? "+" : "") + h,
  4614. of: i.window
  4615. },
  4616. e(this).removeClass("ui-dialog-resizing"),
  4617. i._unblockFrames(),
  4618. i._trigger("resizeStop", n, t(a))
  4619. }
  4620. }).css("position", a)
  4621. },
  4622. _trackFocus: function() {
  4623. this._on(this.widget(), {
  4624. focusin: function(t) {
  4625. this._makeFocusTarget(),
  4626. this._focusedElement = e(t.target)
  4627. }
  4628. })
  4629. },
  4630. _makeFocusTarget: function() {
  4631. this._untrackInstance(),
  4632. this._trackingInstances().unshift(this)
  4633. },
  4634. _untrackInstance: function() {
  4635. var t = this._trackingInstances()
  4636. , i = e.inArray(this, t);
  4637. -1 !== i && t.splice(i, 1)
  4638. },
  4639. _trackingInstances: function() {
  4640. var e = this.document.data("ui-dialog-instances");
  4641. return e || (e = [],
  4642. this.document.data("ui-dialog-instances", e)),
  4643. e
  4644. },
  4645. _minHeight: function() {
  4646. var e = this.options;
  4647. return "auto" === e.height ? e.minHeight : Math.min(e.minHeight, e.height)
  4648. },
  4649. _position: function() {
  4650. var e = this.uiDialog.is(":visible");
  4651. e || this.uiDialog.show(),
  4652. this.uiDialog.position(this.options.position),
  4653. e || this.uiDialog.hide()
  4654. },
  4655. _setOptions: function(t) {
  4656. var i = this
  4657. , s = !1
  4658. , n = {};
  4659. e.each(t, function(e, t) {
  4660. i._setOption(e, t),
  4661. e in i.sizeRelatedOptions && (s = !0),
  4662. e in i.resizableRelatedOptions && (n[e] = t)
  4663. }),
  4664. s && (this._size(),
  4665. this._position()),
  4666. this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", n)
  4667. },
  4668. _setOption: function(e, t) {
  4669. var i, s, n = this.uiDialog;
  4670. "dialogClass" === e && n.removeClass(this.options.dialogClass).addClass(t),
  4671. "disabled" !== e && (this._super(e, t),
  4672. "appendTo" === e && this.uiDialog.appendTo(this._appendTo()),
  4673. "buttons" === e && this._createButtons(),
  4674. "closeText" === e && this.uiDialogTitlebarClose.button({
  4675. label: "" + t
  4676. }),
  4677. "draggable" === e && (i = n.is(":data(ui-draggable)"),
  4678. i && !t && n.draggable("destroy"),
  4679. !i && t && this._makeDraggable()),
  4680. "position" === e && this._position(),
  4681. "resizable" === e && (s = n.is(":data(ui-resizable)"),
  4682. s && !t && n.resizable("destroy"),
  4683. s && "string" == typeof t && n.resizable("option", "handles", t),
  4684. s || t === !1 || this._makeResizable()),
  4685. "title" === e && this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))
  4686. },
  4687. _size: function() {
  4688. var e, t, i, s = this.options;
  4689. this.element.show().css({
  4690. width: "auto",
  4691. minHeight: 0,
  4692. maxHeight: "none",
  4693. height: 0
  4694. }),
  4695. s.minWidth > s.width && (s.width = s.minWidth),
  4696. e = this.uiDialog.css({
  4697. height: "auto",
  4698. width: s.width
  4699. }).outerHeight(),
  4700. t = Math.max(0, s.minHeight - e),
  4701. i = "number" == typeof s.maxHeight ? Math.max(0, s.maxHeight - e) : "none",
  4702. "auto" === s.height ? this.element.css({
  4703. minHeight: t,
  4704. maxHeight: i,
  4705. height: "auto"
  4706. }) : this.element.height(Math.max(0, s.height - e)),
  4707. this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())
  4708. },
  4709. _blockFrames: function() {
  4710. this.iframeBlocks = this.document.find("iframe").map(function() {
  4711. var t = e(this);
  4712. return e("<div>").css({
  4713. position: "absolute",
  4714. width: t.outerWidth(),
  4715. height: t.outerHeight()
  4716. }).appendTo(t.parent()).offset(t.offset())[0]
  4717. })
  4718. },
  4719. _unblockFrames: function() {
  4720. this.iframeBlocks && (this.iframeBlocks.remove(),
  4721. delete this.iframeBlocks)
  4722. },
  4723. _allowInteraction: function(t) {
  4724. return e(t.target).closest(".ui-dialog").length ? !0 : !!e(t.target).closest(".ui-datepicker").length
  4725. },
  4726. _createOverlay: function() {
  4727. if (this.options.modal) {
  4728. var t = !0;
  4729. this._delay(function() {
  4730. t = !1
  4731. }),
  4732. this.document.data("ui-dialog-overlays") || this._on(this.document, {
  4733. focusin: function(e) {
  4734. t || this._allowInteraction(e) || (e.preventDefault(),
  4735. this._trackingInstances()[0]._focusTabbable())
  4736. }
  4737. }),
  4738. this.overlay = e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),
  4739. this._on(this.overlay, {
  4740. mousedown: "_keepFocus"
  4741. }),
  4742. this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1)
  4743. }
  4744. },
  4745. _destroyOverlay: function() {
  4746. if (this.options.modal && this.overlay) {
  4747. var e = this.document.data("ui-dialog-overlays") - 1;
  4748. e ? this.document.data("ui-dialog-overlays", e) : this.document.unbind("focusin").removeData("ui-dialog-overlays"),
  4749. this.overlay.remove(),
  4750. this.overlay = null
  4751. }
  4752. }
  4753. }),
  4754. e.widget("ui.droppable", {
  4755. version: "1.11.4",
  4756. widgetEventPrefix: "drop",
  4757. options: {
  4758. accept: "*",
  4759. activeClass: !1,
  4760. addClasses: !0,
  4761. greedy: !1,
  4762. hoverClass: !1,
  4763. scope: "default",
  4764. tolerance: "intersect",
  4765. activate: null,
  4766. deactivate: null,
  4767. drop: null,
  4768. out: null,
  4769. over: null
  4770. },
  4771. _create: function() {
  4772. var t, i = this.options, s = i.accept;
  4773. this.isover = !1,
  4774. this.isout = !0,
  4775. this.accept = e.isFunction(s) ? s : function(e) {
  4776. return e.is(s)
  4777. }
  4778. ,
  4779. this.proportions = function() {
  4780. return arguments.length ? (t = arguments[0],
  4781. void 0) : t ? t : t = {
  4782. width: this.element[0].offsetWidth,
  4783. height: this.element[0].offsetHeight
  4784. }
  4785. }
  4786. ,
  4787. this._addToManager(i.scope),
  4788. i.addClasses && this.element.addClass("ui-droppable")
  4789. },
  4790. _addToManager: function(t) {
  4791. e.ui.ddmanager.droppables[t] = e.ui.ddmanager.droppables[t] || [],
  4792. e.ui.ddmanager.droppables[t].push(this)
  4793. },
  4794. _splice: function(e) {
  4795. for (var t = 0; e.length > t; t++)
  4796. e[t] === this && e.splice(t, 1)
  4797. },
  4798. _destroy: function() {
  4799. var t = e.ui.ddmanager.droppables[this.options.scope];
  4800. this._splice(t),
  4801. this.element.removeClass("ui-droppable ui-droppable-disabled")
  4802. },
  4803. _setOption: function(t, i) {
  4804. if ("accept" === t)
  4805. this.accept = e.isFunction(i) ? i : function(e) {
  4806. return e.is(i)
  4807. }
  4808. ;
  4809. else if ("scope" === t) {
  4810. var s = e.ui.ddmanager.droppables[this.options.scope];
  4811. this._splice(s),
  4812. this._addToManager(i)
  4813. }
  4814. this._super(t, i)
  4815. },
  4816. _activate: function(t) {
  4817. var i = e.ui.ddmanager.current;
  4818. this.options.activeClass && this.element.addClass(this.options.activeClass),
  4819. i && this._trigger("activate", t, this.ui(i))
  4820. },
  4821. _deactivate: function(t) {
  4822. var i = e.ui.ddmanager.current;
  4823. this.options.activeClass && this.element.removeClass(this.options.activeClass),
  4824. i && this._trigger("deactivate", t, this.ui(i))
  4825. },
  4826. _over: function(t) {
  4827. var i = e.ui.ddmanager.current;
  4828. i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass),
  4829. this._trigger("over", t, this.ui(i)))
  4830. },
  4831. _out: function(t) {
  4832. var i = e.ui.ddmanager.current;
  4833. i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass),
  4834. this._trigger("out", t, this.ui(i)))
  4835. },
  4836. _drop: function(t, i) {
  4837. var s = i || e.ui.ddmanager.current
  4838. , n = !1;
  4839. return s && (s.currentItem || s.element)[0] !== this.element[0] ? (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
  4840. var i = e(this).droppable("instance");
  4841. return i.options.greedy && !i.options.disabled && i.options.scope === s.options.scope && i.accept.call(i.element[0], s.currentItem || s.element) && e.ui.intersect(s, e.extend(i, {
  4842. offset: i.element.offset()
  4843. }), i.options.tolerance, t) ? (n = !0,
  4844. !1) : void 0
  4845. }),
  4846. n ? !1 : this.accept.call(this.element[0], s.currentItem || s.element) ? (this.options.activeClass && this.element.removeClass(this.options.activeClass),
  4847. this.options.hoverClass && this.element.removeClass(this.options.hoverClass),
  4848. this._trigger("drop", t, this.ui(s)),
  4849. this.element) : !1) : !1
  4850. },
  4851. ui: function(e) {
  4852. return {
  4853. draggable: e.currentItem || e.element,
  4854. helper: e.helper,
  4855. position: e.position,
  4856. offset: e.positionAbs
  4857. }
  4858. }
  4859. }),
  4860. e.ui.intersect = function() {
  4861. function e(e, t, i) {
  4862. return e >= t && t + i > e
  4863. }
  4864. return function(t, i, s, n) {
  4865. if (!i.offset)
  4866. return !1;
  4867. var a = (t.positionAbs || t.position.absolute).left + t.margins.left
  4868. , o = (t.positionAbs || t.position.absolute).top + t.margins.top
  4869. , r = a + t.helperProportions.width
  4870. , h = o + t.helperProportions.height
  4871. , l = i.offset.left
  4872. , u = i.offset.top
  4873. , d = l + i.proportions().width
  4874. , c = u + i.proportions().height;
  4875. switch (s) {
  4876. case "fit":
  4877. return a >= l && d >= r && o >= u && c >= h;
  4878. case "intersect":
  4879. return a + t.helperProportions.width / 2 > l && d > r - t.helperProportions.width / 2 && o + t.helperProportions.height / 2 > u && c > h - t.helperProportions.height / 2;
  4880. case "pointer":
  4881. return e(n.pageY, u, i.proportions().height) && e(n.pageX, l, i.proportions().width);
  4882. case "touch":
  4883. return (o >= u && c >= o || h >= u && c >= h || u > o && h > c) && (a >= l && d >= a || r >= l && d >= r || l > a && r > d);
  4884. default:
  4885. return !1
  4886. }
  4887. }
  4888. }(),
  4889. e.ui.ddmanager = {
  4890. current: null,
  4891. droppables: {
  4892. "default": []
  4893. },
  4894. prepareOffsets: function(t, i) {
  4895. var s, n, a = e.ui.ddmanager.droppables[t.options.scope] || [], o = i ? i.type : null, r = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
  4896. e: for (s = 0; a.length > s; s++)
  4897. if (!(a[s].options.disabled || t && !a[s].accept.call(a[s].element[0], t.currentItem || t.element))) {
  4898. for (n = 0; r.length > n; n++)
  4899. if (r[n] === a[s].element[0]) {
  4900. a[s].proportions().height = 0;
  4901. continue e
  4902. }
  4903. a[s].visible = "none" !== a[s].element.css("display"),
  4904. a[s].visible && ("mousedown" === o && a[s]._activate.call(a[s], i),
  4905. a[s].offset = a[s].element.offset(),
  4906. a[s].proportions({
  4907. width: a[s].element[0].offsetWidth,
  4908. height: a[s].element[0].offsetHeight
  4909. }))
  4910. }
  4911. },
  4912. drop: function(t, i) {
  4913. var s = !1;
  4914. return e.each((e.ui.ddmanager.droppables[t.options.scope] || []).slice(), function() {
  4915. this.options && (!this.options.disabled && this.visible && e.ui.intersect(t, this, this.options.tolerance, i) && (s = this._drop.call(this, i) || s),
  4916. !this.options.disabled && this.visible && this.accept.call(this.element[0], t.currentItem || t.element) && (this.isout = !0,
  4917. this.isover = !1,
  4918. this._deactivate.call(this, i)))
  4919. }),
  4920. s
  4921. },
  4922. dragStart: function(t, i) {
  4923. t.element.parentsUntil("body").bind("scroll.droppable", function() {
  4924. t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i)
  4925. })
  4926. },
  4927. drag: function(t, i) {
  4928. t.options.refreshPositions && e.ui.ddmanager.prepareOffsets(t, i),
  4929. e.each(e.ui.ddmanager.droppables[t.options.scope] || [], function() {
  4930. if (!this.options.disabled && !this.greedyChild && this.visible) {
  4931. var s, n, a, o = e.ui.intersect(t, this, this.options.tolerance, i), r = !o && this.isover ? "isout" : o && !this.isover ? "isover" : null;
  4932. r && (this.options.greedy && (n = this.options.scope,
  4933. a = this.element.parents(":data(ui-droppable)").filter(function() {
  4934. return e(this).droppable("instance").options.scope === n
  4935. }),
  4936. a.length && (s = e(a[0]).droppable("instance"),
  4937. s.greedyChild = "isover" === r)),
  4938. s && "isover" === r && (s.isover = !1,
  4939. s.isout = !0,
  4940. s._out.call(s, i)),
  4941. this[r] = !0,
  4942. this["isout" === r ? "isover" : "isout"] = !1,
  4943. this["isover" === r ? "_over" : "_out"].call(this, i),
  4944. s && "isout" === r && (s.isout = !1,
  4945. s.isover = !0,
  4946. s._over.call(s, i)))
  4947. }
  4948. })
  4949. },
  4950. dragStop: function(t, i) {
  4951. t.element.parentsUntil("body").unbind("scroll.droppable"),
  4952. t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i)
  4953. }
  4954. },
  4955. e.ui.droppable;
  4956. var y = "ui-effects-"
  4957. , b = e;
  4958. e.effects = {
  4959. effect: {}
  4960. },
  4961. function(e, t) {
  4962. function i(e, t, i) {
  4963. var s = d[t.type] || {};
  4964. return null == e ? i || !t.def ? null : t.def : (e = s.floor ? ~~e : parseFloat(e),
  4965. isNaN(e) ? t.def : s.mod ? (e + s.mod) % s.mod : 0 > e ? 0 : e > s.max ? s.max : e)
  4966. }
  4967. function s(i) {
  4968. var s = l()
  4969. , n = s._rgba = [];
  4970. return i = i.toLowerCase(),
  4971. f(h, function(e, a) {
  4972. var o, r = a.re.exec(i), h = r && a.parse(r), l = a.space || "rgba";
  4973. return h ? (o = s[l](h),
  4974. s[u[l].cache] = o[u[l].cache],
  4975. n = s._rgba = o._rgba,
  4976. !1) : t
  4977. }),
  4978. n.length ? ("0,0,0,0" === n.join() && e.extend(n, a.transparent),
  4979. s) : a[i]
  4980. }
  4981. function n(e, t, i) {
  4982. return i = (i + 1) % 1,
  4983. 1 > 6 * i ? e + 6 * (t - e) * i : 1 > 2 * i ? t : 2 > 3 * i ? e + 6 * (t - e) * (2 / 3 - i) : e
  4984. }
  4985. var a, o = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", r = /^([\-+])=\s*(\d+\.?\d*)/, h = [{
  4986. re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  4987. parse: function(e) {
  4988. return [e[1], e[2], e[3], e[4]]
  4989. }
  4990. }, {
  4991. re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  4992. parse: function(e) {
  4993. return [2.55 * e[1], 2.55 * e[2], 2.55 * e[3], e[4]]
  4994. }
  4995. }, {
  4996. re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
  4997. parse: function(e) {
  4998. return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)]
  4999. }
  5000. }, {
  5001. re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
  5002. parse: function(e) {
  5003. return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)]
  5004. }
  5005. }, {
  5006. re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
  5007. space: "hsla",
  5008. parse: function(e) {
  5009. return [e[1], e[2] / 100, e[3] / 100, e[4]]
  5010. }
  5011. }], l = e.Color = function(t, i, s, n) {
  5012. return new e.Color.fn.parse(t,i,s,n)
  5013. }
  5014. , u = {
  5015. rgba: {
  5016. props: {
  5017. red: {
  5018. idx: 0,
  5019. type: "byte"
  5020. },
  5021. green: {
  5022. idx: 1,
  5023. type: "byte"
  5024. },
  5025. blue: {
  5026. idx: 2,
  5027. type: "byte"
  5028. }
  5029. }
  5030. },
  5031. hsla: {
  5032. props: {
  5033. hue: {
  5034. idx: 0,
  5035. type: "degrees"
  5036. },
  5037. saturation: {
  5038. idx: 1,
  5039. type: "percent"
  5040. },
  5041. lightness: {
  5042. idx: 2,
  5043. type: "percent"
  5044. }
  5045. }
  5046. }
  5047. }, d = {
  5048. "byte": {
  5049. floor: !0,
  5050. max: 255
  5051. },
  5052. percent: {
  5053. max: 1
  5054. },
  5055. degrees: {
  5056. mod: 360,
  5057. floor: !0
  5058. }
  5059. }, c = l.support = {}, p = e("<p>")[0], f = e.each;
  5060. p.style.cssText = "background-color:rgba(1,1,1,.5)",
  5061. c.rgba = p.style.backgroundColor.indexOf("rgba") > -1,
  5062. f(u, function(e, t) {
  5063. t.cache = "_" + e,
  5064. t.props.alpha = {
  5065. idx: 3,
  5066. type: "percent",
  5067. def: 1
  5068. }
  5069. }),
  5070. l.fn = e.extend(l.prototype, {
  5071. parse: function(n, o, r, h) {
  5072. if (n === t)
  5073. return this._rgba = [null, null, null, null],
  5074. this;
  5075. (n.jquery || n.nodeType) && (n = e(n).css(o),
  5076. o = t);
  5077. var d = this
  5078. , c = e.type(n)
  5079. , p = this._rgba = [];
  5080. return o !== t && (n = [n, o, r, h],
  5081. c = "array"),
  5082. "string" === c ? this.parse(s(n) || a._default) : "array" === c ? (f(u.rgba.props, function(e, t) {
  5083. p[t.idx] = i(n[t.idx], t)
  5084. }),
  5085. this) : "object" === c ? (n instanceof l ? f(u, function(e, t) {
  5086. n[t.cache] && (d[t.cache] = n[t.cache].slice())
  5087. }) : f(u, function(t, s) {
  5088. var a = s.cache;
  5089. f(s.props, function(e, t) {
  5090. if (!d[a] && s.to) {
  5091. if ("alpha" === e || null == n[e])
  5092. return;
  5093. d[a] = s.to(d._rgba)
  5094. }
  5095. d[a][t.idx] = i(n[e], t, !0)
  5096. }),
  5097. d[a] && 0 > e.inArray(null, d[a].slice(0, 3)) && (d[a][3] = 1,
  5098. s.from && (d._rgba = s.from(d[a])))
  5099. }),
  5100. this) : t
  5101. },
  5102. is: function(e) {
  5103. var i = l(e)
  5104. , s = !0
  5105. , n = this;
  5106. return f(u, function(e, a) {
  5107. var o, r = i[a.cache];
  5108. return r && (o = n[a.cache] || a.to && a.to(n._rgba) || [],
  5109. f(a.props, function(e, i) {
  5110. return null != r[i.idx] ? s = r[i.idx] === o[i.idx] : t
  5111. })),
  5112. s
  5113. }),
  5114. s
  5115. },
  5116. _space: function() {
  5117. var e = []
  5118. , t = this;
  5119. return f(u, function(i, s) {
  5120. t[s.cache] && e.push(i)
  5121. }),
  5122. e.pop()
  5123. },
  5124. transition: function(e, t) {
  5125. var s = l(e)
  5126. , n = s._space()
  5127. , a = u[n]
  5128. , o = 0 === this.alpha() ? l("transparent") : this
  5129. , r = o[a.cache] || a.to(o._rgba)
  5130. , h = r.slice();
  5131. return s = s[a.cache],
  5132. f(a.props, function(e, n) {
  5133. var a = n.idx
  5134. , o = r[a]
  5135. , l = s[a]
  5136. , u = d[n.type] || {};
  5137. null !== l && (null === o ? h[a] = l : (u.mod && (l - o > u.mod / 2 ? o += u.mod : o - l > u.mod / 2 && (o -= u.mod)),
  5138. h[a] = i((l - o) * t + o, n)))
  5139. }),
  5140. this[n](h)
  5141. },
  5142. blend: function(t) {
  5143. if (1 === this._rgba[3])
  5144. return this;
  5145. var i = this._rgba.slice()
  5146. , s = i.pop()
  5147. , n = l(t)._rgba;
  5148. return l(e.map(i, function(e, t) {
  5149. return (1 - s) * n[t] + s * e
  5150. }))
  5151. },
  5152. toRgbaString: function() {
  5153. var t = "rgba("
  5154. , i = e.map(this._rgba, function(e, t) {
  5155. return null == e ? t > 2 ? 1 : 0 : e
  5156. });
  5157. return 1 === i[3] && (i.pop(),
  5158. t = "rgb("),
  5159. t + i.join() + ")"
  5160. },
  5161. toHslaString: function() {
  5162. var t = "hsla("
  5163. , i = e.map(this.hsla(), function(e, t) {
  5164. return null == e && (e = t > 2 ? 1 : 0),
  5165. t && 3 > t && (e = Math.round(100 * e) + "%"),
  5166. e
  5167. });
  5168. return 1 === i[3] && (i.pop(),
  5169. t = "hsl("),
  5170. t + i.join() + ")"
  5171. },
  5172. toHexString: function(t) {
  5173. var i = this._rgba.slice()
  5174. , s = i.pop();
  5175. return t && i.push(~~(255 * s)),
  5176. "#" + e.map(i, function(e) {
  5177. return e = (e || 0).toString(16),
  5178. 1 === e.length ? "0" + e : e
  5179. }).join("")
  5180. },
  5181. toString: function() {
  5182. return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
  5183. }
  5184. }),
  5185. l.fn.parse.prototype = l.fn,
  5186. u.hsla.to = function(e) {
  5187. if (null == e[0] || null == e[1] || null == e[2])
  5188. return [null, null, null, e[3]];
  5189. var t, i, s = e[0] / 255, n = e[1] / 255, a = e[2] / 255, o = e[3], r = Math.max(s, n, a), h = Math.min(s, n, a), l = r - h, u = r + h, d = .5 * u;
  5190. return t = h === r ? 0 : s === r ? 60 * (n - a) / l + 360 : n === r ? 60 * (a - s) / l + 120 : 60 * (s - n) / l + 240,
  5191. i = 0 === l ? 0 : .5 >= d ? l / u : l / (2 - u),
  5192. [Math.round(t) % 360, i, d, null == o ? 1 : o]
  5193. }
  5194. ,
  5195. u.hsla.from = function(e) {
  5196. if (null == e[0] || null == e[1] || null == e[2])
  5197. return [null, null, null, e[3]];
  5198. var t = e[0] / 360
  5199. , i = e[1]
  5200. , s = e[2]
  5201. , a = e[3]
  5202. , o = .5 >= s ? s * (1 + i) : s + i - s * i
  5203. , r = 2 * s - o;
  5204. return [Math.round(255 * n(r, o, t + 1 / 3)), Math.round(255 * n(r, o, t)), Math.round(255 * n(r, o, t - 1 / 3)), a]
  5205. }
  5206. ,
  5207. f(u, function(s, n) {
  5208. var a = n.props
  5209. , o = n.cache
  5210. , h = n.to
  5211. , u = n.from;
  5212. l.fn[s] = function(s) {
  5213. if (h && !this[o] && (this[o] = h(this._rgba)),
  5214. s === t)
  5215. return this[o].slice();
  5216. var n, r = e.type(s), d = "array" === r || "object" === r ? s : arguments, c = this[o].slice();
  5217. return f(a, function(e, t) {
  5218. var s = d["object" === r ? e : t.idx];
  5219. null == s && (s = c[t.idx]),
  5220. c[t.idx] = i(s, t)
  5221. }),
  5222. u ? (n = l(u(c)),
  5223. n[o] = c,
  5224. n) : l(c)
  5225. }
  5226. ,
  5227. f(a, function(t, i) {
  5228. l.fn[t] || (l.fn[t] = function(n) {
  5229. var a, o = e.type(n), h = "alpha" === t ? this._hsla ? "hsla" : "rgba" : s, l = this[h](), u = l[i.idx];
  5230. return "undefined" === o ? u : ("function" === o && (n = n.call(this, u),
  5231. o = e.type(n)),
  5232. null == n && i.empty ? this : ("string" === o && (a = r.exec(n),
  5233. a && (n = u + parseFloat(a[2]) * ("+" === a[1] ? 1 : -1))),
  5234. l[i.idx] = n,
  5235. this[h](l)))
  5236. }
  5237. )
  5238. })
  5239. }),
  5240. l.hook = function(t) {
  5241. var i = t.split(" ");
  5242. f(i, function(t, i) {
  5243. e.cssHooks[i] = {
  5244. set: function(t, n) {
  5245. var a, o, r = "";
  5246. if ("transparent" !== n && ("string" !== e.type(n) || (a = s(n)))) {
  5247. if (n = l(a || n),
  5248. !c.rgba && 1 !== n._rgba[3]) {
  5249. for (o = "backgroundColor" === i ? t.parentNode : t; ("" === r || "transparent" === r) && o && o.style; )
  5250. try {
  5251. r = e.css(o, "backgroundColor"),
  5252. o = o.parentNode
  5253. } catch (h) {}
  5254. n = n.blend(r && "transparent" !== r ? r : "_default")
  5255. }
  5256. n = n.toRgbaString()
  5257. }
  5258. try {
  5259. t.style[i] = n
  5260. } catch (h) {}
  5261. }
  5262. },
  5263. e.fx.step[i] = function(t) {
  5264. t.colorInit || (t.start = l(t.elem, i),
  5265. t.end = l(t.end),
  5266. t.colorInit = !0),
  5267. e.cssHooks[i].set(t.elem, t.start.transition(t.end, t.pos))
  5268. }
  5269. })
  5270. }
  5271. ,
  5272. l.hook(o),
  5273. e.cssHooks.borderColor = {
  5274. expand: function(e) {
  5275. var t = {};
  5276. return f(["Top", "Right", "Bottom", "Left"], function(i, s) {
  5277. t["border" + s + "Color"] = e
  5278. }),
  5279. t
  5280. }
  5281. },
  5282. a = e.Color.names = {
  5283. aqua: "#00ffff",
  5284. black: "#000000",
  5285. blue: "#0000ff",
  5286. fuchsia: "#ff00ff",
  5287. gray: "#808080",
  5288. green: "#008000",
  5289. lime: "#00ff00",
  5290. maroon: "#800000",
  5291. navy: "#000080",
  5292. olive: "#808000",
  5293. purple: "#800080",
  5294. red: "#ff0000",
  5295. silver: "#c0c0c0",
  5296. teal: "#008080",
  5297. white: "#ffffff",
  5298. yellow: "#ffff00",
  5299. transparent: [null, null, null, 0],
  5300. _default: "#ffffff"
  5301. }
  5302. }(b),
  5303. function() {
  5304. function t(t) {
  5305. var i, s, n = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle, a = {};
  5306. if (n && n.length && n[0] && n[n[0]])
  5307. for (s = n.length; s--; )
  5308. i = n[s],
  5309. "string" == typeof n[i] && (a[e.camelCase(i)] = n[i]);
  5310. else
  5311. for (i in n)
  5312. "string" == typeof n[i] && (a[i] = n[i]);
  5313. return a
  5314. }
  5315. function i(t, i) {
  5316. var s, a, o = {};
  5317. for (s in i)
  5318. a = i[s],
  5319. t[s] !== a && (n[s] || (e.fx.step[s] || !isNaN(parseFloat(a))) && (o[s] = a));
  5320. return o
  5321. }
  5322. var s = ["add", "remove", "toggle"]
  5323. , n = {
  5324. border: 1,
  5325. borderBottom: 1,
  5326. borderColor: 1,
  5327. borderLeft: 1,
  5328. borderRight: 1,
  5329. borderTop: 1,
  5330. borderWidth: 1,
  5331. margin: 1,
  5332. padding: 1
  5333. };
  5334. e.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(t, i) {
  5335. e.fx.step[i] = function(e) {
  5336. ("none" !== e.end && !e.setAttr || 1 === e.pos && !e.setAttr) && (b.style(e.elem, i, e.end),
  5337. e.setAttr = !0)
  5338. }
  5339. }),
  5340. e.fn.addBack || (e.fn.addBack = function(e) {
  5341. return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
  5342. }
  5343. ),
  5344. e.effects.animateClass = function(n, a, o, r) {
  5345. var h = e.speed(a, o, r);
  5346. return this.queue(function() {
  5347. var a, o = e(this), r = o.attr("class") || "", l = h.children ? o.find("*").addBack() : o;
  5348. l = l.map(function() {
  5349. var i = e(this);
  5350. return {
  5351. el: i,
  5352. start: t(this)
  5353. }
  5354. }),
  5355. a = function() {
  5356. e.each(s, function(e, t) {
  5357. n[t] && o[t + "Class"](n[t])
  5358. })
  5359. }
  5360. ,
  5361. a(),
  5362. l = l.map(function() {
  5363. return this.end = t(this.el[0]),
  5364. this.diff = i(this.start, this.end),
  5365. this
  5366. }),
  5367. o.attr("class", r),
  5368. l = l.map(function() {
  5369. var t = this
  5370. , i = e.Deferred()
  5371. , s = e.extend({}, h, {
  5372. queue: !1,
  5373. complete: function() {
  5374. i.resolve(t)
  5375. }
  5376. });
  5377. return this.el.animate(this.diff, s),
  5378. i.promise()
  5379. }),
  5380. e.when.apply(e, l.get()).done(function() {
  5381. a(),
  5382. e.each(arguments, function() {
  5383. var t = this.el;
  5384. e.each(this.diff, function(e) {
  5385. t.css(e, "")
  5386. })
  5387. }),
  5388. h.complete.call(o[0])
  5389. })
  5390. })
  5391. }
  5392. ,
  5393. e.fn.extend({
  5394. addClass: function(t) {
  5395. return function(i, s, n, a) {
  5396. return s ? e.effects.animateClass.call(this, {
  5397. add: i
  5398. }, s, n, a) : t.apply(this, arguments)
  5399. }
  5400. }(e.fn.addClass),
  5401. removeClass: function(t) {
  5402. return function(i, s, n, a) {
  5403. return arguments.length > 1 ? e.effects.animateClass.call(this, {
  5404. remove: i
  5405. }, s, n, a) : t.apply(this, arguments)
  5406. }
  5407. }(e.fn.removeClass),
  5408. toggleClass: function(t) {
  5409. return function(i, s, n, a, o) {
  5410. return "boolean" == typeof s || void 0 === s ? n ? e.effects.animateClass.call(this, s ? {
  5411. add: i
  5412. } : {
  5413. remove: i
  5414. }, n, a, o) : t.apply(this, arguments) : e.effects.animateClass.call(this, {
  5415. toggle: i
  5416. }, s, n, a)
  5417. }
  5418. }(e.fn.toggleClass),
  5419. switchClass: function(t, i, s, n, a) {
  5420. return e.effects.animateClass.call(this, {
  5421. add: i,
  5422. remove: t
  5423. }, s, n, a)
  5424. }
  5425. })
  5426. }(),
  5427. function() {
  5428. function t(t, i, s, n) {
  5429. return e.isPlainObject(t) && (i = t,
  5430. t = t.effect),
  5431. t = {
  5432. effect: t
  5433. },
  5434. null == i && (i = {}),
  5435. e.isFunction(i) && (n = i,
  5436. s = null,
  5437. i = {}),
  5438. ("number" == typeof i || e.fx.speeds[i]) && (n = s,
  5439. s = i,
  5440. i = {}),
  5441. e.isFunction(s) && (n = s,
  5442. s = null),
  5443. i && e.extend(t, i),
  5444. s = s || i.duration,
  5445. t.duration = e.fx.off ? 0 : "number" == typeof s ? s : s in e.fx.speeds ? e.fx.speeds[s] : e.fx.speeds._default,
  5446. t.complete = n || i.complete,
  5447. t
  5448. }
  5449. function i(t) {
  5450. return !t || "number" == typeof t || e.fx.speeds[t] ? !0 : "string" != typeof t || e.effects.effect[t] ? e.isFunction(t) ? !0 : "object" != typeof t || t.effect ? !1 : !0 : !0
  5451. }
  5452. e.extend(e.effects, {
  5453. version: "1.11.4",
  5454. save: function(e, t) {
  5455. for (var i = 0; t.length > i; i++)
  5456. null !== t[i] && e.data(y + t[i], e[0].style[t[i]])
  5457. },
  5458. restore: function(e, t) {
  5459. var i, s;
  5460. for (s = 0; t.length > s; s++)
  5461. null !== t[s] && (i = e.data(y + t[s]),
  5462. void 0 === i && (i = ""),
  5463. e.css(t[s], i))
  5464. },
  5465. setMode: function(e, t) {
  5466. return "toggle" === t && (t = e.is(":hidden") ? "show" : "hide"),
  5467. t
  5468. },
  5469. getBaseline: function(e, t) {
  5470. var i, s;
  5471. switch (e[0]) {
  5472. case "top":
  5473. i = 0;
  5474. break;
  5475. case "middle":
  5476. i = .5;
  5477. break;
  5478. case "bottom":
  5479. i = 1;
  5480. break;
  5481. default:
  5482. i = e[0] / t.height
  5483. }
  5484. switch (e[1]) {
  5485. case "left":
  5486. s = 0;
  5487. break;
  5488. case "center":
  5489. s = .5;
  5490. break;
  5491. case "right":
  5492. s = 1;
  5493. break;
  5494. default:
  5495. s = e[1] / t.width
  5496. }
  5497. return {
  5498. x: s,
  5499. y: i
  5500. }
  5501. },
  5502. createWrapper: function(t) {
  5503. if (t.parent().is(".ui-effects-wrapper"))
  5504. return t.parent();
  5505. var i = {
  5506. width: t.outerWidth(!0),
  5507. height: t.outerHeight(!0),
  5508. "float": t.css("float")
  5509. }
  5510. , s = e("<div></div>").addClass("ui-effects-wrapper").css({
  5511. fontSize: "100%",
  5512. background: "transparent",
  5513. border: "none",
  5514. margin: 0,
  5515. padding: 0
  5516. })
  5517. , n = {
  5518. width: t.width(),
  5519. height: t.height()
  5520. }
  5521. , a = document.activeElement;
  5522. try {
  5523. a.id
  5524. } catch (o) {
  5525. a = document.body
  5526. }
  5527. return t.wrap(s),
  5528. (t[0] === a || e.contains(t[0], a)) && e(a).focus(),
  5529. s = t.parent(),
  5530. "static" === t.css("position") ? (s.css({
  5531. position: "relative"
  5532. }),
  5533. t.css({
  5534. position: "relative"
  5535. })) : (e.extend(i, {
  5536. position: t.css("position"),
  5537. zIndex: t.css("z-index")
  5538. }),
  5539. e.each(["top", "left", "bottom", "right"], function(e, s) {
  5540. i[s] = t.css(s),
  5541. isNaN(parseInt(i[s], 10)) && (i[s] = "auto")
  5542. }),
  5543. t.css({
  5544. position: "relative",
  5545. top: 0,
  5546. left: 0,
  5547. right: "auto",
  5548. bottom: "auto"
  5549. })),
  5550. t.css(n),
  5551. s.css(i).show()
  5552. },
  5553. removeWrapper: function(t) {
  5554. var i = document.activeElement;
  5555. return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t),
  5556. (t[0] === i || e.contains(t[0], i)) && e(i).focus()),
  5557. t
  5558. },
  5559. setTransition: function(t, i, s, n) {
  5560. return n = n || {},
  5561. e.each(i, function(e, i) {
  5562. var a = t.cssUnit(i);
  5563. a[0] > 0 && (n[i] = a[0] * s + a[1])
  5564. }),
  5565. n
  5566. }
  5567. }),
  5568. e.fn.extend({
  5569. effect: function() {
  5570. function i(t) {
  5571. function i() {
  5572. e.isFunction(a) && a.call(n[0]),
  5573. e.isFunction(t) && t()
  5574. }
  5575. var n = e(this)
  5576. , a = s.complete
  5577. , r = s.mode;
  5578. (n.is(":hidden") ? "hide" === r : "show" === r) ? (n[r](),
  5579. i()) : o.call(n[0], s, i)
  5580. }
  5581. var s = t.apply(this, arguments)
  5582. , n = s.mode
  5583. , a = s.queue
  5584. , o = e.effects.effect[s.effect];
  5585. return e.fx.off || !o ? n ? this[n](s.duration, s.complete) : this.each(function() {
  5586. s.complete && s.complete.call(this)
  5587. }) : a === !1 ? this.each(i) : this.queue(a || "fx", i)
  5588. },
  5589. show: function(e) {
  5590. return function(s) {
  5591. if (i(s))
  5592. return e.apply(this, arguments);
  5593. var n = t.apply(this, arguments);
  5594. return n.mode = "show",
  5595. this.effect.call(this, n)
  5596. }
  5597. }(e.fn.show),
  5598. hide: function(e) {
  5599. return function(s) {
  5600. if (i(s))
  5601. return e.apply(this, arguments);
  5602. var n = t.apply(this, arguments);
  5603. return n.mode = "hide",
  5604. this.effect.call(this, n)
  5605. }
  5606. }(e.fn.hide),
  5607. toggle: function(e) {
  5608. return function(s) {
  5609. if (i(s) || "boolean" == typeof s)
  5610. return e.apply(this, arguments);
  5611. var n = t.apply(this, arguments);
  5612. return n.mode = "toggle",
  5613. this.effect.call(this, n)
  5614. }
  5615. }(e.fn.toggle),
  5616. cssUnit: function(t) {
  5617. var i = this.css(t)
  5618. , s = [];
  5619. return e.each(["em", "px", "%", "pt"], function(e, t) {
  5620. i.indexOf(t) > 0 && (s = [parseFloat(i), t])
  5621. }),
  5622. s
  5623. }
  5624. })
  5625. }(),
  5626. function() {
  5627. var t = {};
  5628. e.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(e, i) {
  5629. t[i] = function(t) {
  5630. return Math.pow(t, e + 2)
  5631. }
  5632. }),
  5633. e.extend(t, {
  5634. Sine: function(e) {
  5635. return 1 - Math.cos(e * Math.PI / 2)
  5636. },
  5637. Circ: function(e) {
  5638. return 1 - Math.sqrt(1 - e * e)
  5639. },
  5640. Elastic: function(e) {
  5641. return 0 === e || 1 === e ? e : -Math.pow(2, 8 * (e - 1)) * Math.sin((80 * (e - 1) - 7.5) * Math.PI / 15)
  5642. },
  5643. Back: function(e) {
  5644. return e * e * (3 * e - 2)
  5645. },
  5646. Bounce: function(e) {
  5647. for (var t, i = 4; ((t = Math.pow(2, --i)) - 1) / 11 > e; )
  5648. ;
  5649. return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * t - 2) / 22 - e, 2)
  5650. }
  5651. }),
  5652. e.each(t, function(t, i) {
  5653. e.easing["easeIn" + t] = i,
  5654. e.easing["easeOut" + t] = function(e) {
  5655. return 1 - i(1 - e)
  5656. }
  5657. ,
  5658. e.easing["easeInOut" + t] = function(e) {
  5659. return .5 > e ? i(2 * e) / 2 : 1 - i(-2 * e + 2) / 2
  5660. }
  5661. })
  5662. }(),
  5663. e.effects,
  5664. e.effects.effect.blind = function(t, i) {
  5665. var s, n, a, o = e(this), r = /up|down|vertical/, h = /up|left|vertical|horizontal/, l = ["position", "top", "bottom", "left", "right", "height", "width"], u = e.effects.setMode(o, t.mode || "hide"), d = t.direction || "up", c = r.test(d), p = c ? "height" : "width", f = c ? "top" : "left", m = h.test(d), g = {}, v = "show" === u;
  5666. o.parent().is(".ui-effects-wrapper") ? e.effects.save(o.parent(), l) : e.effects.save(o, l),
  5667. o.show(),
  5668. s = e.effects.createWrapper(o).css({
  5669. overflow: "hidden"
  5670. }),
  5671. n = s[p](),
  5672. a = parseFloat(s.css(f)) || 0,
  5673. g[p] = v ? n : 0,
  5674. m || (o.css(c ? "bottom" : "right", 0).css(c ? "top" : "left", "auto").css({
  5675. position: "absolute"
  5676. }),
  5677. g[f] = v ? a : n + a),
  5678. v && (s.css(p, 0),
  5679. m || s.css(f, a + n)),
  5680. s.animate(g, {
  5681. duration: t.duration,
  5682. easing: t.easing,
  5683. queue: !1,
  5684. complete: function() {
  5685. "hide" === u && o.hide(),
  5686. e.effects.restore(o, l),
  5687. e.effects.removeWrapper(o),
  5688. i()
  5689. }
  5690. })
  5691. }
  5692. ,
  5693. e.effects.effect.bounce = function(t, i) {
  5694. var s, n, a, o = e(this), r = ["position", "top", "bottom", "left", "right", "height", "width"], h = e.effects.setMode(o, t.mode || "effect"), l = "hide" === h, u = "show" === h, d = t.direction || "up", c = t.distance, p = t.times || 5, f = 2 * p + (u || l ? 1 : 0), m = t.duration / f, g = t.easing, v = "up" === d || "down" === d ? "top" : "left", y = "up" === d || "left" === d, b = o.queue(), _ = b.length;
  5695. for ((u || l) && r.push("opacity"),
  5696. e.effects.save(o, r),
  5697. o.show(),
  5698. e.effects.createWrapper(o),
  5699. c || (c = o["top" === v ? "outerHeight" : "outerWidth"]() / 3),
  5700. u && (a = {
  5701. opacity: 1
  5702. },
  5703. a[v] = 0,
  5704. o.css("opacity", 0).css(v, y ? 2 * -c : 2 * c).animate(a, m, g)),
  5705. l && (c /= Math.pow(2, p - 1)),
  5706. a = {},
  5707. a[v] = 0,
  5708. s = 0; p > s; s++)
  5709. n = {},
  5710. n[v] = (y ? "-=" : "+=") + c,
  5711. o.animate(n, m, g).animate(a, m, g),
  5712. c = l ? 2 * c : c / 2;
  5713. l && (n = {
  5714. opacity: 0
  5715. },
  5716. n[v] = (y ? "-=" : "+=") + c,
  5717. o.animate(n, m, g)),
  5718. o.queue(function() {
  5719. l && o.hide(),
  5720. e.effects.restore(o, r),
  5721. e.effects.removeWrapper(o),
  5722. i()
  5723. }),
  5724. _ > 1 && b.splice.apply(b, [1, 0].concat(b.splice(_, f + 1))),
  5725. o.dequeue()
  5726. }
  5727. ,
  5728. e.effects.effect.clip = function(t, i) {
  5729. var s, n, a, o = e(this), r = ["position", "top", "bottom", "left", "right", "height", "width"], h = e.effects.setMode(o, t.mode || "hide"), l = "show" === h, u = t.direction || "vertical", d = "vertical" === u, c = d ? "height" : "width", p = d ? "top" : "left", f = {};
  5730. e.effects.save(o, r),
  5731. o.show(),
  5732. s = e.effects.createWrapper(o).css({
  5733. overflow: "hidden"
  5734. }),
  5735. n = "IMG" === o[0].tagName ? s : o,
  5736. a = n[c](),
  5737. l && (n.css(c, 0),
  5738. n.css(p, a / 2)),
  5739. f[c] = l ? a : 0,
  5740. f[p] = l ? 0 : a / 2,
  5741. n.animate(f, {
  5742. queue: !1,
  5743. duration: t.duration,
  5744. easing: t.easing,
  5745. complete: function() {
  5746. l || o.hide(),
  5747. e.effects.restore(o, r),
  5748. e.effects.removeWrapper(o),
  5749. i()
  5750. }
  5751. })
  5752. }
  5753. ,
  5754. e.effects.effect.drop = function(t, i) {
  5755. var s, n = e(this), a = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"], o = e.effects.setMode(n, t.mode || "hide"), r = "show" === o, h = t.direction || "left", l = "up" === h || "down" === h ? "top" : "left", u = "up" === h || "left" === h ? "pos" : "neg", d = {
  5756. opacity: r ? 1 : 0
  5757. };
  5758. e.effects.save(n, a),
  5759. n.show(),
  5760. e.effects.createWrapper(n),
  5761. s = t.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0) / 2,
  5762. r && n.css("opacity", 0).css(l, "pos" === u ? -s : s),
  5763. d[l] = (r ? "pos" === u ? "+=" : "-=" : "pos" === u ? "-=" : "+=") + s,
  5764. n.animate(d, {
  5765. queue: !1,
  5766. duration: t.duration,
  5767. easing: t.easing,
  5768. complete: function() {
  5769. "hide" === o && n.hide(),
  5770. e.effects.restore(n, a),
  5771. e.effects.removeWrapper(n),
  5772. i()
  5773. }
  5774. })
  5775. }
  5776. ,
  5777. e.effects.effect.explode = function(t, i) {
  5778. function s() {
  5779. b.push(this),
  5780. b.length === d * c && n()
  5781. }
  5782. function n() {
  5783. p.css({
  5784. visibility: "visible"
  5785. }),
  5786. e(b).remove(),
  5787. m || p.hide(),
  5788. i()
  5789. }
  5790. var a, o, r, h, l, u, d = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, c = d, p = e(this), f = e.effects.setMode(p, t.mode || "hide"), m = "show" === f, g = p.show().css("visibility", "hidden").offset(), v = Math.ceil(p.outerWidth() / c), y = Math.ceil(p.outerHeight() / d), b = [];
  5791. for (a = 0; d > a; a++)
  5792. for (h = g.top + a * y,
  5793. u = a - (d - 1) / 2,
  5794. o = 0; c > o; o++)
  5795. r = g.left + o * v,
  5796. l = o - (c - 1) / 2,
  5797. p.clone().appendTo("body").wrap("<div></div>").css({
  5798. position: "absolute",
  5799. visibility: "visible",
  5800. left: -o * v,
  5801. top: -a * y
  5802. }).parent().addClass("ui-effects-explode").css({
  5803. position: "absolute",
  5804. overflow: "hidden",
  5805. width: v,
  5806. height: y,
  5807. left: r + (m ? l * v : 0),
  5808. top: h + (m ? u * y : 0),
  5809. opacity: m ? 0 : 1
  5810. }).animate({
  5811. left: r + (m ? 0 : l * v),
  5812. top: h + (m ? 0 : u * y),
  5813. opacity: m ? 1 : 0
  5814. }, t.duration || 500, t.easing, s)
  5815. }
  5816. ,
  5817. e.effects.effect.fade = function(t, i) {
  5818. var s = e(this)
  5819. , n = e.effects.setMode(s, t.mode || "toggle");
  5820. s.animate({
  5821. opacity: n
  5822. }, {
  5823. queue: !1,
  5824. duration: t.duration,
  5825. easing: t.easing,
  5826. complete: i
  5827. })
  5828. }
  5829. ,
  5830. e.effects.effect.fold = function(t, i) {
  5831. var s, n, a = e(this), o = ["position", "top", "bottom", "left", "right", "height", "width"], r = e.effects.setMode(a, t.mode || "hide"), h = "show" === r, l = "hide" === r, u = t.size || 15, d = /([0-9]+)%/.exec(u), c = !!t.horizFirst, p = h !== c, f = p ? ["width", "height"] : ["height", "width"], m = t.duration / 2, g = {}, v = {};
  5832. e.effects.save(a, o),
  5833. a.show(),
  5834. s = e.effects.createWrapper(a).css({
  5835. overflow: "hidden"
  5836. }),
  5837. n = p ? [s.width(), s.height()] : [s.height(), s.width()],
  5838. d && (u = parseInt(d[1], 10) / 100 * n[l ? 0 : 1]),
  5839. h && s.css(c ? {
  5840. height: 0,
  5841. width: u
  5842. } : {
  5843. height: u,
  5844. width: 0
  5845. }),
  5846. g[f[0]] = h ? n[0] : u,
  5847. v[f[1]] = h ? n[1] : 0,
  5848. s.animate(g, m, t.easing).animate(v, m, t.easing, function() {
  5849. l && a.hide(),
  5850. e.effects.restore(a, o),
  5851. e.effects.removeWrapper(a),
  5852. i()
  5853. })
  5854. }
  5855. ,
  5856. e.effects.effect.highlight = function(t, i) {
  5857. var s = e(this)
  5858. , n = ["backgroundImage", "backgroundColor", "opacity"]
  5859. , a = e.effects.setMode(s, t.mode || "show")
  5860. , o = {
  5861. backgroundColor: s.css("backgroundColor")
  5862. };
  5863. "hide" === a && (o.opacity = 0),
  5864. e.effects.save(s, n),
  5865. s.show().css({
  5866. backgroundImage: "none",
  5867. backgroundColor: t.color || "#ffff99"
  5868. }).animate(o, {
  5869. queue: !1,
  5870. duration: t.duration,
  5871. easing: t.easing,
  5872. complete: function() {
  5873. "hide" === a && s.hide(),
  5874. e.effects.restore(s, n),
  5875. i()
  5876. }
  5877. })
  5878. }
  5879. ,
  5880. e.effects.effect.size = function(t, i) {
  5881. var s, n, a, o = e(this), r = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], h = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], l = ["width", "height", "overflow"], u = ["fontSize"], d = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], c = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], p = e.effects.setMode(o, t.mode || "effect"), f = t.restore || "effect" !== p, m = t.scale || "both", g = t.origin || ["middle", "center"], v = o.css("position"), y = f ? r : h, b = {
  5882. height: 0,
  5883. width: 0,
  5884. outerHeight: 0,
  5885. outerWidth: 0
  5886. };
  5887. "show" === p && o.show(),
  5888. s = {
  5889. height: o.height(),
  5890. width: o.width(),
  5891. outerHeight: o.outerHeight(),
  5892. outerWidth: o.outerWidth()
  5893. },
  5894. "toggle" === t.mode && "show" === p ? (o.from = t.to || b,
  5895. o.to = t.from || s) : (o.from = t.from || ("show" === p ? b : s),
  5896. o.to = t.to || ("hide" === p ? b : s)),
  5897. a = {
  5898. from: {
  5899. y: o.from.height / s.height,
  5900. x: o.from.width / s.width
  5901. },
  5902. to: {
  5903. y: o.to.height / s.height,
  5904. x: o.to.width / s.width
  5905. }
  5906. },
  5907. ("box" === m || "both" === m) && (a.from.y !== a.to.y && (y = y.concat(d),
  5908. o.from = e.effects.setTransition(o, d, a.from.y, o.from),
  5909. o.to = e.effects.setTransition(o, d, a.to.y, o.to)),
  5910. a.from.x !== a.to.x && (y = y.concat(c),
  5911. o.from = e.effects.setTransition(o, c, a.from.x, o.from),
  5912. o.to = e.effects.setTransition(o, c, a.to.x, o.to))),
  5913. ("content" === m || "both" === m) && a.from.y !== a.to.y && (y = y.concat(u).concat(l),
  5914. o.from = e.effects.setTransition(o, u, a.from.y, o.from),
  5915. o.to = e.effects.setTransition(o, u, a.to.y, o.to)),
  5916. e.effects.save(o, y),
  5917. o.show(),
  5918. e.effects.createWrapper(o),
  5919. o.css("overflow", "hidden").css(o.from),
  5920. g && (n = e.effects.getBaseline(g, s),
  5921. o.from.top = (s.outerHeight - o.outerHeight()) * n.y,
  5922. o.from.left = (s.outerWidth - o.outerWidth()) * n.x,
  5923. o.to.top = (s.outerHeight - o.to.outerHeight) * n.y,
  5924. o.to.left = (s.outerWidth - o.to.outerWidth) * n.x),
  5925. o.css(o.from),
  5926. ("content" === m || "both" === m) && (d = d.concat(["marginTop", "marginBottom"]).concat(u),
  5927. c = c.concat(["marginLeft", "marginRight"]),
  5928. l = r.concat(d).concat(c),
  5929. o.find("*[width]").each(function() {
  5930. var i = e(this)
  5931. , s = {
  5932. height: i.height(),
  5933. width: i.width(),
  5934. outerHeight: i.outerHeight(),
  5935. outerWidth: i.outerWidth()
  5936. };
  5937. f && e.effects.save(i, l),
  5938. i.from = {
  5939. height: s.height * a.from.y,
  5940. width: s.width * a.from.x,
  5941. outerHeight: s.outerHeight * a.from.y,
  5942. outerWidth: s.outerWidth * a.from.x
  5943. },
  5944. i.to = {
  5945. height: s.height * a.to.y,
  5946. width: s.width * a.to.x,
  5947. outerHeight: s.height * a.to.y,
  5948. outerWidth: s.width * a.to.x
  5949. },
  5950. a.from.y !== a.to.y && (i.from = e.effects.setTransition(i, d, a.from.y, i.from),
  5951. i.to = e.effects.setTransition(i, d, a.to.y, i.to)),
  5952. a.from.x !== a.to.x && (i.from = e.effects.setTransition(i, c, a.from.x, i.from),
  5953. i.to = e.effects.setTransition(i, c, a.to.x, i.to)),
  5954. i.css(i.from),
  5955. i.animate(i.to, t.duration, t.easing, function() {
  5956. f && e.effects.restore(i, l)
  5957. })
  5958. })),
  5959. o.animate(o.to, {
  5960. queue: !1,
  5961. duration: t.duration,
  5962. easing: t.easing,
  5963. complete: function() {
  5964. 0 === o.to.opacity && o.css("opacity", o.from.opacity),
  5965. "hide" === p && o.hide(),
  5966. e.effects.restore(o, y),
  5967. f || ("static" === v ? o.css({
  5968. position: "relative",
  5969. top: o.to.top,
  5970. left: o.to.left
  5971. }) : e.each(["top", "left"], function(e, t) {
  5972. o.css(t, function(t, i) {
  5973. var s = parseInt(i, 10)
  5974. , n = e ? o.to.left : o.to.top;
  5975. return "auto" === i ? n + "px" : s + n + "px"
  5976. })
  5977. })),
  5978. e.effects.removeWrapper(o),
  5979. i()
  5980. }
  5981. })
  5982. }
  5983. ,
  5984. e.effects.effect.scale = function(t, i) {
  5985. var s = e(this)
  5986. , n = e.extend(!0, {}, t)
  5987. , a = e.effects.setMode(s, t.mode || "effect")
  5988. , o = parseInt(t.percent, 10) || (0 === parseInt(t.percent, 10) ? 0 : "hide" === a ? 0 : 100)
  5989. , r = t.direction || "both"
  5990. , h = t.origin
  5991. , l = {
  5992. height: s.height(),
  5993. width: s.width(),
  5994. outerHeight: s.outerHeight(),
  5995. outerWidth: s.outerWidth()
  5996. }
  5997. , u = {
  5998. y: "horizontal" !== r ? o / 100 : 1,
  5999. x: "vertical" !== r ? o / 100 : 1
  6000. };
  6001. n.effect = "size",
  6002. n.queue = !1,
  6003. n.complete = i,
  6004. "effect" !== a && (n.origin = h || ["middle", "center"],
  6005. n.restore = !0),
  6006. n.from = t.from || ("show" === a ? {
  6007. height: 0,
  6008. width: 0,
  6009. outerHeight: 0,
  6010. outerWidth: 0
  6011. } : l),
  6012. n.to = {
  6013. height: l.height * u.y,
  6014. width: l.width * u.x,
  6015. outerHeight: l.outerHeight * u.y,
  6016. outerWidth: l.outerWidth * u.x
  6017. },
  6018. n.fade && ("show" === a && (n.from.opacity = 0,
  6019. n.to.opacity = 1),
  6020. "hide" === a && (n.from.opacity = 1,
  6021. n.to.opacity = 0)),
  6022. s.effect(n)
  6023. }
  6024. ,
  6025. e.effects.effect.puff = function(t, i) {
  6026. var s = e(this)
  6027. , n = e.effects.setMode(s, t.mode || "hide")
  6028. , a = "hide" === n
  6029. , o = parseInt(t.percent, 10) || 150
  6030. , r = o / 100
  6031. , h = {
  6032. height: s.height(),
  6033. width: s.width(),
  6034. outerHeight: s.outerHeight(),
  6035. outerWidth: s.outerWidth()
  6036. };
  6037. e.extend(t, {
  6038. effect: "scale",
  6039. queue: !1,
  6040. fade: !0,
  6041. mode: n,
  6042. complete: i,
  6043. percent: a ? o : 100,
  6044. from: a ? h : {
  6045. height: h.height * r,
  6046. width: h.width * r,
  6047. outerHeight: h.outerHeight * r,
  6048. outerWidth: h.outerWidth * r
  6049. }
  6050. }),
  6051. s.effect(t)
  6052. }
  6053. ,
  6054. e.effects.effect.pulsate = function(t, i) {
  6055. var s, n = e(this), a = e.effects.setMode(n, t.mode || "show"), o = "show" === a, r = "hide" === a, h = o || "hide" === a, l = 2 * (t.times || 5) + (h ? 1 : 0), u = t.duration / l, d = 0, c = n.queue(), p = c.length;
  6056. for ((o || !n.is(":visible")) && (n.css("opacity", 0).show(),
  6057. d = 1),
  6058. s = 1; l > s; s++)
  6059. n.animate({
  6060. opacity: d
  6061. }, u, t.easing),
  6062. d = 1 - d;
  6063. n.animate({
  6064. opacity: d
  6065. }, u, t.easing),
  6066. n.queue(function() {
  6067. r && n.hide(),
  6068. i()
  6069. }),
  6070. p > 1 && c.splice.apply(c, [1, 0].concat(c.splice(p, l + 1))),
  6071. n.dequeue()
  6072. }
  6073. ,
  6074. e.effects.effect.shake = function(t, i) {
  6075. var s, n = e(this), a = ["position", "top", "bottom", "left", "right", "height", "width"], o = e.effects.setMode(n, t.mode || "effect"), r = t.direction || "left", h = t.distance || 20, l = t.times || 3, u = 2 * l + 1, d = Math.round(t.duration / u), c = "up" === r || "down" === r ? "top" : "left", p = "up" === r || "left" === r, f = {}, m = {}, g = {}, v = n.queue(), y = v.length;
  6076. for (e.effects.save(n, a),
  6077. n.show(),
  6078. e.effects.createWrapper(n),
  6079. f[c] = (p ? "-=" : "+=") + h,
  6080. m[c] = (p ? "+=" : "-=") + 2 * h,
  6081. g[c] = (p ? "-=" : "+=") + 2 * h,
  6082. n.animate(f, d, t.easing),
  6083. s = 1; l > s; s++)
  6084. n.animate(m, d, t.easing).animate(g, d, t.easing);
  6085. n.animate(m, d, t.easing).animate(f, d / 2, t.easing).queue(function() {
  6086. "hide" === o && n.hide(),
  6087. e.effects.restore(n, a),
  6088. e.effects.removeWrapper(n),
  6089. i()
  6090. }),
  6091. y > 1 && v.splice.apply(v, [1, 0].concat(v.splice(y, u + 1))),
  6092. n.dequeue()
  6093. }
  6094. ,
  6095. e.effects.effect.slide = function(t, i) {
  6096. var s, n = e(this), a = ["position", "top", "bottom", "left", "right", "width", "height"], o = e.effects.setMode(n, t.mode || "show"), r = "show" === o, h = t.direction || "left", l = "up" === h || "down" === h ? "top" : "left", u = "up" === h || "left" === h, d = {};
  6097. e.effects.save(n, a),
  6098. n.show(),
  6099. s = t.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0),
  6100. e.effects.createWrapper(n).css({
  6101. overflow: "hidden"
  6102. }),
  6103. r && n.css(l, u ? isNaN(s) ? "-" + s : -s : s),
  6104. d[l] = (r ? u ? "+=" : "-=" : u ? "-=" : "+=") + s,
  6105. n.animate(d, {
  6106. queue: !1,
  6107. duration: t.duration,
  6108. easing: t.easing,
  6109. complete: function() {
  6110. "hide" === o && n.hide(),
  6111. e.effects.restore(n, a),
  6112. e.effects.removeWrapper(n),
  6113. i()
  6114. }
  6115. })
  6116. }
  6117. ,
  6118. e.effects.effect.transfer = function(t, i) {
  6119. var s = e(this)
  6120. , n = e(t.to)
  6121. , a = "fixed" === n.css("position")
  6122. , o = e("body")
  6123. , r = a ? o.scrollTop() : 0
  6124. , h = a ? o.scrollLeft() : 0
  6125. , l = n.offset()
  6126. , u = {
  6127. top: l.top - r,
  6128. left: l.left - h,
  6129. height: n.innerHeight(),
  6130. width: n.innerWidth()
  6131. }
  6132. , d = s.offset()
  6133. , c = e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({
  6134. top: d.top - r,
  6135. left: d.left - h,
  6136. height: s.innerHeight(),
  6137. width: s.innerWidth(),
  6138. position: a ? "fixed" : "absolute"
  6139. }).animate(u, t.duration, t.easing, function() {
  6140. c.remove(),
  6141. i()
  6142. })
  6143. }
  6144. ,
  6145. e.widget("ui.progressbar", {
  6146. version: "1.11.4",
  6147. options: {
  6148. max: 100,
  6149. value: 0,
  6150. change: null,
  6151. complete: null
  6152. },
  6153. min: 0,
  6154. _create: function() {
  6155. this.oldValue = this.options.value = this._constrainedValue(),
  6156. this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({
  6157. role: "progressbar",
  6158. "aria-valuemin": this.min
  6159. }),
  6160. this.valueDiv = e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),
  6161. this._refreshValue()
  6162. },
  6163. _destroy: function() {
  6164. this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),
  6165. this.valueDiv.remove()
  6166. },
  6167. value: function(e) {
  6168. return void 0 === e ? this.options.value : (this.options.value = this._constrainedValue(e),
  6169. this._refreshValue(),
  6170. void 0)
  6171. },
  6172. _constrainedValue: function(e) {
  6173. return void 0 === e && (e = this.options.value),
  6174. this.indeterminate = e === !1,
  6175. "number" != typeof e && (e = 0),
  6176. this.indeterminate ? !1 : Math.min(this.options.max, Math.max(this.min, e))
  6177. },
  6178. _setOptions: function(e) {
  6179. var t = e.value;
  6180. delete e.value,
  6181. this._super(e),
  6182. this.options.value = this._constrainedValue(t),
  6183. this._refreshValue()
  6184. },
  6185. _setOption: function(e, t) {
  6186. "max" === e && (t = Math.max(this.min, t)),
  6187. "disabled" === e && this.element.toggleClass("ui-state-disabled", !!t).attr("aria-disabled", t),
  6188. this._super(e, t)
  6189. },
  6190. _percentage: function() {
  6191. return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min)
  6192. },
  6193. _refreshValue: function() {
  6194. var t = this.options.value
  6195. , i = this._percentage();
  6196. this.valueDiv.toggle(this.indeterminate || t > this.min).toggleClass("ui-corner-right", t === this.options.max).width(i.toFixed(0) + "%"),
  6197. this.element.toggleClass("ui-progressbar-indeterminate", this.indeterminate),
  6198. this.indeterminate ? (this.element.removeAttr("aria-valuenow"),
  6199. this.overlayDiv || (this.overlayDiv = e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))) : (this.element.attr({
  6200. "aria-valuemax": this.options.max,
  6201. "aria-valuenow": t
  6202. }),
  6203. this.overlayDiv && (this.overlayDiv.remove(),
  6204. this.overlayDiv = null)),
  6205. this.oldValue !== t && (this.oldValue = t,
  6206. this._trigger("change")),
  6207. t === this.options.max && this._trigger("complete")
  6208. }
  6209. }),
  6210. e.widget("ui.selectable", e.ui.mouse, {
  6211. version: "1.11.4",
  6212. options: {
  6213. appendTo: "body",
  6214. autoRefresh: !0,
  6215. distance: 0,
  6216. filter: "*",
  6217. tolerance: "touch",
  6218. selected: null,
  6219. selecting: null,
  6220. start: null,
  6221. stop: null,
  6222. unselected: null,
  6223. unselecting: null
  6224. },
  6225. _create: function() {
  6226. var t, i = this;
  6227. this.element.addClass("ui-selectable"),
  6228. this.dragged = !1,
  6229. this.refresh = function() {
  6230. t = e(i.options.filter, i.element[0]),
  6231. t.addClass("ui-selectee"),
  6232. t.each(function() {
  6233. var t = e(this)
  6234. , i = t.offset();
  6235. e.data(this, "selectable-item", {
  6236. element: this,
  6237. $element: t,
  6238. left: i.left,
  6239. top: i.top,
  6240. right: i.left + t.outerWidth(),
  6241. bottom: i.top + t.outerHeight(),
  6242. startselected: !1,
  6243. selected: t.hasClass("ui-selected"),
  6244. selecting: t.hasClass("ui-selecting"),
  6245. unselecting: t.hasClass("ui-unselecting")
  6246. })
  6247. })
  6248. }
  6249. ,
  6250. this.refresh(),
  6251. this.selectees = t.addClass("ui-selectee"),
  6252. this._mouseInit(),
  6253. this.helper = e("<div class='ui-selectable-helper'></div>")
  6254. },
  6255. _destroy: function() {
  6256. this.selectees.removeClass("ui-selectee").removeData("selectable-item"),
  6257. this.element.removeClass("ui-selectable ui-selectable-disabled"),
  6258. this._mouseDestroy()
  6259. },
  6260. _mouseStart: function(t) {
  6261. var i = this
  6262. , s = this.options;
  6263. this.opos = [t.pageX, t.pageY],
  6264. this.options.disabled || (this.selectees = e(s.filter, this.element[0]),
  6265. this._trigger("start", t),
  6266. e(s.appendTo).append(this.helper),
  6267. this.helper.css({
  6268. left: t.pageX,
  6269. top: t.pageY,
  6270. width: 0,
  6271. height: 0
  6272. }),
  6273. s.autoRefresh && this.refresh(),
  6274. this.selectees.filter(".ui-selected").each(function() {
  6275. var s = e.data(this, "selectable-item");
  6276. s.startselected = !0,
  6277. t.metaKey || t.ctrlKey || (s.$element.removeClass("ui-selected"),
  6278. s.selected = !1,
  6279. s.$element.addClass("ui-unselecting"),
  6280. s.unselecting = !0,
  6281. i._trigger("unselecting", t, {
  6282. unselecting: s.element
  6283. }))
  6284. }),
  6285. e(t.target).parents().addBack().each(function() {
  6286. var s, n = e.data(this, "selectable-item");
  6287. return n ? (s = !t.metaKey && !t.ctrlKey || !n.$element.hasClass("ui-selected"),
  6288. n.$element.removeClass(s ? "ui-unselecting" : "ui-selected").addClass(s ? "ui-selecting" : "ui-unselecting"),
  6289. n.unselecting = !s,
  6290. n.selecting = s,
  6291. n.selected = s,
  6292. s ? i._trigger("selecting", t, {
  6293. selecting: n.element
  6294. }) : i._trigger("unselecting", t, {
  6295. unselecting: n.element
  6296. }),
  6297. !1) : void 0
  6298. }))
  6299. },
  6300. _mouseDrag: function(t) {
  6301. if (this.dragged = !0,
  6302. !this.options.disabled) {
  6303. var i, s = this, n = this.options, a = this.opos[0], o = this.opos[1], r = t.pageX, h = t.pageY;
  6304. return a > r && (i = r,
  6305. r = a,
  6306. a = i),
  6307. o > h && (i = h,
  6308. h = o,
  6309. o = i),
  6310. this.helper.css({
  6311. left: a,
  6312. top: o,
  6313. width: r - a,
  6314. height: h - o
  6315. }),
  6316. this.selectees.each(function() {
  6317. var i = e.data(this, "selectable-item")
  6318. , l = !1;
  6319. i && i.element !== s.element[0] && ("touch" === n.tolerance ? l = !(i.left > r || a > i.right || i.top > h || o > i.bottom) : "fit" === n.tolerance && (l = i.left > a && r > i.right && i.top > o && h > i.bottom),
  6320. l ? (i.selected && (i.$element.removeClass("ui-selected"),
  6321. i.selected = !1),
  6322. i.unselecting && (i.$element.removeClass("ui-unselecting"),
  6323. i.unselecting = !1),
  6324. i.selecting || (i.$element.addClass("ui-selecting"),
  6325. i.selecting = !0,
  6326. s._trigger("selecting", t, {
  6327. selecting: i.element
  6328. }))) : (i.selecting && ((t.metaKey || t.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"),
  6329. i.selecting = !1,
  6330. i.$element.addClass("ui-selected"),
  6331. i.selected = !0) : (i.$element.removeClass("ui-selecting"),
  6332. i.selecting = !1,
  6333. i.startselected && (i.$element.addClass("ui-unselecting"),
  6334. i.unselecting = !0),
  6335. s._trigger("unselecting", t, {
  6336. unselecting: i.element
  6337. }))),
  6338. i.selected && (t.metaKey || t.ctrlKey || i.startselected || (i.$element.removeClass("ui-selected"),
  6339. i.selected = !1,
  6340. i.$element.addClass("ui-unselecting"),
  6341. i.unselecting = !0,
  6342. s._trigger("unselecting", t, {
  6343. unselecting: i.element
  6344. })))))
  6345. }),
  6346. !1
  6347. }
  6348. },
  6349. _mouseStop: function(t) {
  6350. var i = this;
  6351. return this.dragged = !1,
  6352. e(".ui-unselecting", this.element[0]).each(function() {
  6353. var s = e.data(this, "selectable-item");
  6354. s.$element.removeClass("ui-unselecting"),
  6355. s.unselecting = !1,
  6356. s.startselected = !1,
  6357. i._trigger("unselected", t, {
  6358. unselected: s.element
  6359. })
  6360. }),
  6361. e(".ui-selecting", this.element[0]).each(function() {
  6362. var s = e.data(this, "selectable-item");
  6363. s.$element.removeClass("ui-selecting").addClass("ui-selected"),
  6364. s.selecting = !1,
  6365. s.selected = !0,
  6366. s.startselected = !0,
  6367. i._trigger("selected", t, {
  6368. selected: s.element
  6369. })
  6370. }),
  6371. this._trigger("stop", t),
  6372. this.helper.remove(),
  6373. !1
  6374. }
  6375. }),
  6376. e.widget("ui.selectmenu", {
  6377. version: "1.11.4",
  6378. defaultElement: "<select>",
  6379. options: {
  6380. appendTo: null,
  6381. disabled: null,
  6382. icons: {
  6383. button: "ui-icon-triangle-1-s"
  6384. },
  6385. position: {
  6386. my: "left top",
  6387. at: "left bottom",
  6388. collision: "none"
  6389. },
  6390. width: null,
  6391. change: null,
  6392. close: null,
  6393. focus: null,
  6394. open: null,
  6395. select: null
  6396. },
  6397. _create: function() {
  6398. var e = this.element.uniqueId().attr("id");
  6399. this.ids = {
  6400. element: e,
  6401. button: e + "-button",
  6402. menu: e + "-menu"
  6403. },
  6404. this._drawButton(),
  6405. this._drawMenu(),
  6406. this.options.disabled && this.disable()
  6407. },
  6408. _drawButton: function() {
  6409. var t = this;
  6410. this.label = e("label[for='" + this.ids.element + "']").attr("for", this.ids.button),
  6411. this._on(this.label, {
  6412. click: function(e) {
  6413. this.button.focus(),
  6414. e.preventDefault()
  6415. }
  6416. }),
  6417. this.element.hide(),
  6418. this.button = e("<span>", {
  6419. "class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
  6420. tabindex: this.options.disabled ? -1 : 0,
  6421. id: this.ids.button,
  6422. role: "combobox",
  6423. "aria-expanded": "false",
  6424. "aria-autocomplete": "list",
  6425. "aria-owns": this.ids.menu,
  6426. "aria-haspopup": "true"
  6427. }).insertAfter(this.element),
  6428. e("<span>", {
  6429. "class": "ui-icon " + this.options.icons.button
  6430. }).prependTo(this.button),
  6431. this.buttonText = e("<span>", {
  6432. "class": "ui-selectmenu-text"
  6433. }).appendTo(this.button),
  6434. this._setText(this.buttonText, this.element.find("option:selected").text()),
  6435. this._resizeButton(),
  6436. this._on(this.button, this._buttonEvents),
  6437. this.button.one("focusin", function() {
  6438. t.menuItems || t._refreshMenu()
  6439. }),
  6440. this._hoverable(this.button),
  6441. this._focusable(this.button)
  6442. },
  6443. _drawMenu: function() {
  6444. var t = this;
  6445. this.menu = e("<ul>", {
  6446. "aria-hidden": "true",
  6447. "aria-labelledby": this.ids.button,
  6448. id: this.ids.menu
  6449. }),
  6450. this.menuWrap = e("<div>", {
  6451. "class": "ui-selectmenu-menu ui-front"
  6452. }).append(this.menu).appendTo(this._appendTo()),
  6453. this.menuInstance = this.menu.menu({
  6454. role: "listbox",
  6455. select: function(e, i) {
  6456. e.preventDefault(),
  6457. t._setSelection(),
  6458. t._select(i.item.data("ui-selectmenu-item"), e)
  6459. },
  6460. focus: function(e, i) {
  6461. var s = i.item.data("ui-selectmenu-item");
  6462. null != t.focusIndex && s.index !== t.focusIndex && (t._trigger("focus", e, {
  6463. item: s
  6464. }),
  6465. t.isOpen || t._select(s, e)),
  6466. t.focusIndex = s.index,
  6467. t.button.attr("aria-activedescendant", t.menuItems.eq(s.index).attr("id"))
  6468. }
  6469. }).menu("instance"),
  6470. this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),
  6471. this.menuInstance._off(this.menu, "mouseleave"),
  6472. this.menuInstance._closeOnDocumentClick = function() {
  6473. return !1
  6474. }
  6475. ,
  6476. this.menuInstance._isDivider = function() {
  6477. return !1
  6478. }
  6479. },
  6480. refresh: function() {
  6481. this._refreshMenu(),
  6482. this._setText(this.buttonText, this._getSelectedItem().text()),
  6483. this.options.width || this._resizeButton()
  6484. },
  6485. _refreshMenu: function() {
  6486. this.menu.empty();
  6487. var e, t = this.element.find("option");
  6488. t.length && (this._parseOptions(t),
  6489. this._renderMenu(this.menu, this.items),
  6490. this.menuInstance.refresh(),
  6491. this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup"),
  6492. e = this._getSelectedItem(),
  6493. this.menuInstance.focus(null, e),
  6494. this._setAria(e.data("ui-selectmenu-item")),
  6495. this._setOption("disabled", this.element.prop("disabled")))
  6496. },
  6497. open: function(e) {
  6498. this.options.disabled || (this.menuItems ? (this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),
  6499. this.menuInstance.focus(null, this._getSelectedItem())) : this._refreshMenu(),
  6500. this.isOpen = !0,
  6501. this._toggleAttr(),
  6502. this._resizeMenu(),
  6503. this._position(),
  6504. this._on(this.document, this._documentClick),
  6505. this._trigger("open", e))
  6506. },
  6507. _position: function() {
  6508. this.menuWrap.position(e.extend({
  6509. of: this.button
  6510. }, this.options.position))
  6511. },
  6512. close: function(e) {
  6513. this.isOpen && (this.isOpen = !1,
  6514. this._toggleAttr(),
  6515. this.range = null,
  6516. this._off(this.document),
  6517. this._trigger("close", e))
  6518. },
  6519. widget: function() {
  6520. return this.button
  6521. },
  6522. menuWidget: function() {
  6523. return this.menu
  6524. },
  6525. _renderMenu: function(t, i) {
  6526. var s = this
  6527. , n = "";
  6528. e.each(i, function(i, a) {
  6529. a.optgroup !== n && (e("<li>", {
  6530. "class": "ui-selectmenu-optgroup ui-menu-divider" + (a.element.parent("optgroup").prop("disabled") ? " ui-state-disabled" : ""),
  6531. text: a.optgroup
  6532. }).appendTo(t),
  6533. n = a.optgroup),
  6534. s._renderItemData(t, a)
  6535. })
  6536. },
  6537. _renderItemData: function(e, t) {
  6538. return this._renderItem(e, t).data("ui-selectmenu-item", t)
  6539. },
  6540. _renderItem: function(t, i) {
  6541. var s = e("<li>");
  6542. return i.disabled && s.addClass("ui-state-disabled"),
  6543. this._setText(s, i.label),
  6544. s.appendTo(t)
  6545. },
  6546. _setText: function(e, t) {
  6547. t ? e.text(t) : e.html("&#160;")
  6548. },
  6549. _move: function(e, t) {
  6550. var i, s, n = ".ui-menu-item";
  6551. this.isOpen ? i = this.menuItems.eq(this.focusIndex) : (i = this.menuItems.eq(this.element[0].selectedIndex),
  6552. n += ":not(.ui-state-disabled)"),
  6553. s = "first" === e || "last" === e ? i["first" === e ? "prevAll" : "nextAll"](n).eq(-1) : i[e + "All"](n).eq(0),
  6554. s.length && this.menuInstance.focus(t, s)
  6555. },
  6556. _getSelectedItem: function() {
  6557. return this.menuItems.eq(this.element[0].selectedIndex)
  6558. },
  6559. _toggle: function(e) {
  6560. this[this.isOpen ? "close" : "open"](e)
  6561. },
  6562. _setSelection: function() {
  6563. var e;
  6564. this.range && (window.getSelection ? (e = window.getSelection(),
  6565. e.removeAllRanges(),
  6566. e.addRange(this.range)) : this.range.select(),
  6567. this.button.focus())
  6568. },
  6569. _documentClick: {
  6570. mousedown: function(t) {
  6571. this.isOpen && (e(t.target).closest(".ui-selectmenu-menu, #" + this.ids.button).length || this.close(t))
  6572. }
  6573. },
  6574. _buttonEvents: {
  6575. mousedown: function() {
  6576. var e;
  6577. window.getSelection ? (e = window.getSelection(),
  6578. e.rangeCount && (this.range = e.getRangeAt(0))) : this.range = document.selection.createRange()
  6579. },
  6580. click: function(e) {
  6581. this._setSelection(),
  6582. this._toggle(e)
  6583. },
  6584. keydown: function(t) {
  6585. var i = !0;
  6586. switch (t.keyCode) {
  6587. case e.ui.keyCode.TAB:
  6588. case e.ui.keyCode.ESCAPE:
  6589. this.close(t),
  6590. i = !1;
  6591. break;
  6592. case e.ui.keyCode.ENTER:
  6593. this.isOpen && this._selectFocusedItem(t);
  6594. break;
  6595. case e.ui.keyCode.UP:
  6596. t.altKey ? this._toggle(t) : this._move("prev", t);
  6597. break;
  6598. case e.ui.keyCode.DOWN:
  6599. t.altKey ? this._toggle(t) : this._move("next", t);
  6600. break;
  6601. case e.ui.keyCode.SPACE:
  6602. this.isOpen ? this._selectFocusedItem(t) : this._toggle(t);
  6603. break;
  6604. case e.ui.keyCode.LEFT:
  6605. this._move("prev", t);
  6606. break;
  6607. case e.ui.keyCode.RIGHT:
  6608. this._move("next", t);
  6609. break;
  6610. case e.ui.keyCode.HOME:
  6611. case e.ui.keyCode.PAGE_UP:
  6612. this._move("first", t);
  6613. break;
  6614. case e.ui.keyCode.END:
  6615. case e.ui.keyCode.PAGE_DOWN:
  6616. this._move("last", t);
  6617. break;
  6618. default:
  6619. this.menu.trigger(t),
  6620. i = !1
  6621. }
  6622. i && t.preventDefault()
  6623. }
  6624. },
  6625. _selectFocusedItem: function(e) {
  6626. var t = this.menuItems.eq(this.focusIndex);
  6627. t.hasClass("ui-state-disabled") || this._select(t.data("ui-selectmenu-item"), e)
  6628. },
  6629. _select: function(e, t) {
  6630. var i = this.element[0].selectedIndex;
  6631. this.element[0].selectedIndex = e.index,
  6632. this._setText(this.buttonText, e.label),
  6633. this._setAria(e),
  6634. this._trigger("select", t, {
  6635. item: e
  6636. }),
  6637. e.index !== i && this._trigger("change", t, {
  6638. item: e
  6639. }),
  6640. this.close(t)
  6641. },
  6642. _setAria: function(e) {
  6643. var t = this.menuItems.eq(e.index).attr("id");
  6644. this.button.attr({
  6645. "aria-labelledby": t,
  6646. "aria-activedescendant": t
  6647. }),
  6648. this.menu.attr("aria-activedescendant", t)
  6649. },
  6650. _setOption: function(e, t) {
  6651. "icons" === e && this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),
  6652. this._super(e, t),
  6653. "appendTo" === e && this.menuWrap.appendTo(this._appendTo()),
  6654. "disabled" === e && (this.menuInstance.option("disabled", t),
  6655. this.button.toggleClass("ui-state-disabled", t).attr("aria-disabled", t),
  6656. this.element.prop("disabled", t),
  6657. t ? (this.button.attr("tabindex", -1),
  6658. this.close()) : this.button.attr("tabindex", 0)),
  6659. "width" === e && this._resizeButton()
  6660. },
  6661. _appendTo: function() {
  6662. var t = this.options.appendTo;
  6663. return t && (t = t.jquery || t.nodeType ? e(t) : this.document.find(t).eq(0)),
  6664. t && t[0] || (t = this.element.closest(".ui-front")),
  6665. t.length || (t = this.document[0].body),
  6666. t
  6667. },
  6668. _toggleAttr: function() {
  6669. this.button.toggleClass("ui-corner-top", this.isOpen).toggleClass("ui-corner-all", !this.isOpen).attr("aria-expanded", this.isOpen),
  6670. this.menuWrap.toggleClass("ui-selectmenu-open", this.isOpen),
  6671. this.menu.attr("aria-hidden", !this.isOpen)
  6672. },
  6673. _resizeButton: function() {
  6674. var e = this.options.width;
  6675. e || (e = this.element.show().outerWidth(),
  6676. this.element.hide()),
  6677. this.button.outerWidth(e)
  6678. },
  6679. _resizeMenu: function() {
  6680. this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1))
  6681. },
  6682. _getCreateOptions: function() {
  6683. return {
  6684. disabled: this.element.prop("disabled")
  6685. }
  6686. },
  6687. _parseOptions: function(t) {
  6688. var i = [];
  6689. t.each(function(t, s) {
  6690. var n = e(s)
  6691. , a = n.parent("optgroup");
  6692. i.push({
  6693. element: n,
  6694. index: t,
  6695. value: n.val(),
  6696. label: n.text(),
  6697. optgroup: a.attr("label") || "",
  6698. disabled: a.prop("disabled") || n.prop("disabled")
  6699. })
  6700. }),
  6701. this.items = i
  6702. },
  6703. _destroy: function() {
  6704. this.menuWrap.remove(),
  6705. this.button.remove(),
  6706. this.element.show(),
  6707. this.element.removeUniqueId(),
  6708. this.label.attr("for", this.ids.element)
  6709. }
  6710. }),
  6711. e.widget("ui.slider", e.ui.mouse, {
  6712. version: "1.11.4",
  6713. widgetEventPrefix: "slide",
  6714. options: {
  6715. animate: !1,
  6716. distance: 0,
  6717. max: 100,
  6718. min: 0,
  6719. orientation: "horizontal",
  6720. range: !1,
  6721. step: 1,
  6722. value: 0,
  6723. values: null,
  6724. change: null,
  6725. slide: null,
  6726. start: null,
  6727. stop: null
  6728. },
  6729. numPages: 5,
  6730. _create: function() {
  6731. this._keySliding = !1,
  6732. this._mouseSliding = !1,
  6733. this._animateOff = !0,
  6734. this._handleIndex = null,
  6735. this._detectOrientation(),
  6736. this._mouseInit(),
  6737. this._calculateNewMax(),
  6738. this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget" + " ui-widget-content" + " ui-corner-all"),
  6739. this._refresh(),
  6740. this._setOption("disabled", this.options.disabled),
  6741. this._animateOff = !1
  6742. },
  6743. _refresh: function() {
  6744. this._createRange(),
  6745. this._createHandles(),
  6746. this._setupEvents(),
  6747. this._refreshValue()
  6748. },
  6749. _createHandles: function() {
  6750. var t, i, s = this.options, n = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"), a = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>", o = [];
  6751. for (i = s.values && s.values.length || 1,
  6752. n.length > i && (n.slice(i).remove(),
  6753. n = n.slice(0, i)),
  6754. t = n.length; i > t; t++)
  6755. o.push(a);
  6756. this.handles = n.add(e(o.join("")).appendTo(this.element)),
  6757. this.handle = this.handles.eq(0),
  6758. this.handles.each(function(t) {
  6759. e(this).data("ui-slider-handle-index", t)
  6760. })
  6761. },
  6762. _createRange: function() {
  6763. var t = this.options
  6764. , i = "";
  6765. t.range ? (t.range === !0 && (t.values ? t.values.length && 2 !== t.values.length ? t.values = [t.values[0], t.values[0]] : e.isArray(t.values) && (t.values = t.values.slice(0)) : t.values = [this._valueMin(), this._valueMin()]),
  6766. this.range && this.range.length ? this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({
  6767. left: "",
  6768. bottom: ""
  6769. }) : (this.range = e("<div></div>").appendTo(this.element),
  6770. i = "ui-slider-range ui-widget-header ui-corner-all"),
  6771. this.range.addClass(i + ("min" === t.range || "max" === t.range ? " ui-slider-range-" + t.range : ""))) : (this.range && this.range.remove(),
  6772. this.range = null)
  6773. },
  6774. _setupEvents: function() {
  6775. this._off(this.handles),
  6776. this._on(this.handles, this._handleEvents),
  6777. this._hoverable(this.handles),
  6778. this._focusable(this.handles)
  6779. },
  6780. _destroy: function() {
  6781. this.handles.remove(),
  6782. this.range && this.range.remove(),
  6783. this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),
  6784. this._mouseDestroy()
  6785. },
  6786. _mouseCapture: function(t) {
  6787. var i, s, n, a, o, r, h, l, u = this, d = this.options;
  6788. return d.disabled ? !1 : (this.elementSize = {
  6789. width: this.element.outerWidth(),
  6790. height: this.element.outerHeight()
  6791. },
  6792. this.elementOffset = this.element.offset(),
  6793. i = {
  6794. x: t.pageX,
  6795. y: t.pageY
  6796. },
  6797. s = this._normValueFromMouse(i),
  6798. n = this._valueMax() - this._valueMin() + 1,
  6799. this.handles.each(function(t) {
  6800. var i = Math.abs(s - u.values(t));
  6801. (n > i || n === i && (t === u._lastChangedValue || u.values(t) === d.min)) && (n = i,
  6802. a = e(this),
  6803. o = t)
  6804. }),
  6805. r = this._start(t, o),
  6806. r === !1 ? !1 : (this._mouseSliding = !0,
  6807. this._handleIndex = o,
  6808. a.addClass("ui-state-active").focus(),
  6809. h = a.offset(),
  6810. l = !e(t.target).parents().addBack().is(".ui-slider-handle"),
  6811. this._clickOffset = l ? {
  6812. left: 0,
  6813. top: 0
  6814. } : {
  6815. left: t.pageX - h.left - a.width() / 2,
  6816. top: t.pageY - h.top - a.height() / 2 - (parseInt(a.css("borderTopWidth"), 10) || 0) - (parseInt(a.css("borderBottomWidth"), 10) || 0) + (parseInt(a.css("marginTop"), 10) || 0)
  6817. },
  6818. this.handles.hasClass("ui-state-hover") || this._slide(t, o, s),
  6819. this._animateOff = !0,
  6820. !0))
  6821. },
  6822. _mouseStart: function() {
  6823. return !0
  6824. },
  6825. _mouseDrag: function(e) {
  6826. var t = {
  6827. x: e.pageX,
  6828. y: e.pageY
  6829. }
  6830. , i = this._normValueFromMouse(t);
  6831. return this._slide(e, this._handleIndex, i),
  6832. !1
  6833. },
  6834. _mouseStop: function(e) {
  6835. return this.handles.removeClass("ui-state-active"),
  6836. this._mouseSliding = !1,
  6837. this._stop(e, this._handleIndex),
  6838. this._change(e, this._handleIndex),
  6839. this._handleIndex = null,
  6840. this._clickOffset = null,
  6841. this._animateOff = !1,
  6842. !1
  6843. },
  6844. _detectOrientation: function() {
  6845. this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
  6846. },
  6847. _normValueFromMouse: function(e) {
  6848. var t, i, s, n, a;
  6849. return "horizontal" === this.orientation ? (t = this.elementSize.width,
  6850. i = e.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (t = this.elementSize.height,
  6851. i = e.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)),
  6852. s = i / t,
  6853. s > 1 && (s = 1),
  6854. 0 > s && (s = 0),
  6855. "vertical" === this.orientation && (s = 1 - s),
  6856. n = this._valueMax() - this._valueMin(),
  6857. a = this._valueMin() + s * n,
  6858. this._trimAlignValue(a)
  6859. },
  6860. _start: function(e, t) {
  6861. var i = {
  6862. handle: this.handles[t],
  6863. value: this.value()
  6864. };
  6865. return this.options.values && this.options.values.length && (i.value = this.values(t),
  6866. i.values = this.values()),
  6867. this._trigger("start", e, i)
  6868. },
  6869. _slide: function(e, t, i) {
  6870. var s, n, a;
  6871. this.options.values && this.options.values.length ? (s = this.values(t ? 0 : 1),
  6872. 2 === this.options.values.length && this.options.range === !0 && (0 === t && i > s || 1 === t && s > i) && (i = s),
  6873. i !== this.values(t) && (n = this.values(),
  6874. n[t] = i,
  6875. a = this._trigger("slide", e, {
  6876. handle: this.handles[t],
  6877. value: i,
  6878. values: n
  6879. }),
  6880. s = this.values(t ? 0 : 1),
  6881. a !== !1 && this.values(t, i))) : i !== this.value() && (a = this._trigger("slide", e, {
  6882. handle: this.handles[t],
  6883. value: i
  6884. }),
  6885. a !== !1 && this.value(i))
  6886. },
  6887. _stop: function(e, t) {
  6888. var i = {
  6889. handle: this.handles[t],
  6890. value: this.value()
  6891. };
  6892. this.options.values && this.options.values.length && (i.value = this.values(t),
  6893. i.values = this.values()),
  6894. this._trigger("stop", e, i)
  6895. },
  6896. _change: function(e, t) {
  6897. if (!this._keySliding && !this._mouseSliding) {
  6898. var i = {
  6899. handle: this.handles[t],
  6900. value: this.value()
  6901. };
  6902. this.options.values && this.options.values.length && (i.value = this.values(t),
  6903. i.values = this.values()),
  6904. this._lastChangedValue = t,
  6905. this._trigger("change", e, i)
  6906. }
  6907. },
  6908. value: function(e) {
  6909. return arguments.length ? (this.options.value = this._trimAlignValue(e),
  6910. this._refreshValue(),
  6911. this._change(null, 0),
  6912. void 0) : this._value()
  6913. },
  6914. values: function(t, i) {
  6915. var s, n, a;
  6916. if (arguments.length > 1)
  6917. return this.options.values[t] = this._trimAlignValue(i),
  6918. this._refreshValue(),
  6919. this._change(null, t),
  6920. void 0;
  6921. if (!arguments.length)
  6922. return this._values();
  6923. if (!e.isArray(arguments[0]))
  6924. return this.options.values && this.options.values.length ? this._values(t) : this.value();
  6925. for (s = this.options.values,
  6926. n = arguments[0],
  6927. a = 0; s.length > a; a += 1)
  6928. s[a] = this._trimAlignValue(n[a]),
  6929. this._change(null, a);
  6930. this._refreshValue()
  6931. },
  6932. _setOption: function(t, i) {
  6933. var s, n = 0;
  6934. switch ("range" === t && this.options.range === !0 && ("min" === i ? (this.options.value = this._values(0),
  6935. this.options.values = null) : "max" === i && (this.options.value = this._values(this.options.values.length - 1),
  6936. this.options.values = null)),
  6937. e.isArray(this.options.values) && (n = this.options.values.length),
  6938. "disabled" === t && this.element.toggleClass("ui-state-disabled", !!i),
  6939. this._super(t, i),
  6940. t) {
  6941. case "orientation":
  6942. this._detectOrientation(),
  6943. this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation),
  6944. this._refreshValue(),
  6945. this.handles.css("horizontal" === i ? "bottom" : "left", "");
  6946. break;
  6947. case "value":
  6948. this._animateOff = !0,
  6949. this._refreshValue(),
  6950. this._change(null, 0),
  6951. this._animateOff = !1;
  6952. break;
  6953. case "values":
  6954. for (this._animateOff = !0,
  6955. this._refreshValue(),
  6956. s = 0; n > s; s += 1)
  6957. this._change(null, s);
  6958. this._animateOff = !1;
  6959. break;
  6960. case "step":
  6961. case "min":
  6962. case "max":
  6963. this._animateOff = !0,
  6964. this._calculateNewMax(),
  6965. this._refreshValue(),
  6966. this._animateOff = !1;
  6967. break;
  6968. case "range":
  6969. this._animateOff = !0,
  6970. this._refresh(),
  6971. this._animateOff = !1
  6972. }
  6973. },
  6974. _value: function() {
  6975. var e = this.options.value;
  6976. return e = this._trimAlignValue(e)
  6977. },
  6978. _values: function(e) {
  6979. var t, i, s;
  6980. if (arguments.length)
  6981. return t = this.options.values[e],
  6982. t = this._trimAlignValue(t);
  6983. if (this.options.values && this.options.values.length) {
  6984. for (i = this.options.values.slice(),
  6985. s = 0; i.length > s; s += 1)
  6986. i[s] = this._trimAlignValue(i[s]);
  6987. return i
  6988. }
  6989. return []
  6990. },
  6991. _trimAlignValue: function(e) {
  6992. if (this._valueMin() >= e)
  6993. return this._valueMin();
  6994. if (e >= this._valueMax())
  6995. return this._valueMax();
  6996. var t = this.options.step > 0 ? this.options.step : 1
  6997. , i = (e - this._valueMin()) % t
  6998. , s = e - i;
  6999. return 2 * Math.abs(i) >= t && (s += i > 0 ? t : -t),
  7000. parseFloat(s.toFixed(5))
  7001. },
  7002. _calculateNewMax: function() {
  7003. var e = this.options.max
  7004. , t = this._valueMin()
  7005. , i = this.options.step
  7006. , s = Math.floor(+(e - t).toFixed(this._precision()) / i) * i;
  7007. e = s + t,
  7008. this.max = parseFloat(e.toFixed(this._precision()))
  7009. },
  7010. _precision: function() {
  7011. var e = this._precisionOf(this.options.step);
  7012. return null !== this.options.min && (e = Math.max(e, this._precisionOf(this.options.min))),
  7013. e
  7014. },
  7015. _precisionOf: function(e) {
  7016. var t = "" + e
  7017. , i = t.indexOf(".");
  7018. return -1 === i ? 0 : t.length - i - 1
  7019. },
  7020. _valueMin: function() {
  7021. return this.options.min
  7022. },
  7023. _valueMax: function() {
  7024. return this.max
  7025. },
  7026. _refreshValue: function() {
  7027. var t, i, s, n, a, o = this.options.range, r = this.options, h = this, l = this._animateOff ? !1 : r.animate, u = {};
  7028. this.options.values && this.options.values.length ? this.handles.each(function(s) {
  7029. i = 100 * ((h.values(s) - h._valueMin()) / (h._valueMax() - h._valueMin())),
  7030. u["horizontal" === h.orientation ? "left" : "bottom"] = i + "%",
  7031. e(this).stop(1, 1)[l ? "animate" : "css"](u, r.animate),
  7032. h.options.range === !0 && ("horizontal" === h.orientation ? (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({
  7033. left: i + "%"
  7034. }, r.animate),
  7035. 1 === s && h.range[l ? "animate" : "css"]({
  7036. width: i - t + "%"
  7037. }, {
  7038. queue: !1,
  7039. duration: r.animate
  7040. })) : (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({
  7041. bottom: i + "%"
  7042. }, r.animate),
  7043. 1 === s && h.range[l ? "animate" : "css"]({
  7044. height: i - t + "%"
  7045. }, {
  7046. queue: !1,
  7047. duration: r.animate
  7048. }))),
  7049. t = i
  7050. }) : (s = this.value(),
  7051. n = this._valueMin(),
  7052. a = this._valueMax(),
  7053. i = a !== n ? 100 * ((s - n) / (a - n)) : 0,
  7054. u["horizontal" === this.orientation ? "left" : "bottom"] = i + "%",
  7055. this.handle.stop(1, 1)[l ? "animate" : "css"](u, r.animate),
  7056. "min" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({
  7057. width: i + "%"
  7058. }, r.animate),
  7059. "max" === o && "horizontal" === this.orientation && this.range[l ? "animate" : "css"]({
  7060. width: 100 - i + "%"
  7061. }, {
  7062. queue: !1,
  7063. duration: r.animate
  7064. }),
  7065. "min" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({
  7066. height: i + "%"
  7067. }, r.animate),
  7068. "max" === o && "vertical" === this.orientation && this.range[l ? "animate" : "css"]({
  7069. height: 100 - i + "%"
  7070. }, {
  7071. queue: !1,
  7072. duration: r.animate
  7073. }))
  7074. },
  7075. _handleEvents: {
  7076. keydown: function(t) {
  7077. var i, s, n, a, o = e(t.target).data("ui-slider-handle-index");
  7078. switch (t.keyCode) {
  7079. case e.ui.keyCode.HOME:
  7080. case e.ui.keyCode.END:
  7081. case e.ui.keyCode.PAGE_UP:
  7082. case e.ui.keyCode.PAGE_DOWN:
  7083. case e.ui.keyCode.UP:
  7084. case e.ui.keyCode.RIGHT:
  7085. case e.ui.keyCode.DOWN:
  7086. case e.ui.keyCode.LEFT:
  7087. if (t.preventDefault(),
  7088. !this._keySliding && (this._keySliding = !0,
  7089. e(t.target).addClass("ui-state-active"),
  7090. i = this._start(t, o),
  7091. i === !1))
  7092. return
  7093. }
  7094. switch (a = this.options.step,
  7095. s = n = this.options.values && this.options.values.length ? this.values(o) : this.value(),
  7096. t.keyCode) {
  7097. case e.ui.keyCode.HOME:
  7098. n = this._valueMin();
  7099. break;
  7100. case e.ui.keyCode.END:
  7101. n = this._valueMax();
  7102. break;
  7103. case e.ui.keyCode.PAGE_UP:
  7104. n = this._trimAlignValue(s + (this._valueMax() - this._valueMin()) / this.numPages);
  7105. break;
  7106. case e.ui.keyCode.PAGE_DOWN:
  7107. n = this._trimAlignValue(s - (this._valueMax() - this._valueMin()) / this.numPages);
  7108. break;
  7109. case e.ui.keyCode.UP:
  7110. case e.ui.keyCode.RIGHT:
  7111. if (s === this._valueMax())
  7112. return;
  7113. n = this._trimAlignValue(s + a);
  7114. break;
  7115. case e.ui.keyCode.DOWN:
  7116. case e.ui.keyCode.LEFT:
  7117. if (s === this._valueMin())
  7118. return;
  7119. n = this._trimAlignValue(s - a)
  7120. }
  7121. this._slide(t, o, n)
  7122. },
  7123. keyup: function(t) {
  7124. var i = e(t.target).data("ui-slider-handle-index");
  7125. this._keySliding && (this._keySliding = !1,
  7126. this._stop(t, i),
  7127. this._change(t, i),
  7128. e(t.target).removeClass("ui-state-active"))
  7129. }
  7130. }
  7131. }),
  7132. e.widget("ui.sortable", e.ui.mouse, {
  7133. version: "1.11.4",
  7134. widgetEventPrefix: "sort",
  7135. ready: !1,
  7136. options: {
  7137. appendTo: "parent",
  7138. axis: !1,
  7139. connectWith: !1,
  7140. containment: !1,
  7141. cursor: "auto",
  7142. cursorAt: !1,
  7143. dropOnEmpty: !0,
  7144. forcePlaceholderSize: !1,
  7145. forceHelperSize: !1,
  7146. grid: !1,
  7147. handle: !1,
  7148. helper: "original",
  7149. items: "> *",
  7150. opacity: !1,
  7151. placeholder: !1,
  7152. revert: !1,
  7153. scroll: !0,
  7154. scrollSensitivity: 20,
  7155. scrollSpeed: 20,
  7156. scope: "default",
  7157. tolerance: "intersect",
  7158. zIndex: 1e3,
  7159. activate: null,
  7160. beforeStop: null,
  7161. change: null,
  7162. deactivate: null,
  7163. out: null,
  7164. over: null,
  7165. receive: null,
  7166. remove: null,
  7167. sort: null,
  7168. start: null,
  7169. stop: null,
  7170. update: null
  7171. },
  7172. _isOverAxis: function(e, t, i) {
  7173. return e >= t && t + i > e
  7174. },
  7175. _isFloating: function(e) {
  7176. return /left|right/.test(e.css("float")) || /inline|table-cell/.test(e.css("display"))
  7177. },
  7178. _create: function() {
  7179. this.containerCache = {},
  7180. this.element.addClass("ui-sortable"),
  7181. this.refresh(),
  7182. this.offset = this.element.offset(),
  7183. this._mouseInit(),
  7184. this._setHandleClassName(),
  7185. this.ready = !0
  7186. },
  7187. _setOption: function(e, t) {
  7188. this._super(e, t),
  7189. "handle" === e && this._setHandleClassName()
  7190. },
  7191. _setHandleClassName: function() {
  7192. this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),
  7193. e.each(this.items, function() {
  7194. (this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item).addClass("ui-sortable-handle")
  7195. })
  7196. },
  7197. _destroy: function() {
  7198. this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),
  7199. this._mouseDestroy();
  7200. for (var e = this.items.length - 1; e >= 0; e--)
  7201. this.items[e].item.removeData(this.widgetName + "-item");
  7202. return this
  7203. },
  7204. _mouseCapture: function(t, i) {
  7205. var s = null
  7206. , n = !1
  7207. , a = this;
  7208. return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(t),
  7209. e(t.target).parents().each(function() {
  7210. return e.data(this, a.widgetName + "-item") === a ? (s = e(this),
  7211. !1) : void 0
  7212. }),
  7213. e.data(t.target, a.widgetName + "-item") === a && (s = e(t.target)),
  7214. s ? !this.options.handle || i || (e(this.options.handle, s).find("*").addBack().each(function() {
  7215. this === t.target && (n = !0)
  7216. }),
  7217. n) ? (this.currentItem = s,
  7218. this._removeCurrentsFromItems(),
  7219. !0) : !1 : !1)
  7220. },
  7221. _mouseStart: function(t, i, s) {
  7222. var n, a, o = this.options;
  7223. if (this.currentContainer = this,
  7224. this.refreshPositions(),
  7225. this.helper = this._createHelper(t),
  7226. this._cacheHelperProportions(),
  7227. this._cacheMargins(),
  7228. this.scrollParent = this.helper.scrollParent(),
  7229. this.offset = this.currentItem.offset(),
  7230. this.offset = {
  7231. top: this.offset.top - this.margins.top,
  7232. left: this.offset.left - this.margins.left
  7233. },
  7234. e.extend(this.offset, {
  7235. click: {
  7236. left: t.pageX - this.offset.left,
  7237. top: t.pageY - this.offset.top
  7238. },
  7239. parent: this._getParentOffset(),
  7240. relative: this._getRelativeOffset()
  7241. }),
  7242. this.helper.css("position", "absolute"),
  7243. this.cssPosition = this.helper.css("position"),
  7244. this.originalPosition = this._generatePosition(t),
  7245. this.originalPageX = t.pageX,
  7246. this.originalPageY = t.pageY,
  7247. o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt),
  7248. this.domPosition = {
  7249. prev: this.currentItem.prev()[0],
  7250. parent: this.currentItem.parent()[0]
  7251. },
  7252. this.helper[0] !== this.currentItem[0] && this.currentItem.hide(),
  7253. this._createPlaceholder(),
  7254. o.containment && this._setContainment(),
  7255. o.cursor && "auto" !== o.cursor && (a = this.document.find("body"),
  7256. this.storedCursor = a.css("cursor"),
  7257. a.css("cursor", o.cursor),
  7258. this.storedStylesheet = e("<style>*{ cursor: " + o.cursor + " !important; }</style>").appendTo(a)),
  7259. o.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")),
  7260. this.helper.css("opacity", o.opacity)),
  7261. o.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")),
  7262. this.helper.css("zIndex", o.zIndex)),
  7263. this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()),
  7264. this._trigger("start", t, this._uiHash()),
  7265. this._preserveHelperProportions || this._cacheHelperProportions(),
  7266. !s)
  7267. for (n = this.containers.length - 1; n >= 0; n--)
  7268. this.containers[n]._trigger("activate", t, this._uiHash(this));
  7269. return e.ui.ddmanager && (e.ui.ddmanager.current = this),
  7270. e.ui.ddmanager && !o.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t),
  7271. this.dragging = !0,
  7272. this.helper.addClass("ui-sortable-helper"),
  7273. this._mouseDrag(t),
  7274. !0
  7275. },
  7276. _mouseDrag: function(t) {
  7277. var i, s, n, a, o = this.options, r = !1;
  7278. for (this.position = this._generatePosition(t),
  7279. this.positionAbs = this._convertPositionTo("absolute"),
  7280. this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs),
  7281. this.options.scroll && (this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - t.pageY < o.scrollSensitivity ? this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + o.scrollSpeed : t.pageY - this.overflowOffset.top < o.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - o.scrollSpeed),
  7282. this.overflowOffset.left + this.scrollParent[0].offsetWidth - t.pageX < o.scrollSensitivity ? this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + o.scrollSpeed : t.pageX - this.overflowOffset.left < o.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - o.scrollSpeed)) : (t.pageY - this.document.scrollTop() < o.scrollSensitivity ? r = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed) : this.window.height() - (t.pageY - this.document.scrollTop()) < o.scrollSensitivity && (r = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed)),
  7283. t.pageX - this.document.scrollLeft() < o.scrollSensitivity ? r = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed) : this.window.width() - (t.pageX - this.document.scrollLeft()) < o.scrollSensitivity && (r = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed))),
  7284. r !== !1 && e.ui.ddmanager && !o.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t)),
  7285. this.positionAbs = this._convertPositionTo("absolute"),
  7286. this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"),
  7287. this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"),
  7288. i = this.items.length - 1; i >= 0; i--)
  7289. if (s = this.items[i],
  7290. n = s.item[0],
  7291. a = this._intersectsWithPointer(s),
  7292. a && s.instance === this.currentContainer && n !== this.currentItem[0] && this.placeholder[1 === a ? "next" : "prev"]()[0] !== n && !e.contains(this.placeholder[0], n) && ("semi-dynamic" === this.options.type ? !e.contains(this.element[0], n) : !0)) {
  7293. if (this.direction = 1 === a ? "down" : "up",
  7294. "pointer" !== this.options.tolerance && !this._intersectsWithSides(s))
  7295. break;
  7296. this._rearrange(t, s),
  7297. this._trigger("change", t, this._uiHash());
  7298. break
  7299. }
  7300. return this._contactContainers(t),
  7301. e.ui.ddmanager && e.ui.ddmanager.drag(this, t),
  7302. this._trigger("sort", t, this._uiHash()),
  7303. this.lastPositionAbs = this.positionAbs,
  7304. !1
  7305. },
  7306. _mouseStop: function(t, i) {
  7307. if (t) {
  7308. if (e.ui.ddmanager && !this.options.dropBehaviour && e.ui.ddmanager.drop(this, t),
  7309. this.options.revert) {
  7310. var s = this
  7311. , n = this.placeholder.offset()
  7312. , a = this.options.axis
  7313. , o = {};
  7314. a && "x" !== a || (o.left = n.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft)),
  7315. a && "y" !== a || (o.top = n.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop)),
  7316. this.reverting = !0,
  7317. e(this.helper).animate(o, parseInt(this.options.revert, 10) || 500, function() {
  7318. s._clear(t)
  7319. })
  7320. } else
  7321. this._clear(t, i);
  7322. return !1
  7323. }
  7324. },
  7325. cancel: function() {
  7326. if (this.dragging) {
  7327. this._mouseUp({
  7328. target: null
  7329. }),
  7330. "original" === this.options.helper ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
  7331. for (var t = this.containers.length - 1; t >= 0; t--)
  7332. this.containers[t]._trigger("deactivate", null, this._uiHash(this)),
  7333. this.containers[t].containerCache.over && (this.containers[t]._trigger("out", null, this._uiHash(this)),
  7334. this.containers[t].containerCache.over = 0)
  7335. }
  7336. return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
  7337. "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(),
  7338. e.extend(this, {
  7339. helper: null,
  7340. dragging: !1,
  7341. reverting: !1,
  7342. _noFinalSort: null
  7343. }),
  7344. this.domPosition.prev ? e(this.domPosition.prev).after(this.currentItem) : e(this.domPosition.parent).prepend(this.currentItem)),
  7345. this
  7346. },
  7347. serialize: function(t) {
  7348. var i = this._getItemsAsjQuery(t && t.connected)
  7349. , s = [];
  7350. return t = t || {},
  7351. e(i).each(function() {
  7352. var i = (e(t.item || this).attr(t.attribute || "id") || "").match(t.expression || /(.+)[\-=_](.+)/);
  7353. i && s.push((t.key || i[1] + "[]") + "=" + (t.key && t.expression ? i[1] : i[2]))
  7354. }),
  7355. !s.length && t.key && s.push(t.key + "="),
  7356. s.join("&")
  7357. },
  7358. toArray: function(t) {
  7359. var i = this._getItemsAsjQuery(t && t.connected)
  7360. , s = [];
  7361. return t = t || {},
  7362. i.each(function() {
  7363. s.push(e(t.item || this).attr(t.attribute || "id") || "")
  7364. }),
  7365. s
  7366. },
  7367. _intersectsWith: function(e) {
  7368. var t = this.positionAbs.left
  7369. , i = t + this.helperProportions.width
  7370. , s = this.positionAbs.top
  7371. , n = s + this.helperProportions.height
  7372. , a = e.left
  7373. , o = a + e.width
  7374. , r = e.top
  7375. , h = r + e.height
  7376. , l = this.offset.click.top
  7377. , u = this.offset.click.left
  7378. , d = "x" === this.options.axis || s + l > r && h > s + l
  7379. , c = "y" === this.options.axis || t + u > a && o > t + u
  7380. , p = d && c;
  7381. return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > e[this.floating ? "width" : "height"] ? p : t + this.helperProportions.width / 2 > a && o > i - this.helperProportions.width / 2 && s + this.helperProportions.height / 2 > r && h > n - this.helperProportions.height / 2
  7382. },
  7383. _intersectsWithPointer: function(e) {
  7384. var t = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, e.top, e.height)
  7385. , i = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, e.left, e.width)
  7386. , s = t && i
  7387. , n = this._getDragVerticalDirection()
  7388. , a = this._getDragHorizontalDirection();
  7389. return s ? this.floating ? a && "right" === a || "down" === n ? 2 : 1 : n && ("down" === n ? 2 : 1) : !1
  7390. },
  7391. _intersectsWithSides: function(e) {
  7392. var t = this._isOverAxis(this.positionAbs.top + this.offset.click.top, e.top + e.height / 2, e.height)
  7393. , i = this._isOverAxis(this.positionAbs.left + this.offset.click.left, e.left + e.width / 2, e.width)
  7394. , s = this._getDragVerticalDirection()
  7395. , n = this._getDragHorizontalDirection();
  7396. return this.floating && n ? "right" === n && i || "left" === n && !i : s && ("down" === s && t || "up" === s && !t)
  7397. },
  7398. _getDragVerticalDirection: function() {
  7399. var e = this.positionAbs.top - this.lastPositionAbs.top;
  7400. return 0 !== e && (e > 0 ? "down" : "up")
  7401. },
  7402. _getDragHorizontalDirection: function() {
  7403. var e = this.positionAbs.left - this.lastPositionAbs.left;
  7404. return 0 !== e && (e > 0 ? "right" : "left")
  7405. },
  7406. refresh: function(e) {
  7407. return this._refreshItems(e),
  7408. this._setHandleClassName(),
  7409. this.refreshPositions(),
  7410. this
  7411. },
  7412. _connectWith: function() {
  7413. var e = this.options;
  7414. return e.connectWith.constructor === String ? [e.connectWith] : e.connectWith
  7415. },
  7416. _getItemsAsjQuery: function(t) {
  7417. function i() {
  7418. r.push(this)
  7419. }
  7420. var s, n, a, o, r = [], h = [], l = this._connectWith();
  7421. if (l && t)
  7422. for (s = l.length - 1; s >= 0; s--)
  7423. for (a = e(l[s], this.document[0]),
  7424. n = a.length - 1; n >= 0; n--)
  7425. o = e.data(a[n], this.widgetFullName),
  7426. o && o !== this && !o.options.disabled && h.push([e.isFunction(o.options.items) ? o.options.items.call(o.element) : e(o.options.items, o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), o]);
  7427. for (h.push([e.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
  7428. options: this.options,
  7429. item: this.currentItem
  7430. }) : e(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]),
  7431. s = h.length - 1; s >= 0; s--)
  7432. h[s][0].each(i);
  7433. return e(r)
  7434. },
  7435. _removeCurrentsFromItems: function() {
  7436. var t = this.currentItem.find(":data(" + this.widgetName + "-item)");
  7437. this.items = e.grep(this.items, function(e) {
  7438. for (var i = 0; t.length > i; i++)
  7439. if (t[i] === e.item[0])
  7440. return !1;
  7441. return !0
  7442. })
  7443. },
  7444. _refreshItems: function(t) {
  7445. this.items = [],
  7446. this.containers = [this];
  7447. var i, s, n, a, o, r, h, l, u = this.items, d = [[e.isFunction(this.options.items) ? this.options.items.call(this.element[0], t, {
  7448. item: this.currentItem
  7449. }) : e(this.options.items, this.element), this]], c = this._connectWith();
  7450. if (c && this.ready)
  7451. for (i = c.length - 1; i >= 0; i--)
  7452. for (n = e(c[i], this.document[0]),
  7453. s = n.length - 1; s >= 0; s--)
  7454. a = e.data(n[s], this.widgetFullName),
  7455. a && a !== this && !a.options.disabled && (d.push([e.isFunction(a.options.items) ? a.options.items.call(a.element[0], t, {
  7456. item: this.currentItem
  7457. }) : e(a.options.items, a.element), a]),
  7458. this.containers.push(a));
  7459. for (i = d.length - 1; i >= 0; i--)
  7460. for (o = d[i][1],
  7461. r = d[i][0],
  7462. s = 0,
  7463. l = r.length; l > s; s++)
  7464. h = e(r[s]),
  7465. h.data(this.widgetName + "-item", o),
  7466. u.push({
  7467. item: h,
  7468. instance: o,
  7469. width: 0,
  7470. height: 0,
  7471. left: 0,
  7472. top: 0
  7473. })
  7474. },
  7475. refreshPositions: function(t) {
  7476. this.floating = this.items.length ? "x" === this.options.axis || this._isFloating(this.items[0].item) : !1,
  7477. this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());
  7478. var i, s, n, a;
  7479. for (i = this.items.length - 1; i >= 0; i--)
  7480. s = this.items[i],
  7481. s.instance !== this.currentContainer && this.currentContainer && s.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement ? e(this.options.toleranceElement, s.item) : s.item,
  7482. t || (s.width = n.outerWidth(),
  7483. s.height = n.outerHeight()),
  7484. a = n.offset(),
  7485. s.left = a.left,
  7486. s.top = a.top);
  7487. if (this.options.custom && this.options.custom.refreshContainers)
  7488. this.options.custom.refreshContainers.call(this);
  7489. else
  7490. for (i = this.containers.length - 1; i >= 0; i--)
  7491. a = this.containers[i].element.offset(),
  7492. this.containers[i].containerCache.left = a.left,
  7493. this.containers[i].containerCache.top = a.top,
  7494. this.containers[i].containerCache.width = this.containers[i].element.outerWidth(),
  7495. this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
  7496. return this
  7497. },
  7498. _createPlaceholder: function(t) {
  7499. t = t || this;
  7500. var i, s = t.options;
  7501. s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder,
  7502. s.placeholder = {
  7503. element: function() {
  7504. var s = t.currentItem[0].nodeName.toLowerCase()
  7505. , n = e("<" + s + ">", t.document[0]).addClass(i || t.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper");
  7506. return "tbody" === s ? t._createTrPlaceholder(t.currentItem.find("tr").eq(0), e("<tr>", t.document[0]).appendTo(n)) : "tr" === s ? t._createTrPlaceholder(t.currentItem, n) : "img" === s && n.attr("src", t.currentItem.attr("src")),
  7507. i || n.css("visibility", "hidden"),
  7508. n
  7509. },
  7510. update: function(e, n) {
  7511. (!i || s.forcePlaceholderSize) && (n.height() || n.height(t.currentItem.innerHeight() - parseInt(t.currentItem.css("paddingTop") || 0, 10) - parseInt(t.currentItem.css("paddingBottom") || 0, 10)),
  7512. n.width() || n.width(t.currentItem.innerWidth() - parseInt(t.currentItem.css("paddingLeft") || 0, 10) - parseInt(t.currentItem.css("paddingRight") || 0, 10)))
  7513. }
  7514. }),
  7515. t.placeholder = e(s.placeholder.element.call(t.element, t.currentItem)),
  7516. t.currentItem.after(t.placeholder),
  7517. s.placeholder.update(t, t.placeholder)
  7518. },
  7519. _createTrPlaceholder: function(t, i) {
  7520. var s = this;
  7521. t.children().each(function() {
  7522. e("<td>&#160;</td>", s.document[0]).attr("colspan", e(this).attr("colspan") || 1).appendTo(i)
  7523. })
  7524. },
  7525. _contactContainers: function(t) {
  7526. var i, s, n, a, o, r, h, l, u, d, c = null, p = null;
  7527. for (i = this.containers.length - 1; i >= 0; i--)
  7528. if (!e.contains(this.currentItem[0], this.containers[i].element[0]))
  7529. if (this._intersectsWith(this.containers[i].containerCache)) {
  7530. if (c && e.contains(this.containers[i].element[0], c.element[0]))
  7531. continue;
  7532. c = this.containers[i],
  7533. p = i
  7534. } else
  7535. this.containers[i].containerCache.over && (this.containers[i]._trigger("out", t, this._uiHash(this)),
  7536. this.containers[i].containerCache.over = 0);
  7537. if (c)
  7538. if (1 === this.containers.length)
  7539. this.containers[p].containerCache.over || (this.containers[p]._trigger("over", t, this._uiHash(this)),
  7540. this.containers[p].containerCache.over = 1);
  7541. else {
  7542. for (n = 1e4,
  7543. a = null,
  7544. u = c.floating || this._isFloating(this.currentItem),
  7545. o = u ? "left" : "top",
  7546. r = u ? "width" : "height",
  7547. d = u ? "clientX" : "clientY",
  7548. s = this.items.length - 1; s >= 0; s--)
  7549. e.contains(this.containers[p].element[0], this.items[s].item[0]) && this.items[s].item[0] !== this.currentItem[0] && (h = this.items[s].item.offset()[o],
  7550. l = !1,
  7551. t[d] - h > this.items[s][r] / 2 && (l = !0),
  7552. n > Math.abs(t[d] - h) && (n = Math.abs(t[d] - h),
  7553. a = this.items[s],
  7554. this.direction = l ? "up" : "down"));
  7555. if (!a && !this.options.dropOnEmpty)
  7556. return;
  7557. if (this.currentContainer === this.containers[p])
  7558. return this.currentContainer.containerCache.over || (this.containers[p]._trigger("over", t, this._uiHash()),
  7559. this.currentContainer.containerCache.over = 1),
  7560. void 0;
  7561. a ? this._rearrange(t, a, null, !0) : this._rearrange(t, null, this.containers[p].element, !0),
  7562. this._trigger("change", t, this._uiHash()),
  7563. this.containers[p]._trigger("change", t, this._uiHash(this)),
  7564. this.currentContainer = this.containers[p],
  7565. this.options.placeholder.update(this.currentContainer, this.placeholder),
  7566. this.containers[p]._trigger("over", t, this._uiHash(this)),
  7567. this.containers[p].containerCache.over = 1
  7568. }
  7569. },
  7570. _createHelper: function(t) {
  7571. var i = this.options
  7572. , s = e.isFunction(i.helper) ? e(i.helper.apply(this.element[0], [t, this.currentItem])) : "clone" === i.helper ? this.currentItem.clone() : this.currentItem;
  7573. return s.parents("body").length || e("parent" !== i.appendTo ? i.appendTo : this.currentItem[0].parentNode)[0].appendChild(s[0]),
  7574. s[0] === this.currentItem[0] && (this._storedCSS = {
  7575. width: this.currentItem[0].style.width,
  7576. height: this.currentItem[0].style.height,
  7577. position: this.currentItem.css("position"),
  7578. top: this.currentItem.css("top"),
  7579. left: this.currentItem.css("left")
  7580. }),
  7581. (!s[0].style.width || i.forceHelperSize) && s.width(this.currentItem.width()),
  7582. (!s[0].style.height || i.forceHelperSize) && s.height(this.currentItem.height()),
  7583. s
  7584. },
  7585. _adjustOffsetFromHelper: function(t) {
  7586. "string" == typeof t && (t = t.split(" ")),
  7587. e.isArray(t) && (t = {
  7588. left: +t[0],
  7589. top: +t[1] || 0
  7590. }),
  7591. "left"in t && (this.offset.click.left = t.left + this.margins.left),
  7592. "right"in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left),
  7593. "top"in t && (this.offset.click.top = t.top + this.margins.top),
  7594. "bottom"in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top)
  7595. },
  7596. _getParentOffset: function() {
  7597. this.offsetParent = this.helper.offsetParent();
  7598. var t = this.offsetParent.offset();
  7599. return "absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(),
  7600. t.top += this.scrollParent.scrollTop()),
  7601. (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && e.ui.ie) && (t = {
  7602. top: 0,
  7603. left: 0
  7604. }),
  7605. {
  7606. top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
  7607. left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
  7608. }
  7609. },
  7610. _getRelativeOffset: function() {
  7611. if ("relative" === this.cssPosition) {
  7612. var e = this.currentItem.position();
  7613. return {
  7614. top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
  7615. left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
  7616. }
  7617. }
  7618. return {
  7619. top: 0,
  7620. left: 0
  7621. }
  7622. },
  7623. _cacheMargins: function() {
  7624. this.margins = {
  7625. left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
  7626. top: parseInt(this.currentItem.css("marginTop"), 10) || 0
  7627. }
  7628. },
  7629. _cacheHelperProportions: function() {
  7630. this.helperProportions = {
  7631. width: this.helper.outerWidth(),
  7632. height: this.helper.outerHeight()
  7633. }
  7634. },
  7635. _setContainment: function() {
  7636. var t, i, s, n = this.options;
  7637. "parent" === n.containment && (n.containment = this.helper[0].parentNode),
  7638. ("document" === n.containment || "window" === n.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, "document" === n.containment ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, ("document" === n.containment ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]),
  7639. /^(document|window|parent)$/.test(n.containment) || (t = e(n.containment)[0],
  7640. i = e(n.containment).offset(),
  7641. s = "hidden" !== e(t).css("overflow"),
  7642. this.containment = [i.left + (parseInt(e(t).css("borderLeftWidth"), 10) || 0) + (parseInt(e(t).css("paddingLeft"), 10) || 0) - this.margins.left, i.top + (parseInt(e(t).css("borderTopWidth"), 10) || 0) + (parseInt(e(t).css("paddingTop"), 10) || 0) - this.margins.top, i.left + (s ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) - (parseInt(e(t).css("borderLeftWidth"), 10) || 0) - (parseInt(e(t).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, i.top + (s ? Math.max(t.scrollHeight, t.offsetHeight) : t.offsetHeight) - (parseInt(e(t).css("borderTopWidth"), 10) || 0) - (parseInt(e(t).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top])
  7643. },
  7644. _convertPositionTo: function(t, i) {
  7645. i || (i = this.position);
  7646. var s = "absolute" === t ? 1 : -1
  7647. , n = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent
  7648. , a = /(html|body)/i.test(n[0].tagName);
  7649. return {
  7650. top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : a ? 0 : n.scrollTop()) * s,
  7651. left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : a ? 0 : n.scrollLeft()) * s
  7652. }
  7653. },
  7654. _generatePosition: function(t) {
  7655. var i, s, n = this.options, a = t.pageX, o = t.pageY, r = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, h = /(html|body)/i.test(r[0].tagName);
  7656. return "relative" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()),
  7657. this.originalPosition && (this.containment && (t.pageX - this.offset.click.left < this.containment[0] && (a = this.containment[0] + this.offset.click.left),
  7658. t.pageY - this.offset.click.top < this.containment[1] && (o = this.containment[1] + this.offset.click.top),
  7659. t.pageX - this.offset.click.left > this.containment[2] && (a = this.containment[2] + this.offset.click.left),
  7660. t.pageY - this.offset.click.top > this.containment[3] && (o = this.containment[3] + this.offset.click.top)),
  7661. n.grid && (i = this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1],
  7662. o = this.containment ? i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <= this.containment[3] ? i : i - this.offset.click.top >= this.containment[1] ? i - n.grid[1] : i + n.grid[1] : i,
  7663. s = this.originalPageX + Math.round((a - this.originalPageX) / n.grid[0]) * n.grid[0],
  7664. a = this.containment ? s - this.offset.click.left >= this.containment[0] && s - this.offset.click.left <= this.containment[2] ? s : s - this.offset.click.left >= this.containment[0] ? s - n.grid[0] : s + n.grid[0] : s)),
  7665. {
  7666. top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : h ? 0 : r.scrollTop()),
  7667. left: a - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : h ? 0 : r.scrollLeft())
  7668. }
  7669. },
  7670. _rearrange: function(e, t, i, s) {
  7671. i ? i[0].appendChild(this.placeholder[0]) : t.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? t.item[0] : t.item[0].nextSibling),
  7672. this.counter = this.counter ? ++this.counter : 1;
  7673. var n = this.counter;
  7674. this._delay(function() {
  7675. n === this.counter && this.refreshPositions(!s)
  7676. })
  7677. },
  7678. _clear: function(e, t) {
  7679. function i(e, t, i) {
  7680. return function(s) {
  7681. i._trigger(e, s, t._uiHash(t))
  7682. }
  7683. }
  7684. this.reverting = !1;
  7685. var s, n = [];
  7686. if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem),
  7687. this._noFinalSort = null,
  7688. this.helper[0] === this.currentItem[0]) {
  7689. for (s in this._storedCSS)
  7690. ("auto" === this._storedCSS[s] || "static" === this._storedCSS[s]) && (this._storedCSS[s] = "");
  7691. this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
  7692. } else
  7693. this.currentItem.show();
  7694. for (this.fromOutside && !t && n.push(function(e) {
  7695. this._trigger("receive", e, this._uiHash(this.fromOutside))
  7696. }),
  7697. !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || t || n.push(function(e) {
  7698. this._trigger("update", e, this._uiHash())
  7699. }),
  7700. this !== this.currentContainer && (t || (n.push(function(e) {
  7701. this._trigger("remove", e, this._uiHash())
  7702. }),
  7703. n.push(function(e) {
  7704. return function(t) {
  7705. e._trigger("receive", t, this._uiHash(this))
  7706. }
  7707. }
  7708. .call(this, this.currentContainer)),
  7709. n.push(function(e) {
  7710. return function(t) {
  7711. e._trigger("update", t, this._uiHash(this))
  7712. }
  7713. }
  7714. .call(this, this.currentContainer)))),
  7715. s = this.containers.length - 1; s >= 0; s--)
  7716. t || n.push(i("deactivate", this, this.containers[s])),
  7717. this.containers[s].containerCache.over && (n.push(i("out", this, this.containers[s])),
  7718. this.containers[s].containerCache.over = 0);
  7719. if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor),
  7720. this.storedStylesheet.remove()),
  7721. this._storedOpacity && this.helper.css("opacity", this._storedOpacity),
  7722. this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex),
  7723. this.dragging = !1,
  7724. t || this._trigger("beforeStop", e, this._uiHash()),
  7725. this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
  7726. this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(),
  7727. this.helper = null),
  7728. !t) {
  7729. for (s = 0; n.length > s; s++)
  7730. n[s].call(this, e);
  7731. this._trigger("stop", e, this._uiHash())
  7732. }
  7733. return this.fromOutside = !1,
  7734. !this.cancelHelperRemoval
  7735. },
  7736. _trigger: function() {
  7737. e.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel()
  7738. },
  7739. _uiHash: function(t) {
  7740. var i = t || this;
  7741. return {
  7742. helper: i.helper,
  7743. placeholder: i.placeholder || e([]),
  7744. position: i.position,
  7745. originalPosition: i.originalPosition,
  7746. offset: i.positionAbs,
  7747. item: i.currentItem,
  7748. sender: t ? t.element : null
  7749. }
  7750. }
  7751. }),
  7752. e.widget("ui.spinner", {
  7753. version: "1.11.4",
  7754. defaultElement: "<input>",
  7755. widgetEventPrefix: "spin",
  7756. options: {
  7757. culture: null,
  7758. icons: {
  7759. down: "ui-icon-triangle-1-s",
  7760. up: "ui-icon-triangle-1-n"
  7761. },
  7762. incremental: !0,
  7763. max: null,
  7764. min: null,
  7765. numberFormat: null,
  7766. page: 10,
  7767. step: 1,
  7768. change: null,
  7769. spin: null,
  7770. start: null,
  7771. stop: null
  7772. },
  7773. _create: function() {
  7774. this._setOption("max", this.options.max),
  7775. this._setOption("min", this.options.min),
  7776. this._setOption("step", this.options.step),
  7777. "" !== this.value() && this._value(this.element.val(), !0),
  7778. this._draw(),
  7779. this._on(this._events),
  7780. this._refresh(),
  7781. this._on(this.window, {
  7782. beforeunload: function() {
  7783. this.element.removeAttr("autocomplete")
  7784. }
  7785. })
  7786. },
  7787. _getCreateOptions: function() {
  7788. var t = {}
  7789. , i = this.element;
  7790. return e.each(["min", "max", "step"], function(e, s) {
  7791. var n = i.attr(s);
  7792. void 0 !== n && n.length && (t[s] = n)
  7793. }),
  7794. t
  7795. },
  7796. _events: {
  7797. keydown: function(e) {
  7798. this._start(e) && this._keydown(e) && e.preventDefault()
  7799. },
  7800. keyup: "_stop",
  7801. focus: function() {
  7802. this.previous = this.element.val()
  7803. },
  7804. blur: function(e) {
  7805. return this.cancelBlur ? (delete this.cancelBlur,
  7806. void 0) : (this._stop(),
  7807. this._refresh(),
  7808. this.previous !== this.element.val() && this._trigger("change", e),
  7809. void 0)
  7810. },
  7811. mousewheel: function(e, t) {
  7812. if (t) {
  7813. if (!this.spinning && !this._start(e))
  7814. return !1;
  7815. this._spin((t > 0 ? 1 : -1) * this.options.step, e),
  7816. clearTimeout(this.mousewheelTimer),
  7817. this.mousewheelTimer = this._delay(function() {
  7818. this.spinning && this._stop(e)
  7819. }, 100),
  7820. e.preventDefault()
  7821. }
  7822. },
  7823. "mousedown .ui-spinner-button": function(t) {
  7824. function i() {
  7825. var e = this.element[0] === this.document[0].activeElement;
  7826. e || (this.element.focus(),
  7827. this.previous = s,
  7828. this._delay(function() {
  7829. this.previous = s
  7830. }))
  7831. }
  7832. var s;
  7833. s = this.element[0] === this.document[0].activeElement ? this.previous : this.element.val(),
  7834. t.preventDefault(),
  7835. i.call(this),
  7836. this.cancelBlur = !0,
  7837. this._delay(function() {
  7838. delete this.cancelBlur,
  7839. i.call(this)
  7840. }),
  7841. this._start(t) !== !1 && this._repeat(null, e(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t)
  7842. },
  7843. "mouseup .ui-spinner-button": "_stop",
  7844. "mouseenter .ui-spinner-button": function(t) {
  7845. return e(t.currentTarget).hasClass("ui-state-active") ? this._start(t) === !1 ? !1 : (this._repeat(null, e(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t),
  7846. void 0) : void 0
  7847. },
  7848. "mouseleave .ui-spinner-button": "_stop"
  7849. },
  7850. _draw: function() {
  7851. var e = this.uiSpinner = this.element.addClass("ui-spinner-input").attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());
  7852. this.element.attr("role", "spinbutton"),
  7853. this.buttons = e.find(".ui-spinner-button").attr("tabIndex", -1).button().removeClass("ui-corner-all"),
  7854. this.buttons.height() > Math.ceil(.5 * e.height()) && e.height() > 0 && e.height(e.height()),
  7855. this.options.disabled && this.disable()
  7856. },
  7857. _keydown: function(t) {
  7858. var i = this.options
  7859. , s = e.ui.keyCode;
  7860. switch (t.keyCode) {
  7861. case s.UP:
  7862. return this._repeat(null, 1, t),
  7863. !0;
  7864. case s.DOWN:
  7865. return this._repeat(null, -1, t),
  7866. !0;
  7867. case s.PAGE_UP:
  7868. return this._repeat(null, i.page, t),
  7869. !0;
  7870. case s.PAGE_DOWN:
  7871. return this._repeat(null, -i.page, t),
  7872. !0
  7873. }
  7874. return !1
  7875. },
  7876. _uiSpinnerHtml: function() {
  7877. return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"
  7878. },
  7879. _buttonHtml: function() {
  7880. return "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" + "</a>" + "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" + "</a>"
  7881. },
  7882. _start: function(e) {
  7883. return this.spinning || this._trigger("start", e) !== !1 ? (this.counter || (this.counter = 1),
  7884. this.spinning = !0,
  7885. !0) : !1
  7886. },
  7887. _repeat: function(e, t, i) {
  7888. e = e || 500,
  7889. clearTimeout(this.timer),
  7890. this.timer = this._delay(function() {
  7891. this._repeat(40, t, i)
  7892. }, e),
  7893. this._spin(t * this.options.step, i)
  7894. },
  7895. _spin: function(e, t) {
  7896. var i = this.value() || 0;
  7897. this.counter || (this.counter = 1),
  7898. i = this._adjustValue(i + e * this._increment(this.counter)),
  7899. this.spinning && this._trigger("spin", t, {
  7900. value: i
  7901. }) === !1 || (this._value(i),
  7902. this.counter++)
  7903. },
  7904. _increment: function(t) {
  7905. var i = this.options.incremental;
  7906. return i ? e.isFunction(i) ? i(t) : Math.floor(t * t * t / 5e4 - t * t / 500 + 17 * t / 200 + 1) : 1
  7907. },
  7908. _precision: function() {
  7909. var e = this._precisionOf(this.options.step);
  7910. return null !== this.options.min && (e = Math.max(e, this._precisionOf(this.options.min))),
  7911. e
  7912. },
  7913. _precisionOf: function(e) {
  7914. var t = "" + e
  7915. , i = t.indexOf(".");
  7916. return -1 === i ? 0 : t.length - i - 1
  7917. },
  7918. _adjustValue: function(e) {
  7919. var t, i, s = this.options;
  7920. return t = null !== s.min ? s.min : 0,
  7921. i = e - t,
  7922. i = Math.round(i / s.step) * s.step,
  7923. e = t + i,
  7924. e = parseFloat(e.toFixed(this._precision())),
  7925. null !== s.max && e > s.max ? s.max : null !== s.min && s.min > e ? s.min : e
  7926. },
  7927. _stop: function(e) {
  7928. this.spinning && (clearTimeout(this.timer),
  7929. clearTimeout(this.mousewheelTimer),
  7930. this.counter = 0,
  7931. this.spinning = !1,
  7932. this._trigger("stop", e))
  7933. },
  7934. _setOption: function(e, t) {
  7935. if ("culture" === e || "numberFormat" === e) {
  7936. var i = this._parse(this.element.val());
  7937. return this.options[e] = t,
  7938. this.element.val(this._format(i)),
  7939. void 0
  7940. }
  7941. ("max" === e || "min" === e || "step" === e) && "string" == typeof t && (t = this._parse(t)),
  7942. "icons" === e && (this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),
  7943. this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),
  7944. this._super(e, t),
  7945. "disabled" === e && (this.widget().toggleClass("ui-state-disabled", !!t),
  7946. this.element.prop("disabled", !!t),
  7947. this.buttons.button(t ? "disable" : "enable"))
  7948. },
  7949. _setOptions: h(function(e) {
  7950. this._super(e)
  7951. }),
  7952. _parse: function(e) {
  7953. return "string" == typeof e && "" !== e && (e = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(e, 10, this.options.culture) : +e),
  7954. "" === e || isNaN(e) ? null : e
  7955. },
  7956. _format: function(e) {
  7957. return "" === e ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(e, this.options.numberFormat, this.options.culture) : e
  7958. },
  7959. _refresh: function() {
  7960. this.element.attr({
  7961. "aria-valuemin": this.options.min,
  7962. "aria-valuemax": this.options.max,
  7963. "aria-valuenow": this._parse(this.element.val())
  7964. })
  7965. },
  7966. isValid: function() {
  7967. var e = this.value();
  7968. return null === e ? !1 : e === this._adjustValue(e)
  7969. },
  7970. _value: function(e, t) {
  7971. var i;
  7972. "" !== e && (i = this._parse(e),
  7973. null !== i && (t || (i = this._adjustValue(i)),
  7974. e = this._format(i))),
  7975. this.element.val(e),
  7976. this._refresh()
  7977. },
  7978. _destroy: function() {
  7979. this.element.removeClass("ui-spinner-input").prop("disabled", !1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),
  7980. this.uiSpinner.replaceWith(this.element)
  7981. },
  7982. stepUp: h(function(e) {
  7983. this._stepUp(e)
  7984. }),
  7985. _stepUp: function(e) {
  7986. this._start() && (this._spin((e || 1) * this.options.step),
  7987. this._stop())
  7988. },
  7989. stepDown: h(function(e) {
  7990. this._stepDown(e)
  7991. }),
  7992. _stepDown: function(e) {
  7993. this._start() && (this._spin((e || 1) * -this.options.step),
  7994. this._stop())
  7995. },
  7996. pageUp: h(function(e) {
  7997. this._stepUp((e || 1) * this.options.page)
  7998. }),
  7999. pageDown: h(function(e) {
  8000. this._stepDown((e || 1) * this.options.page)
  8001. }),
  8002. value: function(e) {
  8003. return arguments.length ? (h(this._value).call(this, e),
  8004. void 0) : this._parse(this.element.val())
  8005. },
  8006. widget: function() {
  8007. return this.uiSpinner
  8008. }
  8009. }),
  8010. e.widget("ui.tabs", {
  8011. version: "1.11.4",
  8012. delay: 300,
  8013. options: {
  8014. active: null,
  8015. collapsible: !1,
  8016. event: "click",
  8017. heightStyle: "content",
  8018. hide: null,
  8019. show: null,
  8020. activate: null,
  8021. beforeActivate: null,
  8022. beforeLoad: null,
  8023. load: null
  8024. },
  8025. _isLocal: function() {
  8026. var e = /#.*$/;
  8027. return function(t) {
  8028. var i, s;
  8029. t = t.cloneNode(!1),
  8030. i = t.href.replace(e, ""),
  8031. s = location.href.replace(e, "");
  8032. try {
  8033. i = decodeURIComponent(i)
  8034. } catch (n) {}
  8035. try {
  8036. s = decodeURIComponent(s)
  8037. } catch (n) {}
  8038. return t.hash.length > 1 && i === s
  8039. }
  8040. }(),
  8041. _create: function() {
  8042. var t = this
  8043. , i = this.options;
  8044. this.running = !1,
  8045. this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", i.collapsible),
  8046. this._processTabs(),
  8047. i.active = this._initialActive(),
  8048. e.isArray(i.disabled) && (i.disabled = e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"), function(e) {
  8049. return t.tabs.index(e)
  8050. }))).sort()),
  8051. this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(i.active) : e(),
  8052. this._refresh(),
  8053. this.active.length && this.load(i.active)
  8054. },
  8055. _initialActive: function() {
  8056. var t = this.options.active
  8057. , i = this.options.collapsible
  8058. , s = location.hash.substring(1);
  8059. return null === t && (s && this.tabs.each(function(i, n) {
  8060. return e(n).attr("aria-controls") === s ? (t = i,
  8061. !1) : void 0
  8062. }),
  8063. null === t && (t = this.tabs.index(this.tabs.filter(".ui-tabs-active"))),
  8064. (null === t || -1 === t) && (t = this.tabs.length ? 0 : !1)),
  8065. t !== !1 && (t = this.tabs.index(this.tabs.eq(t)),
  8066. -1 === t && (t = i ? !1 : 0)),
  8067. !i && t === !1 && this.anchors.length && (t = 0),
  8068. t
  8069. },
  8070. _getCreateEventData: function() {
  8071. return {
  8072. tab: this.active,
  8073. panel: this.active.length ? this._getPanelForTab(this.active) : e()
  8074. }
  8075. },
  8076. _tabKeydown: function(t) {
  8077. var i = e(this.document[0].activeElement).closest("li")
  8078. , s = this.tabs.index(i)
  8079. , n = !0;
  8080. if (!this._handlePageNav(t)) {
  8081. switch (t.keyCode) {
  8082. case e.ui.keyCode.RIGHT:
  8083. case e.ui.keyCode.DOWN:
  8084. s++;
  8085. break;
  8086. case e.ui.keyCode.UP:
  8087. case e.ui.keyCode.LEFT:
  8088. n = !1,
  8089. s--;
  8090. break;
  8091. case e.ui.keyCode.END:
  8092. s = this.anchors.length - 1;
  8093. break;
  8094. case e.ui.keyCode.HOME:
  8095. s = 0;
  8096. break;
  8097. case e.ui.keyCode.SPACE:
  8098. return t.preventDefault(),
  8099. clearTimeout(this.activating),
  8100. this._activate(s),
  8101. void 0;
  8102. case e.ui.keyCode.ENTER:
  8103. return t.preventDefault(),
  8104. clearTimeout(this.activating),
  8105. this._activate(s === this.options.active ? !1 : s),
  8106. void 0;
  8107. default:
  8108. return
  8109. }
  8110. t.preventDefault(),
  8111. clearTimeout(this.activating),
  8112. s = this._focusNextTab(s, n),
  8113. t.ctrlKey || t.metaKey || (i.attr("aria-selected", "false"),
  8114. this.tabs.eq(s).attr("aria-selected", "true"),
  8115. this.activating = this._delay(function() {
  8116. this.option("active", s)
  8117. }, this.delay))
  8118. }
  8119. },
  8120. _panelKeydown: function(t) {
  8121. this._handlePageNav(t) || t.ctrlKey && t.keyCode === e.ui.keyCode.UP && (t.preventDefault(),
  8122. this.active.focus())
  8123. },
  8124. _handlePageNav: function(t) {
  8125. return t.altKey && t.keyCode === e.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)),
  8126. !0) : t.altKey && t.keyCode === e.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)),
  8127. !0) : void 0
  8128. },
  8129. _findNextTab: function(t, i) {
  8130. function s() {
  8131. return t > n && (t = 0),
  8132. 0 > t && (t = n),
  8133. t
  8134. }
  8135. for (var n = this.tabs.length - 1; -1 !== e.inArray(s(), this.options.disabled); )
  8136. t = i ? t + 1 : t - 1;
  8137. return t
  8138. },
  8139. _focusNextTab: function(e, t) {
  8140. return e = this._findNextTab(e, t),
  8141. this.tabs.eq(e).focus(),
  8142. e
  8143. },
  8144. _setOption: function(e, t) {
  8145. return "active" === e ? (this._activate(t),
  8146. void 0) : "disabled" === e ? (this._setupDisabled(t),
  8147. void 0) : (this._super(e, t),
  8148. "collapsible" === e && (this.element.toggleClass("ui-tabs-collapsible", t),
  8149. t || this.options.active !== !1 || this._activate(0)),
  8150. "event" === e && this._setupEvents(t),
  8151. "heightStyle" === e && this._setupHeightStyle(t),
  8152. void 0)
  8153. },
  8154. _sanitizeSelector: function(e) {
  8155. return e ? e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""
  8156. },
  8157. refresh: function() {
  8158. var t = this.options
  8159. , i = this.tablist.children(":has(a[href])");
  8160. t.disabled = e.map(i.filter(".ui-state-disabled"), function(e) {
  8161. return i.index(e)
  8162. }),
  8163. this._processTabs(),
  8164. t.active !== !1 && this.anchors.length ? this.active.length && !e.contains(this.tablist[0], this.active[0]) ? this.tabs.length === t.disabled.length ? (t.active = !1,
  8165. this.active = e()) : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1)) : t.active = this.tabs.index(this.active) : (t.active = !1,
  8166. this.active = e()),
  8167. this._refresh()
  8168. },
  8169. _refresh: function() {
  8170. this._setupDisabled(this.options.disabled),
  8171. this._setupEvents(this.options.event),
  8172. this._setupHeightStyle(this.options.heightStyle),
  8173. this.tabs.not(this.active).attr({
  8174. "aria-selected": "false",
  8175. "aria-expanded": "false",
  8176. tabIndex: -1
  8177. }),
  8178. this.panels.not(this._getPanelForTab(this.active)).hide().attr({
  8179. "aria-hidden": "true"
  8180. }),
  8181. this.active.length ? (this.active.addClass("ui-tabs-active ui-state-active").attr({
  8182. "aria-selected": "true",
  8183. "aria-expanded": "true",
  8184. tabIndex: 0
  8185. }),
  8186. this._getPanelForTab(this.active).show().attr({
  8187. "aria-hidden": "false"
  8188. })) : this.tabs.eq(0).attr("tabIndex", 0)
  8189. },
  8190. _processTabs: function() {
  8191. var t = this
  8192. , i = this.tabs
  8193. , s = this.anchors
  8194. , n = this.panels;
  8195. this.tablist = this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role", "tablist").delegate("> li", "mousedown" + this.eventNamespace, function(t) {
  8196. e(this).is(".ui-state-disabled") && t.preventDefault()
  8197. }).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
  8198. e(this).closest("li").is(".ui-state-disabled") && this.blur()
  8199. }),
  8200. this.tabs = this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({
  8201. role: "tab",
  8202. tabIndex: -1
  8203. }),
  8204. this.anchors = this.tabs.map(function() {
  8205. return e("a", this)[0]
  8206. }).addClass("ui-tabs-anchor").attr({
  8207. role: "presentation",
  8208. tabIndex: -1
  8209. }),
  8210. this.panels = e(),
  8211. this.anchors.each(function(i, s) {
  8212. var n, a, o, r = e(s).uniqueId().attr("id"), h = e(s).closest("li"), l = h.attr("aria-controls");
  8213. t._isLocal(s) ? (n = s.hash,
  8214. o = n.substring(1),
  8215. a = t.element.find(t._sanitizeSelector(n))) : (o = h.attr("aria-controls") || e({}).uniqueId()[0].id,
  8216. n = "#" + o,
  8217. a = t.element.find(n),
  8218. a.length || (a = t._createPanel(o),
  8219. a.insertAfter(t.panels[i - 1] || t.tablist)),
  8220. a.attr("aria-live", "polite")),
  8221. a.length && (t.panels = t.panels.add(a)),
  8222. l && h.data("ui-tabs-aria-controls", l),
  8223. h.attr({
  8224. "aria-controls": o,
  8225. "aria-labelledby": r
  8226. }),
  8227. a.attr("aria-labelledby", r)
  8228. }),
  8229. this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role", "tabpanel"),
  8230. i && (this._off(i.not(this.tabs)),
  8231. this._off(s.not(this.anchors)),
  8232. this._off(n.not(this.panels)))
  8233. },
  8234. _getList: function() {
  8235. return this.tablist || this.element.find("ol,ul").eq(0)
  8236. },
  8237. _createPanel: function(t) {
  8238. return e("<div>").attr("id", t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", !0)
  8239. },
  8240. _setupDisabled: function(t) {
  8241. e.isArray(t) && (t.length ? t.length === this.anchors.length && (t = !0) : t = !1);
  8242. for (var i, s = 0; i = this.tabs[s]; s++)
  8243. t === !0 || -1 !== e.inArray(s, t) ? e(i).addClass("ui-state-disabled").attr("aria-disabled", "true") : e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");
  8244. this.options.disabled = t
  8245. },
  8246. _setupEvents: function(t) {
  8247. var i = {};
  8248. t && e.each(t.split(" "), function(e, t) {
  8249. i[t] = "_eventHandler"
  8250. }),
  8251. this._off(this.anchors.add(this.tabs).add(this.panels)),
  8252. this._on(!0, this.anchors, {
  8253. click: function(e) {
  8254. e.preventDefault()
  8255. }
  8256. }),
  8257. this._on(this.anchors, i),
  8258. this._on(this.tabs, {
  8259. keydown: "_tabKeydown"
  8260. }),
  8261. this._on(this.panels, {
  8262. keydown: "_panelKeydown"
  8263. }),
  8264. this._focusable(this.tabs),
  8265. this._hoverable(this.tabs)
  8266. },
  8267. _setupHeightStyle: function(t) {
  8268. var i, s = this.element.parent();
  8269. "fill" === t ? (i = s.height(),
  8270. i -= this.element.outerHeight() - this.element.height(),
  8271. this.element.siblings(":visible").each(function() {
  8272. var t = e(this)
  8273. , s = t.css("position");
  8274. "absolute" !== s && "fixed" !== s && (i -= t.outerHeight(!0))
  8275. }),
  8276. this.element.children().not(this.panels).each(function() {
  8277. i -= e(this).outerHeight(!0)
  8278. }),
  8279. this.panels.each(function() {
  8280. e(this).height(Math.max(0, i - e(this).innerHeight() + e(this).height()))
  8281. }).css("overflow", "auto")) : "auto" === t && (i = 0,
  8282. this.panels.each(function() {
  8283. i = Math.max(i, e(this).height("").height())
  8284. }).height(i))
  8285. },
  8286. _eventHandler: function(t) {
  8287. var i = this.options
  8288. , s = this.active
  8289. , n = e(t.currentTarget)
  8290. , a = n.closest("li")
  8291. , o = a[0] === s[0]
  8292. , r = o && i.collapsible
  8293. , h = r ? e() : this._getPanelForTab(a)
  8294. , l = s.length ? this._getPanelForTab(s) : e()
  8295. , u = {
  8296. oldTab: s,
  8297. oldPanel: l,
  8298. newTab: r ? e() : a,
  8299. newPanel: h
  8300. };
  8301. t.preventDefault(),
  8302. a.hasClass("ui-state-disabled") || a.hasClass("ui-tabs-loading") || this.running || o && !i.collapsible || this._trigger("beforeActivate", t, u) === !1 || (i.active = r ? !1 : this.tabs.index(a),
  8303. this.active = o ? e() : a,
  8304. this.xhr && this.xhr.abort(),
  8305. l.length || h.length || e.error("jQuery UI Tabs: Mismatching fragment identifier."),
  8306. h.length && this.load(this.tabs.index(a), t),
  8307. this._toggle(t, u))
  8308. },
  8309. _toggle: function(t, i) {
  8310. function s() {
  8311. a.running = !1,
  8312. a._trigger("activate", t, i)
  8313. }
  8314. function n() {
  8315. i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),
  8316. o.length && a.options.show ? a._show(o, a.options.show, s) : (o.show(),
  8317. s())
  8318. }
  8319. var a = this
  8320. , o = i.newPanel
  8321. , r = i.oldPanel;
  8322. this.running = !0,
  8323. r.length && this.options.hide ? this._hide(r, this.options.hide, function() {
  8324. i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),
  8325. n()
  8326. }) : (i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),
  8327. r.hide(),
  8328. n()),
  8329. r.attr("aria-hidden", "true"),
  8330. i.oldTab.attr({
  8331. "aria-selected": "false",
  8332. "aria-expanded": "false"
  8333. }),
  8334. o.length && r.length ? i.oldTab.attr("tabIndex", -1) : o.length && this.tabs.filter(function() {
  8335. return 0 === e(this).attr("tabIndex")
  8336. }).attr("tabIndex", -1),
  8337. o.attr("aria-hidden", "false"),
  8338. i.newTab.attr({
  8339. "aria-selected": "true",
  8340. "aria-expanded": "true",
  8341. tabIndex: 0
  8342. })
  8343. },
  8344. _activate: function(t) {
  8345. var i, s = this._findActive(t);
  8346. s[0] !== this.active[0] && (s.length || (s = this.active),
  8347. i = s.find(".ui-tabs-anchor")[0],
  8348. this._eventHandler({
  8349. target: i,
  8350. currentTarget: i,
  8351. preventDefault: e.noop
  8352. }))
  8353. },
  8354. _findActive: function(t) {
  8355. return t === !1 ? e() : this.tabs.eq(t)
  8356. },
  8357. _getIndex: function(e) {
  8358. return "string" == typeof e && (e = this.anchors.index(this.anchors.filter("[href$='" + e + "']"))),
  8359. e
  8360. },
  8361. _destroy: function() {
  8362. this.xhr && this.xhr.abort(),
  8363. this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),
  8364. this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),
  8365. this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),
  8366. this.tablist.unbind(this.eventNamespace),
  8367. this.tabs.add(this.panels).each(function() {
  8368. e.data(this, "ui-tabs-destroy") ? e(this).remove() : e(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")
  8369. }),
  8370. this.tabs.each(function() {
  8371. var t = e(this)
  8372. , i = t.data("ui-tabs-aria-controls");
  8373. i ? t.attr("aria-controls", i).removeData("ui-tabs-aria-controls") : t.removeAttr("aria-controls")
  8374. }),
  8375. this.panels.show(),
  8376. "content" !== this.options.heightStyle && this.panels.css("height", "")
  8377. },
  8378. enable: function(t) {
  8379. var i = this.options.disabled;
  8380. i !== !1 && (void 0 === t ? i = !1 : (t = this._getIndex(t),
  8381. i = e.isArray(i) ? e.map(i, function(e) {
  8382. return e !== t ? e : null
  8383. }) : e.map(this.tabs, function(e, i) {
  8384. return i !== t ? i : null
  8385. })),
  8386. this._setupDisabled(i))
  8387. },
  8388. disable: function(t) {
  8389. var i = this.options.disabled;
  8390. if (i !== !0) {
  8391. if (void 0 === t)
  8392. i = !0;
  8393. else {
  8394. if (t = this._getIndex(t),
  8395. -1 !== e.inArray(t, i))
  8396. return;
  8397. i = e.isArray(i) ? e.merge([t], i).sort() : [t]
  8398. }
  8399. this._setupDisabled(i)
  8400. }
  8401. },
  8402. load: function(t, i) {
  8403. t = this._getIndex(t);
  8404. var s = this
  8405. , n = this.tabs.eq(t)
  8406. , a = n.find(".ui-tabs-anchor")
  8407. , o = this._getPanelForTab(n)
  8408. , r = {
  8409. tab: n,
  8410. panel: o
  8411. }
  8412. , h = function(e, t) {
  8413. "abort" === t && s.panels.stop(!1, !0),
  8414. n.removeClass("ui-tabs-loading"),
  8415. o.removeAttr("aria-busy"),
  8416. e === s.xhr && delete s.xhr
  8417. };
  8418. this._isLocal(a[0]) || (this.xhr = e.ajax(this._ajaxSettings(a, i, r)),
  8419. this.xhr && "canceled" !== this.xhr.statusText && (n.addClass("ui-tabs-loading"),
  8420. o.attr("aria-busy", "true"),
  8421. this.xhr.done(function(e, t, n) {
  8422. setTimeout(function() {
  8423. o.html(e),
  8424. s._trigger("load", i, r),
  8425. h(n, t)
  8426. }, 1)
  8427. }).fail(function(e, t) {
  8428. setTimeout(function() {
  8429. h(e, t)
  8430. }, 1)
  8431. })))
  8432. },
  8433. _ajaxSettings: function(t, i, s) {
  8434. var n = this;
  8435. return {
  8436. url: t.attr("href"),
  8437. beforeSend: function(t, a) {
  8438. return n._trigger("beforeLoad", i, e.extend({
  8439. jqXHR: t,
  8440. ajaxSettings: a
  8441. }, s))
  8442. }
  8443. }
  8444. },
  8445. _getPanelForTab: function(t) {
  8446. var i = e(t).attr("aria-controls");
  8447. return this.element.find(this._sanitizeSelector("#" + i))
  8448. }
  8449. }),
  8450. e.widget("ui.tooltip", {
  8451. version: "1.11.4",
  8452. options: {
  8453. content: function() {
  8454. var t = e(this).attr("title") || "";
  8455. return e("<a>").text(t).html()
  8456. },
  8457. hide: !0,
  8458. items: "[title]:not([disabled])",
  8459. position: {
  8460. my: "left top+15",
  8461. at: "left bottom",
  8462. collision: "flipfit flip"
  8463. },
  8464. show: !0,
  8465. tooltipClass: null,
  8466. track: !1,
  8467. close: null,
  8468. open: null
  8469. },
  8470. _addDescribedBy: function(t, i) {
  8471. var s = (t.attr("aria-describedby") || "").split(/\s+/);
  8472. s.push(i),
  8473. t.data("ui-tooltip-id", i).attr("aria-describedby", e.trim(s.join(" ")))
  8474. },
  8475. _removeDescribedBy: function(t) {
  8476. var i = t.data("ui-tooltip-id")
  8477. , s = (t.attr("aria-describedby") || "").split(/\s+/)
  8478. , n = e.inArray(i, s);
  8479. -1 !== n && s.splice(n, 1),
  8480. t.removeData("ui-tooltip-id"),
  8481. s = e.trim(s.join(" ")),
  8482. s ? t.attr("aria-describedby", s) : t.removeAttr("aria-describedby")
  8483. },
  8484. _create: function() {
  8485. this._on({
  8486. mouseover: "open",
  8487. focusin: "open"
  8488. }),
  8489. this.tooltips = {},
  8490. this.parents = {},
  8491. this.options.disabled && this._disable(),
  8492. this.liveRegion = e("<div>").attr({
  8493. role: "log",
  8494. "aria-live": "assertive",
  8495. "aria-relevant": "additions"
  8496. }).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)
  8497. },
  8498. _setOption: function(t, i) {
  8499. var s = this;
  8500. return "disabled" === t ? (this[i ? "_disable" : "_enable"](),
  8501. this.options[t] = i,
  8502. void 0) : (this._super(t, i),
  8503. "content" === t && e.each(this.tooltips, function(e, t) {
  8504. s._updateContent(t.element)
  8505. }),
  8506. void 0)
  8507. },
  8508. _disable: function() {
  8509. var t = this;
  8510. e.each(this.tooltips, function(i, s) {
  8511. var n = e.Event("blur");
  8512. n.target = n.currentTarget = s.element[0],
  8513. t.close(n, !0)
  8514. }),
  8515. this.element.find(this.options.items).addBack().each(function() {
  8516. var t = e(this);
  8517. t.is("[title]") && t.data("ui-tooltip-title", t.attr("title")).removeAttr("title")
  8518. })
  8519. },
  8520. _enable: function() {
  8521. this.element.find(this.options.items).addBack().each(function() {
  8522. var t = e(this);
  8523. t.data("ui-tooltip-title") && t.attr("title", t.data("ui-tooltip-title"))
  8524. })
  8525. },
  8526. open: function(t) {
  8527. var i = this
  8528. , s = e(t ? t.target : this.element).closest(this.options.items);
  8529. s.length && !s.data("ui-tooltip-id") && (s.attr("title") && s.data("ui-tooltip-title", s.attr("title")),
  8530. s.data("ui-tooltip-open", !0),
  8531. t && "mouseover" === t.type && s.parents().each(function() {
  8532. var t, s = e(this);
  8533. s.data("ui-tooltip-open") && (t = e.Event("blur"),
  8534. t.target = t.currentTarget = this,
  8535. i.close(t, !0)),
  8536. s.attr("title") && (s.uniqueId(),
  8537. i.parents[this.id] = {
  8538. element: this,
  8539. title: s.attr("title")
  8540. },
  8541. s.attr("title", ""))
  8542. }),
  8543. this._registerCloseHandlers(t, s),
  8544. this._updateContent(s, t))
  8545. },
  8546. _updateContent: function(e, t) {
  8547. var i, s = this.options.content, n = this, a = t ? t.type : null;
  8548. return "string" == typeof s ? this._open(t, e, s) : (i = s.call(e[0], function(i) {
  8549. n._delay(function() {
  8550. e.data("ui-tooltip-open") && (t && (t.type = a),
  8551. this._open(t, e, i))
  8552. })
  8553. }),
  8554. i && this._open(t, e, i),
  8555. void 0)
  8556. },
  8557. _open: function(t, i, s) {
  8558. function n(e) {
  8559. l.of = e,
  8560. o.is(":hidden") || o.position(l)
  8561. }
  8562. var a, o, r, h, l = e.extend({}, this.options.position);
  8563. if (s) {
  8564. if (a = this._find(i))
  8565. return a.tooltip.find(".ui-tooltip-content").html(s),
  8566. void 0;
  8567. i.is("[title]") && (t && "mouseover" === t.type ? i.attr("title", "") : i.removeAttr("title")),
  8568. a = this._tooltip(i),
  8569. o = a.tooltip,
  8570. this._addDescribedBy(i, o.attr("id")),
  8571. o.find(".ui-tooltip-content").html(s),
  8572. this.liveRegion.children().hide(),
  8573. s.clone ? (h = s.clone(),
  8574. h.removeAttr("id").find("[id]").removeAttr("id")) : h = s,
  8575. e("<div>").html(h).appendTo(this.liveRegion),
  8576. this.options.track && t && /^mouse/.test(t.type) ? (this._on(this.document, {
  8577. mousemove: n
  8578. }),
  8579. n(t)) : o.position(e.extend({
  8580. of: i
  8581. }, this.options.position)),
  8582. o.hide(),
  8583. this._show(o, this.options.show),
  8584. this.options.show && this.options.show.delay && (r = this.delayedShow = setInterval(function() {
  8585. o.is(":visible") && (n(l.of),
  8586. clearInterval(r))
  8587. }, e.fx.interval)),
  8588. this._trigger("open", t, {
  8589. tooltip: o
  8590. })
  8591. }
  8592. },
  8593. _registerCloseHandlers: function(t, i) {
  8594. var s = {
  8595. keyup: function(t) {
  8596. if (t.keyCode === e.ui.keyCode.ESCAPE) {
  8597. var s = e.Event(t);
  8598. s.currentTarget = i[0],
  8599. this.close(s, !0)
  8600. }
  8601. }
  8602. };
  8603. i[0] !== this.element[0] && (s.remove = function() {
  8604. this._removeTooltip(this._find(i).tooltip)
  8605. }
  8606. ),
  8607. t && "mouseover" !== t.type || (s.mouseleave = "close"),
  8608. t && "focusin" !== t.type || (s.focusout = "close"),
  8609. this._on(!0, i, s)
  8610. },
  8611. close: function(t) {
  8612. var i, s = this, n = e(t ? t.currentTarget : this.element), a = this._find(n);
  8613. return a ? (i = a.tooltip,
  8614. a.closing || (clearInterval(this.delayedShow),
  8615. n.data("ui-tooltip-title") && !n.attr("title") && n.attr("title", n.data("ui-tooltip-title")),
  8616. this._removeDescribedBy(n),
  8617. a.hiding = !0,
  8618. i.stop(!0),
  8619. this._hide(i, this.options.hide, function() {
  8620. s._removeTooltip(e(this))
  8621. }),
  8622. n.removeData("ui-tooltip-open"),
  8623. this._off(n, "mouseleave focusout keyup"),
  8624. n[0] !== this.element[0] && this._off(n, "remove"),
  8625. this._off(this.document, "mousemove"),
  8626. t && "mouseleave" === t.type && e.each(this.parents, function(t, i) {
  8627. e(i.element).attr("title", i.title),
  8628. delete s.parents[t]
  8629. }),
  8630. a.closing = !0,
  8631. this._trigger("close", t, {
  8632. tooltip: i
  8633. }),
  8634. a.hiding || (a.closing = !1)),
  8635. void 0) : (n.removeData("ui-tooltip-open"),
  8636. void 0)
  8637. },
  8638. _tooltip: function(t) {
  8639. var i = e("<div>").attr("role", "tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || ""))
  8640. , s = i.uniqueId().attr("id");
  8641. return e("<div>").addClass("ui-tooltip-content").appendTo(i),
  8642. i.appendTo(this.document[0].body),
  8643. this.tooltips[s] = {
  8644. element: t,
  8645. tooltip: i
  8646. }
  8647. },
  8648. _find: function(e) {
  8649. var t = e.data("ui-tooltip-id");
  8650. return t ? this.tooltips[t] : null
  8651. },
  8652. _removeTooltip: function(e) {
  8653. e.remove(),
  8654. delete this.tooltips[e.attr("id")]
  8655. },
  8656. _destroy: function() {
  8657. var t = this;
  8658. e.each(this.tooltips, function(i, s) {
  8659. var n = e.Event("blur")
  8660. , a = s.element;
  8661. n.target = n.currentTarget = a[0],
  8662. t.close(n, !0),
  8663. e("#" + i).remove(),
  8664. a.data("ui-tooltip-title") && (a.attr("title") || a.attr("title", a.data("ui-tooltip-title")),
  8665. a.removeData("ui-tooltip-title"))
  8666. }),
  8667. this.liveRegion.remove()
  8668. }
  8669. })
  8670. });