Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tinymce.min.js 710KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446
  1. // 4.5.1 (2016-12-07)
  2. ! function(e, t) {
  3. "use strict";
  4. function n(e, t) {
  5. for (var n, r = [], i = 0; i < e.length; ++i) {
  6. if (n = s[e[i]] || o(e[i]), !n) throw "module definition dependecy not found: " + e[i];
  7. r.push(n)
  8. }
  9. t.apply(null, r)
  10. }
  11. function r(e, r, i) {
  12. if ("string" != typeof e) throw "invalid module definition, module id must be defined and be a string";
  13. if (r === t) throw "invalid module definition, dependencies must be specified";
  14. if (i === t) throw "invalid module definition, definition function must be specified";
  15. n(r, function() {
  16. s[e] = i.apply(null, arguments)
  17. })
  18. }
  19. function i(e) {
  20. return !!s[e]
  21. }
  22. function o(t) {
  23. for (var n = e, r = t.split(/[.\/]/), i = 0; i < r.length; ++i) {
  24. if (!n[r[i]]) return;
  25. n = n[r[i]]
  26. }
  27. return n
  28. }
  29. function a(n) {
  30. var r, i, o, a, l;
  31. for (r = 0; r < n.length; r++) {
  32. i = e, o = n[r], a = o.split(/[.\/]/);
  33. for (var c = 0; c < a.length - 1; ++c) i[a[c]] === t && (i[a[c]] = {}), i = i[a[c]];
  34. i[a[a.length - 1]] = s[o]
  35. }
  36. if (e.AMDLC_TESTS) {
  37. l = e.privateModules || {};
  38. for (o in s) l[o] = s[o];
  39. for (r = 0; r < n.length; r++) delete l[n[r]];
  40. e.privateModules = l
  41. }
  42. }
  43. var s = {},
  44. l = "tinymce/geom/Rect",
  45. c = "tinymce/util/Promise",
  46. u = "tinymce/util/Delay",
  47. d = "tinymce/Env",
  48. f = "tinymce/dom/EventUtils",
  49. h = "tinymce/dom/Sizzle",
  50. p = "tinymce/util/Arr",
  51. m = "tinymce/util/Tools",
  52. g = "tinymce/dom/DomQuery",
  53. v = "tinymce/html/Styles",
  54. y = "tinymce/dom/TreeWalker",
  55. b = "tinymce/dom/Range",
  56. C = "tinymce/html/Entities",
  57. x = "tinymce/dom/StyleSheetLoader",
  58. w = "tinymce/dom/DOMUtils",
  59. E = "tinymce/dom/ScriptLoader",
  60. N = "tinymce/AddOnManager",
  61. _ = "tinymce/dom/NodeType",
  62. S = "tinymce/text/Zwsp",
  63. k = "tinymce/caret/CaretContainer",
  64. T = "tinymce/dom/RangeUtils",
  65. R = "tinymce/NodeChange",
  66. A = "tinymce/html/Node",
  67. B = "tinymce/html/Schema",
  68. D = "tinymce/html/SaxParser",
  69. L = "tinymce/html/DomParser",
  70. M = "tinymce/html/Writer",
  71. P = "tinymce/html/Serializer",
  72. O = "tinymce/dom/Serializer",
  73. H = "tinymce/dom/TridentSelection",
  74. I = "tinymce/util/VK",
  75. F = "tinymce/dom/ControlSelection",
  76. z = "tinymce/util/Fun",
  77. U = "tinymce/caret/CaretCandidate",
  78. W = "tinymce/geom/ClientRect",
  79. V = "tinymce/text/ExtendingChar",
  80. $ = "tinymce/caret/CaretPosition",
  81. q = "tinymce/caret/CaretBookmark",
  82. j = "tinymce/dom/BookmarkManager",
  83. Y = "tinymce/dom/Selection",
  84. X = "tinymce/dom/ElementUtils",
  85. K = "tinymce/fmt/Preview",
  86. G = "tinymce/fmt/Hooks",
  87. J = "tinymce/Formatter",
  88. Q = "tinymce/undo/Diff",
  89. Z = "tinymce/undo/Fragments",
  90. ee = "tinymce/undo/Levels",
  91. te = "tinymce/UndoManager",
  92. ne = "tinymce/EnterKey",
  93. re = "tinymce/ForceBlocks",
  94. ie = "tinymce/caret/CaretUtils",
  95. oe = "tinymce/caret/CaretWalker",
  96. ae = "tinymce/InsertList",
  97. se = "tinymce/InsertContent",
  98. le = "tinymce/EditorCommands",
  99. ce = "tinymce/util/URI",
  100. ue = "tinymce/util/Class",
  101. de = "tinymce/util/EventDispatcher",
  102. fe = "tinymce/data/Binding",
  103. he = "tinymce/util/Observable",
  104. pe = "tinymce/data/ObservableObject",
  105. me = "tinymce/ui/Selector",
  106. ge = "tinymce/ui/Collection",
  107. ve = "tinymce/ui/DomUtils",
  108. ye = "tinymce/ui/BoxUtils",
  109. be = "tinymce/ui/ClassList",
  110. Ce = "tinymce/ui/ReflowQueue",
  111. xe = "tinymce/ui/Control",
  112. we = "tinymce/ui/Factory",
  113. Ee = "tinymce/ui/KeyboardNavigation",
  114. Ne = "tinymce/ui/Container",
  115. _e = "tinymce/ui/DragHelper",
  116. Se = "tinymce/ui/Scrollable",
  117. ke = "tinymce/ui/Panel",
  118. Te = "tinymce/ui/Movable",
  119. Re = "tinymce/ui/Resizable",
  120. Ae = "tinymce/ui/FloatPanel",
  121. Be = "tinymce/ui/Window",
  122. De = "tinymce/ui/MessageBox",
  123. Le = "tinymce/WindowManager",
  124. Me = "tinymce/ui/Tooltip",
  125. Pe = "tinymce/ui/Widget",
  126. Oe = "tinymce/ui/Progress",
  127. He = "tinymce/ui/Notification",
  128. Ie = "tinymce/NotificationManager",
  129. Fe = "tinymce/dom/NodePath",
  130. ze = "tinymce/util/Quirks",
  131. Ue = "tinymce/EditorObservable",
  132. We = "tinymce/Mode",
  133. Ve = "tinymce/Shortcuts",
  134. $e = "tinymce/file/Uploader",
  135. qe = "tinymce/file/Conversions",
  136. je = "tinymce/file/ImageScanner",
  137. Ye = "tinymce/file/BlobCache",
  138. Xe = "tinymce/file/UploadStatus",
  139. Ke = "tinymce/EditorUpload",
  140. Ge = "tinymce/caret/FakeCaret",
  141. Je = "tinymce/dom/Dimensions",
  142. Qe = "tinymce/caret/LineWalker",
  143. Ze = "tinymce/caret/LineUtils",
  144. et = "tinymce/dom/MousePosition",
  145. tt = "tinymce/DragDropOverrides",
  146. nt = "tinymce/SelectionOverrides",
  147. rt = "tinymce/util/Uuid",
  148. it = "tinymce/ui/Sidebar",
  149. ot = "tinymce/Editor",
  150. at = "tinymce/util/I18n",
  151. st = "tinymce/FocusManager",
  152. lt = "tinymce/EditorManager",
  153. ct = "tinymce/LegacyInput",
  154. ut = "tinymce/util/XHR",
  155. dt = "tinymce/util/JSON",
  156. ft = "tinymce/util/JSONRequest",
  157. ht = "tinymce/util/JSONP",
  158. pt = "tinymce/util/LocalStorage",
  159. mt = "tinymce/Compat",
  160. gt = "tinymce/ui/Layout",
  161. vt = "tinymce/ui/AbsoluteLayout",
  162. yt = "tinymce/ui/Button",
  163. bt = "tinymce/ui/ButtonGroup",
  164. Ct = "tinymce/ui/Checkbox",
  165. xt = "tinymce/ui/ComboBox",
  166. wt = "tinymce/ui/ColorBox",
  167. Et = "tinymce/ui/PanelButton",
  168. Nt = "tinymce/ui/ColorButton",
  169. _t = "tinymce/util/Color",
  170. St = "tinymce/ui/ColorPicker",
  171. kt = "tinymce/ui/Path",
  172. Tt = "tinymce/ui/ElementPath",
  173. Rt = "tinymce/ui/FormItem",
  174. At = "tinymce/ui/Form",
  175. Bt = "tinymce/ui/FieldSet",
  176. Dt = "tinymce/content/LinkTargets",
  177. Lt = "tinymce/ui/FilePicker",
  178. Mt = "tinymce/ui/FitLayout",
  179. Pt = "tinymce/ui/FlexLayout",
  180. Ot = "tinymce/ui/FlowLayout",
  181. Ht = "tinymce/ui/FormatControls",
  182. It = "tinymce/ui/GridLayout",
  183. Ft = "tinymce/ui/Iframe",
  184. zt = "tinymce/ui/InfoBox",
  185. Ut = "tinymce/ui/Label",
  186. Wt = "tinymce/ui/Toolbar",
  187. Vt = "tinymce/ui/MenuBar",
  188. $t = "tinymce/ui/MenuButton",
  189. qt = "tinymce/ui/MenuItem",
  190. jt = "tinymce/ui/Throbber",
  191. Yt = "tinymce/ui/Menu",
  192. Xt = "tinymce/ui/ListBox",
  193. Kt = "tinymce/ui/Radio",
  194. Gt = "tinymce/ui/ResizeHandle",
  195. Jt = "tinymce/ui/SelectBox",
  196. Qt = "tinymce/ui/Slider",
  197. Zt = "tinymce/ui/Spacer",
  198. en = "tinymce/ui/SplitButton",
  199. tn = "tinymce/ui/StackLayout",
  200. nn = "tinymce/ui/TabPanel",
  201. rn = "tinymce/ui/TextBox",
  202. on = "tinymce/Register";
  203. r(l, [], function() {
  204. function e(e, t, n) {
  205. var r, i, a, s, l, u;
  206. return r = t.x, i = t.y, a = e.w, s = e.h, l = t.w, u = t.h, n = (n || "").split(""), "b" === n[0] && (i += u), "r" === n[1] && (r += l), "c" === n[0] && (i += c(u / 2)), "c" === n[1] && (r += c(l / 2)), "b" === n[3] && (i -= s), "r" === n[4] && (r -= a), "c" === n[3] && (i -= c(s / 2)), "c" === n[4] && (r -= c(a / 2)), o(r, i, a, s)
  207. }
  208. function t(t, n, r, i) {
  209. var o, a;
  210. for (a = 0; a < i.length; a++)
  211. if (o = e(t, n, i[a]), o.x >= r.x && o.x + o.w <= r.w + r.x && o.y >= r.y && o.y + o.h <= r.h + r.y) return i[a];
  212. return null
  213. }
  214. function n(e, t, n) {
  215. return o(e.x - t, e.y - n, e.w + 2 * t, e.h + 2 * n)
  216. }
  217. function r(e, t) {
  218. var n, r, i, a;
  219. return n = l(e.x, t.x), r = l(e.y, t.y), i = s(e.x + e.w, t.x + t.w), a = s(e.y + e.h, t.y + t.h), i - n < 0 || a - r < 0 ? null : o(n, r, i - n, a - r)
  220. }
  221. function i(e, t, n) {
  222. var r, i, a, s, c, u, d, f, h, p;
  223. return c = e.x, u = e.y, d = e.x + e.w, f = e.y + e.h, h = t.x + t.w, p = t.y + t.h, r = l(0, t.x - c), i = l(0, t.y - u), a = l(0, d - h), s = l(0, f - p), c += r, u += i, n && (d += r, f += i, c -= a, u -= s), d -= a, f -= s, o(c, u, d - c, f - u)
  224. }
  225. function o(e, t, n, r) {
  226. return {
  227. x: e,
  228. y: t,
  229. w: n,
  230. h: r
  231. }
  232. }
  233. function a(e) {
  234. return o(e.left, e.top, e.width, e.height)
  235. }
  236. var s = Math.min,
  237. l = Math.max,
  238. c = Math.round;
  239. return {
  240. inflate: n,
  241. relativePosition: e,
  242. findBestRelativePosition: t,
  243. intersect: r,
  244. clamp: i,
  245. create: o,
  246. fromClientRect: a
  247. }
  248. }), r(c, [], function() {
  249. function e(e, t) {
  250. return function() {
  251. e.apply(t, arguments)
  252. }
  253. }
  254. function t(t) {
  255. if ("object" != typeof this) throw new TypeError("Promises must be constructed via new");
  256. if ("function" != typeof t) throw new TypeError("not a function");
  257. this._state = null, this._value = null, this._deferreds = [], s(t, e(r, this), e(i, this))
  258. }
  259. function n(e) {
  260. var t = this;
  261. return null === this._state ? void this._deferreds.push(e) : void l(function() {
  262. var n = t._state ? e.onFulfilled : e.onRejected;
  263. if (null === n) return void(t._state ? e.resolve : e.reject)(t._value);
  264. var r;
  265. try {
  266. r = n(t._value)
  267. } catch (i) {
  268. return void e.reject(i)
  269. }
  270. e.resolve(r)
  271. })
  272. }
  273. function r(t) {
  274. try {
  275. if (t === this) throw new TypeError("A promise cannot be resolved with itself.");
  276. if (t && ("object" == typeof t || "function" == typeof t)) {
  277. var n = t.then;
  278. if ("function" == typeof n) return void s(e(n, t), e(r, this), e(i, this))
  279. }
  280. this._state = !0, this._value = t, o.call(this)
  281. } catch (a) {
  282. i.call(this, a)
  283. }
  284. }
  285. function i(e) {
  286. this._state = !1, this._value = e, o.call(this)
  287. }
  288. function o() {
  289. for (var e = 0, t = this._deferreds.length; e < t; e++) n.call(this, this._deferreds[e]);
  290. this._deferreds = null
  291. }
  292. function a(e, t, n, r) {
  293. this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.resolve = n, this.reject = r
  294. }
  295. function s(e, t, n) {
  296. var r = !1;
  297. try {
  298. e(function(e) {
  299. r || (r = !0, t(e))
  300. }, function(e) {
  301. r || (r = !0, n(e))
  302. })
  303. } catch (i) {
  304. if (r) return;
  305. r = !0, n(i)
  306. }
  307. }
  308. if (window.Promise) return window.Promise;
  309. var l = t.immediateFn || "function" == typeof setImmediate && setImmediate || function(e) {
  310. setTimeout(e, 1)
  311. },
  312. c = Array.isArray || function(e) {
  313. return "[object Array]" === Object.prototype.toString.call(e)
  314. };
  315. return t.prototype["catch"] = function(e) {
  316. return this.then(null, e)
  317. }, t.prototype.then = function(e, r) {
  318. var i = this;
  319. return new t(function(t, o) {
  320. n.call(i, new a(e, r, t, o))
  321. })
  322. }, t.all = function() {
  323. var e = Array.prototype.slice.call(1 === arguments.length && c(arguments[0]) ? arguments[0] : arguments);
  324. return new t(function(t, n) {
  325. function r(o, a) {
  326. try {
  327. if (a && ("object" == typeof a || "function" == typeof a)) {
  328. var s = a.then;
  329. if ("function" == typeof s) return void s.call(a, function(e) {
  330. r(o, e)
  331. }, n)
  332. }
  333. e[o] = a, 0 === --i && t(e)
  334. } catch (l) {
  335. n(l)
  336. }
  337. }
  338. if (0 === e.length) return t([]);
  339. for (var i = e.length, o = 0; o < e.length; o++) r(o, e[o])
  340. })
  341. }, t.resolve = function(e) {
  342. return e && "object" == typeof e && e.constructor === t ? e : new t(function(t) {
  343. t(e)
  344. })
  345. }, t.reject = function(e) {
  346. return new t(function(t, n) {
  347. n(e)
  348. })
  349. }, t.race = function(e) {
  350. return new t(function(t, n) {
  351. for (var r = 0, i = e.length; r < i; r++) e[r].then(t, n)
  352. })
  353. }, t
  354. }), r(u, [c], function(e) {
  355. function t(e, t) {
  356. function n(e) {
  357. window.setTimeout(e, 0)
  358. }
  359. var r, i = window.requestAnimationFrame,
  360. o = ["ms", "moz", "webkit"];
  361. for (r = 0; r < o.length && !i; r++) i = window[o[r] + "RequestAnimationFrame"];
  362. i || (i = n), i(e, t)
  363. }
  364. function n(e, t) {
  365. return "number" != typeof t && (t = 0), setTimeout(e, t)
  366. }
  367. function r(e, t) {
  368. return "number" != typeof t && (t = 1), setInterval(e, t)
  369. }
  370. function i(e) {
  371. return clearTimeout(e)
  372. }
  373. function o(e) {
  374. return clearInterval(e)
  375. }
  376. function a(e, t) {
  377. var r, i;
  378. return i = function() {
  379. var i = arguments;
  380. clearTimeout(r), r = n(function() {
  381. e.apply(this, i)
  382. }, t)
  383. }, i.stop = function() {
  384. clearTimeout(r)
  385. }, i
  386. }
  387. var s;
  388. return {
  389. requestAnimationFrame: function(n, r) {
  390. return s ? void s.then(n) : void(s = new e(function(e) {
  391. r || (r = document.body), t(e, r)
  392. }).then(n))
  393. },
  394. setTimeout: n,
  395. setInterval: r,
  396. setEditorTimeout: function(e, t, r) {
  397. return n(function() {
  398. e.removed || t()
  399. }, r)
  400. },
  401. setEditorInterval: function(e, t, n) {
  402. var i;
  403. return i = r(function() {
  404. e.removed ? clearInterval(i) : t()
  405. }, n)
  406. },
  407. debounce: a,
  408. throttle: a,
  409. clearInterval: o,
  410. clearTimeout: i
  411. }
  412. }), r(d, [], function() {
  413. function e(e) {
  414. return "matchMedia" in window && matchMedia(e).matches
  415. }
  416. var t = navigator,
  417. n = t.userAgent,
  418. r, i, o, a, s, l, c, u, d, f, h, p, m;
  419. r = window.opera && window.opera.buildNumber, d = /Android/.test(n), i = /WebKit/.test(n), o = !i && !r && /MSIE/gi.test(n) && /Explorer/gi.test(t.appName), o = o && /MSIE (\w+)\./.exec(n)[1], a = n.indexOf("Trident/") != -1 && (n.indexOf("rv:") != -1 || t.appName.indexOf("Netscape") != -1) && 11, s = n.indexOf("Edge/") != -1 && !o && !a && 12, o = o || a || s, l = !i && !a && /Gecko/.test(n), c = n.indexOf("Mac") != -1, u = /(iPad|iPhone)/.test(n), f = "FormData" in window && "FileReader" in window && "URL" in window && !!URL.createObjectURL, h = e("only screen and (max-device-width: 480px)") && (d || u), p = e("only screen and (min-width: 800px)") && (d || u), m = n.indexOf("Windows Phone") != -1, s && (i = !1);
  420. var g = !u || f || n.match(/AppleWebKit\/(\d*)/)[1] >= 534;
  421. return {
  422. opera: r,
  423. webkit: i,
  424. ie: o,
  425. gecko: l,
  426. mac: c,
  427. iOS: u,
  428. android: d,
  429. contentEditable: g,
  430. transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
  431. caretAfter: 8 != o,
  432. range: window.getSelection && "Range" in window,
  433. documentMode: o && !s ? document.documentMode || 7 : 10,
  434. fileApi: f,
  435. ceFalse: o === !1 || o > 8,
  436. canHaveCSP: o === !1 || o > 11,
  437. desktop: !h && !p,
  438. windowsPhone: m
  439. }
  440. }), r(f, [u, d], function(e, t) {
  441. function n(e, t, n, r) {
  442. e.addEventListener ? e.addEventListener(t, n, r || !1) : e.attachEvent && e.attachEvent("on" + t, n)
  443. }
  444. function r(e, t, n, r) {
  445. e.removeEventListener ? e.removeEventListener(t, n, r || !1) : e.detachEvent && e.detachEvent("on" + t, n)
  446. }
  447. function i(e, t) {
  448. var n, r = t;
  449. return n = e.path, n && n.length > 0 && (r = n[0]), e.deepPath && (n = e.deepPath(), n && n.length > 0 && (r = n[0])), r
  450. }
  451. function o(e, n) {
  452. function r() {
  453. return !1
  454. }
  455. function o() {
  456. return !0
  457. }
  458. var a, s = n || {},
  459. l;
  460. for (a in e) u[a] || (s[a] = e[a]);
  461. if (s.target || (s.target = s.srcElement || document), t.experimentalShadowDom && (s.target = i(e, s.target)), e && c.test(e.type) && e.pageX === l && e.clientX !== l) {
  462. var d = s.target.ownerDocument || document,
  463. f = d.documentElement,
  464. h = d.body;
  465. s.pageX = e.clientX + (f && f.scrollLeft || h && h.scrollLeft || 0) - (f && f.clientLeft || h && h.clientLeft || 0), s.pageY = e.clientY + (f && f.scrollTop || h && h.scrollTop || 0) - (f && f.clientTop || h && h.clientTop || 0)
  466. }
  467. return s.preventDefault = function() {
  468. s.isDefaultPrevented = o, e && (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
  469. }, s.stopPropagation = function() {
  470. s.isPropagationStopped = o, e && (e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0)
  471. }, s.stopImmediatePropagation = function() {
  472. s.isImmediatePropagationStopped = o, s.stopPropagation()
  473. }, s.isDefaultPrevented || (s.isDefaultPrevented = r, s.isPropagationStopped = r, s.isImmediatePropagationStopped = r), "undefined" == typeof s.metaKey && (s.metaKey = !1), s
  474. }
  475. function a(t, i, o) {
  476. function a() {
  477. o.domLoaded || (o.domLoaded = !0, i(u))
  478. }
  479. function s() {
  480. ("complete" === c.readyState || "interactive" === c.readyState && c.body) && (r(c, "readystatechange", s), a())
  481. }
  482. function l() {
  483. try {
  484. c.documentElement.doScroll("left")
  485. } catch (t) {
  486. return void e.setTimeout(l)
  487. }
  488. a()
  489. }
  490. var c = t.document,
  491. u = {
  492. type: "ready"
  493. };
  494. return o.domLoaded ? void i(u) : (c.addEventListener ? "complete" === c.readyState ? a() : n(t, "DOMContentLoaded", a) : (n(c, "readystatechange", s), c.documentElement.doScroll && t.self === t.top && l()), void n(t, "load", a))
  495. }
  496. function s() {
  497. function e(e, t) {
  498. var n, r, o, a, s = i[t];
  499. if (n = s && s[e.type])
  500. for (r = 0, o = n.length; r < o; r++)
  501. if (a = n[r], a && a.func.call(a.scope, e) === !1 && e.preventDefault(), e.isImmediatePropagationStopped()) return
  502. }
  503. var t = this,
  504. i = {},
  505. s, c, u, d, f;
  506. c = l + (+new Date).toString(32), d = "onmouseenter" in document.documentElement, u = "onfocusin" in document.documentElement, f = {
  507. mouseenter: "mouseover",
  508. mouseleave: "mouseout"
  509. }, s = 1, t.domLoaded = !1, t.events = i, t.bind = function(r, l, h, p) {
  510. function m(t) {
  511. e(o(t || E.event), g)
  512. }
  513. var g, v, y, b, C, x, w, E = window;
  514. if (r && 3 !== r.nodeType && 8 !== r.nodeType) {
  515. for (r[c] ? g = r[c] : (g = s++, r[c] = g, i[g] = {}), p = p || r, l = l.split(" "), y = l.length; y--;) b = l[y], x = m, C = w = !1, "DOMContentLoaded" === b && (b = "ready"), t.domLoaded && "ready" === b && "complete" == r.readyState ? h.call(p, o({
  516. type: b
  517. })) : (d || (C = f[b], C && (x = function(t) {
  518. var n, r;
  519. if (n = t.currentTarget, r = t.relatedTarget, r && n.contains) r = n.contains(r);
  520. else
  521. for (; r && r !== n;) r = r.parentNode;
  522. r || (t = o(t || E.event), t.type = "mouseout" === t.type ? "mouseleave" : "mouseenter", t.target = n, e(t, g))
  523. })), u || "focusin" !== b && "focusout" !== b || (w = !0, C = "focusin" === b ? "focus" : "blur", x = function(t) {
  524. t = o(t || E.event), t.type = "focus" === t.type ? "focusin" : "focusout", e(t, g)
  525. }), v = i[g][b], v ? "ready" === b && t.domLoaded ? h({
  526. type: b
  527. }) : v.push({
  528. func: h,
  529. scope: p
  530. }) : (i[g][b] = v = [{
  531. func: h,
  532. scope: p
  533. }], v.fakeName = C, v.capture = w, v.nativeHandler = x, "ready" === b ? a(r, x, t) : n(r, C || b, x, w)));
  534. return r = v = 0, h
  535. }
  536. }, t.unbind = function(e, n, o) {
  537. var a, s, l, u, d, f;
  538. if (!e || 3 === e.nodeType || 8 === e.nodeType) return t;
  539. if (a = e[c]) {
  540. if (f = i[a], n) {
  541. for (n = n.split(" "), l = n.length; l--;)
  542. if (d = n[l], s = f[d]) {
  543. if (o)
  544. for (u = s.length; u--;)
  545. if (s[u].func === o) {
  546. var h = s.nativeHandler,
  547. p = s.fakeName,
  548. m = s.capture;
  549. s = s.slice(0, u).concat(s.slice(u + 1)), s.nativeHandler = h, s.fakeName = p, s.capture = m, f[d] = s
  550. }
  551. o && 0 !== s.length || (delete f[d], r(e, s.fakeName || d, s.nativeHandler, s.capture))
  552. }
  553. } else {
  554. for (d in f) s = f[d], r(e, s.fakeName || d, s.nativeHandler, s.capture);
  555. f = {}
  556. }
  557. for (d in f) return t;
  558. delete i[a];
  559. try {
  560. delete e[c]
  561. } catch (g) {
  562. e[c] = null
  563. }
  564. }
  565. return t
  566. }, t.fire = function(n, r, i) {
  567. var a;
  568. if (!n || 3 === n.nodeType || 8 === n.nodeType) return t;
  569. i = o(null, i), i.type = r, i.target = n;
  570. do a = n[c], a && e(i, a), n = n.parentNode || n.ownerDocument || n.defaultView || n.parentWindow; while (n && !i.isPropagationStopped());
  571. return t
  572. }, t.clean = function(e) {
  573. var n, r, i = t.unbind;
  574. if (!e || 3 === e.nodeType || 8 === e.nodeType) return t;
  575. if (e[c] && i(e), e.getElementsByTagName || (e = e.document), e && e.getElementsByTagName)
  576. for (i(e), r = e.getElementsByTagName("*"), n = r.length; n--;) e = r[n], e[c] && i(e);
  577. return t
  578. }, t.destroy = function() {
  579. i = {}
  580. }, t.cancel = function(e) {
  581. return e && (e.preventDefault(), e.stopImmediatePropagation()), !1
  582. }
  583. }
  584. var l = "mce-data-",
  585. c = /^(?:mouse|contextmenu)|click/,
  586. u = {
  587. keyLocation: 1,
  588. layerX: 1,
  589. layerY: 1,
  590. returnValue: 1,
  591. webkitMovementX: 1,
  592. webkitMovementY: 1,
  593. keyIdentifier: 1
  594. };
  595. return s.Event = new s, s.Event.bind(window, "ready", function() {}), s
  596. }), r(h, [], function() {
  597. function e(e, t, n, r) {
  598. var i, o, a, s, l, c, d, h, p, m;
  599. if ((t ? t.ownerDocument || t : z) !== D && B(t), t = t || D, n = n || [], !e || "string" != typeof e) return n;
  600. if (1 !== (s = t.nodeType) && 9 !== s) return [];
  601. if (M && !r) {
  602. if (i = ve.exec(e))
  603. if (a = i[1]) {
  604. if (9 === s) {
  605. if (o = t.getElementById(a), !o || !o.parentNode) return n;
  606. if (o.id === a) return n.push(o), n
  607. } else if (t.ownerDocument && (o = t.ownerDocument.getElementById(a)) && I(t, o) && o.id === a) return n.push(o), n
  608. } else {
  609. if (i[2]) return Z.apply(n, t.getElementsByTagName(e)), n;
  610. if ((a = i[3]) && x.getElementsByClassName) return Z.apply(n, t.getElementsByClassName(a)), n
  611. }
  612. if (x.qsa && (!P || !P.test(e))) {
  613. if (h = d = F, p = t, m = 9 === s && e, 1 === s && "object" !== t.nodeName.toLowerCase()) {
  614. for (c = _(e), (d = t.getAttribute("id")) ? h = d.replace(be, "\\$&") : t.setAttribute("id", h), h = "[id='" + h + "'] ", l = c.length; l--;) c[l] = h + f(c[l]);
  615. p = ye.test(e) && u(t.parentNode) || t, m = c.join(",")
  616. }
  617. if (m) try {
  618. return Z.apply(n, p.querySelectorAll(m)), n
  619. } catch (g) {} finally {
  620. d || t.removeAttribute("id")
  621. }
  622. }
  623. }
  624. return k(e.replace(se, "$1"), t, n, r)
  625. }
  626. function n() {
  627. function e(n, r) {
  628. return t.push(n + " ") > w.cacheLength && delete e[t.shift()], e[n + " "] = r
  629. }
  630. var t = [];
  631. return e
  632. }
  633. function r(e) {
  634. return e[F] = !0, e
  635. }
  636. function i(e) {
  637. var t = D.createElement("div");
  638. try {
  639. return !!e(t)
  640. } catch (n) {
  641. return !1
  642. } finally {
  643. t.parentNode && t.parentNode.removeChild(t), t = null
  644. }
  645. }
  646. function o(e, t) {
  647. for (var n = e.split("|"), r = e.length; r--;) w.attrHandle[n[r]] = t
  648. }
  649. function a(e, t) {
  650. var n = t && e,
  651. r = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || X) - (~e.sourceIndex || X);
  652. if (r) return r;
  653. if (n)
  654. for (; n = n.nextSibling;)
  655. if (n === t) return -1;
  656. return e ? 1 : -1
  657. }
  658. function s(e) {
  659. return function(t) {
  660. var n = t.nodeName.toLowerCase();
  661. return "input" === n && t.type === e
  662. }
  663. }
  664. function l(e) {
  665. return function(t) {
  666. var n = t.nodeName.toLowerCase();
  667. return ("input" === n || "button" === n) && t.type === e
  668. }
  669. }
  670. function c(e) {
  671. return r(function(t) {
  672. return t = +t, r(function(n, r) {
  673. for (var i, o = e([], n.length, t), a = o.length; a--;) n[i = o[a]] && (n[i] = !(r[i] = n[i]))
  674. })
  675. })
  676. }
  677. function u(e) {
  678. return e && typeof e.getElementsByTagName !== Y && e
  679. }
  680. function d() {}
  681. function f(e) {
  682. for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value;
  683. return r
  684. }
  685. function h(e, t, n) {
  686. var r = t.dir,
  687. i = n && "parentNode" === r,
  688. o = W++;
  689. return t.first ? function(t, n, o) {
  690. for (; t = t[r];)
  691. if (1 === t.nodeType || i) return e(t, n, o)
  692. } : function(t, n, a) {
  693. var s, l, c = [U, o];
  694. if (a) {
  695. for (; t = t[r];)
  696. if ((1 === t.nodeType || i) && e(t, n, a)) return !0
  697. } else
  698. for (; t = t[r];)
  699. if (1 === t.nodeType || i) {
  700. if (l = t[F] || (t[F] = {}), (s = l[r]) && s[0] === U && s[1] === o) return c[2] = s[2];
  701. if (l[r] = c, c[2] = e(t, n, a)) return !0
  702. }
  703. }
  704. }
  705. function p(e) {
  706. return e.length > 1 ? function(t, n, r) {
  707. for (var i = e.length; i--;)
  708. if (!e[i](t, n, r)) return !1;
  709. return !0
  710. } : e[0]
  711. }
  712. function m(t, n, r) {
  713. for (var i = 0, o = n.length; i < o; i++) e(t, n[i], r);
  714. return r
  715. }
  716. function g(e, t, n, r, i) {
  717. for (var o, a = [], s = 0, l = e.length, c = null != t; s < l; s++)(o = e[s]) && (n && !n(o, r, i) || (a.push(o), c && t.push(s)));
  718. return a
  719. }
  720. function v(e, t, n, i, o, a) {
  721. return i && !i[F] && (i = v(i)), o && !o[F] && (o = v(o, a)), r(function(r, a, s, l) {
  722. var c, u, d, f = [],
  723. h = [],
  724. p = a.length,
  725. v = r || m(t || "*", s.nodeType ? [s] : s, []),
  726. y = !e || !r && t ? v : g(v, f, e, s, l),
  727. b = n ? o || (r ? e : p || i) ? [] : a : y;
  728. if (n && n(y, b, s, l), i)
  729. for (c = g(b, h), i(c, [], s, l), u = c.length; u--;)(d = c[u]) && (b[h[u]] = !(y[h[u]] = d));
  730. if (r) {
  731. if (o || e) {
  732. if (o) {
  733. for (c = [], u = b.length; u--;)(d = b[u]) && c.push(y[u] = d);
  734. o(null, b = [], c, l)
  735. }
  736. for (u = b.length; u--;)(d = b[u]) && (c = o ? te.call(r, d) : f[u]) > -1 && (r[c] = !(a[c] = d))
  737. }
  738. } else b = g(b === a ? b.splice(p, b.length) : b), o ? o(null, a, b, l) : Z.apply(a, b)
  739. })
  740. }
  741. function y(e) {
  742. for (var t, n, r, i = e.length, o = w.relative[e[0].type], a = o || w.relative[" "], s = o ? 1 : 0, l = h(function(e) {
  743. return e === t
  744. }, a, !0), c = h(function(e) {
  745. return te.call(t, e) > -1
  746. }, a, !0), u = [function(e, n, r) {
  747. return !o && (r || n !== T) || ((t = n).nodeType ? l(e, n, r) : c(e, n, r))
  748. }]; s < i; s++)
  749. if (n = w.relative[e[s].type]) u = [h(p(u), n)];
  750. else {
  751. if (n = w.filter[e[s].type].apply(null, e[s].matches), n[F]) {
  752. for (r = ++s; r < i && !w.relative[e[r].type]; r++);
  753. return v(s > 1 && p(u), s > 1 && f(e.slice(0, s - 1).concat({
  754. value: " " === e[s - 2].type ? "*" : ""
  755. })).replace(se, "$1"), n, s < r && y(e.slice(s, r)), r < i && y(e = e.slice(r)), r < i && f(e))
  756. }
  757. u.push(n)
  758. }
  759. return p(u)
  760. }
  761. function b(t, n) {
  762. var i = n.length > 0,
  763. o = t.length > 0,
  764. a = function(r, a, s, l, c) {
  765. var u, d, f, h = 0,
  766. p = "0",
  767. m = r && [],
  768. v = [],
  769. y = T,
  770. b = r || o && w.find.TAG("*", c),
  771. C = U += null == y ? 1 : Math.random() || .1,
  772. x = b.length;
  773. for (c && (T = a !== D && a); p !== x && null != (u = b[p]); p++) {
  774. if (o && u) {
  775. for (d = 0; f = t[d++];)
  776. if (f(u, a, s)) {
  777. l.push(u);
  778. break
  779. }
  780. c && (U = C)
  781. }
  782. i && ((u = !f && u) && h--, r && m.push(u))
  783. }
  784. if (h += p, i && p !== h) {
  785. for (d = 0; f = n[d++];) f(m, v, a, s);
  786. if (r) {
  787. if (h > 0)
  788. for (; p--;) m[p] || v[p] || (v[p] = J.call(l));
  789. v = g(v)
  790. }
  791. Z.apply(l, v), c && !r && v.length > 0 && h + n.length > 1 && e.uniqueSort(l)
  792. }
  793. return c && (U = C, T = y), m
  794. };
  795. return i ? r(a) : a
  796. }
  797. var C, x, w, E, N, _, S, k, T, R, A, B, D, L, M, P, O, H, I, F = "sizzle" + -new Date,
  798. z = window.document,
  799. U = 0,
  800. W = 0,
  801. V = n(),
  802. $ = n(),
  803. q = n(),
  804. j = function(e, t) {
  805. return e === t && (A = !0), 0
  806. },
  807. Y = typeof t,
  808. X = 1 << 31,
  809. K = {}.hasOwnProperty,
  810. G = [],
  811. J = G.pop,
  812. Q = G.push,
  813. Z = G.push,
  814. ee = G.slice,
  815. te = G.indexOf || function(e) {
  816. for (var t = 0, n = this.length; t < n; t++)
  817. if (this[t] === e) return t;
  818. return -1
  819. },
  820. ne = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  821. re = "[\\x20\\t\\r\\n\\f]",
  822. ie = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
  823. oe = "\\[" + re + "*(" + ie + ")(?:" + re + "*([*^$|!~]?=)" + re + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + ie + "))|)" + re + "*\\]",
  824. ae = ":(" + ie + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + oe + ")*)|.*)\\)|)",
  825. se = new RegExp("^" + re + "+|((?:^|[^\\\\])(?:\\\\.)*)" + re + "+$", "g"),
  826. le = new RegExp("^" + re + "*," + re + "*"),
  827. ce = new RegExp("^" + re + "*([>+~]|" + re + ")" + re + "*"),
  828. ue = new RegExp("=" + re + "*([^\\]'\"]*?)" + re + "*\\]", "g"),
  829. de = new RegExp(ae),
  830. fe = new RegExp("^" + ie + "$"),
  831. he = {
  832. ID: new RegExp("^#(" + ie + ")"),
  833. CLASS: new RegExp("^\\.(" + ie + ")"),
  834. TAG: new RegExp("^(" + ie + "|[*])"),
  835. ATTR: new RegExp("^" + oe),
  836. PSEUDO: new RegExp("^" + ae),
  837. CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + re + "*(even|odd|(([+-]|)(\\d*)n|)" + re + "*(?:([+-]|)" + re + "*(\\d+)|))" + re + "*\\)|)", "i"),
  838. bool: new RegExp("^(?:" + ne + ")$", "i"),
  839. needsContext: new RegExp("^" + re + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + re + "*((?:-\\d)?\\d*)" + re + "*\\)|)(?=[^-]|$)", "i")
  840. },
  841. pe = /^(?:input|select|textarea|button)$/i,
  842. me = /^h\d$/i,
  843. ge = /^[^{]+\{\s*\[native \w/,
  844. ve = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  845. ye = /[+~]/,
  846. be = /'|\\/g,
  847. Ce = new RegExp("\\\\([\\da-f]{1,6}" + re + "?|(" + re + ")|.)", "ig"),
  848. xe = function(e, t, n) {
  849. var r = "0x" + t - 65536;
  850. return r !== r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  851. };
  852. try {
  853. Z.apply(G = ee.call(z.childNodes), z.childNodes), G[z.childNodes.length].nodeType
  854. } catch (we) {
  855. Z = {
  856. apply: G.length ? function(e, t) {
  857. Q.apply(e, ee.call(t))
  858. } : function(e, t) {
  859. for (var n = e.length, r = 0; e[n++] = t[r++];);
  860. e.length = n - 1
  861. }
  862. }
  863. }
  864. x = e.support = {}, N = e.isXML = function(e) {
  865. var t = e && (e.ownerDocument || e).documentElement;
  866. return !!t && "HTML" !== t.nodeName
  867. }, B = e.setDocument = function(e) {
  868. function t(e) {
  869. try {
  870. return e.top
  871. } catch (t) {}
  872. return null
  873. }
  874. var n, r = e ? e.ownerDocument || e : z,
  875. o = r.defaultView;
  876. return r !== D && 9 === r.nodeType && r.documentElement ? (D = r, L = r.documentElement, M = !N(r), o && o !== t(o) && (o.addEventListener ? o.addEventListener("unload", function() {
  877. B()
  878. }, !1) : o.attachEvent && o.attachEvent("onunload", function() {
  879. B()
  880. })), x.attributes = i(function(e) {
  881. return e.className = "i", !e.getAttribute("className")
  882. }), x.getElementsByTagName = i(function(e) {
  883. return e.appendChild(r.createComment("")), !e.getElementsByTagName("*").length
  884. }), x.getElementsByClassName = ge.test(r.getElementsByClassName), x.getById = i(function(e) {
  885. return L.appendChild(e).id = F, !r.getElementsByName || !r.getElementsByName(F).length
  886. }), x.getById ? (w.find.ID = function(e, t) {
  887. if (typeof t.getElementById !== Y && M) {
  888. var n = t.getElementById(e);
  889. return n && n.parentNode ? [n] : []
  890. }
  891. }, w.filter.ID = function(e) {
  892. var t = e.replace(Ce, xe);
  893. return function(e) {
  894. return e.getAttribute("id") === t
  895. }
  896. }) : (delete w.find.ID, w.filter.ID = function(e) {
  897. var t = e.replace(Ce, xe);
  898. return function(e) {
  899. var n = typeof e.getAttributeNode !== Y && e.getAttributeNode("id");
  900. return n && n.value === t
  901. }
  902. }), w.find.TAG = x.getElementsByTagName ? function(e, t) {
  903. if (typeof t.getElementsByTagName !== Y) return t.getElementsByTagName(e)
  904. } : function(e, t) {
  905. var n, r = [],
  906. i = 0,
  907. o = t.getElementsByTagName(e);
  908. if ("*" === e) {
  909. for (; n = o[i++];) 1 === n.nodeType && r.push(n);
  910. return r
  911. }
  912. return o
  913. }, w.find.CLASS = x.getElementsByClassName && function(e, t) {
  914. if (M) return t.getElementsByClassName(e)
  915. }, O = [], P = [], (x.qsa = ge.test(r.querySelectorAll)) && (i(function(e) {
  916. e.innerHTML = "<select msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && P.push("[*^$]=" + re + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || P.push("\\[" + re + "*(?:value|" + ne + ")"), e.querySelectorAll(":checked").length || P.push(":checked")
  917. }), i(function(e) {
  918. var t = r.createElement("input");
  919. t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && P.push("name" + re + "*[*^$|!~]?="), e.querySelectorAll(":enabled").length || P.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), P.push(",.*:")
  920. })), (x.matchesSelector = ge.test(H = L.matches || L.webkitMatchesSelector || L.mozMatchesSelector || L.oMatchesSelector || L.msMatchesSelector)) && i(function(e) {
  921. x.disconnectedMatch = H.call(e, "div"), H.call(e, "[s!='']:x"), O.push("!=", ae)
  922. }), P = P.length && new RegExp(P.join("|")), O = O.length && new RegExp(O.join("|")), n = ge.test(L.compareDocumentPosition), I = n || ge.test(L.contains) ? function(e, t) {
  923. var n = 9 === e.nodeType ? e.documentElement : e,
  924. r = t && t.parentNode;
  925. return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r)))
  926. } : function(e, t) {
  927. if (t)
  928. for (; t = t.parentNode;)
  929. if (t === e) return !0;
  930. return !1
  931. }, j = n ? function(e, t) {
  932. if (e === t) return A = !0, 0;
  933. var n = !e.compareDocumentPosition - !t.compareDocumentPosition;
  934. return n ? n : (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1, 1 & n || !x.sortDetached && t.compareDocumentPosition(e) === n ? e === r || e.ownerDocument === z && I(z, e) ? -1 : t === r || t.ownerDocument === z && I(z, t) ? 1 : R ? te.call(R, e) - te.call(R, t) : 0 : 4 & n ? -1 : 1)
  935. } : function(e, t) {
  936. if (e === t) return A = !0, 0;
  937. var n, i = 0,
  938. o = e.parentNode,
  939. s = t.parentNode,
  940. l = [e],
  941. c = [t];
  942. if (!o || !s) return e === r ? -1 : t === r ? 1 : o ? -1 : s ? 1 : R ? te.call(R, e) - te.call(R, t) : 0;
  943. if (o === s) return a(e, t);
  944. for (n = e; n = n.parentNode;) l.unshift(n);
  945. for (n = t; n = n.parentNode;) c.unshift(n);
  946. for (; l[i] === c[i];) i++;
  947. return i ? a(l[i], c[i]) : l[i] === z ? -1 : c[i] === z ? 1 : 0
  948. }, r) : D
  949. }, e.matches = function(t, n) {
  950. return e(t, null, null, n)
  951. }, e.matchesSelector = function(t, n) {
  952. if ((t.ownerDocument || t) !== D && B(t), n = n.replace(ue, "='$1']"), x.matchesSelector && M && (!O || !O.test(n)) && (!P || !P.test(n))) try {
  953. var r = H.call(t, n);
  954. if (r || x.disconnectedMatch || t.document && 11 !== t.document.nodeType) return r
  955. } catch (i) {}
  956. return e(n, D, null, [t]).length > 0
  957. }, e.contains = function(e, t) {
  958. return (e.ownerDocument || e) !== D && B(e), I(e, t)
  959. }, e.attr = function(e, n) {
  960. (e.ownerDocument || e) !== D && B(e);
  961. var r = w.attrHandle[n.toLowerCase()],
  962. i = r && K.call(w.attrHandle, n.toLowerCase()) ? r(e, n, !M) : t;
  963. return i !== t ? i : x.attributes || !M ? e.getAttribute(n) : (i = e.getAttributeNode(n)) && i.specified ? i.value : null
  964. }, e.error = function(e) {
  965. throw new Error("Syntax error, unrecognized expression: " + e)
  966. }, e.uniqueSort = function(e) {
  967. var t, n = [],
  968. r = 0,
  969. i = 0;
  970. if (A = !x.detectDuplicates, R = !x.sortStable && e.slice(0), e.sort(j), A) {
  971. for (; t = e[i++];) t === e[i] && (r = n.push(i));
  972. for (; r--;) e.splice(n[r], 1)
  973. }
  974. return R = null, e
  975. }, E = e.getText = function(e) {
  976. var t, n = "",
  977. r = 0,
  978. i = e.nodeType;
  979. if (i) {
  980. if (1 === i || 9 === i || 11 === i) {
  981. if ("string" == typeof e.textContent) return e.textContent;
  982. for (e = e.firstChild; e; e = e.nextSibling) n += E(e)
  983. } else if (3 === i || 4 === i) return e.nodeValue
  984. } else
  985. for (; t = e[r++];) n += E(t);
  986. return n
  987. }, w = e.selectors = {
  988. cacheLength: 50,
  989. createPseudo: r,
  990. match: he,
  991. attrHandle: {},
  992. find: {},
  993. relative: {
  994. ">": {
  995. dir: "parentNode",
  996. first: !0
  997. },
  998. " ": {
  999. dir: "parentNode"
  1000. },
  1001. "+": {
  1002. dir: "previousSibling",
  1003. first: !0
  1004. },
  1005. "~": {
  1006. dir: "previousSibling"
  1007. }
  1008. },
  1009. preFilter: {
  1010. ATTR: function(e) {
  1011. return e[1] = e[1].replace(Ce, xe), e[3] = (e[3] || e[4] || e[5] || "").replace(Ce, xe), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4)
  1012. },
  1013. CHILD: function(t) {
  1014. return t[1] = t[1].toLowerCase(), "nth" === t[1].slice(0, 3) ? (t[3] || e.error(t[0]), t[4] = +(t[4] ? t[5] + (t[6] || 1) : 2 * ("even" === t[3] || "odd" === t[3])), t[5] = +(t[7] + t[8] || "odd" === t[3])) : t[3] && e.error(t[0]), t
  1015. },
  1016. PSEUDO: function(e) {
  1017. var t, n = !e[6] && e[2];
  1018. return he.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && de.test(n) && (t = _(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3))
  1019. }
  1020. },
  1021. filter: {
  1022. TAG: function(e) {
  1023. var t = e.replace(Ce, xe).toLowerCase();
  1024. return "*" === e ? function() {
  1025. return !0
  1026. } : function(e) {
  1027. return e.nodeName && e.nodeName.toLowerCase() === t
  1028. }
  1029. },
  1030. CLASS: function(e) {
  1031. var t = V[e + " "];
  1032. return t || (t = new RegExp("(^|" + re + ")" + e + "(" + re + "|$)")) && V(e, function(e) {
  1033. return t.test("string" == typeof e.className && e.className || typeof e.getAttribute !== Y && e.getAttribute("class") || "")
  1034. })
  1035. },
  1036. ATTR: function(t, n, r) {
  1037. return function(i) {
  1038. var o = e.attr(i, t);
  1039. return null == o ? "!=" === n : !n || (o += "", "=" === n ? o === r : "!=" === n ? o !== r : "^=" === n ? r && 0 === o.indexOf(r) : "*=" === n ? r && o.indexOf(r) > -1 : "$=" === n ? r && o.slice(-r.length) === r : "~=" === n ? (" " + o + " ").indexOf(r) > -1 : "|=" === n && (o === r || o.slice(0, r.length + 1) === r + "-"))
  1040. }
  1041. },
  1042. CHILD: function(e, t, n, r, i) {
  1043. var o = "nth" !== e.slice(0, 3),
  1044. a = "last" !== e.slice(-4),
  1045. s = "of-type" === t;
  1046. return 1 === r && 0 === i ? function(e) {
  1047. return !!e.parentNode
  1048. } : function(t, n, l) {
  1049. var c, u, d, f, h, p, m = o !== a ? "nextSibling" : "previousSibling",
  1050. g = t.parentNode,
  1051. v = s && t.nodeName.toLowerCase(),
  1052. y = !l && !s;
  1053. if (g) {
  1054. if (o) {
  1055. for (; m;) {
  1056. for (d = t; d = d[m];)
  1057. if (s ? d.nodeName.toLowerCase() === v : 1 === d.nodeType) return !1;
  1058. p = m = "only" === e && !p && "nextSibling"
  1059. }
  1060. return !0
  1061. }
  1062. if (p = [a ? g.firstChild : g.lastChild], a && y) {
  1063. for (u = g[F] || (g[F] = {}), c = u[e] || [], h = c[0] === U && c[1], f = c[0] === U && c[2], d = h && g.childNodes[h]; d = ++h && d && d[m] || (f = h = 0) || p.pop();)
  1064. if (1 === d.nodeType && ++f && d === t) {
  1065. u[e] = [U, h, f];
  1066. break
  1067. }
  1068. } else if (y && (c = (t[F] || (t[F] = {}))[e]) && c[0] === U) f = c[1];
  1069. else
  1070. for (;
  1071. (d = ++h && d && d[m] || (f = h = 0) || p.pop()) && ((s ? d.nodeName.toLowerCase() !== v : 1 !== d.nodeType) || !++f || (y && ((d[F] || (d[F] = {}))[e] = [U, f]), d !== t)););
  1072. return f -= i, f === r || f % r === 0 && f / r >= 0
  1073. }
  1074. }
  1075. },
  1076. PSEUDO: function(t, n) {
  1077. var i, o = w.pseudos[t] || w.setFilters[t.toLowerCase()] || e.error("unsupported pseudo: " + t);
  1078. return o[F] ? o(n) : o.length > 1 ? (i = [t, t, "", n], w.setFilters.hasOwnProperty(t.toLowerCase()) ? r(function(e, t) {
  1079. for (var r, i = o(e, n), a = i.length; a--;) r = te.call(e, i[a]), e[r] = !(t[r] = i[a])
  1080. }) : function(e) {
  1081. return o(e, 0, i)
  1082. }) : o
  1083. }
  1084. },
  1085. pseudos: {
  1086. not: r(function(e) {
  1087. var t = [],
  1088. n = [],
  1089. i = S(e.replace(se, "$1"));
  1090. return i[F] ? r(function(e, t, n, r) {
  1091. for (var o, a = i(e, null, r, []), s = e.length; s--;)(o = a[s]) && (e[s] = !(t[s] = o))
  1092. }) : function(e, r, o) {
  1093. return t[0] = e, i(t, null, o, n), !n.pop()
  1094. }
  1095. }),
  1096. has: r(function(t) {
  1097. return function(n) {
  1098. return e(t, n).length > 0
  1099. }
  1100. }),
  1101. contains: r(function(e) {
  1102. return e = e.replace(Ce, xe),
  1103. function(t) {
  1104. return (t.textContent || t.innerText || E(t)).indexOf(e) > -1
  1105. }
  1106. }),
  1107. lang: r(function(t) {
  1108. return fe.test(t || "") || e.error("unsupported lang: " + t), t = t.replace(Ce, xe).toLowerCase(),
  1109. function(e) {
  1110. var n;
  1111. do
  1112. if (n = M ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return n = n.toLowerCase(), n === t || 0 === n.indexOf(t + "-");
  1113. while ((e = e.parentNode) && 1 === e.nodeType);
  1114. return !1
  1115. }
  1116. }),
  1117. target: function(e) {
  1118. var t = window.location && window.location.hash;
  1119. return t && t.slice(1) === e.id
  1120. },
  1121. root: function(e) {
  1122. return e === L
  1123. },
  1124. focus: function(e) {
  1125. return e === D.activeElement && (!D.hasFocus || D.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)
  1126. },
  1127. enabled: function(e) {
  1128. return e.disabled === !1
  1129. },
  1130. disabled: function(e) {
  1131. return e.disabled === !0
  1132. },
  1133. checked: function(e) {
  1134. var t = e.nodeName.toLowerCase();
  1135. return "input" === t && !!e.checked || "option" === t && !!e.selected
  1136. },
  1137. selected: function(e) {
  1138. return e.parentNode && e.parentNode.selectedIndex, e.selected === !0
  1139. },
  1140. empty: function(e) {
  1141. for (e = e.firstChild; e; e = e.nextSibling)
  1142. if (e.nodeType < 6) return !1;
  1143. return !0
  1144. },
  1145. parent: function(e) {
  1146. return !w.pseudos.empty(e)
  1147. },
  1148. header: function(e) {
  1149. return me.test(e.nodeName)
  1150. },
  1151. input: function(e) {
  1152. return pe.test(e.nodeName)
  1153. },
  1154. button: function(e) {
  1155. var t = e.nodeName.toLowerCase();
  1156. return "input" === t && "button" === e.type || "button" === t
  1157. },
  1158. text: function(e) {
  1159. var t;
  1160. return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase())
  1161. },
  1162. first: c(function() {
  1163. return [0]
  1164. }),
  1165. last: c(function(e, t) {
  1166. return [t - 1]
  1167. }),
  1168. eq: c(function(e, t, n) {
  1169. return [n < 0 ? n + t : n]
  1170. }),
  1171. even: c(function(e, t) {
  1172. for (var n = 0; n < t; n += 2) e.push(n);
  1173. return e
  1174. }),
  1175. odd: c(function(e, t) {
  1176. for (var n = 1; n < t; n += 2) e.push(n);
  1177. return e
  1178. }),
  1179. lt: c(function(e, t, n) {
  1180. for (var r = n < 0 ? n + t : n; --r >= 0;) e.push(r);
  1181. return e
  1182. }),
  1183. gt: c(function(e, t, n) {
  1184. for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r);
  1185. return e
  1186. })
  1187. }
  1188. }, w.pseudos.nth = w.pseudos.eq;
  1189. for (C in {
  1190. radio: !0,
  1191. checkbox: !0,
  1192. file: !0,
  1193. password: !0,
  1194. image: !0
  1195. }) w.pseudos[C] = s(C);
  1196. for (C in {
  1197. submit: !0,
  1198. reset: !0
  1199. }) w.pseudos[C] = l(C);
  1200. return d.prototype = w.filters = w.pseudos, w.setFilters = new d, _ = e.tokenize = function(t, n) {
  1201. var r, i, o, a, s, l, c, u = $[t + " "];
  1202. if (u) return n ? 0 : u.slice(0);
  1203. for (s = t, l = [], c = w.preFilter; s;) {
  1204. r && !(i = le.exec(s)) || (i && (s = s.slice(i[0].length) || s), l.push(o = [])), r = !1, (i = ce.exec(s)) && (r = i.shift(), o.push({
  1205. value: r,
  1206. type: i[0].replace(se, " ")
  1207. }), s = s.slice(r.length));
  1208. for (a in w.filter) !(i = he[a].exec(s)) || c[a] && !(i = c[a](i)) || (r = i.shift(), o.push({
  1209. value: r,
  1210. type: a,
  1211. matches: i
  1212. }), s = s.slice(r.length));
  1213. if (!r) break
  1214. }
  1215. return n ? s.length : s ? e.error(t) : $(t, l).slice(0)
  1216. }, S = e.compile = function(e, t) {
  1217. var n, r = [],
  1218. i = [],
  1219. o = q[e + " "];
  1220. if (!o) {
  1221. for (t || (t = _(e)), n = t.length; n--;) o = y(t[n]), o[F] ? r.push(o) : i.push(o);
  1222. o = q(e, b(i, r)), o.selector = e
  1223. }
  1224. return o
  1225. }, k = e.select = function(e, t, n, r) {
  1226. var i, o, a, s, l, c = "function" == typeof e && e,
  1227. d = !r && _(e = c.selector || e);
  1228. if (n = n || [], 1 === d.length) {
  1229. if (o = d[0] = d[0].slice(0),
  1230. o.length > 2 && "ID" === (a = o[0]).type && x.getById && 9 === t.nodeType && M && w.relative[o[1].type]) {
  1231. if (t = (w.find.ID(a.matches[0].replace(Ce, xe), t) || [])[0], !t) return n;
  1232. c && (t = t.parentNode), e = e.slice(o.shift().value.length)
  1233. }
  1234. for (i = he.needsContext.test(e) ? 0 : o.length; i-- && (a = o[i], !w.relative[s = a.type]);)
  1235. if ((l = w.find[s]) && (r = l(a.matches[0].replace(Ce, xe), ye.test(o[0].type) && u(t.parentNode) || t))) {
  1236. if (o.splice(i, 1), e = r.length && f(o), !e) return Z.apply(n, r), n;
  1237. break
  1238. }
  1239. }
  1240. return (c || S(e, d))(r, t, !M, n, ye.test(e) && u(t.parentNode) || t), n
  1241. }, x.sortStable = F.split("").sort(j).join("") === F, x.detectDuplicates = !!A, B(), x.sortDetached = i(function(e) {
  1242. return 1 & e.compareDocumentPosition(D.createElement("div"))
  1243. }), i(function(e) {
  1244. return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")
  1245. }) || o("type|href|height|width", function(e, t, n) {
  1246. if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2)
  1247. }), x.attributes && i(function(e) {
  1248. return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")
  1249. }) || o("value", function(e, t, n) {
  1250. if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue
  1251. }), i(function(e) {
  1252. return null == e.getAttribute("disabled")
  1253. }) || o(ne, function(e, t, n) {
  1254. var r;
  1255. if (!n) return e[t] === !0 ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null
  1256. }), e
  1257. }), r(p, [], function() {
  1258. function e(e) {
  1259. var t = e,
  1260. n, r;
  1261. if (!u(e))
  1262. for (t = [], n = 0, r = e.length; n < r; n++) t[n] = e[n];
  1263. return t
  1264. }
  1265. function n(e, n, r) {
  1266. var i, o;
  1267. if (!e) return 0;
  1268. if (r = r || e, e.length !== t) {
  1269. for (i = 0, o = e.length; i < o; i++)
  1270. if (n.call(r, e[i], i, e) === !1) return 0
  1271. } else
  1272. for (i in e)
  1273. if (e.hasOwnProperty(i) && n.call(r, e[i], i, e) === !1) return 0; return 1
  1274. }
  1275. function r(e, t) {
  1276. var r = [];
  1277. return n(e, function(n, i) {
  1278. r.push(t(n, i, e))
  1279. }), r
  1280. }
  1281. function i(e, t) {
  1282. var r = [];
  1283. return n(e, function(n, i) {
  1284. t && !t(n, i, e) || r.push(n)
  1285. }), r
  1286. }
  1287. function o(e, t) {
  1288. var n, r;
  1289. if (e)
  1290. for (n = 0, r = e.length; n < r; n++)
  1291. if (e[n] === t) return n;
  1292. return -1
  1293. }
  1294. function a(e, t, n, r) {
  1295. var i = 0;
  1296. for (arguments.length < 3 && (n = e[0]); i < e.length; i++) n = t.call(r, n, e[i], i);
  1297. return n
  1298. }
  1299. function s(e, t, n) {
  1300. var r, i;
  1301. for (r = 0, i = e.length; r < i; r++)
  1302. if (t.call(n, e[r], r, e)) return r;
  1303. return -1
  1304. }
  1305. function l(e, n, r) {
  1306. var i = s(e, n, r);
  1307. return i !== -1 ? e[i] : t
  1308. }
  1309. function c(e) {
  1310. return e[e.length - 1]
  1311. }
  1312. var u = Array.isArray || function(e) {
  1313. return "[object Array]" === Object.prototype.toString.call(e)
  1314. };
  1315. return {
  1316. isArray: u,
  1317. toArray: e,
  1318. each: n,
  1319. map: r,
  1320. filter: i,
  1321. indexOf: o,
  1322. reduce: a,
  1323. findIndex: s,
  1324. find: l,
  1325. last: c
  1326. }
  1327. }), r(m, [d, p], function(e, n) {
  1328. function r(e) {
  1329. return null === e || e === t ? "" : ("" + e).replace(p, "")
  1330. }
  1331. function i(e, r) {
  1332. return r ? !("array" != r || !n.isArray(e)) || typeof e == r : e !== t
  1333. }
  1334. function o(e, t, n) {
  1335. var r;
  1336. for (e = e || [], t = t || ",", "string" == typeof e && (e = e.split(t)), n = n || {}, r = e.length; r--;) n[e[r]] = {};
  1337. return n
  1338. }
  1339. function a(e, t) {
  1340. return Object.prototype.hasOwnProperty.call(e, t)
  1341. }
  1342. function s(e, t, n) {
  1343. var r = this,
  1344. i, o, a, s, l, c = 0;
  1345. if (e = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(e), a = e[3].match(/(^|\.)(\w+)$/i)[2], o = r.createNS(e[3].replace(/\.\w+$/, ""), n), !o[a]) {
  1346. if ("static" == e[2]) return o[a] = t, void(this.onCreate && this.onCreate(e[2], e[3], o[a]));
  1347. t[a] || (t[a] = function() {}, c = 1), o[a] = t[a], r.extend(o[a].prototype, t), e[5] && (i = r.resolve(e[5]).prototype, s = e[5].match(/\.(\w+)$/i)[1], l = o[a], c ? o[a] = function() {
  1348. return i[s].apply(this, arguments)
  1349. } : o[a] = function() {
  1350. return this.parent = i[s], l.apply(this, arguments)
  1351. }, o[a].prototype[a] = o[a], r.each(i, function(e, t) {
  1352. o[a].prototype[t] = i[t]
  1353. }), r.each(t, function(e, t) {
  1354. i[t] ? o[a].prototype[t] = function() {
  1355. return this.parent = i[t], e.apply(this, arguments)
  1356. } : t != a && (o[a].prototype[t] = e)
  1357. })), r.each(t["static"], function(e, t) {
  1358. o[a][t] = e
  1359. })
  1360. }
  1361. }
  1362. function l(e, n) {
  1363. var r, i, o, a = arguments,
  1364. s;
  1365. for (r = 1, i = a.length; r < i; r++) {
  1366. n = a[r];
  1367. for (o in n) n.hasOwnProperty(o) && (s = n[o], s !== t && (e[o] = s))
  1368. }
  1369. return e
  1370. }
  1371. function c(e, t, r, i) {
  1372. i = i || this, e && (r && (e = e[r]), n.each(e, function(e, n) {
  1373. return t.call(i, e, n, r) !== !1 && void c(e, t, r, i)
  1374. }))
  1375. }
  1376. function u(e, t) {
  1377. var n, r;
  1378. for (t = t || window, e = e.split("."), n = 0; n < e.length; n++) r = e[n], t[r] || (t[r] = {}), t = t[r];
  1379. return t
  1380. }
  1381. function d(e, t) {
  1382. var n, r;
  1383. for (t = t || window, e = e.split("."), n = 0, r = e.length; n < r && (t = t[e[n]], t); n++);
  1384. return t
  1385. }
  1386. function f(e, t) {
  1387. return !e || i(e, "array") ? e : n.map(e.split(t || ","), r)
  1388. }
  1389. function h(t) {
  1390. var n = e.cacheSuffix;
  1391. return n && (t += (t.indexOf("?") === -1 ? "?" : "&") + n), t
  1392. }
  1393. var p = /^\s*|\s*$/g;
  1394. return {
  1395. trim: r,
  1396. isArray: n.isArray,
  1397. is: i,
  1398. toArray: n.toArray,
  1399. makeMap: o,
  1400. each: n.each,
  1401. map: n.map,
  1402. grep: n.filter,
  1403. inArray: n.indexOf,
  1404. hasOwn: a,
  1405. extend: l,
  1406. create: s,
  1407. walk: c,
  1408. createNS: u,
  1409. resolve: d,
  1410. explode: f,
  1411. _addCacheSuffix: h
  1412. }
  1413. }), r(g, [f, h, m, d], function(e, n, r, i) {
  1414. function o(e) {
  1415. return "undefined" != typeof e
  1416. }
  1417. function a(e) {
  1418. return "string" == typeof e
  1419. }
  1420. function s(e) {
  1421. return e && e == e.window
  1422. }
  1423. function l(e, t) {
  1424. var n, r, i;
  1425. for (t = t || w, i = t.createElement("div"), n = t.createDocumentFragment(), i.innerHTML = e; r = i.firstChild;) n.appendChild(r);
  1426. return n
  1427. }
  1428. function c(e, t, n, r) {
  1429. var i;
  1430. if (a(t)) t = l(t, v(e[0]));
  1431. else if (t.length && !t.nodeType) {
  1432. if (t = f.makeArray(t), r)
  1433. for (i = t.length - 1; i >= 0; i--) c(e, t[i], n, r);
  1434. else
  1435. for (i = 0; i < t.length; i++) c(e, t[i], n, r);
  1436. return e
  1437. }
  1438. if (t.nodeType)
  1439. for (i = e.length; i--;) n.call(e[i], t);
  1440. return e
  1441. }
  1442. function u(e, t) {
  1443. return e && t && (" " + e.className + " ").indexOf(" " + t + " ") !== -1
  1444. }
  1445. function d(e, t, n) {
  1446. var r, i;
  1447. return t = f(t)[0], e.each(function() {
  1448. var e = this;
  1449. n && r == e.parentNode ? i.appendChild(e) : (r = e.parentNode, i = t.cloneNode(!1), e.parentNode.insertBefore(i, e), i.appendChild(e))
  1450. }), e
  1451. }
  1452. function f(e, t) {
  1453. return new f.fn.init(e, t)
  1454. }
  1455. function h(e, t) {
  1456. var n;
  1457. if (t.indexOf) return t.indexOf(e);
  1458. for (n = t.length; n--;)
  1459. if (t[n] === e) return n;
  1460. return -1
  1461. }
  1462. function p(e) {
  1463. return null === e || e === k ? "" : ("" + e).replace(P, "")
  1464. }
  1465. function m(e, t) {
  1466. var n, r, i, o, a;
  1467. if (e)
  1468. if (n = e.length, n === o) {
  1469. for (r in e)
  1470. if (e.hasOwnProperty(r) && (a = e[r], t.call(a, r, a) === !1)) break
  1471. } else
  1472. for (i = 0; i < n && (a = e[i], t.call(a, i, a) !== !1); i++);
  1473. return e
  1474. }
  1475. function g(e, t) {
  1476. var n = [];
  1477. return m(e, function(e, r) {
  1478. t(r, e) && n.push(r)
  1479. }), n
  1480. }
  1481. function v(e) {
  1482. return e ? 9 == e.nodeType ? e : e.ownerDocument : w
  1483. }
  1484. function y(e, n, r) {
  1485. var i = [],
  1486. o = e[n];
  1487. for ("string" != typeof r && r instanceof f && (r = r[0]); o && 9 !== o.nodeType;) {
  1488. if (r !== t) {
  1489. if (o === r) break;
  1490. if ("string" == typeof r && f(o).is(r)) break
  1491. }
  1492. 1 === o.nodeType && i.push(o), o = o[n]
  1493. }
  1494. return i
  1495. }
  1496. function b(e, n, r, i) {
  1497. var o = [];
  1498. for (i instanceof f && (i = i[0]); e; e = e[n])
  1499. if (!r || e.nodeType === r) {
  1500. if (i !== t) {
  1501. if (e === i) break;
  1502. if ("string" == typeof i && f(e).is(i)) break
  1503. }
  1504. o.push(e)
  1505. }
  1506. return o
  1507. }
  1508. function C(e, t, n) {
  1509. for (e = e[t]; e; e = e[t])
  1510. if (e.nodeType == n) return e;
  1511. return null
  1512. }
  1513. function x(e, t, n) {
  1514. m(n, function(n, r) {
  1515. e[n] = e[n] || {}, e[n][t] = r
  1516. })
  1517. }
  1518. var w = document,
  1519. E = Array.prototype.push,
  1520. N = Array.prototype.slice,
  1521. _ = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
  1522. S = e.Event,
  1523. k, T = r.makeMap("children,contents,next,prev"),
  1524. R = r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom", " "),
  1525. A = r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected", " "),
  1526. B = {
  1527. "for": "htmlFor",
  1528. "class": "className",
  1529. readonly: "readOnly"
  1530. },
  1531. D = {
  1532. "float": "cssFloat"
  1533. },
  1534. L = {},
  1535. M = {},
  1536. P = /^\s*|\s*$/g;
  1537. return f.fn = f.prototype = {
  1538. constructor: f,
  1539. selector: "",
  1540. context: null,
  1541. length: 0,
  1542. init: function(e, t) {
  1543. var n = this,
  1544. r, i;
  1545. if (!e) return n;
  1546. if (e.nodeType) return n.context = n[0] = e, n.length = 1, n;
  1547. if (t && t.nodeType) n.context = t;
  1548. else {
  1549. if (t) return f(e).attr(t);
  1550. n.context = t = document
  1551. }
  1552. if (a(e)) {
  1553. if (n.selector = e, r = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [null, e, null] : _.exec(e), !r) return f(t).find(e);
  1554. if (r[1])
  1555. for (i = l(e, v(t)).firstChild; i;) E.call(n, i), i = i.nextSibling;
  1556. else {
  1557. if (i = v(t).getElementById(r[2]), !i) return n;
  1558. if (i.id !== r[2]) return n.find(e);
  1559. n.length = 1, n[0] = i
  1560. }
  1561. } else this.add(e, !1);
  1562. return n
  1563. },
  1564. toArray: function() {
  1565. return r.toArray(this)
  1566. },
  1567. add: function(e, t) {
  1568. var n = this,
  1569. r, i;
  1570. if (a(e)) return n.add(f(e));
  1571. if (t !== !1)
  1572. for (r = f.unique(n.toArray().concat(f.makeArray(e))), n.length = r.length, i = 0; i < r.length; i++) n[i] = r[i];
  1573. else E.apply(n, f.makeArray(e));
  1574. return n
  1575. },
  1576. attr: function(e, t) {
  1577. var n = this,
  1578. r;
  1579. if ("object" == typeof e) m(e, function(e, t) {
  1580. n.attr(e, t)
  1581. });
  1582. else {
  1583. if (!o(t)) {
  1584. if (n[0] && 1 === n[0].nodeType) {
  1585. if (r = L[e], r && r.get) return r.get(n[0], e);
  1586. if (A[e]) return n.prop(e) ? e : k;
  1587. t = n[0].getAttribute(e, 2), null === t && (t = k)
  1588. }
  1589. return t
  1590. }
  1591. this.each(function() {
  1592. var n;
  1593. if (1 === this.nodeType) {
  1594. if (n = L[e], n && n.set) return void n.set(this, t);
  1595. null === t ? this.removeAttribute(e, 2) : this.setAttribute(e, t, 2)
  1596. }
  1597. })
  1598. }
  1599. return n
  1600. },
  1601. removeAttr: function(e) {
  1602. return this.attr(e, null)
  1603. },
  1604. prop: function(e, t) {
  1605. var n = this;
  1606. if (e = B[e] || e, "object" == typeof e) m(e, function(e, t) {
  1607. n.prop(e, t)
  1608. });
  1609. else {
  1610. if (!o(t)) return n[0] && n[0].nodeType && e in n[0] ? n[0][e] : t;
  1611. this.each(function() {
  1612. 1 == this.nodeType && (this[e] = t)
  1613. })
  1614. }
  1615. return n
  1616. },
  1617. css: function(e, t) {
  1618. function n(e) {
  1619. return e.replace(/-(\D)/g, function(e, t) {
  1620. return t.toUpperCase()
  1621. })
  1622. }
  1623. function r(e) {
  1624. return e.replace(/[A-Z]/g, function(e) {
  1625. return "-" + e
  1626. })
  1627. }
  1628. var i = this,
  1629. a, s;
  1630. if ("object" == typeof e) m(e, function(e, t) {
  1631. i.css(e, t)
  1632. });
  1633. else if (o(t)) e = n(e), "number" != typeof t || R[e] || (t += "px"), i.each(function() {
  1634. var n = this.style;
  1635. if (s = M[e], s && s.set) return void s.set(this, t);
  1636. try {
  1637. this.style[D[e] || e] = t
  1638. } catch (i) {}
  1639. null !== t && "" !== t || (n.removeProperty ? n.removeProperty(r(e)) : n.removeAttribute(e))
  1640. });
  1641. else {
  1642. if (a = i[0], s = M[e], s && s.get) return s.get(a);
  1643. if (a.ownerDocument.defaultView) try {
  1644. return a.ownerDocument.defaultView.getComputedStyle(a, null).getPropertyValue(r(e))
  1645. } catch (l) {
  1646. return k
  1647. } else if (a.currentStyle) return a.currentStyle[n(e)]
  1648. }
  1649. return i
  1650. },
  1651. remove: function() {
  1652. for (var e = this, t, n = this.length; n--;) t = e[n], S.clean(t), t.parentNode && t.parentNode.removeChild(t);
  1653. return this
  1654. },
  1655. empty: function() {
  1656. for (var e = this, t, n = this.length; n--;)
  1657. for (t = e[n]; t.firstChild;) t.removeChild(t.firstChild);
  1658. return this
  1659. },
  1660. html: function(e) {
  1661. var t = this,
  1662. n;
  1663. if (o(e)) {
  1664. n = t.length;
  1665. try {
  1666. for (; n--;) t[n].innerHTML = e
  1667. } catch (r) {
  1668. f(t[n]).empty().append(e)
  1669. }
  1670. return t
  1671. }
  1672. return t[0] ? t[0].innerHTML : ""
  1673. },
  1674. text: function(e) {
  1675. var t = this,
  1676. n;
  1677. if (o(e)) {
  1678. for (n = t.length; n--;) "innerText" in t[n] ? t[n].innerText = e : t[0].textContent = e;
  1679. return t
  1680. }
  1681. return t[0] ? t[0].innerText || t[0].textContent : ""
  1682. },
  1683. append: function() {
  1684. return c(this, arguments, function(e) {
  1685. (1 === this.nodeType || this.host && 1 === this.host.nodeType) && this.appendChild(e)
  1686. })
  1687. },
  1688. prepend: function() {
  1689. return c(this, arguments, function(e) {
  1690. (1 === this.nodeType || this.host && 1 === this.host.nodeType) && this.insertBefore(e, this.firstChild)
  1691. }, !0)
  1692. },
  1693. before: function() {
  1694. var e = this;
  1695. return e[0] && e[0].parentNode ? c(e, arguments, function(e) {
  1696. this.parentNode.insertBefore(e, this)
  1697. }) : e
  1698. },
  1699. after: function() {
  1700. var e = this;
  1701. return e[0] && e[0].parentNode ? c(e, arguments, function(e) {
  1702. this.parentNode.insertBefore(e, this.nextSibling)
  1703. }, !0) : e
  1704. },
  1705. appendTo: function(e) {
  1706. return f(e).append(this), this
  1707. },
  1708. prependTo: function(e) {
  1709. return f(e).prepend(this), this
  1710. },
  1711. replaceWith: function(e) {
  1712. return this.before(e).remove()
  1713. },
  1714. wrap: function(e) {
  1715. return d(this, e)
  1716. },
  1717. wrapAll: function(e) {
  1718. return d(this, e, !0)
  1719. },
  1720. wrapInner: function(e) {
  1721. return this.each(function() {
  1722. f(this).contents().wrapAll(e)
  1723. }), this
  1724. },
  1725. unwrap: function() {
  1726. return this.parent().each(function() {
  1727. f(this).replaceWith(this.childNodes)
  1728. })
  1729. },
  1730. clone: function() {
  1731. var e = [];
  1732. return this.each(function() {
  1733. e.push(this.cloneNode(!0))
  1734. }), f(e)
  1735. },
  1736. addClass: function(e) {
  1737. return this.toggleClass(e, !0)
  1738. },
  1739. removeClass: function(e) {
  1740. return this.toggleClass(e, !1)
  1741. },
  1742. toggleClass: function(e, t) {
  1743. var n = this;
  1744. return "string" != typeof e ? n : (e.indexOf(" ") !== -1 ? m(e.split(" "), function() {
  1745. n.toggleClass(this, t)
  1746. }) : n.each(function(n, r) {
  1747. var i, o;
  1748. o = u(r, e), o !== t && (i = r.className, o ? r.className = p((" " + i + " ").replace(" " + e + " ", " ")) : r.className += i ? " " + e : e)
  1749. }), n)
  1750. },
  1751. hasClass: function(e) {
  1752. return u(this[0], e)
  1753. },
  1754. each: function(e) {
  1755. return m(this, e)
  1756. },
  1757. on: function(e, t) {
  1758. return this.each(function() {
  1759. S.bind(this, e, t)
  1760. })
  1761. },
  1762. off: function(e, t) {
  1763. return this.each(function() {
  1764. S.unbind(this, e, t)
  1765. })
  1766. },
  1767. trigger: function(e) {
  1768. return this.each(function() {
  1769. "object" == typeof e ? S.fire(this, e.type, e) : S.fire(this, e)
  1770. })
  1771. },
  1772. show: function() {
  1773. return this.css("display", "")
  1774. },
  1775. hide: function() {
  1776. return this.css("display", "none")
  1777. },
  1778. slice: function() {
  1779. return new f(N.apply(this, arguments))
  1780. },
  1781. eq: function(e) {
  1782. return e === -1 ? this.slice(e) : this.slice(e, +e + 1)
  1783. },
  1784. first: function() {
  1785. return this.eq(0)
  1786. },
  1787. last: function() {
  1788. return this.eq(-1)
  1789. },
  1790. find: function(e) {
  1791. var t, n, r = [];
  1792. for (t = 0, n = this.length; t < n; t++) f.find(e, this[t], r);
  1793. return f(r)
  1794. },
  1795. filter: function(e) {
  1796. return f("function" == typeof e ? g(this.toArray(), function(t, n) {
  1797. return e(n, t)
  1798. }) : f.filter(e, this.toArray()))
  1799. },
  1800. closest: function(e) {
  1801. var t = [];
  1802. return e instanceof f && (e = e[0]), this.each(function(n, r) {
  1803. for (; r;) {
  1804. if ("string" == typeof e && f(r).is(e)) {
  1805. t.push(r);
  1806. break
  1807. }
  1808. if (r == e) {
  1809. t.push(r);
  1810. break
  1811. }
  1812. r = r.parentNode
  1813. }
  1814. }), f(t)
  1815. },
  1816. offset: function(e) {
  1817. var t, n, r, i = 0,
  1818. o = 0,
  1819. a;
  1820. return e ? this.css(e) : (t = this[0], t && (n = t.ownerDocument, r = n.documentElement, t.getBoundingClientRect && (a = t.getBoundingClientRect(), i = a.left + (r.scrollLeft || n.body.scrollLeft) - r.clientLeft, o = a.top + (r.scrollTop || n.body.scrollTop) - r.clientTop)), {
  1821. left: i,
  1822. top: o
  1823. })
  1824. },
  1825. push: E,
  1826. sort: [].sort,
  1827. splice: [].splice
  1828. }, r.extend(f, {
  1829. extend: r.extend,
  1830. makeArray: function(e) {
  1831. return s(e) || e.nodeType ? [e] : r.toArray(e)
  1832. },
  1833. inArray: h,
  1834. isArray: r.isArray,
  1835. each: m,
  1836. trim: p,
  1837. grep: g,
  1838. find: n,
  1839. expr: n.selectors,
  1840. unique: n.uniqueSort,
  1841. text: n.getText,
  1842. contains: n.contains,
  1843. filter: function(e, t, n) {
  1844. var r = t.length;
  1845. for (n && (e = ":not(" + e + ")"); r--;) 1 != t[r].nodeType && t.splice(r, 1);
  1846. return t = 1 === t.length ? f.find.matchesSelector(t[0], e) ? [t[0]] : [] : f.find.matches(e, t)
  1847. }
  1848. }), m({
  1849. parent: function(e) {
  1850. var t = e.parentNode;
  1851. return t && 11 !== t.nodeType ? t : null
  1852. },
  1853. parents: function(e) {
  1854. return y(e, "parentNode")
  1855. },
  1856. next: function(e) {
  1857. return C(e, "nextSibling", 1)
  1858. },
  1859. prev: function(e) {
  1860. return C(e, "previousSibling", 1)
  1861. },
  1862. children: function(e) {
  1863. return b(e.firstChild, "nextSibling", 1)
  1864. },
  1865. contents: function(e) {
  1866. return r.toArray(("iframe" === e.nodeName ? e.contentDocument || e.contentWindow.document : e).childNodes)
  1867. }
  1868. }, function(e, t) {
  1869. f.fn[e] = function(n) {
  1870. var r = this,
  1871. i = [];
  1872. return r.each(function() {
  1873. var e = t.call(i, this, n, i);
  1874. e && (f.isArray(e) ? i.push.apply(i, e) : i.push(e))
  1875. }), this.length > 1 && (T[e] || (i = f.unique(i)), 0 === e.indexOf("parents") && (i = i.reverse())), i = f(i), n ? i.filter(n) : i
  1876. }
  1877. }), m({
  1878. parentsUntil: function(e, t) {
  1879. return y(e, "parentNode", t)
  1880. },
  1881. nextUntil: function(e, t) {
  1882. return b(e, "nextSibling", 1, t).slice(1)
  1883. },
  1884. prevUntil: function(e, t) {
  1885. return b(e, "previousSibling", 1, t).slice(1)
  1886. }
  1887. }, function(e, t) {
  1888. f.fn[e] = function(n, r) {
  1889. var i = this,
  1890. o = [];
  1891. return i.each(function() {
  1892. var e = t.call(o, this, n, o);
  1893. e && (f.isArray(e) ? o.push.apply(o, e) : o.push(e))
  1894. }), this.length > 1 && (o = f.unique(o), 0 !== e.indexOf("parents") && "prevUntil" !== e || (o = o.reverse())), o = f(o), r ? o.filter(r) : o
  1895. }
  1896. }), f.fn.is = function(e) {
  1897. return !!e && this.filter(e).length > 0
  1898. }, f.fn.init.prototype = f.fn, f.overrideDefaults = function(e) {
  1899. function t(r, i) {
  1900. return n = n || e(), 0 === arguments.length && (r = n.element), i || (i = n.context), new t.fn.init(r, i)
  1901. }
  1902. var n;
  1903. return f.extend(t, this), t
  1904. }, i.ie && i.ie < 8 && (x(L, "get", {
  1905. maxlength: function(e) {
  1906. var t = e.maxLength;
  1907. return 2147483647 === t ? k : t
  1908. },
  1909. size: function(e) {
  1910. var t = e.size;
  1911. return 20 === t ? k : t
  1912. },
  1913. "class": function(e) {
  1914. return e.className
  1915. },
  1916. style: function(e) {
  1917. var t = e.style.cssText;
  1918. return 0 === t.length ? k : t
  1919. }
  1920. }), x(L, "set", {
  1921. "class": function(e, t) {
  1922. e.className = t
  1923. },
  1924. style: function(e, t) {
  1925. e.style.cssText = t
  1926. }
  1927. })), i.ie && i.ie < 9 && (D["float"] = "styleFloat", x(M, "set", {
  1928. opacity: function(e, t) {
  1929. var n = e.style;
  1930. null === t || "" === t ? n.removeAttribute("filter") : (n.zoom = 1, n.filter = "alpha(opacity=" + 100 * t + ")")
  1931. }
  1932. })), f.attrHooks = L, f.cssHooks = M, f
  1933. }), r(v, [], function() {
  1934. return function(e, t) {
  1935. function n(e, t, n, r) {
  1936. function i(e) {
  1937. return e = parseInt(e, 10).toString(16), e.length > 1 ? e : "0" + e
  1938. }
  1939. return "#" + i(t) + i(n) + i(r)
  1940. }
  1941. var r = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,
  1942. i = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,
  1943. o = /\s*([^:]+):\s*([^;]+);?/g,
  1944. a = /\s+$/,
  1945. s, l = {},
  1946. c, u, d, f = "\ufeff";
  1947. for (e = e || {}, t && (u = t.getValidStyles(), d = t.getInvalidStyles()), c = ("\\\" \\' \\; \\: ; : " + f).split(" "), s = 0; s < c.length; s++) l[c[s]] = f + s, l[f + s] = c[s];
  1948. return {
  1949. toHex: function(e) {
  1950. return e.replace(r, n)
  1951. },
  1952. parse: function(t) {
  1953. function c(e, t, n) {
  1954. var r, i, o, a;
  1955. if (r = y[e + "-top" + t], r && (i = y[e + "-right" + t], i && (o = y[e + "-bottom" + t], o && (a = y[e + "-left" + t])))) {
  1956. var l = [r, i, o, a];
  1957. for (s = l.length - 1; s-- && l[s] === l[s + 1];);
  1958. s > -1 && n || (y[e + t] = s == -1 ? l[0] : l.join(" "), delete y[e + "-top" + t], delete y[e + "-right" + t], delete y[e + "-bottom" + t], delete y[e + "-left" + t])
  1959. }
  1960. }
  1961. function u(e) {
  1962. var t = y[e],
  1963. n;
  1964. if (t) {
  1965. for (t = t.split(" "), n = t.length; n--;)
  1966. if (t[n] !== t[0]) return !1;
  1967. return y[e] = t[0], !0
  1968. }
  1969. }
  1970. function d(e, t, n, r) {
  1971. u(t) && u(n) && u(r) && (y[e] = y[t] + " " + y[n] + " " + y[r], delete y[t], delete y[n], delete y[r])
  1972. }
  1973. function h(e) {
  1974. return w = !0, l[e]
  1975. }
  1976. function p(e, t) {
  1977. return w && (e = e.replace(/\uFEFF[0-9]/g, function(e) {
  1978. return l[e]
  1979. })), t || (e = e.replace(/\\([\'\";:])/g, "$1")), e
  1980. }
  1981. function m(e) {
  1982. return String.fromCharCode(parseInt(e.slice(1), 16))
  1983. }
  1984. function g(e) {
  1985. return e.replace(/\\[0-9a-f]+/gi, m)
  1986. }
  1987. function v(t, n, r, i, o, a) {
  1988. if (o = o || a) return o = p(o), "'" + o.replace(/\'/g, "\\'") + "'";
  1989. if (n = p(n || r || i), !e.allow_script_urls) {
  1990. var s = n.replace(/[\s\r\n]+/g, "");
  1991. if (/(java|vb)script:/i.test(s)) return "";
  1992. if (!e.allow_svg_data_urls && /^data:image\/svg/i.test(s)) return ""
  1993. }
  1994. return E && (n = E.call(N, n, "style")), "url('" + n.replace(/\'/g, "\\'") + "')"
  1995. }
  1996. var y = {},
  1997. b, C, x, w, E = e.url_converter,
  1998. N = e.url_converter_scope || this;
  1999. if (t) {
  2000. for (t = t.replace(/[\u0000-\u001F]/g, ""), t = t.replace(/\\[\"\';:\uFEFF]/g, h).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(e) {
  2001. return e.replace(/[;:]/g, h)
  2002. }); b = o.exec(t);)
  2003. if (o.lastIndex = b.index + b[0].length, C = b[1].replace(a, "").toLowerCase(), x = b[2].replace(a, ""), C && x) {
  2004. if (C = g(C), x = g(x), C.indexOf(f) !== -1 || C.indexOf('"') !== -1) continue;
  2005. if (!e.allow_script_urls && ("behavior" == C || /expression\s*\(|\/\*|\*\//.test(x))) continue;
  2006. "font-weight" === C && "700" === x ? x = "bold" : "color" !== C && "background-color" !== C || (x = x.toLowerCase()), x = x.replace(r, n), x = x.replace(i, v), y[C] = w ? p(x, !0) : x
  2007. }
  2008. c("border", "", !0), c("border", "-width"), c("border", "-color"), c("border", "-style"), c("padding", ""), c("margin", ""), d("border", "border-width", "border-style", "border-color"), "medium none" === y.border && delete y.border, "none" === y["border-image"] && delete y["border-image"]
  2009. }
  2010. return y
  2011. },
  2012. serialize: function(e, t) {
  2013. function n(t) {
  2014. var n, r, o, a;
  2015. if (n = u[t])
  2016. for (r = 0, o = n.length; r < o; r++) t = n[r], a = e[t], a && (i += (i.length > 0 ? " " : "") + t + ": " + a + ";")
  2017. }
  2018. function r(e, t) {
  2019. var n;
  2020. return n = d["*"], (!n || !n[e]) && (n = d[t], !n || !n[e])
  2021. }
  2022. var i = "",
  2023. o, a;
  2024. if (t && u) n("*"), n(t);
  2025. else
  2026. for (o in e) a = e[o], !a || d && !r(o, t) || (i += (i.length > 0 ? " " : "") + o + ": " + a + ";");
  2027. return i
  2028. }
  2029. }
  2030. }
  2031. }), r(y, [], function() {
  2032. return function(e, t) {
  2033. function n(e, n, r, i) {
  2034. var o, a;
  2035. if (e) {
  2036. if (!i && e[n]) return e[n];
  2037. if (e != t) {
  2038. if (o = e[r]) return o;
  2039. for (a = e.parentNode; a && a != t; a = a.parentNode)
  2040. if (o = a[r]) return o
  2041. }
  2042. }
  2043. }
  2044. function r(e, n, r, i) {
  2045. var o, a, s;
  2046. if (e) {
  2047. if (o = e[r], t && o === t) return;
  2048. if (o) {
  2049. if (!i)
  2050. for (s = o[n]; s; s = s[n])
  2051. if (!s[n]) return s;
  2052. return o
  2053. }
  2054. if (a = e.parentNode, a && a !== t) return a
  2055. }
  2056. }
  2057. var i = e;
  2058. this.current = function() {
  2059. return i
  2060. }, this.next = function(e) {
  2061. return i = n(i, "firstChild", "nextSibling", e)
  2062. }, this.prev = function(e) {
  2063. return i = n(i, "lastChild", "previousSibling", e)
  2064. }, this.prev2 = function(e) {
  2065. return i = r(i, "lastChild", "previousSibling", e)
  2066. }
  2067. }
  2068. }), r(b, [m], function(e) {
  2069. function t(n) {
  2070. function r() {
  2071. return P.createDocumentFragment()
  2072. }
  2073. function i(e, t) {
  2074. E(F, e, t)
  2075. }
  2076. function o(e, t) {
  2077. E(z, e, t)
  2078. }
  2079. function a(e) {
  2080. i(e.parentNode, j(e))
  2081. }
  2082. function s(e) {
  2083. i(e.parentNode, j(e) + 1)
  2084. }
  2085. function l(e) {
  2086. o(e.parentNode, j(e))
  2087. }
  2088. function c(e) {
  2089. o(e.parentNode, j(e) + 1)
  2090. }
  2091. function u(e) {
  2092. e ? (M[V] = M[W], M[$] = M[U]) : (M[W] = M[V], M[U] = M[$]), M.collapsed = F
  2093. }
  2094. function d(e) {
  2095. a(e), c(e)
  2096. }
  2097. function f(e) {
  2098. i(e, 0), o(e, 1 === e.nodeType ? e.childNodes.length : e.nodeValue.length)
  2099. }
  2100. function h(e, t) {
  2101. var n = M[W],
  2102. r = M[U],
  2103. i = M[V],
  2104. o = M[$],
  2105. a = t.startContainer,
  2106. s = t.startOffset,
  2107. l = t.endContainer,
  2108. c = t.endOffset;
  2109. return 0 === e ? w(n, r, a, s) : 1 === e ? w(i, o, a, s) : 2 === e ? w(i, o, l, c) : 3 === e ? w(n, r, l, c) : void 0
  2110. }
  2111. function p() {
  2112. N(I)
  2113. }
  2114. function m() {
  2115. return N(O)
  2116. }
  2117. function g() {
  2118. return N(H)
  2119. }
  2120. function v(e) {
  2121. var t = this[W],
  2122. r = this[U],
  2123. i, o;
  2124. 3 !== t.nodeType && 4 !== t.nodeType || !t.nodeValue ? (t.childNodes.length > 0 && (o = t.childNodes[r]), o ? t.insertBefore(e, o) : 3 == t.nodeType ? n.insertAfter(e, t) : t.appendChild(e)) : r ? r >= t.nodeValue.length ? n.insertAfter(e, t) : (i = t.splitText(r), t.parentNode.insertBefore(e, i)) : t.parentNode.insertBefore(e, t)
  2125. }
  2126. function y(e) {
  2127. var t = M.extractContents();
  2128. M.insertNode(e), e.appendChild(t), M.selectNode(e)
  2129. }
  2130. function b() {
  2131. return q(new t(n), {
  2132. startContainer: M[W],
  2133. startOffset: M[U],
  2134. endContainer: M[V],
  2135. endOffset: M[$],
  2136. collapsed: M.collapsed,
  2137. commonAncestorContainer: M.commonAncestorContainer
  2138. })
  2139. }
  2140. function C(e, t) {
  2141. var n;
  2142. if (3 == e.nodeType) return e;
  2143. if (t < 0) return e;
  2144. for (n = e.firstChild; n && t > 0;) --t, n = n.nextSibling;
  2145. return n ? n : e
  2146. }
  2147. function x() {
  2148. return M[W] == M[V] && M[U] == M[$]
  2149. }
  2150. function w(e, t, r, i) {
  2151. var o, a, s, l, c, u;
  2152. if (e == r) return t == i ? 0 : t < i ? -1 : 1;
  2153. for (o = r; o && o.parentNode != e;) o = o.parentNode;
  2154. if (o) {
  2155. for (a = 0, s = e.firstChild; s != o && a < t;) a++, s = s.nextSibling;
  2156. return t <= a ? -1 : 1
  2157. }
  2158. for (o = e; o && o.parentNode != r;) o = o.parentNode;
  2159. if (o) {
  2160. for (a = 0, s = r.firstChild; s != o && a < i;) a++, s = s.nextSibling;
  2161. return a < i ? -1 : 1
  2162. }
  2163. for (l = n.findCommonAncestor(e, r), c = e; c && c.parentNode != l;) c = c.parentNode;
  2164. for (c || (c = l), u = r; u && u.parentNode != l;) u = u.parentNode;
  2165. if (u || (u = l), c == u) return 0;
  2166. for (s = l.firstChild; s;) {
  2167. if (s == c) return -1;
  2168. if (s == u) return 1;
  2169. s = s.nextSibling
  2170. }
  2171. }
  2172. function E(e, t, r) {
  2173. var i, o;
  2174. for (e ? (M[W] = t, M[U] = r) : (M[V] = t, M[$] = r), i = M[V]; i.parentNode;) i = i.parentNode;
  2175. for (o = M[W]; o.parentNode;) o = o.parentNode;
  2176. o == i ? w(M[W], M[U], M[V], M[$]) > 0 && M.collapse(e) : M.collapse(e), M.collapsed = x(), M.commonAncestorContainer = n.findCommonAncestor(M[W], M[V])
  2177. }
  2178. function N(e) {
  2179. var t, n = 0,
  2180. r = 0,
  2181. i, o, a, s, l, c;
  2182. if (M[W] == M[V]) return _(e);
  2183. for (t = M[V], i = t.parentNode; i; t = i, i = i.parentNode) {
  2184. if (i == M[W]) return S(t, e);
  2185. ++n
  2186. }
  2187. for (t = M[W], i = t.parentNode; i; t = i, i = i.parentNode) {
  2188. if (i == M[V]) return k(t, e);
  2189. ++r
  2190. }
  2191. for (o = r - n, a = M[W]; o > 0;) a = a.parentNode, o--;
  2192. for (s = M[V]; o < 0;) s = s.parentNode, o++;
  2193. for (l = a.parentNode, c = s.parentNode; l != c; l = l.parentNode, c = c.parentNode) a = l, s = c;
  2194. return T(a, s, e)
  2195. }
  2196. function _(e) {
  2197. var t, n, i, o, a, s, l, c, u;
  2198. if (e != I && (t = r()), M[U] == M[$]) return t;
  2199. if (3 == M[W].nodeType) {
  2200. if (n = M[W].nodeValue, i = n.substring(M[U], M[$]), e != H && (o = M[W], c = M[U], u = M[$] - M[U], 0 === c && u >= o.nodeValue.length - 1 ? o.parentNode.removeChild(o) : o.deleteData(c, u), M.collapse(F)), e == I) return;
  2201. return i.length > 0 && t.appendChild(P.createTextNode(i)), t
  2202. }
  2203. for (o = C(M[W], M[U]), a = M[$] - M[U]; o && a > 0;) s = o.nextSibling, l = D(o, e), t && t.appendChild(l), --a, o = s;
  2204. return e != H && M.collapse(F), t
  2205. }
  2206. function S(e, t) {
  2207. var n, i, o, a, s, l;
  2208. if (t != I && (n = r()), i = R(e, t), n && n.appendChild(i), o = j(e), a = o - M[U], a <= 0) return t != H && (M.setEndBefore(e), M.collapse(z)), n;
  2209. for (i = e.previousSibling; a > 0;) s = i.previousSibling, l = D(i, t), n && n.insertBefore(l, n.firstChild), --a, i = s;
  2210. return t != H && (M.setEndBefore(e), M.collapse(z)), n
  2211. }
  2212. function k(e, t) {
  2213. var n, i, o, a, s, l;
  2214. for (t != I && (n = r()), o = A(e, t), n && n.appendChild(o), i = j(e), ++i, a = M[$] - i, o = e.nextSibling; o && a > 0;) s = o.nextSibling, l = D(o, t), n && n.appendChild(l), --a, o = s;
  2215. return t != H && (M.setStartAfter(e), M.collapse(F)), n
  2216. }
  2217. function T(e, t, n) {
  2218. var i, o, a, s, l, c, u;
  2219. for (n != I && (o = r()), i = A(e, n), o && o.appendChild(i), a = j(e), s = j(t), ++a, l = s - a, c = e.nextSibling; l > 0;) u = c.nextSibling, i = D(c, n), o && o.appendChild(i), c = u, --l;
  2220. return i = R(t, n), o && o.appendChild(i), n != H && (M.setStartAfter(e), M.collapse(F)), o
  2221. }
  2222. function R(e, t) {
  2223. var n = C(M[V], M[$] - 1),
  2224. r, i, o, a, s, l = n != M[V];
  2225. if (n == e) return B(n, l, z, t);
  2226. for (r = n.parentNode, i = B(r, z, z, t); r;) {
  2227. for (; n;) o = n.previousSibling, a = B(n, l, z, t), t != I && i.insertBefore(a, i.firstChild), l = F, n = o;
  2228. if (r == e) return i;
  2229. n = r.previousSibling, r = r.parentNode, s = B(r, z, z, t), t != I && s.appendChild(i), i = s
  2230. }
  2231. }
  2232. function A(e, t) {
  2233. var n = C(M[W], M[U]),
  2234. r = n != M[W],
  2235. i, o, a, s, l;
  2236. if (n == e) return B(n, r, F, t);
  2237. for (i = n.parentNode, o = B(i, z, F, t); i;) {
  2238. for (; n;) a = n.nextSibling, s = B(n, r, F, t), t != I && o.appendChild(s), r = F, n = a;
  2239. if (i == e) return o;
  2240. n = i.nextSibling, i = i.parentNode, l = B(i, z, F, t), t != I && l.appendChild(o), o = l
  2241. }
  2242. }
  2243. function B(e, t, r, i) {
  2244. var o, a, s, l, c;
  2245. if (t) return D(e, i);
  2246. if (3 == e.nodeType) {
  2247. if (o = e.nodeValue, r ? (l = M[U], a = o.substring(l), s = o.substring(0, l)) : (l = M[$], a = o.substring(0, l), s = o.substring(l)), i != H && (e.nodeValue = s), i == I) return;
  2248. return c = n.clone(e, z), c.nodeValue = a, c
  2249. }
  2250. if (i != I) return n.clone(e, z)
  2251. }
  2252. function D(e, t) {
  2253. return t != I ? t == H ? n.clone(e, F) : e : void e.parentNode.removeChild(e)
  2254. }
  2255. function L() {
  2256. return n.create("body", null, g()).outerText
  2257. }
  2258. var M = this,
  2259. P = n.doc,
  2260. O = 0,
  2261. H = 1,
  2262. I = 2,
  2263. F = !0,
  2264. z = !1,
  2265. U = "startOffset",
  2266. W = "startContainer",
  2267. V = "endContainer",
  2268. $ = "endOffset",
  2269. q = e.extend,
  2270. j = n.nodeIndex;
  2271. return q(M, {
  2272. startContainer: P,
  2273. startOffset: 0,
  2274. endContainer: P,
  2275. endOffset: 0,
  2276. collapsed: F,
  2277. commonAncestorContainer: P,
  2278. START_TO_START: 0,
  2279. START_TO_END: 1,
  2280. END_TO_END: 2,
  2281. END_TO_START: 3,
  2282. setStart: i,
  2283. setEnd: o,
  2284. setStartBefore: a,
  2285. setStartAfter: s,
  2286. setEndBefore: l,
  2287. setEndAfter: c,
  2288. collapse: u,
  2289. selectNode: d,
  2290. selectNodeContents: f,
  2291. compareBoundaryPoints: h,
  2292. deleteContents: p,
  2293. extractContents: m,
  2294. cloneContents: g,
  2295. insertNode: v,
  2296. surroundContents: y,
  2297. cloneRange: b,
  2298. toStringIE: L
  2299. }), M
  2300. }
  2301. return t.prototype.toString = function() {
  2302. return this.toStringIE()
  2303. }, t
  2304. }), r(C, [m], function(e) {
  2305. function t(e) {
  2306. var t;
  2307. return t = document.createElement("div"), t.innerHTML = e, t.textContent || t.innerText || e
  2308. }
  2309. function n(e, t) {
  2310. var n, r, i, a = {};
  2311. if (e) {
  2312. for (e = e.split(","), t = t || 10, n = 0; n < e.length; n += 2) r = String.fromCharCode(parseInt(e[n], t)), o[r] || (i = "&" + e[n + 1] + ";", a[r] = i, a[i] = r);
  2313. return a
  2314. }
  2315. }
  2316. var r = e.makeMap,
  2317. i, o, a, s = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
  2318. l = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
  2319. c = /[<>&\"\']/g,
  2320. u = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi,
  2321. d = {
  2322. 128: "\u20ac",
  2323. 130: "\u201a",
  2324. 131: "\u0192",
  2325. 132: "\u201e",
  2326. 133: "\u2026",
  2327. 134: "\u2020",
  2328. 135: "\u2021",
  2329. 136: "\u02c6",
  2330. 137: "\u2030",
  2331. 138: "\u0160",
  2332. 139: "\u2039",
  2333. 140: "\u0152",
  2334. 142: "\u017d",
  2335. 145: "\u2018",
  2336. 146: "\u2019",
  2337. 147: "\u201c",
  2338. 148: "\u201d",
  2339. 149: "\u2022",
  2340. 150: "\u2013",
  2341. 151: "\u2014",
  2342. 152: "\u02dc",
  2343. 153: "\u2122",
  2344. 154: "\u0161",
  2345. 155: "\u203a",
  2346. 156: "\u0153",
  2347. 158: "\u017e",
  2348. 159: "\u0178"
  2349. };
  2350. o = {
  2351. '"': "&quot;",
  2352. "'": "&#39;",
  2353. "<": "&lt;",
  2354. ">": "&gt;",
  2355. "&": "&amp;",
  2356. "`": "&#96;"
  2357. }, a = {
  2358. "&lt;": "<",
  2359. "&gt;": ">",
  2360. "&amp;": "&",
  2361. "&quot;": '"',
  2362. "&apos;": "'"
  2363. }, i = n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro", 32);
  2364. var f = {
  2365. encodeRaw: function(e, t) {
  2366. return e.replace(t ? s : l, function(e) {
  2367. return o[e] || e
  2368. })
  2369. },
  2370. encodeAllRaw: function(e) {
  2371. return ("" + e).replace(c, function(e) {
  2372. return o[e] || e
  2373. })
  2374. },
  2375. encodeNumeric: function(e, t) {
  2376. return e.replace(t ? s : l, function(e) {
  2377. return e.length > 1 ? "&#" + (1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320) + 65536) + ";" : o[e] || "&#" + e.charCodeAt(0) + ";"
  2378. })
  2379. },
  2380. encodeNamed: function(e, t, n) {
  2381. return n = n || i, e.replace(t ? s : l, function(e) {
  2382. return o[e] || n[e] || e
  2383. })
  2384. },
  2385. getEncodeFunc: function(e, t) {
  2386. function a(e, n) {
  2387. return e.replace(n ? s : l, function(e) {
  2388. return o[e] || t[e] || "&#" + e.charCodeAt(0) + ";" || e
  2389. })
  2390. }
  2391. function c(e, n) {
  2392. return f.encodeNamed(e, n, t)
  2393. }
  2394. return t = n(t) || i, e = r(e.replace(/\+/g, ",")), e.named && e.numeric ? a : e.named ? t ? c : f.encodeNamed : e.numeric ? f.encodeNumeric : f.encodeRaw
  2395. },
  2396. decode: function(e) {
  2397. return e.replace(u, function(e, n) {
  2398. return n ? (n = "x" === n.charAt(0).toLowerCase() ? parseInt(n.substr(1), 16) : parseInt(n, 10), n > 65535 ? (n -= 65536, String.fromCharCode(55296 + (n >> 10), 56320 + (1023 & n))) : d[n] || String.fromCharCode(n)) : a[e] || i[e] || t(e)
  2399. })
  2400. }
  2401. };
  2402. return f
  2403. }), r(x, [m, u], function(e, t) {
  2404. return function(n, r) {
  2405. function i(e) {
  2406. n.getElementsByTagName("head")[0].appendChild(e)
  2407. }
  2408. function o(r, o, c) {
  2409. function u() {
  2410. for (var e = b.passed, t = e.length; t--;) e[t]();
  2411. b.status = 2, b.passed = [], b.failed = []
  2412. }
  2413. function d() {
  2414. for (var e = b.failed, t = e.length; t--;) e[t]();
  2415. b.status = 3, b.passed = [], b.failed = []
  2416. }
  2417. function f() {
  2418. var e = navigator.userAgent.match(/WebKit\/(\d*)/);
  2419. return !!(e && e[1] < 536)
  2420. }
  2421. function h(e, n) {
  2422. e() || ((new Date).getTime() - y < l ? t.setTimeout(n) : d())
  2423. }
  2424. function p() {
  2425. h(function() {
  2426. for (var e = n.styleSheets, t, r = e.length, i; r--;)
  2427. if (t = e[r], i = t.ownerNode ? t.ownerNode : t.owningElement, i && i.id === g.id) return u(), !0
  2428. }, p)
  2429. }
  2430. function m() {
  2431. h(function() {
  2432. try {
  2433. var e = v.sheet.cssRules;
  2434. return u(), !!e
  2435. } catch (t) {}
  2436. }, m)
  2437. }
  2438. var g, v, y, b;
  2439. if (r = e._addCacheSuffix(r), s[r] ? b = s[r] : (b = {
  2440. passed: [],
  2441. failed: []
  2442. }, s[r] = b), o && b.passed.push(o), c && b.failed.push(c), 1 != b.status) {
  2443. if (2 == b.status) return void u();
  2444. if (3 == b.status) return void d();
  2445. if (b.status = 1, g = n.createElement("link"), g.rel = "stylesheet", g.type = "text/css", g.id = "u" + a++, g.async = !1, g.defer = !1, y = (new Date).getTime(), "onload" in g && !f()) g.onload = p, g.onerror = d;
  2446. else {
  2447. if (navigator.userAgent.indexOf("Firefox") > 0) return v = n.createElement("style"), v.textContent = '@import "' + r + '"', m(), void i(v);
  2448. p()
  2449. }
  2450. i(g), g.href = r
  2451. }
  2452. }
  2453. var a = 0,
  2454. s = {},
  2455. l;
  2456. r = r || {}, l = r.maxLoadTime || 5e3, this.load = o
  2457. }
  2458. }), r(w, [h, g, v, f, y, b, C, d, m, x], function(e, n, r, i, o, a, s, l, c, u) {
  2459. function d(e, t) {
  2460. var n = {},
  2461. r = t.keep_values,
  2462. i;
  2463. return i = {
  2464. set: function(n, r, i) {
  2465. t.url_converter && (r = t.url_converter.call(t.url_converter_scope || e, r, i, n[0])), n.attr("data-mce-" + i, r).attr(i, r)
  2466. },
  2467. get: function(e, t) {
  2468. return e.attr("data-mce-" + t) || e.attr(t)
  2469. }
  2470. }, n = {
  2471. style: {
  2472. set: function(e, t) {
  2473. return null !== t && "object" == typeof t ? void e.css(t) : (r && e.attr("data-mce-style", t), void e.attr("style", t))
  2474. },
  2475. get: function(t) {
  2476. var n = t.attr("data-mce-style") || t.attr("style");
  2477. return n = e.serializeStyle(e.parseStyle(n), t[0].nodeName)
  2478. }
  2479. }
  2480. }, r && (n.href = n.src = i), n
  2481. }
  2482. function f(e, t) {
  2483. var n = t.attr("style");
  2484. n = e.serializeStyle(e.parseStyle(n), t[0].nodeName), n || (n = null), t.attr("data-mce-style", n)
  2485. }
  2486. function h(e, t) {
  2487. var n = 0,
  2488. r, i;
  2489. if (e)
  2490. for (r = e.nodeType, e = e.previousSibling; e; e = e.previousSibling) i = e.nodeType, (!t || 3 != i || i != r && e.nodeValue.length) && (n++, r = i);
  2491. return n
  2492. }
  2493. function p(e, t) {
  2494. var o = this,
  2495. a;
  2496. o.doc = e, o.win = window, o.files = {}, o.counter = 0, o.stdMode = !b || e.documentMode >= 8, o.boxModel = !b || "CSS1Compat" == e.compatMode || o.stdMode, o.styleSheetLoader = new u(e), o.boundEvents = [], o.settings = t = t || {}, o.schema = t.schema, o.styles = new r({
  2497. url_converter: t.url_converter,
  2498. url_converter_scope: t.url_converter_scope
  2499. }, t.schema), o.fixDoc(e), o.events = t.ownEvents ? new i(t.proxy) : i.Event, o.attrHooks = d(o, t), a = t.schema ? t.schema.getBlockElements() : {}, o.$ = n.overrideDefaults(function() {
  2500. return {
  2501. context: e,
  2502. element: o.getRoot()
  2503. }
  2504. }), o.isBlock = function(e) {
  2505. if (!e) return !1;
  2506. var t = e.nodeType;
  2507. return t ? !(1 !== t || !a[e.nodeName]) : !!a[e]
  2508. }
  2509. }
  2510. var m = c.each,
  2511. g = c.is,
  2512. v = c.grep,
  2513. y = c.trim,
  2514. b = l.ie,
  2515. C = /^([a-z0-9],?)+$/i,
  2516. x = /^[ \t\r\n]*$/;
  2517. return p.prototype = {
  2518. $$: function(e) {
  2519. return "string" == typeof e && (e = this.get(e)), this.$(e)
  2520. },
  2521. root: null,
  2522. fixDoc: function(e) {
  2523. var t = this.settings,
  2524. n;
  2525. if (b && t.schema) {
  2526. "abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g, function(t) {
  2527. e.createElement(t)
  2528. });
  2529. for (n in t.schema.getCustomElements()) e.createElement(n)
  2530. }
  2531. },
  2532. clone: function(e, t) {
  2533. var n = this,
  2534. r, i;
  2535. return !b || 1 !== e.nodeType || t ? e.cloneNode(t) : (i = n.doc, t ? r.firstChild : (r = i.createElement(e.nodeName), m(n.getAttribs(e), function(t) {
  2536. n.setAttrib(r, t.nodeName, n.getAttrib(e, t.nodeName))
  2537. }), r))
  2538. },
  2539. getRoot: function() {
  2540. var e = this;
  2541. return e.settings.root_element || e.doc.body
  2542. },
  2543. getViewPort: function(e) {
  2544. var t, n;
  2545. return e = e ? e : this.win, t = e.document, n = this.boxModel ? t.documentElement : t.body, {
  2546. x: e.pageXOffset || n.scrollLeft,
  2547. y: e.pageYOffset || n.scrollTop,
  2548. w: e.innerWidth || n.clientWidth,
  2549. h: e.innerHeight || n.clientHeight
  2550. }
  2551. },
  2552. getRect: function(e) {
  2553. var t = this,
  2554. n, r;
  2555. return e = t.get(e), n = t.getPos(e), r = t.getSize(e), {
  2556. x: n.x,
  2557. y: n.y,
  2558. w: r.w,
  2559. h: r.h
  2560. }
  2561. },
  2562. getSize: function(e) {
  2563. var t = this,
  2564. n, r;
  2565. return e = t.get(e), n = t.getStyle(e, "width"), r = t.getStyle(e, "height"), n.indexOf("px") === -1 && (n = 0), r.indexOf("px") === -1 && (r = 0), {
  2566. w: parseInt(n, 10) || e.offsetWidth || e.clientWidth,
  2567. h: parseInt(r, 10) || e.offsetHeight || e.clientHeight
  2568. }
  2569. },
  2570. getParent: function(e, t, n) {
  2571. return this.getParents(e, t, n, !1)
  2572. },
  2573. getParents: function(e, n, r, i) {
  2574. var o = this,
  2575. a, s = [];
  2576. for (e = o.get(e), i = i === t, r = r || ("BODY" != o.getRoot().nodeName ? o.getRoot().parentNode : null), g(n, "string") && (a = n, n = "*" === n ? function(e) {
  2577. return 1 == e.nodeType
  2578. } : function(e) {
  2579. return o.is(e, a)
  2580. }); e && e != r && e.nodeType && 9 !== e.nodeType;) {
  2581. if (!n || n(e)) {
  2582. if (!i) return e;
  2583. s.push(e)
  2584. }
  2585. e = e.parentNode
  2586. }
  2587. return i ? s : null
  2588. },
  2589. get: function(e) {
  2590. var t;
  2591. return e && this.doc && "string" == typeof e && (t = e, e = this.doc.getElementById(e), e && e.id !== t) ? this.doc.getElementsByName(t)[1] : e
  2592. },
  2593. getNext: function(e, t) {
  2594. return this._findSib(e, t, "nextSibling")
  2595. },
  2596. getPrev: function(e, t) {
  2597. return this._findSib(e, t, "previousSibling")
  2598. },
  2599. select: function(t, n) {
  2600. var r = this;
  2601. return e(t, r.get(n) || r.settings.root_element || r.doc, [])
  2602. },
  2603. is: function(n, r) {
  2604. var i;
  2605. if (n.length === t) {
  2606. if ("*" === r) return 1 == n.nodeType;
  2607. if (C.test(r)) {
  2608. for (r = r.toLowerCase().split(/,/), n = n.nodeName.toLowerCase(), i = r.length - 1; i >= 0; i--)
  2609. if (r[i] == n) return !0;
  2610. return !1
  2611. }
  2612. }
  2613. if (n.nodeType && 1 != n.nodeType) return !1;
  2614. var o = n.nodeType ? [n] : n;
  2615. return e(r, o[0].ownerDocument || o[0], null, o).length > 0
  2616. },
  2617. add: function(e, t, n, r, i) {
  2618. var o = this;
  2619. return this.run(e, function(e) {
  2620. var a;
  2621. return a = g(t, "string") ? o.doc.createElement(t) : t, o.setAttribs(a, n), r && (r.nodeType ? a.appendChild(r) : o.setHTML(a, r)), i ? a : e.appendChild(a)
  2622. })
  2623. },
  2624. create: function(e, t, n) {
  2625. return this.add(this.doc.createElement(e), e, t, n, 1)
  2626. },
  2627. createHTML: function(e, t, n) {
  2628. var r = "",
  2629. i;
  2630. r += "<" + e;
  2631. for (i in t) t.hasOwnProperty(i) && null !== t[i] && "undefined" != typeof t[i] && (r += " " + i + '="' + this.encode(t[i]) + '"');
  2632. return "undefined" != typeof n ? r + ">" + n + "</" + e + ">" : r + " />"
  2633. },
  2634. createFragment: function(e) {
  2635. var t, n, r = this.doc,
  2636. i;
  2637. for (i = r.createElement("div"), t = r.createDocumentFragment(), e && (i.innerHTML = e); n = i.firstChild;) t.appendChild(n);
  2638. return t
  2639. },
  2640. remove: function(e, t) {
  2641. return e = this.$$(e), t ? e.each(function() {
  2642. for (var e; e = this.firstChild;) 3 == e.nodeType && 0 === e.data.length ? this.removeChild(e) : this.parentNode.insertBefore(e, this)
  2643. }).remove() : e.remove(), e.length > 1 ? e.toArray() : e[0]
  2644. },
  2645. setStyle: function(e, t, n) {
  2646. e = this.$$(e).css(t, n), this.settings.update_styles && f(this, e)
  2647. },
  2648. getStyle: function(e, n, r) {
  2649. return e = this.$$(e), r ? e.css(n) : (n = n.replace(/-(\D)/g, function(e, t) {
  2650. return t.toUpperCase()
  2651. }), "float" == n && (n = l.ie && l.ie < 12 ? "styleFloat" : "cssFloat"), e[0] && e[0].style ? e[0].style[n] : t)
  2652. },
  2653. setStyles: function(e, t) {
  2654. e = this.$$(e).css(t), this.settings.update_styles && f(this, e)
  2655. },
  2656. removeAllAttribs: function(e) {
  2657. return this.run(e, function(e) {
  2658. var t, n = e.attributes;
  2659. for (t = n.length - 1; t >= 0; t--) e.removeAttributeNode(n.item(t))
  2660. })
  2661. },
  2662. setAttrib: function(e, t, n) {
  2663. var r = this,
  2664. i, o, a = r.settings;
  2665. "" === n && (n = null), e = r.$$(e), i = e.attr(t), e.length && (o = r.attrHooks[t], o && o.set ? o.set(e, n, t) : e.attr(t, n), i != n && a.onSetAttrib && a.onSetAttrib({
  2666. attrElm: e,
  2667. attrName: t,
  2668. attrValue: n
  2669. }))
  2670. },
  2671. setAttribs: function(e, t) {
  2672. var n = this;
  2673. n.$$(e).each(function(e, r) {
  2674. m(t, function(e, t) {
  2675. n.setAttrib(r, t, e)
  2676. })
  2677. })
  2678. },
  2679. getAttrib: function(e, t, n) {
  2680. var r = this,
  2681. i, o;
  2682. return e = r.$$(e), e.length && (i = r.attrHooks[t], o = i && i.get ? i.get(e, t) : e.attr(t)), "undefined" == typeof o && (o = n || ""), o
  2683. },
  2684. getPos: function(e, t) {
  2685. var r = this,
  2686. i = 0,
  2687. o = 0,
  2688. a, s = r.doc,
  2689. l = s.body,
  2690. c;
  2691. if (e = r.get(e), t = t || l, e) {
  2692. if (t === l && e.getBoundingClientRect && "static" === n(l).css("position")) return c = e.getBoundingClientRect(), t = r.boxModel ? s.documentElement : l, i = c.left + (s.documentElement.scrollLeft || l.scrollLeft) - t.clientLeft, o = c.top + (s.documentElement.scrollTop || l.scrollTop) - t.clientTop, {
  2693. x: i,
  2694. y: o
  2695. };
  2696. for (a = e; a && a != t && a.nodeType;) i += a.offsetLeft || 0, o += a.offsetTop || 0, a = a.offsetParent;
  2697. for (a = e.parentNode; a && a != t && a.nodeType;) i -= a.scrollLeft || 0, o -= a.scrollTop || 0, a = a.parentNode
  2698. }
  2699. return {
  2700. x: i,
  2701. y: o
  2702. }
  2703. },
  2704. parseStyle: function(e) {
  2705. return this.styles.parse(e)
  2706. },
  2707. serializeStyle: function(e, t) {
  2708. return this.styles.serialize(e, t)
  2709. },
  2710. addStyle: function(e) {
  2711. var t = this,
  2712. n = t.doc,
  2713. r, i;
  2714. if (t !== p.DOM && n === document) {
  2715. var o = p.DOM.addedStyles;
  2716. if (o = o || [], o[e]) return;
  2717. o[e] = !0, p.DOM.addedStyles = o
  2718. }
  2719. i = n.getElementById("mceDefaultStyles"), i || (i = n.createElement("style"), i.id = "mceDefaultStyles", i.type = "text/css", r = n.getElementsByTagName("head")[0], r.firstChild ? r.insertBefore(i, r.firstChild) : r.appendChild(i)), i.styleSheet ? i.styleSheet.cssText += e : i.appendChild(n.createTextNode(e))
  2720. },
  2721. loadCSS: function(e) {
  2722. var t = this,
  2723. n = t.doc,
  2724. r;
  2725. return t !== p.DOM && n === document ? void p.DOM.loadCSS(e) : (e || (e = ""), r = n.getElementsByTagName("head")[0], void m(e.split(","), function(e) {
  2726. var i;
  2727. e = c._addCacheSuffix(e), t.files[e] || (t.files[e] = !0, i = t.create("link", {
  2728. rel: "stylesheet",
  2729. href: e
  2730. }), b && n.documentMode && n.recalc && (i.onload = function() {
  2731. n.recalc && n.recalc(), i.onload = null
  2732. }), r.appendChild(i))
  2733. }))
  2734. },
  2735. addClass: function(e, t) {
  2736. this.$$(e).addClass(t)
  2737. },
  2738. removeClass: function(e, t) {
  2739. this.toggleClass(e, t, !1)
  2740. },
  2741. hasClass: function(e, t) {
  2742. return this.$$(e).hasClass(t)
  2743. },
  2744. toggleClass: function(e, t, r) {
  2745. this.$$(e).toggleClass(t, r).each(function() {
  2746. "" === this.className && n(this).attr("class", null)
  2747. })
  2748. },
  2749. show: function(e) {
  2750. this.$$(e).show()
  2751. },
  2752. hide: function(e) {
  2753. this.$$(e).hide()
  2754. },
  2755. isHidden: function(e) {
  2756. return "none" == this.$$(e).css("display")
  2757. },
  2758. uniqueId: function(e) {
  2759. return (e ? e : "mce_") + this.counter++
  2760. },
  2761. setHTML: function(e, t) {
  2762. e = this.$$(e), b ? e.each(function(e, r) {
  2763. if (r.canHaveHTML !== !1) {
  2764. for (; r.firstChild;) r.removeChild(r.firstChild);
  2765. try {
  2766. r.innerHTML = "<br>" + t, r.removeChild(r.firstChild)
  2767. } catch (i) {
  2768. n("<div></div>").html("<br>" + t).contents().slice(1).appendTo(r)
  2769. }
  2770. return t
  2771. }
  2772. }) : e.html(t)
  2773. },
  2774. getOuterHTML: function(e) {
  2775. return e = this.get(e), 1 == e.nodeType && "outerHTML" in e ? e.outerHTML : n("<div></div>").append(n(e).clone()).html()
  2776. },
  2777. setOuterHTML: function(e, t) {
  2778. var r = this;
  2779. r.$$(e).each(function() {
  2780. try {
  2781. if ("outerHTML" in this) return void(this.outerHTML = t)
  2782. } catch (e) {}
  2783. r.remove(n(this).html(t), !0)
  2784. })
  2785. },
  2786. decode: s.decode,
  2787. encode: s.encodeAllRaw,
  2788. insertAfter: function(e, t) {
  2789. return t = this.get(t), this.run(e, function(e) {
  2790. var n, r;
  2791. return n = t.parentNode, r = t.nextSibling, r ? n.insertBefore(e, r) : n.appendChild(e), e
  2792. })
  2793. },
  2794. replace: function(e, t, n) {
  2795. var r = this;
  2796. return r.run(t, function(t) {
  2797. return g(t, "array") && (e = e.cloneNode(!0)), n && m(v(t.childNodes), function(t) {
  2798. e.appendChild(t)
  2799. }), t.parentNode.replaceChild(e, t)
  2800. })
  2801. },
  2802. rename: function(e, t) {
  2803. var n = this,
  2804. r;
  2805. return e.nodeName != t.toUpperCase() && (r = n.create(t), m(n.getAttribs(e), function(t) {
  2806. n.setAttrib(r, t.nodeName, n.getAttrib(e, t.nodeName))
  2807. }), n.replace(r, e, 1)), r || e
  2808. },
  2809. findCommonAncestor: function(e, t) {
  2810. for (var n = e, r; n;) {
  2811. for (r = t; r && n != r;) r = r.parentNode;
  2812. if (n == r) break;
  2813. n = n.parentNode
  2814. }
  2815. return !n && e.ownerDocument ? e.ownerDocument.documentElement : n
  2816. },
  2817. toHex: function(e) {
  2818. return this.styles.toHex(c.trim(e))
  2819. },
  2820. run: function(e, t, n) {
  2821. var r = this,
  2822. i;
  2823. return "string" == typeof e && (e = r.get(e)), !!e && (n = n || this, e.nodeType || !e.length && 0 !== e.length ? t.call(n, e) : (i = [], m(e, function(e, o) {
  2824. e && ("string" == typeof e && (e = r.get(e)), i.push(t.call(n, e, o)))
  2825. }), i))
  2826. },
  2827. getAttribs: function(e) {
  2828. var t;
  2829. if (e = this.get(e), !e) return [];
  2830. if (b) {
  2831. if (t = [], "OBJECT" == e.nodeName) return e.attributes;
  2832. "OPTION" === e.nodeName && this.getAttrib(e, "selected") && t.push({
  2833. specified: 1,
  2834. nodeName: "selected"
  2835. });
  2836. var n = /<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;
  2837. return e.cloneNode(!1).outerHTML.replace(n, "").replace(/[\w:\-]+/gi, function(e) {
  2838. t.push({
  2839. specified: 1,
  2840. nodeName: e
  2841. })
  2842. }), t
  2843. }
  2844. return e.attributes
  2845. },
  2846. isEmpty: function(e, t) {
  2847. var n = this,
  2848. r, i, a, s, l, c = 0;
  2849. if (e = e.firstChild) {
  2850. s = new o(e, e.parentNode), t = t || (n.schema ? n.schema.getNonEmptyElements() : null);
  2851. do {
  2852. if (a = e.nodeType, 1 === a) {
  2853. var u = e.getAttribute("data-mce-bogus");
  2854. if (u) {
  2855. e = s.next("all" === u);
  2856. continue
  2857. }
  2858. if (l = e.nodeName.toLowerCase(), t && t[l]) {
  2859. if ("br" === l) {
  2860. c++, e = s.next();
  2861. continue
  2862. }
  2863. return !1
  2864. }
  2865. for (i = n.getAttribs(e), r = i.length; r--;)
  2866. if (l = i[r].nodeName, "name" === l || "data-mce-bookmark" === l) return !1
  2867. }
  2868. if (8 == a) return !1;
  2869. if (3 === a && !x.test(e.nodeValue)) return !1;
  2870. e = s.next()
  2871. } while (e)
  2872. }
  2873. return c <= 1
  2874. },
  2875. createRng: function() {
  2876. var e = this.doc;
  2877. return e.createRange ? e.createRange() : new a(this)
  2878. },
  2879. nodeIndex: h,
  2880. split: function(e, t, n) {
  2881. function r(e) {
  2882. function t(e) {
  2883. var t = e.previousSibling && "SPAN" == e.previousSibling.nodeName,
  2884. n = e.nextSibling && "SPAN" == e.nextSibling.nodeName;
  2885. return t && n
  2886. }
  2887. var n, o = e.childNodes,
  2888. a = e.nodeType;
  2889. if (1 != a || "bookmark" != e.getAttribute("data-mce-type")) {
  2890. for (n = o.length - 1; n >= 0; n--) r(o[n]);
  2891. if (9 != a) {
  2892. if (3 == a && e.nodeValue.length > 0) {
  2893. var s = y(e.nodeValue).length;
  2894. if (!i.isBlock(e.parentNode) || s > 0 || 0 === s && t(e)) return
  2895. } else if (1 == a && (o = e.childNodes, 1 == o.length && o[0] && 1 == o[0].nodeType && "bookmark" == o[0].getAttribute("data-mce-type") && e.parentNode.insertBefore(o[0], e), o.length || /^(br|hr|input|img)$/i.test(e.nodeName))) return;
  2896. i.remove(e)
  2897. }
  2898. return e
  2899. }
  2900. }
  2901. var i = this,
  2902. o = i.createRng(),
  2903. a, s, l;
  2904. if (e && t) return o.setStart(e.parentNode, i.nodeIndex(e)), o.setEnd(t.parentNode, i.nodeIndex(t)), a = o.extractContents(), o = i.createRng(), o.setStart(t.parentNode, i.nodeIndex(t) + 1), o.setEnd(e.parentNode, i.nodeIndex(e) + 1), s = o.extractContents(), l = e.parentNode, l.insertBefore(r(a), e), n ? l.insertBefore(n, e) : l.insertBefore(t, e), l.insertBefore(r(s), e), i.remove(e), n || t
  2905. },
  2906. bind: function(e, t, n, r) {
  2907. var i = this;
  2908. if (c.isArray(e)) {
  2909. for (var o = e.length; o--;) e[o] = i.bind(e[o], t, n, r);
  2910. return e
  2911. }
  2912. return !i.settings.collect || e !== i.doc && e !== i.win || i.boundEvents.push([e, t, n, r]), i.events.bind(e, t, n, r || i)
  2913. },
  2914. unbind: function(e, t, n) {
  2915. var r = this,
  2916. i;
  2917. if (c.isArray(e)) {
  2918. for (i = e.length; i--;) e[i] = r.unbind(e[i], t, n);
  2919. return e
  2920. }
  2921. if (r.boundEvents && (e === r.doc || e === r.win))
  2922. for (i = r.boundEvents.length; i--;) {
  2923. var o = r.boundEvents[i];
  2924. e != o[0] || t && t != o[1] || n && n != o[2] || this.events.unbind(o[0], o[1], o[2])
  2925. }
  2926. return this.events.unbind(e, t, n)
  2927. },
  2928. fire: function(e, t, n) {
  2929. return this.events.fire(e, t, n)
  2930. },
  2931. getContentEditable: function(e) {
  2932. var t;
  2933. return e && 1 == e.nodeType ? (t = e.getAttribute("data-mce-contenteditable"), t && "inherit" !== t ? t : "inherit" !== e.contentEditable ? e.contentEditable : null) : null
  2934. },
  2935. getContentEditableParent: function(e) {
  2936. for (var t = this.getRoot(), n = null; e && e !== t && (n = this.getContentEditable(e), null === n); e = e.parentNode);
  2937. return n
  2938. },
  2939. destroy: function() {
  2940. var t = this;
  2941. if (t.boundEvents) {
  2942. for (var n = t.boundEvents.length; n--;) {
  2943. var r = t.boundEvents[n];
  2944. this.events.unbind(r[0], r[1], r[2])
  2945. }
  2946. t.boundEvents = null
  2947. }
  2948. e.setDocument && e.setDocument(), t.win = t.doc = t.root = t.events = t.frag = null
  2949. },
  2950. isChildOf: function(e, t) {
  2951. for (; e;) {
  2952. if (t === e) return !0;
  2953. e = e.parentNode
  2954. }
  2955. return !1
  2956. },
  2957. dumpRng: function(e) {
  2958. return "startContainer: " + e.startContainer.nodeName + ", startOffset: " + e.startOffset + ", endContainer: " + e.endContainer.nodeName + ", endOffset: " + e.endOffset
  2959. },
  2960. _findSib: function(e, t, n) {
  2961. var r = this,
  2962. i = t;
  2963. if (e)
  2964. for ("string" == typeof i && (i = function(e) {
  2965. return r.is(e, t)
  2966. }), e = e[n]; e; e = e[n])
  2967. if (i(e)) return e;
  2968. return null
  2969. }
  2970. }, p.DOM = new p(document), p.nodeIndex = h, p
  2971. }), r(E, [w, m], function(e, t) {
  2972. function n() {
  2973. function e(e, n) {
  2974. function i() {
  2975. a.remove(l), s && (s.onreadystatechange = s.onload = s = null), n()
  2976. }
  2977. function o() {
  2978. "undefined" != typeof console && console.log && console.log("Failed to load: " + e)
  2979. }
  2980. var a = r,
  2981. s, l;
  2982. l = a.uniqueId(), s = document.createElement("script"), s.id = l, s.type = "text/javascript", s.src = t._addCacheSuffix(e), "onreadystatechange" in s ? s.onreadystatechange = function() {
  2983. /loaded|complete/.test(s.readyState) && i()
  2984. } : s.onload = i, s.onerror = o, (document.getElementsByTagName("head")[0] || document.body).appendChild(s)
  2985. }
  2986. var n = 0,
  2987. a = 1,
  2988. s = 2,
  2989. l = {},
  2990. c = [],
  2991. u = {},
  2992. d = [],
  2993. f = 0,
  2994. h;
  2995. this.isDone = function(e) {
  2996. return l[e] == s
  2997. }, this.markDone = function(e) {
  2998. l[e] = s
  2999. }, this.add = this.load = function(e, t, r) {
  3000. var i = l[e];
  3001. i == h && (c.push(e), l[e] = n), t && (u[e] || (u[e] = []), u[e].push({
  3002. func: t,
  3003. scope: r || this
  3004. }))
  3005. }, this.remove = function(e) {
  3006. delete l[e], delete u[e]
  3007. }, this.loadQueue = function(e, t) {
  3008. this.loadScripts(c, e, t)
  3009. }, this.loadScripts = function(t, n, r) {
  3010. function c(e) {
  3011. i(u[e], function(e) {
  3012. e.func.call(e.scope)
  3013. }), u[e] = h
  3014. }
  3015. var p;
  3016. d.push({
  3017. func: n,
  3018. scope: r || this
  3019. }), (p = function() {
  3020. var n = o(t);
  3021. t.length = 0, i(n, function(t) {
  3022. return l[t] == s ? void c(t) : void(l[t] != a && (l[t] = a, f++, e(t, function() {
  3023. l[t] = s, f--, c(t), p()
  3024. })))
  3025. }), f || (i(d, function(e) {
  3026. e.func.call(e.scope)
  3027. }), d.length = 0)
  3028. })()
  3029. }
  3030. }
  3031. var r = e.DOM,
  3032. i = t.each,
  3033. o = t.grep;
  3034. return n.ScriptLoader = new n, n
  3035. }), r(N, [E, m], function(e, n) {
  3036. function r() {
  3037. var e = this;
  3038. e.items = [], e.urls = {}, e.lookup = {}
  3039. }
  3040. var i = n.each;
  3041. return r.prototype = {
  3042. get: function(e) {
  3043. return this.lookup[e] ? this.lookup[e].instance : t
  3044. },
  3045. dependencies: function(e) {
  3046. var t;
  3047. return this.lookup[e] && (t = this.lookup[e].dependencies), t || []
  3048. },
  3049. requireLangPack: function(t, n) {
  3050. var i = r.language;
  3051. if (i && r.languageLoad !== !1) {
  3052. if (n)
  3053. if (n = "," + n + ",", n.indexOf("," + i.substr(0, 2) + ",") != -1) i = i.substr(0, 2);
  3054. else if (n.indexOf("," + i + ",") == -1) return;
  3055. e.ScriptLoader.add(this.urls[t] + "/langs/" + i + ".js")
  3056. }
  3057. },
  3058. add: function(e, t, n) {
  3059. return this.items.push(t), this.lookup[e] = {
  3060. instance: t,
  3061. dependencies: n
  3062. }, t
  3063. },
  3064. remove: function(e) {
  3065. delete this.urls[e], delete this.lookup[e]
  3066. },
  3067. createUrl: function(e, t) {
  3068. return "object" == typeof t ? t : {
  3069. prefix: e.prefix,
  3070. resource: t,
  3071. suffix: e.suffix
  3072. }
  3073. },
  3074. addComponents: function(t, n) {
  3075. var r = this.urls[t];
  3076. i(n, function(t) {
  3077. e.ScriptLoader.add(r + "/" + t)
  3078. })
  3079. },
  3080. load: function(n, o, a, s) {
  3081. function l() {
  3082. var r = c.dependencies(n);
  3083. i(r, function(e) {
  3084. var n = c.createUrl(o, e);
  3085. c.load(n.resource, n, t, t)
  3086. }), a && (s ? a.call(s) : a.call(e))
  3087. }
  3088. var c = this,
  3089. u = o;
  3090. c.urls[n] || ("object" == typeof o && (u = o.prefix + o.resource + o.suffix), 0 !== u.indexOf("/") && u.indexOf("://") == -1 && (u = r.baseURL + "/" + u), c.urls[n] = u.substring(0, u.lastIndexOf("/")), c.lookup[n] ? l() : e.ScriptLoader.add(u, l, s))
  3091. }
  3092. }, r.PluginManager = new r, r.ThemeManager = new r, r
  3093. }), r(_, [], function() {
  3094. function e(e) {
  3095. return function(t) {
  3096. return !!t && t.nodeType == e
  3097. }
  3098. }
  3099. function t(e) {
  3100. return e = e.toLowerCase().split(" "),
  3101. function(t) {
  3102. var n, r;
  3103. if (t && t.nodeType)
  3104. for (r = t.nodeName.toLowerCase(), n = 0; n < e.length; n++)
  3105. if (r === e[n]) return !0;
  3106. return !1
  3107. }
  3108. }
  3109. function n(e, t) {
  3110. return t = t.toLowerCase().split(" "),
  3111. function(n) {
  3112. var r, i;
  3113. if (s(n))
  3114. for (r = 0; r < t.length; r++)
  3115. if (i = getComputedStyle(n, null).getPropertyValue(e), i === t[r]) return !0;
  3116. return !1
  3117. }
  3118. }
  3119. function r(e, t) {
  3120. return function(n) {
  3121. return s(n) && n[e] === t
  3122. }
  3123. }
  3124. function i(e, t) {
  3125. return function(n) {
  3126. return s(n) && n.getAttribute(e) === t
  3127. }
  3128. }
  3129. function o(e) {
  3130. return s(e) && e.hasAttribute("data-mce-bogus")
  3131. }
  3132. function a(e) {
  3133. return function(t) {
  3134. if (s(t)) {
  3135. if (t.contentEditable === e) return !0;
  3136. if (t.getAttribute("data-mce-contenteditable") === e) return !0
  3137. }
  3138. return !1
  3139. }
  3140. }
  3141. var s = e(1);
  3142. return {
  3143. isText: e(3),
  3144. isElement: s,
  3145. isComment: e(8),
  3146. isBr: t("br"),
  3147. isContentEditableTrue: a("true"),
  3148. isContentEditableFalse: a("false"),
  3149. matchNodeNames: t,
  3150. hasPropValue: r,
  3151. hasAttributeValue: i,
  3152. matchStyleValues: n,
  3153. isBogus: o
  3154. }
  3155. }), r(S, [], function() {
  3156. function e(e) {
  3157. return e == n
  3158. }
  3159. function t(e) {
  3160. return e.replace(new RegExp(n, "g"), "")
  3161. }
  3162. var n = "\ufeff";
  3163. return {
  3164. isZwsp: e,
  3165. ZWSP: n,
  3166. trim: t
  3167. }
  3168. }), r(k, [_, S], function(e, t) {
  3169. function n(e) {
  3170. return y(e) && (e = e.parentNode), v(e) && e.hasAttribute("data-mce-caret")
  3171. }
  3172. function r(e) {
  3173. return y(e) && t.isZwsp(e.data)
  3174. }
  3175. function i(e) {
  3176. return n(e) || r(e)
  3177. }
  3178. function o(e) {
  3179. var t = e.parentNode;
  3180. t && t.removeChild(e)
  3181. }
  3182. function a(e) {
  3183. try {
  3184. return e.nodeValue
  3185. } catch (t) {
  3186. return ""
  3187. }
  3188. }
  3189. function s(e, t) {
  3190. 0 === t.length ? o(e) : e.nodeValue = t
  3191. }
  3192. function l(e, n) {
  3193. var r, o, a, s;
  3194. if (r = e.ownerDocument, a = r.createTextNode(t.ZWSP), s = e.parentNode, n) {
  3195. if (o = e.previousSibling, y(o)) {
  3196. if (i(o)) return o;
  3197. if (p(o)) return o.splitText(o.data.length - 1)
  3198. }
  3199. s.insertBefore(a, e)
  3200. } else {
  3201. if (o = e.nextSibling, y(o)) {
  3202. if (i(o)) return o;
  3203. if (h(o)) return o.splitText(1), o
  3204. }
  3205. e.nextSibling ? s.insertBefore(a, e.nextSibling) : s.appendChild(a)
  3206. }
  3207. return a
  3208. }
  3209. function c() {
  3210. var e = document.createElement("br");
  3211. return e.setAttribute("data-mce-bogus", "1"), e
  3212. }
  3213. function u(e, t, n) {
  3214. var r, i, o;
  3215. return r = t.ownerDocument, i = r.createElement(e), i.setAttribute("data-mce-caret", n ? "before" : "after"), i.setAttribute("data-mce-bogus", "all"), i.appendChild(c()), o = t.parentNode, n ? o.insertBefore(i, t) : t.nextSibling ? o.insertBefore(i, t.nextSibling) : o.appendChild(i), i
  3216. }
  3217. function d(t) {
  3218. return t.firstChild !== t.lastChild || !e.isBr(t.firstChild)
  3219. }
  3220. function f(e) {
  3221. if (v(e) && i(e) && (d(e) ? e.removeAttribute("data-mce-caret") : o(e)), y(e)) {
  3222. var n = t.trim(a(e));
  3223. s(e, n)
  3224. }
  3225. }
  3226. function h(e) {
  3227. return y(e) && e.data[0] == t.ZWSP
  3228. }
  3229. function p(e) {
  3230. return y(e) && e.data[e.data.length - 1] == t.ZWSP
  3231. }
  3232. function m(t) {
  3233. var n = t.getElementsByTagName("br"),
  3234. r = n[n.length - 1];
  3235. e.isBogus(r) && r.parentNode.removeChild(r)
  3236. }
  3237. function g(e) {
  3238. return e && e.hasAttribute("data-mce-caret") ? (m(e), e.removeAttribute("data-mce-caret"), e.removeAttribute("data-mce-bogus"), e.removeAttribute("style"), e.removeAttribute("_moz_abspos"), e) : null
  3239. }
  3240. var v = e.isElement,
  3241. y = e.isText;
  3242. return {
  3243. isCaretContainer: i,
  3244. isCaretContainerBlock: n,
  3245. isCaretContainerInline: r,
  3246. showCaretContainerBlock: g,
  3247. insertInline: l,
  3248. insertBlock: u,
  3249. hasContent: d,
  3250. remove: f,
  3251. startsWithCaretContainer: h,
  3252. endsWithCaretContainer: p
  3253. }
  3254. }), r(T, [m, y, _, b, k], function(e, t, n, r, i) {
  3255. function o(e) {
  3256. return m(e) || g(e)
  3257. }
  3258. function a(e, t) {
  3259. var n = e.childNodes;
  3260. return t--, t > n.length - 1 ? t = n.length - 1 : t < 0 && (t = 0), n[t] || e
  3261. }
  3262. function s(e, t, n) {
  3263. for (; e && e !== t;) {
  3264. if (n(e)) return e;
  3265. e = e.parentNode
  3266. }
  3267. return null
  3268. }
  3269. function l(e, t, n) {
  3270. return null !== s(e, t, n)
  3271. }
  3272. function c(e) {
  3273. return "_mce_caret" === e.id
  3274. }
  3275. function u(e, t) {
  3276. return v(e) && l(e, t, c) === !1
  3277. }
  3278. function d(e) {
  3279. this.walk = function(t, n) {
  3280. function r(e) {
  3281. var t;
  3282. return t = e[0], 3 === t.nodeType && t === l && c >= t.nodeValue.length && e.splice(0, 1), t = e[e.length - 1], 0 === d && e.length > 0 && t === u && 3 === t.nodeType && e.splice(e.length - 1, 1), e
  3283. }
  3284. function i(e, t, n) {
  3285. for (var r = []; e && e != n; e = e[t]) r.push(e);
  3286. return r
  3287. }
  3288. function o(e, t) {
  3289. do {
  3290. if (e.parentNode == t) return e;
  3291. e = e.parentNode
  3292. } while (e)
  3293. }
  3294. function s(e, t, o) {
  3295. var a = o ? "nextSibling" : "previousSibling";
  3296. for (g = e, v = g.parentNode; g && g != t; g = v) v = g.parentNode, y = i(g == e ? g : g[a], a), y.length && (o || y.reverse(), n(r(y)))
  3297. }
  3298. var l = t.startContainer,
  3299. c = t.startOffset,
  3300. u = t.endContainer,
  3301. d = t.endOffset,
  3302. f, h, m, g, v, y, b;
  3303. if (b = e.select("td[data-mce-selected],th[data-mce-selected]"), b.length > 0) return void p(b, function(e) {
  3304. n([e])
  3305. });
  3306. if (1 == l.nodeType && l.hasChildNodes() && (l = l.childNodes[c]), 1 == u.nodeType && u.hasChildNodes() && (u = a(u, d)), l == u) return n(r([l]));
  3307. for (f = e.findCommonAncestor(l, u), g = l; g; g = g.parentNode) {
  3308. if (g === u) return s(l, f, !0);
  3309. if (g === f) break
  3310. }
  3311. for (g = u; g; g = g.parentNode) {
  3312. if (g === l) return s(u, f);
  3313. if (g === f) break
  3314. }
  3315. h = o(l, f) || l, m = o(u, f) || u, s(l, h, !0), y = i(h == l ? h : h.nextSibling, "nextSibling", m == u ? m.nextSibling : m), y.length && n(r(y)), s(u, m)
  3316. }, this.split = function(e) {
  3317. function t(e, t) {
  3318. return e.splitText(t)
  3319. }
  3320. var n = e.startContainer,
  3321. r = e.startOffset,
  3322. i = e.endContainer,
  3323. o = e.endOffset;
  3324. return n == i && 3 == n.nodeType ? r > 0 && r < n.nodeValue.length && (i = t(n, r), n = i.previousSibling, o > r ? (o -= r, n = i = t(i, o).previousSibling, o = i.nodeValue.length, r = 0) : o = 0) : (3 == n.nodeType && r > 0 && r < n.nodeValue.length && (n = t(n, r), r = 0), 3 == i.nodeType && o > 0 && o < i.nodeValue.length && (i = t(i, o).previousSibling, o = i.nodeValue.length)), {
  3325. startContainer: n,
  3326. startOffset: r,
  3327. endContainer: i,
  3328. endOffset: o
  3329. }
  3330. }, this.normalize = function(n) {
  3331. function r(r) {
  3332. function a(e) {
  3333. return e && /^(TD|TH|CAPTION)$/.test(e.nodeName)
  3334. }
  3335. function s(n, r) {
  3336. for (var i = new t(n, e.getParent(n.parentNode, e.isBlock) || m); n = i[r ? "prev" : "next"]();)
  3337. if ("BR" === n.nodeName) return !0
  3338. }
  3339. function l(e) {
  3340. for (; e && e != m;) {
  3341. if (g(e)) return !0;
  3342. e = e.parentNode
  3343. }
  3344. return !1
  3345. }
  3346. function c(e, t) {
  3347. return e.previousSibling && e.previousSibling.nodeName == t
  3348. }
  3349. function d(n, r) {
  3350. var a, s, l;
  3351. if (r = r || f, l = e.getParent(r.parentNode, e.isBlock) || m, n && "BR" == r.nodeName && x && e.isEmpty(l)) return f = r.parentNode, h = e.nodeIndex(r), void(i = !0);
  3352. for (a = new t(r, l); y = a[n ? "prev" : "next"]();) {
  3353. if ("false" === e.getContentEditableParent(y) || u(y, e.getRoot())) return;
  3354. if (3 === y.nodeType && y.nodeValue.length > 0) return f = y, h = n ? y.nodeValue.length : 0, void(i = !0);
  3355. if (e.isBlock(y) || b[y.nodeName.toLowerCase()]) return;
  3356. s = y
  3357. }
  3358. o && s && (f = s, i = !0, h = 0)
  3359. }
  3360. var f, h, p, m = e.getRoot(),
  3361. y, b, C, x;
  3362. if (f = n[(r ? "start" : "end") + "Container"], h = n[(r ? "start" : "end") + "Offset"], x = 1 == f.nodeType && h === f.childNodes.length, b = e.schema.getNonEmptyElements(), C = r, !v(f)) {
  3363. if (1 == f.nodeType && h > f.childNodes.length - 1 && (C = !1), 9 === f.nodeType && (f = e.getRoot(), h = 0), f === m) {
  3364. if (C && (y = f.childNodes[h > 0 ? h - 1 : 0])) {
  3365. if (v(y)) return;
  3366. if (b[y.nodeName] || "TABLE" == y.nodeName) return
  3367. }
  3368. if (f.hasChildNodes()) {
  3369. if (h = Math.min(!C && h > 0 ? h - 1 : h, f.childNodes.length - 1), f = f.childNodes[h], h = 0, !o && f === m.lastChild && "TABLE" === f.nodeName) return;
  3370. if (l(f) || v(f)) return;
  3371. if (f.hasChildNodes() && !/TABLE/.test(f.nodeName)) {
  3372. y = f, p = new t(f, m);
  3373. do {
  3374. if (g(y) || v(y)) {
  3375. i = !1;
  3376. break
  3377. }
  3378. if (3 === y.nodeType && y.nodeValue.length > 0) {
  3379. h = C ? 0 : y.nodeValue.length, f = y, i = !0;
  3380. break
  3381. }
  3382. if (b[y.nodeName.toLowerCase()] && !a(y)) {
  3383. h = e.nodeIndex(y), f = y.parentNode, "IMG" != y.nodeName || C || h++, i = !0;
  3384. break
  3385. }
  3386. } while (y = C ? p.next() : p.prev())
  3387. }
  3388. }
  3389. }
  3390. o && (3 === f.nodeType && 0 === h && d(!0), 1 === f.nodeType && (y = f.childNodes[h], y || (y = f.childNodes[h - 1]), !y || "BR" !== y.nodeName || c(y, "A") || s(y) || s(y, !0) || d(!0, y))), C && !o && 3 === f.nodeType && h === f.nodeValue.length && d(!1), i && n["set" + (r ? "Start" : "End")](f, h)
  3391. }
  3392. }
  3393. var i, o;
  3394. return o = n.collapsed, r(!0), o || r(), i && o && n.collapse(!0), i
  3395. }
  3396. }
  3397. function f(t, n, r) {
  3398. var i, o, a;
  3399. if (i = r.elementFromPoint(t, n), o = r.body.createTextRange(), i && "HTML" != i.tagName || (i = r.body), o.moveToElementText(i), a = e.toArray(o.getClientRects()), a = a.sort(function(e, t) {
  3400. return e = Math.abs(Math.max(e.top - n, e.bottom - n)), t = Math.abs(Math.max(t.top - n, t.bottom - n)), e - t
  3401. }), a.length > 0) {
  3402. n = (a[0].bottom + a[0].top) / 2;
  3403. try {
  3404. return o.moveToPoint(t, n), o.collapse(!0), o
  3405. } catch (s) {}
  3406. }
  3407. return null
  3408. }
  3409. function h(e, t) {
  3410. var n = e && e.parentElement ? e.parentElement() : null;
  3411. return g(s(n, t, o)) ? null : e
  3412. }
  3413. var p = e.each,
  3414. m = n.isContentEditableTrue,
  3415. g = n.isContentEditableFalse,
  3416. v = i.isCaretContainer;
  3417. return d.compareRanges = function(e, t) {
  3418. if (e && t) {
  3419. if (!e.item && !e.duplicate) return e.startContainer == t.startContainer && e.startOffset == t.startOffset;
  3420. if (e.item && t.item && e.item(0) === t.item(0)) return !0;
  3421. if (e.isEqual && t.isEqual && t.isEqual(e)) return !0
  3422. }
  3423. return !1
  3424. }, d.getCaretRangeFromPoint = function(e, t, n) {
  3425. var r, i;
  3426. if (n.caretPositionFromPoint) i = n.caretPositionFromPoint(e, t), r = n.createRange(), r.setStart(i.offsetNode, i.offset), r.collapse(!0);
  3427. else if (n.caretRangeFromPoint) r = n.caretRangeFromPoint(e, t);
  3428. else if (n.body.createTextRange) {
  3429. r = n.body.createTextRange();
  3430. try {
  3431. r.moveToPoint(e, t), r.collapse(!0)
  3432. } catch (o) {
  3433. r = f(e, t, n)
  3434. }
  3435. return h(r, n.body)
  3436. }
  3437. return r
  3438. }, d.getSelectedNode = function(e) {
  3439. var t = e.startContainer,
  3440. n = e.startOffset;
  3441. return t.hasChildNodes() && e.endOffset == n + 1 ? t.childNodes[n] : null
  3442. }, d.getNode = function(e, t) {
  3443. return 1 == e.nodeType && e.hasChildNodes() && (t >= e.childNodes.length && (t = e.childNodes.length - 1), e = e.childNodes[t]), e
  3444. }, d
  3445. }), r(R, [T, d, u], function(e, t, n) {
  3446. return function(r) {
  3447. function i(e) {
  3448. var t, n;
  3449. if (n = r.$(e).parentsUntil(r.getBody()).add(e), n.length === a.length) {
  3450. for (t = n.length; t >= 0 && n[t] === a[t]; t--);
  3451. if (t === -1) return a = n, !0
  3452. }
  3453. return a = n, !1
  3454. }
  3455. var o, a = [];
  3456. "onselectionchange" in r.getDoc() || r.on("NodeChange Click MouseUp KeyUp Focus", function(t) {
  3457. var n, i;
  3458. n = r.selection.getRng(), i = {
  3459. startContainer: n.startContainer,
  3460. startOffset: n.startOffset,
  3461. endContainer: n.endContainer,
  3462. endOffset: n.endOffset
  3463. }, "nodechange" != t.type && e.compareRanges(i, o) || r.fire("SelectionChange"), o = i
  3464. }), r.on("contextmenu", function() {
  3465. r.fire("SelectionChange")
  3466. }), r.on("SelectionChange", function() {
  3467. var e = r.selection.getStart(!0);
  3468. !t.range && r.selection.isCollapsed() || !i(e) && r.dom.isChildOf(e, r.getBody()) && r.nodeChanged({
  3469. selectionChange: !0
  3470. })
  3471. }), r.on("MouseUp", function(e) {
  3472. e.isDefaultPrevented() || ("IMG" == r.selection.getNode().nodeName ? n.setEditorTimeout(r, function() {
  3473. r.nodeChanged()
  3474. }) : r.nodeChanged())
  3475. }), this.nodeChanged = function(e) {
  3476. var t = r.selection,
  3477. n, i, o;
  3478. r.initialized && t && !r.settings.disable_nodechange && !r.readonly && (o = r.getBody(), n = t.getStart() || o, n.ownerDocument == r.getDoc() && r.dom.isChildOf(n, o) || (n = o), "IMG" == n.nodeName && t.isCollapsed() && (n = n.parentNode), i = [], r.dom.getParent(n, function(e) {
  3479. return e === o || void i.push(e)
  3480. }), e = e || {}, e.element = n, e.parents = i, r.fire("NodeChange", e))
  3481. }
  3482. }
  3483. }), r(A, [], function() {
  3484. function e(e, t, n) {
  3485. var r, i, o = n ? "lastChild" : "firstChild",
  3486. a = n ? "prev" : "next";
  3487. if (e[o]) return e[o];
  3488. if (e !== t) {
  3489. if (r = e[a]) return r;
  3490. for (i = e.parent; i && i !== t; i = i.parent)
  3491. if (r = i[a]) return r
  3492. }
  3493. }
  3494. function t(e, t) {
  3495. this.name = e, this.type = t, 1 === t && (this.attributes = [], this.attributes.map = {})
  3496. }
  3497. var n = /^[ \t\r\n]*$/,
  3498. r = {
  3499. "#text": 3,
  3500. "#comment": 8,
  3501. "#cdata": 4,
  3502. "#pi": 7,
  3503. "#doctype": 10,
  3504. "#document-fragment": 11
  3505. };
  3506. return t.prototype = {
  3507. replace: function(e) {
  3508. var t = this;
  3509. return e.parent && e.remove(), t.insert(e, t), t.remove(), t
  3510. },
  3511. attr: function(e, t) {
  3512. var n = this,
  3513. r, i, o;
  3514. if ("string" != typeof e) {
  3515. for (i in e) n.attr(i, e[i]);
  3516. return n
  3517. }
  3518. if (r = n.attributes) {
  3519. if (t !== o) {
  3520. if (null === t) {
  3521. if (e in r.map)
  3522. for (delete r.map[e], i = r.length; i--;)
  3523. if (r[i].name === e) return r = r.splice(i, 1), n;
  3524. return n
  3525. }
  3526. if (e in r.map) {
  3527. for (i = r.length; i--;)
  3528. if (r[i].name === e) {
  3529. r[i].value = t;
  3530. break
  3531. }
  3532. } else r.push({
  3533. name: e,
  3534. value: t
  3535. });
  3536. return r.map[e] = t, n
  3537. }
  3538. return r.map[e]
  3539. }
  3540. },
  3541. clone: function() {
  3542. var e = this,
  3543. n = new t(e.name, e.type),
  3544. r, i, o, a, s;
  3545. if (o = e.attributes) {
  3546. for (s = [], s.map = {}, r = 0, i = o.length; r < i; r++) a = o[r], "id" !== a.name && (s[s.length] = {
  3547. name: a.name,
  3548. value: a.value
  3549. }, s.map[a.name] = a.value);
  3550. n.attributes = s
  3551. }
  3552. return n.value = e.value, n.shortEnded = e.shortEnded, n
  3553. },
  3554. wrap: function(e) {
  3555. var t = this;
  3556. return t.parent.insert(e, t), e.append(t), t
  3557. },
  3558. unwrap: function() {
  3559. var e = this,
  3560. t, n;
  3561. for (t = e.firstChild; t;) n = t.next, e.insert(t, e, !0), t = n;
  3562. e.remove()
  3563. },
  3564. remove: function() {
  3565. var e = this,
  3566. t = e.parent,
  3567. n = e.next,
  3568. r = e.prev;
  3569. return t && (t.firstChild === e ? (t.firstChild = n, n && (n.prev = null)) : r.next = n, t.lastChild === e ? (t.lastChild = r, r && (r.next = null)) : n.prev = r, e.parent = e.next = e.prev = null), e
  3570. },
  3571. append: function(e) {
  3572. var t = this,
  3573. n;
  3574. return e.parent && e.remove(), n = t.lastChild, n ? (n.next = e, e.prev = n, t.lastChild = e) : t.lastChild = t.firstChild = e, e.parent = t, e
  3575. },
  3576. insert: function(e, t, n) {
  3577. var r;
  3578. return e.parent && e.remove(), r = t.parent || this, n ? (t === r.firstChild ? r.firstChild = e : t.prev.next = e, e.prev = t.prev, e.next = t, t.prev = e) : (t === r.lastChild ? r.lastChild = e : t.next.prev = e, e.next = t.next, e.prev = t, t.next = e), e.parent = r, e
  3579. },
  3580. getAll: function(t) {
  3581. var n = this,
  3582. r, i = [];
  3583. for (r = n.firstChild; r; r = e(r, n)) r.name === t && i.push(r);
  3584. return i
  3585. },
  3586. empty: function() {
  3587. var t = this,
  3588. n, r, i;
  3589. if (t.firstChild) {
  3590. for (n = [], i = t.firstChild; i; i = e(i, t)) n.push(i);
  3591. for (r = n.length; r--;) i = n[r], i.parent = i.firstChild = i.lastChild = i.next = i.prev = null
  3592. }
  3593. return t.firstChild = t.lastChild = null, t
  3594. },
  3595. isEmpty: function(t) {
  3596. var r = this,
  3597. i = r.firstChild,
  3598. o, a;
  3599. if (i)
  3600. do {
  3601. if (1 === i.type) {
  3602. if (i.attributes.map["data-mce-bogus"]) continue;
  3603. if (t[i.name]) return !1;
  3604. for (o = i.attributes.length; o--;)
  3605. if (a = i.attributes[o].name, "name" === a || 0 === a.indexOf("data-mce-bookmark")) return !1
  3606. }
  3607. if (8 === i.type) return !1;
  3608. if (3 === i.type && !n.test(i.value)) return !1
  3609. } while (i = e(i, r));
  3610. return !0
  3611. },
  3612. walk: function(t) {
  3613. return e(this, null, t)
  3614. }
  3615. }, t.create = function(e, n) {
  3616. var i, o;
  3617. if (i = new t(e, r[e] || 1), n)
  3618. for (o in n) i.attr(o, n[o]);
  3619. return i
  3620. }, t
  3621. }), r(B, [m], function(e) {
  3622. function t(t, n) {
  3623. return t = e.trim(t), t ? t.split(n || " ") : []
  3624. }
  3625. function n(e) {
  3626. function n(e, n, r) {
  3627. function i(e, t) {
  3628. var n = {},
  3629. r, i;
  3630. for (r = 0, i = e.length; r < i; r++) n[e[r]] = t || {};
  3631. return n
  3632. }
  3633. var s, c, u;
  3634. for (r = r || [], n = n || "", "string" == typeof r && (r = t(r)), e = t(e), s = e.length; s--;) c = t([l, n].join(" ")), u = {
  3635. attributes: i(c),
  3636. attributesOrder: c,
  3637. children: i(r, o)
  3638. }, a[e[s]] = u
  3639. }
  3640. function r(e, n) {
  3641. var r, i, o, s;
  3642. for (e = t(e), r = e.length, n = t(n); r--;)
  3643. for (i = a[e[r]], o = 0, s = n.length; o < s; o++) i.attributes[n[o]] = {}, i.attributesOrder.push(n[o])
  3644. }
  3645. var a = {},
  3646. l, c, u, d, f, h;
  3647. return i[e] ? i[e] : (l = "id accesskey class dir lang style tabindex title", c = "address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul", u = "a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment", "html4" != e && (l += " contenteditable contextmenu draggable dropzone hidden spellcheck translate", c += " article aside details dialog figure header footer hgroup section nav", u += " audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"), "html5-strict" != e && (l += " xml:lang", h = "acronym applet basefont big font strike tt", u = [u, h].join(" "), s(t(h), function(e) {
  3648. n(e, "", u)
  3649. }), f = "center dir isindex noframes", c = [c, f].join(" "), d = [c, u].join(" "), s(t(f), function(e) {
  3650. n(e, "", d)
  3651. })), d = d || [c, u].join(" "), n("html", "manifest", "head body"), n("head", "", "base command link meta noscript script style title"), n("title hr noscript br"), n("base", "href target"), n("link", "href rel media hreflang type sizes hreflang"), n("meta", "name http-equiv content charset"), n("style", "media type scoped"), n("script", "src async defer type charset"), n("body", "onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload", d), n("address dt dd div caption", "", d), n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn", "", u), n("blockquote", "cite", d), n("ol", "reversed start type", "li"), n("ul", "", "li"), n("li", "value", d), n("dl", "", "dt dd"), n("a", "href target rel media hreflang type", u), n("q", "cite", u), n("ins del", "cite datetime", d), n("img", "src sizes srcset alt usemap ismap width height"), n("iframe", "src name width height", d), n("embed", "src type width height"), n("object", "data type typemustmatch name usemap form width height", [d, "param"].join(" ")), n("param", "name value"), n("map", "name", [d, "area"].join(" ")), n("area", "alt coords shape href target rel media hreflang type"), n("table", "border", "caption colgroup thead tfoot tbody tr" + ("html4" == e ? " col" : "")), n("colgroup", "span", "col"), n("col", "span"), n("tbody thead tfoot", "", "tr"), n("tr", "", "td th"), n("td", "colspan rowspan headers", d), n("th", "colspan rowspan headers scope abbr", d), n("form", "accept-charset action autocomplete enctype method name novalidate target", d), n("fieldset", "disabled form name", [d, "legend"].join(" ")), n("label", "form for", u), n("input", "accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"), n("button", "disabled form formaction formenctype formmethod formnovalidate formtarget name type value", "html4" == e ? d : u), n("select", "disabled form multiple name required size", "option optgroup"), n("optgroup", "disabled label", "option"), n("option", "disabled label selected value"), n("textarea", "cols dirname disabled form maxlength name readonly required rows wrap"), n("menu", "type label", [d, "li"].join(" ")), n("noscript", "", d), "html4" != e && (n("wbr"), n("ruby", "", [u, "rt rp"].join(" ")), n("figcaption", "", d), n("mark rt rp summary bdi", "", u), n("canvas", "width height", d), n("video", "src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered", [d, "track source"].join(" ")), n("audio", "src crossorigin preload autoplay mediagroup loop muted controls buffered volume", [d, "track source"].join(" ")), n("picture", "", "img source"), n("source", "src srcset type media sizes"), n("track", "kind src srclang label default"), n("datalist", "", [u, "option"].join(" ")), n("article section nav aside header footer", "", d), n("hgroup", "", "h1 h2 h3 h4 h5 h6"), n("figure", "", [d, "figcaption"].join(" ")), n("time", "datetime", u), n("dialog", "open", d), n("command", "type label icon disabled checked radiogroup command"), n("output", "for form name", u), n("progress", "value max", u), n("meter", "value min max low high optimum", u), n("details", "open", [d, "summary"].join(" ")), n("keygen", "autofocus challenge disabled form keytype name")), "html5-strict" != e && (r("script", "language xml:space"), r("style", "xml:space"), r("object", "declare classid code codebase codetype archive standby align border hspace vspace"), r("embed", "align name hspace vspace"), r("param", "valuetype type"), r("a", "charset name rev shape coords"), r("br", "clear"), r("applet", "codebase archive code object alt name width height align hspace vspace"), r("img", "name longdesc align border hspace vspace"), r("iframe", "longdesc frameborder marginwidth marginheight scrolling align"), r("font basefont", "size color face"), r("input", "usemap align"), r("select", "onchange"), r("textarea"), r("h1 h2 h3 h4 h5 h6 div p legend caption", "align"), r("ul", "type compact"), r("li", "type"), r("ol dl menu dir", "compact"), r("pre", "width xml:space"), r("hr", "align noshade size width"), r("isindex", "prompt"), r("table", "summary width frame rules cellspacing cellpadding align bgcolor"), r("col", "width align char charoff valign"), r("colgroup", "width align char charoff valign"), r("thead", "align char charoff valign"), r("tr", "align char charoff valign bgcolor"), r("th", "axis align char charoff valign nowrap bgcolor width height"), r("form", "accept"), r("td", "abbr axis scope align char charoff valign nowrap bgcolor width height"), r("tfoot", "align char charoff valign"), r("tbody", "align char charoff valign"), r("area", "nohref"), r("body", "background bgcolor text link vlink alink")), "html4" != e && (r("input button select textarea", "autofocus"), r("input textarea", "placeholder"), r("a", "download"), r("link script img", "crossorigin"), r("iframe", "sandbox seamless allowfullscreen")), s(t("a form meter progress dfn"), function(e) {
  3652. a[e] && delete a[e].children[e]
  3653. }), delete a.caption.children.table, delete a.script, i[e] = a, a)
  3654. }
  3655. function r(e, t) {
  3656. var n;
  3657. return e && (n = {}, "string" == typeof e && (e = {
  3658. "*": e
  3659. }), s(e, function(e, r) {
  3660. n[r] = n[r.toUpperCase()] = "map" == t ? a(e, /[, ]/) : c(e, /[, ]/)
  3661. })), n
  3662. }
  3663. var i = {},
  3664. o = {},
  3665. a = e.makeMap,
  3666. s = e.each,
  3667. l = e.extend,
  3668. c = e.explode,
  3669. u = e.inArray;
  3670. return function(e) {
  3671. function o(t, n, r) {
  3672. var o = e[t];
  3673. return o ? o = a(o, /[, ]/, a(o.toUpperCase(), /[, ]/)) : (o = i[t],
  3674. o || (o = a(n, " ", a(n.toUpperCase(), " ")), o = l(o, r), i[t] = o)), o
  3675. }
  3676. function d(e) {
  3677. return new RegExp("^" + e.replace(/([?+*])/g, ".$1") + "$")
  3678. }
  3679. function f(e) {
  3680. var n, r, i, o, s, l, c, f, h, p, m, g, v, b, x, w, E, N, _, S = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,
  3681. k = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
  3682. T = /[*?+]/;
  3683. if (e)
  3684. for (e = t(e, ","), y["@"] && (w = y["@"].attributes, E = y["@"].attributesOrder), n = 0, r = e.length; n < r; n++)
  3685. if (s = S.exec(e[n])) {
  3686. if (b = s[1], h = s[2], x = s[3], f = s[5], g = {}, v = [], l = {
  3687. attributes: g,
  3688. attributesOrder: v
  3689. }, "#" === b && (l.paddEmpty = !0), "-" === b && (l.removeEmpty = !0), "!" === s[4] && (l.removeEmptyAttrs = !0), w) {
  3690. for (N in w) g[N] = w[N];
  3691. v.push.apply(v, E)
  3692. }
  3693. if (f)
  3694. for (f = t(f, "|"), i = 0, o = f.length; i < o; i++)
  3695. if (s = k.exec(f[i])) {
  3696. if (c = {}, m = s[1], p = s[2].replace(/::/g, ":"), b = s[3], _ = s[4], "!" === m && (l.attributesRequired = l.attributesRequired || [], l.attributesRequired.push(p), c.required = !0), "-" === m) {
  3697. delete g[p], v.splice(u(v, p), 1);
  3698. continue
  3699. }
  3700. b && ("=" === b && (l.attributesDefault = l.attributesDefault || [], l.attributesDefault.push({
  3701. name: p,
  3702. value: _
  3703. }), c.defaultValue = _), ":" === b && (l.attributesForced = l.attributesForced || [], l.attributesForced.push({
  3704. name: p,
  3705. value: _
  3706. }), c.forcedValue = _), "<" === b && (c.validValues = a(_, "?"))), T.test(p) ? (l.attributePatterns = l.attributePatterns || [], c.pattern = d(p), l.attributePatterns.push(c)) : (g[p] || v.push(p), g[p] = c)
  3707. }
  3708. w || "@" != h || (w = g, E = v), x && (l.outputName = h, y[x] = l), T.test(h) ? (l.pattern = d(h), C.push(l)) : y[h] = l
  3709. }
  3710. }
  3711. function h(e) {
  3712. y = {}, C = [], f(e), s(E, function(e, t) {
  3713. b[t] = e.children
  3714. })
  3715. }
  3716. function p(e) {
  3717. var n = /^(~)?(.+)$/;
  3718. e && (i.text_block_elements = i.block_elements = null, s(t(e, ","), function(e) {
  3719. var t = n.exec(e),
  3720. r = "~" === t[1],
  3721. i = r ? "span" : "div",
  3722. o = t[2];
  3723. if (b[o] = b[i], M[o] = i, r || (R[o.toUpperCase()] = {}, R[o] = {}), !y[o]) {
  3724. var a = y[i];
  3725. a = l({}, a), delete a.removeEmptyAttrs, delete a.removeEmpty, y[o] = a
  3726. }
  3727. s(b, function(e, t) {
  3728. e[i] && (b[t] = e = l({}, b[t]), e[o] = e[i])
  3729. })
  3730. }))
  3731. }
  3732. function m(n) {
  3733. var r = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
  3734. i[e.schema] = null, n && s(t(n, ","), function(e) {
  3735. var n = r.exec(e),
  3736. i, o;
  3737. n && (o = n[1], i = o ? b[n[2]] : b[n[2]] = {
  3738. "#comment": {}
  3739. }, i = b[n[2]], s(t(n[3], "|"), function(e) {
  3740. "-" === o ? delete i[e] : i[e] = {}
  3741. }))
  3742. })
  3743. }
  3744. function g(e) {
  3745. var t = y[e],
  3746. n;
  3747. if (t) return t;
  3748. for (n = C.length; n--;)
  3749. if (t = C[n], t.pattern.test(e)) return t
  3750. }
  3751. var v = this,
  3752. y = {},
  3753. b = {},
  3754. C = [],
  3755. x, w, E, N, _, S, k, T, R, A, B, D, L, M = {},
  3756. P = {};
  3757. e = e || {}, E = n(e.schema), e.verify_html === !1 && (e.valid_elements = "*[*]"), x = r(e.valid_styles), w = r(e.invalid_styles, "map"), T = r(e.valid_classes, "map"), N = o("whitespace_elements", "pre script noscript style textarea video audio iframe object"), _ = o("self_closing_elements", "colgroup dd dt li option p td tfoot th thead tr"), S = o("short_ended_elements", "area base basefont br col frame hr img input isindex link meta param embed source wbr track"), k = o("boolean_attributes", "checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"), A = o("non_empty_elements", "td th iframe video audio object script", S), B = o("move_caret_before_on_enter_elements", "table", A), D = o("text_block_elements", "h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"), R = o("block_elements", "hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption", D), L = o("text_inline_elements", "span strong b em i font strike u var cite dfn code mark q sup sub samp"), s((e.special || "script noscript style textarea").split(" "), function(e) {
  3758. P[e] = new RegExp("</" + e + "[^>]*>", "gi")
  3759. }), e.valid_elements ? h(e.valid_elements) : (s(E, function(e, t) {
  3760. y[t] = {
  3761. attributes: e.attributes,
  3762. attributesOrder: e.attributesOrder
  3763. }, b[t] = e.children
  3764. }), "html5" != e.schema && s(t("strong/b em/i"), function(e) {
  3765. e = t(e, "/"), y[e[1]].outputName = e[0]
  3766. }), s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"), function(e) {
  3767. y[e] && (y[e].removeEmpty = !0)
  3768. }), s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"), function(e) {
  3769. y[e].paddEmpty = !0
  3770. }), s(t("span"), function(e) {
  3771. y[e].removeEmptyAttrs = !0
  3772. })), p(e.custom_elements), m(e.valid_children), f(e.extended_valid_elements), m("+ol[ul|ol],+ul[ul|ol]"), s({
  3773. dd: "dl",
  3774. dt: "dl",
  3775. li: "ul ol",
  3776. td: "tr",
  3777. th: "tr",
  3778. tr: "tbody thead tfoot",
  3779. tbody: "table",
  3780. thead: "table",
  3781. tfoot: "table",
  3782. legend: "fieldset",
  3783. area: "map",
  3784. param: "video audio object"
  3785. }, function(e, n) {
  3786. y[n] && (y[n].parentsRequired = t(e))
  3787. }), e.invalid_elements && s(c(e.invalid_elements), function(e) {
  3788. y[e] && delete y[e]
  3789. }), g("span") || f("span[!data-mce-type|*]"), v.children = b, v.getValidStyles = function() {
  3790. return x
  3791. }, v.getInvalidStyles = function() {
  3792. return w
  3793. }, v.getValidClasses = function() {
  3794. return T
  3795. }, v.getBoolAttrs = function() {
  3796. return k
  3797. }, v.getBlockElements = function() {
  3798. return R
  3799. }, v.getTextBlockElements = function() {
  3800. return D
  3801. }, v.getTextInlineElements = function() {
  3802. return L
  3803. }, v.getShortEndedElements = function() {
  3804. return S
  3805. }, v.getSelfClosingElements = function() {
  3806. return _
  3807. }, v.getNonEmptyElements = function() {
  3808. return A
  3809. }, v.getMoveCaretBeforeOnEnterElements = function() {
  3810. return B
  3811. }, v.getWhiteSpaceElements = function() {
  3812. return N
  3813. }, v.getSpecialElements = function() {
  3814. return P
  3815. }, v.isValidChild = function(e, t) {
  3816. var n = b[e];
  3817. return !(!n || !n[t])
  3818. }, v.isValid = function(e, t) {
  3819. var n, r, i = g(e);
  3820. if (i) {
  3821. if (!t) return !0;
  3822. if (i.attributes[t]) return !0;
  3823. if (n = i.attributePatterns)
  3824. for (r = n.length; r--;)
  3825. if (n[r].pattern.test(e)) return !0
  3826. }
  3827. return !1
  3828. }, v.getElementRule = g, v.getCustomElements = function() {
  3829. return M
  3830. }, v.addValidElements = f, v.setValidElements = h, v.addCustomElements = p, v.addValidChildren = m, v.elements = y
  3831. }
  3832. }), r(D, [B, C, m], function(e, t, n) {
  3833. function r(e, t, n) {
  3834. var r = 1,
  3835. i, o, a, s;
  3836. for (s = e.getShortEndedElements(), a = /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g, a.lastIndex = i = n; o = a.exec(t);) {
  3837. if (i = a.lastIndex, "/" === o[1]) r--;
  3838. else if (!o[1]) {
  3839. if (o[2] in s) continue;
  3840. r++
  3841. }
  3842. if (0 === r) break
  3843. }
  3844. return i
  3845. }
  3846. function i(i, a) {
  3847. function s() {}
  3848. var l = this;
  3849. i = i || {}, l.schema = a = a || new e, i.fix_self_closing !== !1 && (i.fix_self_closing = !0), o("comment cdata text start end pi doctype".split(" "), function(e) {
  3850. e && (l[e] = i[e] || s)
  3851. }), l.parse = function(e) {
  3852. function o(e) {
  3853. var t, n;
  3854. for (t = h.length; t-- && h[t].name !== e;);
  3855. if (t >= 0) {
  3856. for (n = h.length - 1; n >= t; n--) e = h[n], e.valid && l.end(e.name);
  3857. h.length = t
  3858. }
  3859. }
  3860. function s(e, t, n, r, o) {
  3861. var a, s, l = /[\s\u0000-\u001F]+/g;
  3862. if (t = t.toLowerCase(), n = t in x ? t : z(n || r || o || ""), E && !y && 0 !== t.indexOf("data-")) {
  3863. if (a = T[t], !a && R) {
  3864. for (s = R.length; s-- && (a = R[s], !a.pattern.test(t)););
  3865. s === -1 && (a = null)
  3866. }
  3867. if (!a) return;
  3868. if (a.validValues && !(n in a.validValues)) return
  3869. }
  3870. if (W[t] && !i.allow_script_urls) {
  3871. var c = n.replace(l, "");
  3872. try {
  3873. c = decodeURIComponent(c)
  3874. } catch (u) {
  3875. c = unescape(c)
  3876. }
  3877. if (V.test(c)) return;
  3878. if (!i.allow_html_data_urls && $.test(c) && !/^data:image\//i.test(c)) return
  3879. }
  3880. p.map[t] = n, p.push({
  3881. name: t,
  3882. value: n
  3883. })
  3884. }
  3885. var l = this,
  3886. c, u = 0,
  3887. d, f, h = [],
  3888. p, m, g, v, y, b, C, x, w, E, N, _, S, k, T, R, A, B, D, L, M, P, O, H, I, F = 0,
  3889. z = t.decode,
  3890. U, W = n.makeMap("src,href,data,background,formaction,poster"),
  3891. V = /((java|vb)script|mhtml):/i,
  3892. $ = /^data:/i;
  3893. for (P = new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))", "g"), O = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g, C = a.getShortEndedElements(), M = i.self_closing_elements || a.getSelfClosingElements(), x = a.getBoolAttrs(), E = i.validate, b = i.remove_internals, U = i.fix_self_closing, H = a.getSpecialElements(); c = P.exec(e);) {
  3894. if (u < c.index && l.text(z(e.substr(u, c.index - u))), d = c[6]) d = d.toLowerCase(), ":" === d.charAt(0) && (d = d.substr(1)), o(d);
  3895. else if (d = c[7]) {
  3896. if (d = d.toLowerCase(), ":" === d.charAt(0) && (d = d.substr(1)), w = d in C, U && M[d] && h.length > 0 && h[h.length - 1].name === d && o(d), !E || (N = a.getElementRule(d))) {
  3897. if (_ = !0, E && (T = N.attributes, R = N.attributePatterns), (k = c[8]) ? (y = k.indexOf("data-mce-type") !== -1, y && b && (_ = !1), p = [], p.map = {}, k.replace(O, s)) : (p = [], p.map = {}), E && !y) {
  3898. if (A = N.attributesRequired, B = N.attributesDefault, D = N.attributesForced, L = N.removeEmptyAttrs, L && !p.length && (_ = !1), D)
  3899. for (m = D.length; m--;) S = D[m], v = S.name, I = S.value, "{$uid}" === I && (I = "mce_" + F++), p.map[v] = I, p.push({
  3900. name: v,
  3901. value: I
  3902. });
  3903. if (B)
  3904. for (m = B.length; m--;) S = B[m], v = S.name, v in p.map || (I = S.value, "{$uid}" === I && (I = "mce_" + F++), p.map[v] = I, p.push({
  3905. name: v,
  3906. value: I
  3907. }));
  3908. if (A) {
  3909. for (m = A.length; m-- && !(A[m] in p.map););
  3910. m === -1 && (_ = !1)
  3911. }
  3912. if (S = p.map["data-mce-bogus"]) {
  3913. if ("all" === S) {
  3914. u = r(a, e, P.lastIndex), P.lastIndex = u;
  3915. continue
  3916. }
  3917. _ = !1
  3918. }
  3919. }
  3920. _ && l.start(d, p, w)
  3921. } else _ = !1;
  3922. if (f = H[d]) {
  3923. f.lastIndex = u = c.index + c[0].length, (c = f.exec(e)) ? (_ && (g = e.substr(u, c.index - u)), u = c.index + c[0].length) : (g = e.substr(u), u = e.length), _ && (g.length > 0 && l.text(g, !0), l.end(d)), P.lastIndex = u;
  3924. continue
  3925. }
  3926. w || (k && k.indexOf("/") == k.length - 1 ? _ && l.end(d) : h.push({
  3927. name: d,
  3928. valid: _
  3929. }))
  3930. } else(d = c[1]) ? (">" === d.charAt(0) && (d = " " + d), i.allow_conditional_comments || "[if" !== d.substr(0, 3).toLowerCase() || (d = " " + d), l.comment(d)) : (d = c[2]) ? l.cdata(d) : (d = c[3]) ? l.doctype(d) : (d = c[4]) && l.pi(d, c[5]);
  3931. u = c.index + c[0].length
  3932. }
  3933. for (u < e.length && l.text(z(e.substr(u))), m = h.length - 1; m >= 0; m--) d = h[m], d.valid && l.end(d.name)
  3934. }
  3935. }
  3936. var o = n.each;
  3937. return i.findEndTag = r, i
  3938. }), r(L, [A, B, D, m], function(e, t, n, r) {
  3939. var i = r.makeMap,
  3940. o = r.each,
  3941. a = r.explode,
  3942. s = r.extend;
  3943. return function(l, c) {
  3944. function u(t) {
  3945. var n, r, o, a, s, l, u, f, h, p, m, g, v, y, b;
  3946. for (m = i("tr,td,th,tbody,thead,tfoot,table"), p = c.getNonEmptyElements(), g = c.getTextBlockElements(), v = c.getSpecialElements(), n = 0; n < t.length; n++)
  3947. if (r = t[n], r.parent && !r.fixed)
  3948. if (g[r.name] && "li" == r.parent.name) {
  3949. for (y = r.next; y && g[y.name];) y.name = "li", y.fixed = !0, r.parent.insert(y, r.parent), y = y.next;
  3950. r.unwrap(r)
  3951. } else {
  3952. for (a = [r], o = r.parent; o && !c.isValidChild(o.name, r.name) && !m[o.name]; o = o.parent) a.push(o);
  3953. if (o && a.length > 1) {
  3954. for (a.reverse(), s = l = d.filterNode(a[0].clone()), h = 0; h < a.length - 1; h++) {
  3955. for (c.isValidChild(l.name, a[h].name) ? (u = d.filterNode(a[h].clone()), l.append(u)) : u = l, f = a[h].firstChild; f && f != a[h + 1];) b = f.next, u.append(f), f = b;
  3956. l = u
  3957. }
  3958. s.isEmpty(p) ? o.insert(r, a[0], !0) : (o.insert(s, a[0], !0), o.insert(r, s)), o = a[0], (o.isEmpty(p) || o.firstChild === o.lastChild && "br" === o.firstChild.name) && o.empty().remove()
  3959. } else if (r.parent) {
  3960. if ("li" === r.name) {
  3961. if (y = r.prev, y && ("ul" === y.name || "ul" === y.name)) {
  3962. y.append(r);
  3963. continue
  3964. }
  3965. if (y = r.next, y && ("ul" === y.name || "ul" === y.name)) {
  3966. y.insert(r, y.firstChild, !0);
  3967. continue
  3968. }
  3969. r.wrap(d.filterNode(new e("ul", 1)));
  3970. continue
  3971. }
  3972. c.isValidChild(r.parent.name, "div") && c.isValidChild("div", r.name) ? r.wrap(d.filterNode(new e("div", 1))) : v[r.name] ? r.empty().remove() : r.unwrap()
  3973. }
  3974. }
  3975. }
  3976. var d = this,
  3977. f = {},
  3978. h = [],
  3979. p = {},
  3980. m = {};
  3981. l = l || {}, l.validate = !("validate" in l) || l.validate, l.root_name = l.root_name || "body", d.schema = c = c || new t, d.filterNode = function(e) {
  3982. var t, n, r;
  3983. n in f && (r = p[n], r ? r.push(e) : p[n] = [e]), t = h.length;
  3984. for (; t--;) n = h[t].name, n in e.attributes.map && (r = m[n], r ? r.push(e) : m[n] = [e]);
  3985. return e
  3986. }, d.addNodeFilter = function(e, t) {
  3987. o(a(e), function(e) {
  3988. var n = f[e];
  3989. n || (f[e] = n = []), n.push(t)
  3990. })
  3991. }, d.addAttributeFilter = function(e, t) {
  3992. o(a(e), function(e) {
  3993. var n;
  3994. for (n = 0; n < h.length; n++)
  3995. if (h[n].name === e) return void h[n].callbacks.push(t);
  3996. h.push({
  3997. name: e,
  3998. callbacks: [t]
  3999. })
  4000. })
  4001. }, d.parse = function(t, r) {
  4002. function o() {
  4003. function e(e) {
  4004. e && (t = e.firstChild, t && 3 == t.type && (t.value = t.value.replace(R, "")), t = e.lastChild, t && 3 == t.type && (t.value = t.value.replace(D, "")))
  4005. }
  4006. var t = y.firstChild,
  4007. n, r;
  4008. if (c.isValidChild(y.name, I.toLowerCase())) {
  4009. for (; t;) n = t.next, 3 == t.type || 1 == t.type && "p" !== t.name && !T[t.name] && !t.attr("data-mce-type") ? r ? r.append(t) : (r = a(I, 1), r.attr(l.forced_root_block_attrs), y.insert(r, t), r.append(t)) : (e(r), r = null), t = n;
  4010. e(r)
  4011. }
  4012. }
  4013. function a(t, n) {
  4014. var r = new e(t, n),
  4015. i;
  4016. return t in f && (i = p[t], i ? i.push(r) : p[t] = [r]), r
  4017. }
  4018. function d(e) {
  4019. var t, n, r, i, o = c.getBlockElements();
  4020. for (t = e.prev; t && 3 === t.type;) {
  4021. if (r = t.value.replace(D, ""), r.length > 0) return void(t.value = r);
  4022. if (n = t.next) {
  4023. if (3 == n.type && n.value.length) {
  4024. t = t.prev;
  4025. continue
  4026. }
  4027. if (!o[n.name] && "script" != n.name && "style" != n.name) {
  4028. t = t.prev;
  4029. continue
  4030. }
  4031. }
  4032. i = t.prev, t.remove(), t = i
  4033. }
  4034. }
  4035. function g(e) {
  4036. var t, n = {};
  4037. for (t in e) "li" !== t && "p" != t && (n[t] = e[t]);
  4038. return n
  4039. }
  4040. var v, y, b, C, x, w, E, N, _, S, k, T, R, A = [],
  4041. B, D, L, M, P, O, H, I;
  4042. if (r = r || {}, p = {}, m = {}, T = s(i("script,style,head,html,body,title,meta,param"), c.getBlockElements()), H = c.getNonEmptyElements(), O = c.children, k = l.validate, I = "forced_root_block" in r ? r.forced_root_block : l.forced_root_block, P = c.getWhiteSpaceElements(), R = /^[ \t\r\n]+/, D = /[ \t\r\n]+$/, L = /[ \t\r\n]+/g, M = /^[ \t\r\n]+$/, v = new n({
  4043. validate: k,
  4044. allow_script_urls: l.allow_script_urls,
  4045. allow_conditional_comments: l.allow_conditional_comments,
  4046. self_closing_elements: g(c.getSelfClosingElements()),
  4047. cdata: function(e) {
  4048. b.append(a("#cdata", 4)).value = e
  4049. },
  4050. text: function(e, t) {
  4051. var n;
  4052. B || (e = e.replace(L, " "), b.lastChild && T[b.lastChild.name] && (e = e.replace(R, ""))), 0 !== e.length && (n = a("#text", 3), n.raw = !!t, b.append(n).value = e)
  4053. },
  4054. comment: function(e) {
  4055. b.append(a("#comment", 8)).value = e
  4056. },
  4057. pi: function(e, t) {
  4058. b.append(a(e, 7)).value = t, d(b)
  4059. },
  4060. doctype: function(e) {
  4061. var t;
  4062. t = b.append(a("#doctype", 10)), t.value = e, d(b)
  4063. },
  4064. start: function(e, t, n) {
  4065. var r, i, o, s, l;
  4066. if (o = k ? c.getElementRule(e) : {}) {
  4067. for (r = a(o.outputName || e, 1), r.attributes = t, r.shortEnded = n, b.append(r), l = O[b.name], l && O[r.name] && !l[r.name] && A.push(r), i = h.length; i--;) s = h[i].name, s in t.map && (_ = m[s], _ ? _.push(r) : m[s] = [r]);
  4068. T[e] && d(r), n || (b = r), !B && P[e] && (B = !0)
  4069. }
  4070. },
  4071. end: function(t) {
  4072. var n, r, i, o, a;
  4073. if (r = k ? c.getElementRule(t) : {}) {
  4074. if (T[t] && !B) {
  4075. if (n = b.firstChild, n && 3 === n.type)
  4076. if (i = n.value.replace(R, ""), i.length > 0) n.value = i, n = n.next;
  4077. else
  4078. for (o = n.next, n.remove(), n = o; n && 3 === n.type;) i = n.value, o = n.next, (0 === i.length || M.test(i)) && (n.remove(), n = o), n = o;
  4079. if (n = b.lastChild, n && 3 === n.type)
  4080. if (i = n.value.replace(D, ""), i.length > 0) n.value = i, n = n.prev;
  4081. else
  4082. for (o = n.prev, n.remove(), n = o; n && 3 === n.type;) i = n.value, o = n.prev, (0 === i.length || M.test(i)) && (n.remove(), n = o), n = o
  4083. }
  4084. if (B && P[t] && (B = !1), (r.removeEmpty || r.paddEmpty) && b.isEmpty(H))
  4085. if (r.paddEmpty) b.empty().append(new e("#text", "3")).value = "\xa0";
  4086. else if (!b.attributes.map.name && !b.attributes.map.id) return a = b.parent, T[b.name] ? b.empty().remove() : b.unwrap(), void(b = a);
  4087. b = b.parent
  4088. }
  4089. }
  4090. }, c), y = b = new e(r.context || l.root_name, 11), v.parse(t), k && A.length && (r.context ? r.invalid = !0 : u(A)), I && ("body" == y.name || r.isRootContent) && o(), !r.invalid) {
  4091. for (S in p) {
  4092. for (_ = f[S], C = p[S], E = C.length; E--;) C[E].parent || C.splice(E, 1);
  4093. for (x = 0, w = _.length; x < w; x++) _[x](C, S, r)
  4094. }
  4095. for (x = 0, w = h.length; x < w; x++)
  4096. if (_ = h[x], _.name in m) {
  4097. for (C = m[_.name], E = C.length; E--;) C[E].parent || C.splice(E, 1);
  4098. for (E = 0, N = _.callbacks.length; E < N; E++) _.callbacks[E](C, _.name, r)
  4099. }
  4100. }
  4101. return y
  4102. }, l.remove_trailing_brs && d.addNodeFilter("br", function(t) {
  4103. var n, r = t.length,
  4104. i, o = s({}, c.getBlockElements()),
  4105. a = c.getNonEmptyElements(),
  4106. l, u, d, f, h, p;
  4107. for (o.body = 1, n = 0; n < r; n++)
  4108. if (i = t[n], l = i.parent, o[i.parent.name] && i === l.lastChild) {
  4109. for (d = i.prev; d;) {
  4110. if (f = d.name, "span" !== f || "bookmark" !== d.attr("data-mce-type")) {
  4111. if ("br" !== f) break;
  4112. if ("br" === f) {
  4113. i = null;
  4114. break
  4115. }
  4116. }
  4117. d = d.prev
  4118. }
  4119. i && (i.remove(), l.isEmpty(a) && (h = c.getElementRule(l.name), h && (h.removeEmpty ? l.remove() : h.paddEmpty && (l.empty().append(new e("#text", 3)).value = "\xa0"))))
  4120. } else {
  4121. for (u = i; l && l.firstChild === u && l.lastChild === u && (u = l, !o[l.name]);) l = l.parent;
  4122. u === l && (p = new e("#text", 3), p.value = "\xa0", i.replace(p))
  4123. }
  4124. }), l.allow_unsafe_link_target || d.addAttributeFilter("href", function(e) {
  4125. function t(e) {
  4126. return e = n(e), e ? [e, l].join(" ") : l
  4127. }
  4128. function n(e) {
  4129. var t = new RegExp("(" + l.replace(" ", "|") + ")", "g");
  4130. return e && (e = r.trim(e.replace(t, ""))), e ? e : null
  4131. }
  4132. function i(e, r) {
  4133. return r ? t(e) : n(e)
  4134. }
  4135. for (var o = e.length, a, s, l = "noopener noreferrer"; o--;) a = e[o], s = a.attr("rel"), "a" === a.name && a.attr("rel", i(s, "_blank" == a.attr("target")))
  4136. }), l.allow_html_in_named_anchor || d.addAttributeFilter("id,name", function(e) {
  4137. for (var t = e.length, n, r, i, o; t--;)
  4138. if (o = e[t], "a" === o.name && o.firstChild && !o.attr("href")) {
  4139. i = o.parent, n = o.lastChild;
  4140. do r = n.prev, i.insert(n, o), n = r; while (n)
  4141. }
  4142. }), l.validate && c.getValidClasses() && d.addAttributeFilter("class", function(e) {
  4143. for (var t = e.length, n, r, i, o, a, s = c.getValidClasses(), l, u; t--;) {
  4144. for (n = e[t], r = n.attr("class").split(" "), a = "", i = 0; i < r.length; i++) o = r[i], u = !1, l = s["*"], l && l[o] && (u = !0), l = s[n.name], !u && l && l[o] && (u = !0), u && (a && (a += " "), a += o);
  4145. a.length || (a = null), n.attr("class", a)
  4146. }
  4147. })
  4148. }
  4149. }), r(M, [C, m], function(e, t) {
  4150. var n = t.makeMap;
  4151. return function(t) {
  4152. var r = [],
  4153. i, o, a, s, l;
  4154. return t = t || {}, i = t.indent, o = n(t.indent_before || ""), a = n(t.indent_after || ""), s = e.getEncodeFunc(t.entity_encoding || "raw", t.entities), l = "html" == t.element_format, {
  4155. start: function(e, t, n) {
  4156. var c, u, d, f;
  4157. if (i && o[e] && r.length > 0 && (f = r[r.length - 1], f.length > 0 && "\n" !== f && r.push("\n")), r.push("<", e), t)
  4158. for (c = 0, u = t.length; c < u; c++) d = t[c], r.push(" ", d.name, '="', s(d.value, !0), '"');
  4159. !n || l ? r[r.length] = ">" : r[r.length] = " />", n && i && a[e] && r.length > 0 && (f = r[r.length - 1], f.length > 0 && "\n" !== f && r.push("\n"))
  4160. },
  4161. end: function(e) {
  4162. var t;
  4163. r.push("</", e, ">"), i && a[e] && r.length > 0 && (t = r[r.length - 1], t.length > 0 && "\n" !== t && r.push("\n"))
  4164. },
  4165. text: function(e, t) {
  4166. e.length > 0 && (r[r.length] = t ? e : s(e))
  4167. },
  4168. cdata: function(e) {
  4169. r.push("<![CDATA[", e, "]]>")
  4170. },
  4171. comment: function(e) {
  4172. r.push("<!--", e, "-->")
  4173. },
  4174. pi: function(e, t) {
  4175. t ? r.push("<?", e, " ", s(t), "?>") : r.push("<?", e, "?>"), i && r.push("\n")
  4176. },
  4177. doctype: function(e) {
  4178. r.push("<!DOCTYPE", e, ">", i ? "\n" : "")
  4179. },
  4180. reset: function() {
  4181. r.length = 0
  4182. },
  4183. getContent: function() {
  4184. return r.join("").replace(/\n$/, "")
  4185. }
  4186. }
  4187. }
  4188. }), r(P, [M, B], function(e, t) {
  4189. return function(n, r) {
  4190. var i = this,
  4191. o = new e(n);
  4192. n = n || {}, n.validate = !("validate" in n) || n.validate, i.schema = r = r || new t, i.writer = o, i.serialize = function(e) {
  4193. function t(e) {
  4194. var n = i[e.type],
  4195. s, l, c, u, d, f, h, p, m;
  4196. if (n) n(e);
  4197. else {
  4198. if (s = e.name, l = e.shortEnded, c = e.attributes, a && c && c.length > 1 && (f = [], f.map = {}, m = r.getElementRule(e.name))) {
  4199. for (h = 0, p = m.attributesOrder.length; h < p; h++) u = m.attributesOrder[h], u in c.map && (d = c.map[u], f.map[u] = d, f.push({
  4200. name: u,
  4201. value: d
  4202. }));
  4203. for (h = 0, p = c.length; h < p; h++) u = c[h].name, u in f.map || (d = c.map[u], f.map[u] = d, f.push({
  4204. name: u,
  4205. value: d
  4206. }));
  4207. c = f
  4208. }
  4209. if (o.start(e.name, c, l), !l) {
  4210. if (e = e.firstChild)
  4211. do t(e); while (e = e.next);
  4212. o.end(s)
  4213. }
  4214. }
  4215. }
  4216. var i, a;
  4217. return a = n.validate, i = {
  4218. 3: function(e) {
  4219. o.text(e.value, e.raw)
  4220. },
  4221. 8: function(e) {
  4222. o.comment(e.value)
  4223. },
  4224. 7: function(e) {
  4225. o.pi(e.name, e.value)
  4226. },
  4227. 10: function(e) {
  4228. o.doctype(e.value)
  4229. },
  4230. 4: function(e) {
  4231. o.cdata(e.value)
  4232. },
  4233. 11: function(e) {
  4234. if (e = e.firstChild)
  4235. do t(e); while (e = e.next)
  4236. }
  4237. }, o.reset(), 1 != e.type || n.inner ? i[11](e) : t(e), o.getContent()
  4238. }
  4239. }
  4240. }), r(O, [w, L, D, C, P, A, B, d, m, S], function(e, t, n, r, i, o, a, s, l, c) {
  4241. function u(e) {
  4242. function t(e) {
  4243. return e && "br" === e.name
  4244. }
  4245. var n, r;
  4246. n = e.lastChild, t(n) && (r = n.prev, t(r) && (n.remove(), r.remove()))
  4247. }
  4248. var d = l.each,
  4249. f = l.trim,
  4250. h = e.DOM;
  4251. return function(e, o) {
  4252. function p(e) {
  4253. var t = new RegExp(["<span[^>]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>", "\\s?(" + x.join("|") + ')="[^"]+"'].join("|"), "gi");
  4254. return e = c.trim(e.replace(t, ""))
  4255. }
  4256. function m(e) {
  4257. var t = e,
  4258. r = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,
  4259. i, a, s, l, c, u = o.schema;
  4260. for (t = p(t), c = u.getShortEndedElements(); l = r.exec(t);) a = r.lastIndex, s = l[0].length, i = c[l[1]] ? a : n.findEndTag(u, t, a), t = t.substring(0, a - s) + t.substring(i), r.lastIndex = a - s;
  4261. return f(t)
  4262. }
  4263. function g() {
  4264. return m(o.getBody().innerHTML)
  4265. }
  4266. function v(e) {
  4267. l.inArray(x, e) === -1 && (C.addAttributeFilter(e, function(e, t) {
  4268. for (var n = e.length; n--;) e[n].attr(t, null)
  4269. }), x.push(e))
  4270. }
  4271. var y, b, C, x = ["data-mce-selected"];
  4272. return o && (y = o.dom, b = o.schema), y = y || h, b = b || new a(e), e.entity_encoding = e.entity_encoding || "named", e.remove_trailing_brs = !("remove_trailing_brs" in e) || e.remove_trailing_brs, C = new t(e, b), C.addAttributeFilter("data-mce-tabindex", function(e, t) {
  4273. for (var n = e.length, r; n--;) r = e[n], r.attr("tabindex", r.attributes.map["data-mce-tabindex"]), r.attr(t, null)
  4274. }), C.addAttributeFilter("src,href,style", function(t, n) {
  4275. for (var r = t.length, i, o, a = "data-mce-" + n, s = e.url_converter, l = e.url_converter_scope, c; r--;) i = t[r], o = i.attributes.map[a], o !== c ? (i.attr(n, o.length > 0 ? o : null), i.attr(a, null)) : (o = i.attributes.map[n], "style" === n ? o = y.serializeStyle(y.parseStyle(o), i.name) : s && (o = s.call(l, o, n, i.name)), i.attr(n, o.length > 0 ? o : null))
  4276. }), C.addAttributeFilter("class", function(e) {
  4277. for (var t = e.length, n, r; t--;) n = e[t], r = n.attr("class"), r && (r = n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g, ""), n.attr("class", r.length > 0 ? r : null))
  4278. }), C.addAttributeFilter("data-mce-type", function(e, t, n) {
  4279. for (var r = e.length, i; r--;) i = e[r], "bookmark" !== i.attributes.map["data-mce-type"] || n.cleanup || i.remove()
  4280. }), C.addNodeFilter("noscript", function(e) {
  4281. for (var t = e.length, n; t--;) n = e[t].firstChild, n && (n.value = r.decode(n.value))
  4282. }), C.addNodeFilter("script,style", function(e, t) {
  4283. function n(e) {
  4284. return e.replace(/(<!--\[CDATA\[|\]\]-->)/g, "\n").replace(/^[\r\n]*|[\r\n]*$/g, "").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi, "").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, "")
  4285. }
  4286. for (var r = e.length, i, o, a; r--;) i = e[r], o = i.firstChild ? i.firstChild.value : "", "script" === t ? (a = i.attr("type"), a && i.attr("type", "mce-no/type" == a ? null : a.replace(/^mce\-/, "")), o.length > 0 && (i.firstChild.value = "// <![CDATA[\n" + n(o) + "\n// ]]>")) : o.length > 0 && (i.firstChild.value = "<!--\n" + n(o) + "\n-->")
  4287. }), C.addNodeFilter("#comment", function(e) {
  4288. for (var t = e.length, n; t--;) n = e[t], 0 === n.value.indexOf("[CDATA[") ? (n.name = "#cdata", n.type = 4, n.value = n.value.replace(/^\[CDATA\[|\]\]$/g, "")) : 0 === n.value.indexOf("mce:protected ") && (n.name = "#text", n.type = 3, n.raw = !0, n.value = unescape(n.value).substr(14))
  4289. }), C.addNodeFilter("xml:namespace,input", function(e, t) {
  4290. for (var n = e.length, r; n--;) r = e[n], 7 === r.type ? r.remove() : 1 === r.type && ("input" !== t || "type" in r.attributes.map || r.attr("type", "text"))
  4291. }), e.fix_list_elements && C.addNodeFilter("ul,ol", function(e) {
  4292. for (var t = e.length, n, r; t--;) n = e[t], r = n.parent, "ul" !== r.name && "ol" !== r.name || n.prev && "li" === n.prev.name && n.prev.append(n)
  4293. }), C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize", function(e, t) {
  4294. for (var n = e.length; n--;) e[n].attr(t, null)
  4295. }), {
  4296. schema: b,
  4297. addNodeFilter: C.addNodeFilter,
  4298. addAttributeFilter: C.addAttributeFilter,
  4299. serialize: function(t, n) {
  4300. var r = this,
  4301. o, a, l, h, p, m;
  4302. return s.ie && y.select("script,style,select,map").length > 0 ? (p = t.innerHTML, t = t.cloneNode(!1), y.setHTML(t, p)) : t = t.cloneNode(!0), o = document.implementation, o.createHTMLDocument && (a = o.createHTMLDocument(""), d("BODY" == t.nodeName ? t.childNodes : [t], function(e) {
  4303. a.body.appendChild(a.importNode(e, !0))
  4304. }), t = "BODY" != t.nodeName ? a.body.firstChild : a.body, l = y.doc, y.doc = a), n = n || {}, n.format = n.format || "html", n.selection && (n.forced_root_block = ""), n.no_events || (n.node = t, r.onPreProcess(n)), m = C.parse(f(n.getInner ? t.innerHTML : y.getOuterHTML(t)), n), u(m), h = new i(e, b), n.content = h.serialize(m), n.cleanup || (n.content = c.trim(n.content), n.content = n.content.replace(/\uFEFF/g, "")), n.no_events || r.onPostProcess(n), l && (y.doc = l), n.node = null, n.content
  4305. },
  4306. addRules: function(e) {
  4307. b.addValidElements(e)
  4308. },
  4309. setRules: function(e) {
  4310. b.setValidElements(e)
  4311. },
  4312. onPreProcess: function(e) {
  4313. o && o.fire("PreProcess", e)
  4314. },
  4315. onPostProcess: function(e) {
  4316. o && o.fire("PostProcess", e)
  4317. },
  4318. addTempAttr: v,
  4319. trimHtml: p,
  4320. getTrimmedContent: g,
  4321. trimContent: m
  4322. }
  4323. }
  4324. }), r(H, [], function() {
  4325. function e(e) {
  4326. function t(t, n) {
  4327. var r, i = 0,
  4328. o, a, s, l, c, u, d = -1,
  4329. f;
  4330. if (r = t.duplicate(), r.collapse(n), f = r.parentElement(), f.ownerDocument === e.dom.doc) {
  4331. for (;
  4332. "false" === f.contentEditable;) f = f.parentNode;
  4333. if (!f.hasChildNodes()) return {
  4334. node: f,
  4335. inside: 1
  4336. };
  4337. for (s = f.children, o = s.length - 1; i <= o;)
  4338. if (u = Math.floor((i + o) / 2), l = s[u], r.moveToElementText(l), d = r.compareEndPoints(n ? "StartToStart" : "EndToEnd", t), d > 0) o = u - 1;
  4339. else {
  4340. if (!(d < 0)) return {
  4341. node: l
  4342. };
  4343. i = u + 1
  4344. }
  4345. if (d < 0)
  4346. for (l ? r.collapse(!1) : (r.moveToElementText(f), r.collapse(!0), l = f, a = !0), c = 0; 0 !== r.compareEndPoints(n ? "StartToStart" : "StartToEnd", t) && 0 !== r.move("character", 1) && f == r.parentElement();) c++;
  4347. else
  4348. for (r.collapse(!0), c = 0; 0 !== r.compareEndPoints(n ? "StartToStart" : "StartToEnd", t) && 0 !== r.move("character", -1) && f == r.parentElement();) c++;
  4349. return {
  4350. node: l,
  4351. position: d,
  4352. offset: c,
  4353. inside: a
  4354. }
  4355. }
  4356. }
  4357. function n() {
  4358. function n(e) {
  4359. var n = t(o, e),
  4360. r, i, s = 0,
  4361. l, c, u;
  4362. if (r = n.node, i = n.offset, n.inside && !r.hasChildNodes()) return void a[e ? "setStart" : "setEnd"](r, 0);
  4363. if (i === c) return void a[e ? "setStartBefore" : "setEndAfter"](r);
  4364. if (n.position < 0) {
  4365. if (l = n.inside ? r.firstChild : r.nextSibling, !l) return void a[e ? "setStartAfter" : "setEndAfter"](r);
  4366. if (!i) return void(3 == l.nodeType ? a[e ? "setStart" : "setEnd"](l, 0) : a[e ? "setStartBefore" : "setEndBefore"](l));
  4367. for (; l;) {
  4368. if (3 == l.nodeType && (u = l.nodeValue, s += u.length, s >= i)) {
  4369. r = l, s -= i, s = u.length - s;
  4370. break
  4371. }
  4372. l = l.nextSibling
  4373. }
  4374. } else {
  4375. if (l = r.previousSibling, !l) return a[e ? "setStartBefore" : "setEndBefore"](r);
  4376. if (!i) return void(3 == r.nodeType ? a[e ? "setStart" : "setEnd"](l, r.nodeValue.length) : a[e ? "setStartAfter" : "setEndAfter"](l));
  4377. for (; l;) {
  4378. if (3 == l.nodeType && (s += l.nodeValue.length, s >= i)) {
  4379. r = l, s -= i;
  4380. break
  4381. }
  4382. l = l.previousSibling
  4383. }
  4384. }
  4385. a[e ? "setStart" : "setEnd"](r, s)
  4386. }
  4387. var o = e.getRng(),
  4388. a = i.createRng(),
  4389. s, l, c, u, d;
  4390. if (s = o.item ? o.item(0) : o.parentElement(), s.ownerDocument != i.doc) return a;
  4391. if (l = e.isCollapsed(), o.item) return a.setStart(s.parentNode, i.nodeIndex(s)), a.setEnd(a.startContainer, a.startOffset + 1), a;
  4392. try {
  4393. n(!0), l || n()
  4394. } catch (f) {
  4395. if (f.number != -2147024809) throw f;
  4396. d = r.getBookmark(2), c = o.duplicate(), c.collapse(!0), s = c.parentElement(), l || (c = o.duplicate(), c.collapse(!1), u = c.parentElement(), u.innerHTML = u.innerHTML), s.innerHTML = s.innerHTML, r.moveToBookmark(d), o = e.getRng(), n(!0), l || n()
  4397. }
  4398. return a
  4399. }
  4400. var r = this,
  4401. i = e.dom,
  4402. o = !1;
  4403. this.getBookmark = function(n) {
  4404. function r(e) {
  4405. var t, n, r, o, a = [];
  4406. for (t = e.parentNode, n = i.getRoot().parentNode; t != n && 9 !== t.nodeType;) {
  4407. for (r = t.children, o = r.length; o--;)
  4408. if (e === r[o]) {
  4409. a.push(o);
  4410. break
  4411. }
  4412. e = t, t = t.parentNode
  4413. }
  4414. return a
  4415. }
  4416. function o(e) {
  4417. var n;
  4418. if (n = t(a, e)) return {
  4419. position: n.position,
  4420. offset: n.offset,
  4421. indexes: r(n.node),
  4422. inside: n.inside
  4423. }
  4424. }
  4425. var a = e.getRng(),
  4426. s = {};
  4427. return 2 === n && (a.item ? s.start = {
  4428. ctrl: !0,
  4429. indexes: r(a.item(0))
  4430. } : (s.start = o(!0), e.isCollapsed() || (s.end = o()))), s
  4431. }, this.moveToBookmark = function(e) {
  4432. function t(e) {
  4433. var t, n, r, o;
  4434. for (t = i.getRoot(), n = e.length - 1; n >= 0; n--) o = t.children, r = e[n], r <= o.length - 1 && (t = o[r]);
  4435. return t
  4436. }
  4437. function n(n) {
  4438. var i = e[n ? "start" : "end"],
  4439. a, s, l, c;
  4440. i && (a = i.position > 0, s = o.createTextRange(), s.moveToElementText(t(i.indexes)), c = i.offset, c !== l ? (s.collapse(i.inside || a), s.moveStart("character", a ? -c : c)) : s.collapse(n), r.setEndPoint(n ? "StartToStart" : "EndToStart", s), n && r.collapse(!0))
  4441. }
  4442. var r, o = i.doc.body;
  4443. e.start && (e.start.ctrl ? (r = o.createControlRange(), r.addElement(t(e.start.indexes)), r.select()) : (r = o.createTextRange(), n(!0), n(), r.select()))
  4444. }, this.addRange = function(t) {
  4445. function n(e) {
  4446. var t, n, a, d, p;
  4447. a = i.create("a"), t = e ? s : c, n = e ? l : u, d = r.duplicate(), t != f && t != f.documentElement || (t = h, n = 0), 3 == t.nodeType ? (t.parentNode.insertBefore(a, t), d.moveToElementText(a), d.moveStart("character", n), i.remove(a), r.setEndPoint(e ? "StartToStart" : "EndToEnd", d)) : (p = t.childNodes, p.length ? (n >= p.length ? i.insertAfter(a, p[p.length - 1]) : t.insertBefore(a, p[n]), d.moveToElementText(a)) : t.canHaveHTML && (t.innerHTML = "<span>&#xFEFF;</span>", a = t.firstChild, d.moveToElementText(a), d.collapse(o)), r.setEndPoint(e ? "StartToStart" : "EndToEnd", d), i.remove(a))
  4448. }
  4449. var r, a, s, l, c, u, d, f = e.dom.doc,
  4450. h = f.body,
  4451. p, m;
  4452. if (s = t.startContainer, l = t.startOffset, c = t.endContainer, u = t.endOffset, r = h.createTextRange(), s == c && 1 == s.nodeType) {
  4453. if (l == u && !s.hasChildNodes()) {
  4454. if (s.canHaveHTML) return d = s.previousSibling, d && !d.hasChildNodes() && i.isBlock(d) ? d.innerHTML = "&#xFEFF;" : d = null, s.innerHTML = "<span>&#xFEFF;</span><span>&#xFEFF;</span>", r.moveToElementText(s.lastChild), r.select(), i.doc.selection.clear(), s.innerHTML = "", void(d && (d.innerHTML = ""));
  4455. l = i.nodeIndex(s), s = s.parentNode
  4456. }
  4457. if (l == u - 1) try {
  4458. if (m = s.childNodes[l], a = h.createControlRange(), a.addElement(m), a.select(), p = e.getRng(), p.item && m === p.item(0)) return
  4459. } catch (g) {}
  4460. }
  4461. n(!0), n(), r.select()
  4462. }, this.getRangeAt = n
  4463. }
  4464. return e
  4465. }), r(I, [d], function(e) {
  4466. return {
  4467. BACKSPACE: 8,
  4468. DELETE: 46,
  4469. DOWN: 40,
  4470. ENTER: 13,
  4471. LEFT: 37,
  4472. RIGHT: 39,
  4473. SPACEBAR: 32,
  4474. TAB: 9,
  4475. UP: 38,
  4476. modifierPressed: function(e) {
  4477. return e.shiftKey || e.ctrlKey || e.altKey || this.metaKeyPressed(e)
  4478. },
  4479. metaKeyPressed: function(t) {
  4480. return e.mac ? t.metaKey : t.ctrlKey && !t.altKey
  4481. }
  4482. }
  4483. }), r(F, [I, m, u, d, _], function(e, t, n, r, i) {
  4484. function o(e, t) {
  4485. for (; t && t != e;) {
  4486. if (s(t) || a(t)) return t;
  4487. t = t.parentNode
  4488. }
  4489. return null
  4490. }
  4491. var a = i.isContentEditableFalse,
  4492. s = i.isContentEditableTrue;
  4493. return function(i, s) {
  4494. function l(e) {
  4495. var t = s.settings.object_resizing;
  4496. return t !== !1 && !r.iOS && ("string" != typeof t && (t = "table,img,div"), "false" !== e.getAttribute("data-mce-resize") && (e != s.getBody() && s.dom.is(e, t)))
  4497. }
  4498. function c(t) {
  4499. var n, r, i, o, a;
  4500. n = t.screenX - L, r = t.screenY - M, U = n * B[2] + H, W = r * B[3] + I, U = U < 5 ? 5 : U, W = W < 5 ? 5 : W, i = "IMG" == k.nodeName && s.settings.resize_img_proportional !== !1 ? !e.modifierPressed(t) : e.modifierPressed(t) || "IMG" == k.nodeName && B[2] * B[3] !== 0, i && (j(n) > j(r) ? (W = Y(U * F), U = Y(W / F)) : (U = Y(W / F), W = Y(U * F))), _.setStyles(T, {
  4501. width: U,
  4502. height: W
  4503. }), o = B.startPos.x + n, a = B.startPos.y + r, o = o > 0 ? o : 0, a = a > 0 ? a : 0, _.setStyles(R, {
  4504. left: o,
  4505. top: a,
  4506. display: "block"
  4507. }), R.innerHTML = U + " &times; " + W, B[2] < 0 && T.clientWidth <= U && _.setStyle(T, "left", P + (H - U)), B[3] < 0 && T.clientHeight <= W && _.setStyle(T, "top", O + (I - W)), n = X.scrollWidth - K, r = X.scrollHeight - G, n + r !== 0 && _.setStyles(R, {
  4508. left: o - n,
  4509. top: a - r
  4510. }), z || (s.fire("ObjectResizeStart", {
  4511. target: k,
  4512. width: H,
  4513. height: I
  4514. }), z = !0)
  4515. }
  4516. function u() {
  4517. function e(e, t) {
  4518. t && (k.style[e] || !s.schema.isValid(k.nodeName.toLowerCase(), e) ? _.setStyle(k, e, t) : _.setAttrib(k, e, t))
  4519. }
  4520. z = !1, e("width", U), e("height", W), _.unbind(V, "mousemove", c), _.unbind(V, "mouseup", u), $ != V && (_.unbind($, "mousemove", c), _.unbind($, "mouseup", u)), _.remove(T), _.remove(R), q && "TABLE" != k.nodeName || d(k), s.fire("ObjectResized", {
  4521. target: k,
  4522. width: U,
  4523. height: W
  4524. }), _.setAttrib(k, "style", _.getAttrib(k, "style")), s.nodeChanged()
  4525. }
  4526. function d(e, t, n) {
  4527. var i, o, a, d, h;
  4528. f(), x(), i = _.getPos(e, X), P = i.x, O = i.y, h = e.getBoundingClientRect(), o = h.width || h.right - h.left, a = h.height || h.bottom - h.top, k != e && (C(), k = e, U = W = 0), d = s.fire("ObjectSelected", {
  4529. target: e
  4530. }), l(e) && !d.isDefaultPrevented() ? S(A, function(e, i) {
  4531. function s(t) {
  4532. L = t.screenX, M = t.screenY, H = k.clientWidth, I = k.clientHeight, F = I / H, B = e, e.startPos = {
  4533. x: o * e[0] + P,
  4534. y: a * e[1] + O
  4535. }, K = X.scrollWidth, G = X.scrollHeight, T = k.cloneNode(!0), _.addClass(T, "mce-clonedresizable"), _.setAttrib(T, "data-mce-bogus", "all"), T.contentEditable = !1, T.unSelectabe = !0, _.setStyles(T, {
  4536. left: P,
  4537. top: O,
  4538. margin: 0
  4539. }), T.removeAttribute("data-mce-selected"), X.appendChild(T), _.bind(V, "mousemove", c), _.bind(V, "mouseup", u), $ != V && (_.bind($, "mousemove", c), _.bind($, "mouseup", u)), R = _.add(X, "div", {
  4540. "class": "mce-resize-helper",
  4541. "data-mce-bogus": "all"
  4542. }, H + " &times; " + I)
  4543. }
  4544. var l;
  4545. return t ? void(i == t && s(n)) : (l = _.get("mceResizeHandle" + i), l && _.remove(l), l = _.add(X, "div", {
  4546. id: "mceResizeHandle" + i,
  4547. "data-mce-bogus": "all",
  4548. "class": "mce-resizehandle",
  4549. unselectable: !0,
  4550. style: "cursor:" + i + "-resize; margin:0; padding:0"
  4551. }), r.ie && (l.contentEditable = !1), _.bind(l, "mousedown", function(e) {
  4552. e.stopImmediatePropagation(), e.preventDefault(), s(e)
  4553. }), e.elm = l, void _.setStyles(l, {
  4554. left: o * e[0] + P - l.offsetWidth / 2,
  4555. top: a * e[1] + O - l.offsetHeight / 2
  4556. }))
  4557. }) : f(), k.setAttribute("data-mce-selected", "1")
  4558. }
  4559. function f() {
  4560. var e, t;
  4561. x(), k && k.removeAttribute("data-mce-selected");
  4562. for (e in A) t = _.get("mceResizeHandle" + e), t && (_.unbind(t), _.remove(t))
  4563. }
  4564. function h(e) {
  4565. function t(e, t) {
  4566. if (e)
  4567. do
  4568. if (e === t) return !0;
  4569. while (e = e.parentNode)
  4570. }
  4571. var n, r;
  4572. if (!z && !s.removed) return S(_.select("img[data-mce-selected],hr[data-mce-selected]"), function(e) {
  4573. e.removeAttribute("data-mce-selected")
  4574. }), r = "mousedown" == e.type ? e.target : i.getNode(), r = _.$(r).closest(q ? "table" : "table,img,hr")[0], t(r, X) && (w(), n = i.getStart(!0), t(n, r) && t(i.getEnd(!0), r) && (!q || r != n && "IMG" !== n.nodeName)) ? void d(r) : void f()
  4575. }
  4576. function p(e, t, n) {
  4577. e && e.attachEvent && e.attachEvent("on" + t, n)
  4578. }
  4579. function m(e, t, n) {
  4580. e && e.detachEvent && e.detachEvent("on" + t, n)
  4581. }
  4582. function g(e) {
  4583. var t = e.srcElement,
  4584. n, r, i, o, a, l, c;
  4585. n = t.getBoundingClientRect(), l = D.clientX - n.left, c = D.clientY - n.top;
  4586. for (r in A)
  4587. if (i = A[r], o = t.offsetWidth * i[0], a = t.offsetHeight * i[1], j(o - l) < 8 && j(a - c) < 8) {
  4588. B = i;
  4589. break
  4590. }
  4591. z = !0, s.fire("ObjectResizeStart", {
  4592. target: k,
  4593. width: k.clientWidth,
  4594. height: k.clientHeight
  4595. }), s.getDoc().selection.empty(), d(t, r, D)
  4596. }
  4597. function v(e) {
  4598. e.preventDefault ? e.preventDefault() : e.returnValue = !1
  4599. }
  4600. function y(e) {
  4601. return a(o(s.getBody(), e))
  4602. }
  4603. function b(e) {
  4604. var t = e.srcElement;
  4605. if (y(t)) return void v(e);
  4606. if (t != k) {
  4607. if (s.fire("ObjectSelected", {
  4608. target: t
  4609. }), C(), 0 === t.id.indexOf("mceResizeHandle")) return void(e.returnValue = !1);
  4610. "IMG" != t.nodeName && "TABLE" != t.nodeName || (f(), k = t, p(t, "resizestart", g))
  4611. }
  4612. }
  4613. function C() {
  4614. m(k, "resizestart", g)
  4615. }
  4616. function x() {
  4617. for (var e in A) {
  4618. var t = A[e];
  4619. t.elm && (_.unbind(t.elm), delete t.elm)
  4620. }
  4621. }
  4622. function w() {
  4623. try {
  4624. s.getDoc().execCommand("enableObjectResizing", !1, !1)
  4625. } catch (e) {}
  4626. }
  4627. function E(e) {
  4628. var t;
  4629. if (q) {
  4630. t = V.body.createControlRange();
  4631. try {
  4632. return t.addElement(e), t.select(), !0
  4633. } catch (n) {}
  4634. }
  4635. }
  4636. function N() {
  4637. k = T = null, q && (C(), m(X, "controlselect", b))
  4638. }
  4639. var _ = s.dom,
  4640. S = t.each,
  4641. k, T, R, A, B, D, L, M, P, O, H, I, F, z, U, W, V = s.getDoc(),
  4642. $ = document,
  4643. q = r.ie && r.ie < 11,
  4644. j = Math.abs,
  4645. Y = Math.round,
  4646. X = s.getBody(),
  4647. K, G;
  4648. A = {
  4649. nw: [0, 0, -1, -1],
  4650. ne: [1, 0, 1, -1],
  4651. se: [1, 1, 1, 1],
  4652. sw: [0, 1, -1, 1]
  4653. };
  4654. var J = ".mce-content-body";
  4655. return s.contentStyles.push(J + " div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}" + J + " .mce-resizehandle:hover {background: #000}" + J + " img[data-mce-selected]," + J + " hr[data-mce-selected] {outline: 1px solid black;resize: none}" + J + " .mce-clonedresizable {position: absolute;" + (r.gecko ? "" : "outline: 1px dashed black;") + "opacity: .5;filter: alpha(opacity=50);z-index: 10000}" + J + " .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),
  4656. s.on("init", function() {
  4657. q ? (s.on("ObjectResized", function(e) {
  4658. "TABLE" != e.target.nodeName && (f(), E(e.target))
  4659. }), p(X, "controlselect", b), s.on("mousedown", function(e) {
  4660. D = e
  4661. })) : (w(), r.ie >= 11 && (s.on("mousedown click", function(e) {
  4662. var t = e.target,
  4663. n = t.nodeName;
  4664. z || !/^(TABLE|IMG|HR)$/.test(n) || y(t) || (s.selection.select(t, "TABLE" == n), "mousedown" == e.type && s.nodeChanged())
  4665. }), s.dom.bind(X, "mscontrolselect", function(e) {
  4666. function t(e) {
  4667. n.setEditorTimeout(s, function() {
  4668. s.selection.select(e)
  4669. })
  4670. }
  4671. return y(e.target) ? (e.preventDefault(), void t(e.target)) : void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName) && (e.preventDefault(), "IMG" == e.target.tagName && t(e.target)))
  4672. })));
  4673. var e = n.throttle(function(e) {
  4674. s.composing || h(e)
  4675. });
  4676. s.on("nodechange ResizeEditor ResizeWindow drop", e), s.on("keyup compositionend", function(t) {
  4677. k && "TABLE" == k.nodeName && e(t)
  4678. }), s.on("hide blur", f)
  4679. }), s.on("remove", x), {
  4680. isResizable: l,
  4681. showResizeRect: d,
  4682. hideResizeRect: f,
  4683. updateResizeRect: h,
  4684. controlSelect: E,
  4685. destroy: N
  4686. }
  4687. }
  4688. }), r(z, [], function() {
  4689. function e(e) {
  4690. return function() {
  4691. return e
  4692. }
  4693. }
  4694. function t(e) {
  4695. return function(t) {
  4696. return !e(t)
  4697. }
  4698. }
  4699. function n(e, t) {
  4700. return function(n) {
  4701. return e(t(n))
  4702. }
  4703. }
  4704. function r() {
  4705. var e = s.call(arguments);
  4706. return function(t) {
  4707. for (var n = 0; n < e.length; n++)
  4708. if (e[n](t)) return !0;
  4709. return !1
  4710. }
  4711. }
  4712. function i() {
  4713. var e = s.call(arguments);
  4714. return function(t) {
  4715. for (var n = 0; n < e.length; n++)
  4716. if (!e[n](t)) return !1;
  4717. return !0
  4718. }
  4719. }
  4720. function o(e) {
  4721. var t = s.call(arguments);
  4722. return t.length - 1 >= e.length ? e.apply(this, t.slice(1)) : function() {
  4723. var e = t.concat([].slice.call(arguments));
  4724. return o.apply(this, e)
  4725. }
  4726. }
  4727. function a() {}
  4728. var s = [].slice;
  4729. return {
  4730. constant: e,
  4731. negate: t,
  4732. and: i,
  4733. or: r,
  4734. curry: o,
  4735. compose: n,
  4736. noop: a
  4737. }
  4738. }), r(U, [_, p, k], function(e, t, n) {
  4739. function r(e) {
  4740. return !m(e) && (d(e) ? !f(e.parentNode) : h(e) || u(e) || p(e) || c(e))
  4741. }
  4742. function i(e, t) {
  4743. for (e = e.parentNode; e && e != t; e = e.parentNode) {
  4744. if (c(e)) return !1;
  4745. if (l(e)) return !0
  4746. }
  4747. return !0
  4748. }
  4749. function o(e) {
  4750. return !!c(e) && t.reduce(e.getElementsByTagName("*"), function(e, t) {
  4751. return e || l(t)
  4752. }, !1) !== !0
  4753. }
  4754. function a(e) {
  4755. return h(e) || o(e)
  4756. }
  4757. function s(e, t) {
  4758. return r(e) && i(e, t)
  4759. }
  4760. var l = e.isContentEditableTrue,
  4761. c = e.isContentEditableFalse,
  4762. u = e.isBr,
  4763. d = e.isText,
  4764. f = e.matchNodeNames("script style textarea"),
  4765. h = e.matchNodeNames("img input textarea hr iframe video audio object"),
  4766. p = e.matchNodeNames("table"),
  4767. m = n.isCaretContainer;
  4768. return {
  4769. isCaretCandidate: r,
  4770. isInEditable: i,
  4771. isAtomic: a,
  4772. isEditableCaretCandidate: s
  4773. }
  4774. }), r(W, [], function() {
  4775. function e(e) {
  4776. return e ? {
  4777. left: u(e.left),
  4778. top: u(e.top),
  4779. bottom: u(e.bottom),
  4780. right: u(e.right),
  4781. width: u(e.width),
  4782. height: u(e.height)
  4783. } : {
  4784. left: 0,
  4785. top: 0,
  4786. bottom: 0,
  4787. right: 0,
  4788. width: 0,
  4789. height: 0
  4790. }
  4791. }
  4792. function t(t, n) {
  4793. return t = e(t), n ? t.right = t.left : (t.left = t.left + t.width, t.right = t.left), t.width = 0, t
  4794. }
  4795. function n(e, t) {
  4796. return e.left === t.left && e.top === t.top && e.bottom === t.bottom && e.right === t.right
  4797. }
  4798. function r(e, t, n) {
  4799. return e >= 0 && e <= Math.min(t.height, n.height) / 2
  4800. }
  4801. function i(e, t) {
  4802. return e.bottom < t.top || !(e.top > t.bottom) && r(t.top - e.bottom, e, t)
  4803. }
  4804. function o(e, t) {
  4805. return e.top > t.bottom || !(e.bottom < t.top) && r(t.bottom - e.top, e, t)
  4806. }
  4807. function a(e, t) {
  4808. return e.left < t.left
  4809. }
  4810. function s(e, t) {
  4811. return e.right > t.right
  4812. }
  4813. function l(e, t) {
  4814. return i(e, t) ? -1 : o(e, t) ? 1 : a(e, t) ? -1 : s(e, t) ? 1 : 0
  4815. }
  4816. function c(e, t, n) {
  4817. return t >= e.left && t <= e.right && n >= e.top && n <= e.bottom
  4818. }
  4819. var u = Math.round;
  4820. return {
  4821. clone: e,
  4822. collapse: t,
  4823. isEqual: n,
  4824. isAbove: i,
  4825. isBelow: o,
  4826. isLeft: a,
  4827. isRight: s,
  4828. compare: l,
  4829. containsXY: c
  4830. }
  4831. }), r(V, [], function() {
  4832. function e(e) {
  4833. return "string" == typeof e && e.charCodeAt(0) >= 768 && t.test(e)
  4834. }
  4835. var t = new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]");
  4836. return {
  4837. isExtendingChar: e
  4838. }
  4839. }), r($, [z, _, w, T, U, W, V], function(e, t, n, r, i, o, a) {
  4840. function s(e) {
  4841. return "createRange" in e ? e.createRange() : n.DOM.createRng()
  4842. }
  4843. function l(e) {
  4844. return e && /[\r\n\t ]/.test(e)
  4845. }
  4846. function c(e) {
  4847. var t = e.startContainer,
  4848. n = e.startOffset,
  4849. r;
  4850. return !!(l(e.toString()) && v(t.parentNode) && (r = t.data, l(r[n - 1]) || l(r[n + 1])))
  4851. }
  4852. function u(e) {
  4853. function t(e) {
  4854. var t = e.ownerDocument,
  4855. n = s(t),
  4856. r = t.createTextNode("\xa0"),
  4857. i = e.parentNode,
  4858. a;
  4859. return i.insertBefore(r, e), n.setStart(r, 0), n.setEnd(r, 1), a = o.clone(n.getBoundingClientRect()), i.removeChild(r), a
  4860. }
  4861. function n(e) {
  4862. var n, r;
  4863. return r = e.getClientRects(), n = r.length > 0 ? o.clone(r[0]) : o.clone(e.getBoundingClientRect()), b(e) && 0 === n.left ? t(e) : n
  4864. }
  4865. function r(e, t) {
  4866. return e = o.collapse(e, t), e.width = 1, e.right = e.left + 1, e
  4867. }
  4868. function i(e) {
  4869. 0 !== e.height && (u.length > 0 && o.isEqual(e, u[u.length - 1]) || u.push(e))
  4870. }
  4871. function l(e, t) {
  4872. var o = s(e.ownerDocument);
  4873. if (t < e.data.length) {
  4874. if (a.isExtendingChar(e.data[t])) return u;
  4875. if (a.isExtendingChar(e.data[t - 1]) && (o.setStart(e, t), o.setEnd(e, t + 1), !c(o))) return i(r(n(o), !1)), u
  4876. }
  4877. t > 0 && (o.setStart(e, t - 1), o.setEnd(e, t), c(o) || i(r(n(o), !1))), t < e.data.length && (o.setStart(e, t), o.setEnd(e, t + 1), c(o) || i(r(n(o), !0)))
  4878. }
  4879. var u = [],
  4880. d, h;
  4881. if (y(e.container())) return l(e.container(), e.offset()), u;
  4882. if (f(e.container()))
  4883. if (e.isAtEnd()) h = x(e.container(), e.offset()), y(h) && l(h, h.data.length), g(h) && !b(h) && i(r(n(h), !1));
  4884. else {
  4885. if (h = x(e.container(), e.offset()), y(h) && l(h, 0), g(h) && e.isAtEnd()) return i(r(n(h), !1)), u;
  4886. d = x(e.container(), e.offset() - 1), g(d) && !b(d) && (p(d) || p(h) || !g(h)) && i(r(n(d), !1)), g(h) && i(r(n(h), !0))
  4887. }
  4888. return u
  4889. }
  4890. function d(t, n, r) {
  4891. function i() {
  4892. return y(t) ? 0 === n : 0 === n
  4893. }
  4894. function o() {
  4895. return y(t) ? n >= t.data.length : n >= t.childNodes.length
  4896. }
  4897. function a() {
  4898. var e;
  4899. return e = s(t.ownerDocument), e.setStart(t, n), e.setEnd(t, n), e
  4900. }
  4901. function l() {
  4902. return r || (r = u(new d(t, n))), r
  4903. }
  4904. function c() {
  4905. return l().length > 0
  4906. }
  4907. function f(e) {
  4908. return e && t === e.container() && n === e.offset()
  4909. }
  4910. function h(e) {
  4911. return x(t, e ? n - 1 : n)
  4912. }
  4913. return {
  4914. container: e.constant(t),
  4915. offset: e.constant(n),
  4916. toRange: a,
  4917. getClientRects: l,
  4918. isVisible: c,
  4919. isAtStart: i,
  4920. isAtEnd: o,
  4921. isEqual: f,
  4922. getNode: h
  4923. }
  4924. }
  4925. var f = t.isElement,
  4926. h = i.isCaretCandidate,
  4927. p = t.matchStyleValues("display", "block table"),
  4928. m = t.matchStyleValues("float", "left right"),
  4929. g = e.and(f, h, e.negate(m)),
  4930. v = e.negate(t.matchStyleValues("white-space", "pre pre-line pre-wrap")),
  4931. y = t.isText,
  4932. b = t.isBr,
  4933. C = n.nodeIndex,
  4934. x = r.getNode;
  4935. return d.fromRangeStart = function(e) {
  4936. return new d(e.startContainer, e.startOffset)
  4937. }, d.fromRangeEnd = function(e) {
  4938. return new d(e.endContainer, e.endOffset)
  4939. }, d.after = function(e) {
  4940. return new d(e.parentNode, C(e) + 1)
  4941. }, d.before = function(e) {
  4942. return new d(e.parentNode, C(e))
  4943. }, d
  4944. }), r(q, [_, w, z, p, $], function(e, t, n, r, i) {
  4945. function o(e) {
  4946. var t = e.parentNode;
  4947. return v(t) ? o(t) : t
  4948. }
  4949. function a(e) {
  4950. return e ? r.reduce(e.childNodes, function(e, t) {
  4951. return v(t) && "BR" != t.nodeName ? e = e.concat(a(t)) : e.push(t), e
  4952. }, []) : []
  4953. }
  4954. function s(e, t) {
  4955. for (;
  4956. (e = e.previousSibling) && g(e);) t += e.data.length;
  4957. return t
  4958. }
  4959. function l(e) {
  4960. return function(t) {
  4961. return e === t
  4962. }
  4963. }
  4964. function c(t) {
  4965. var n, i, s;
  4966. return n = a(o(t)), i = r.findIndex(n, l(t), t), n = n.slice(0, i + 1), s = r.reduce(n, function(e, t, r) {
  4967. return g(t) && g(n[r - 1]) && e++, e
  4968. }, 0), n = r.filter(n, e.matchNodeNames(t.nodeName)), i = r.findIndex(n, l(t), t), i - s
  4969. }
  4970. function u(e) {
  4971. var t;
  4972. return t = g(e) ? "text()" : e.nodeName.toLowerCase(), t + "[" + c(e) + "]"
  4973. }
  4974. function d(e, t, n) {
  4975. var r = [];
  4976. for (t = t.parentNode; t != e && (!n || !n(t)); t = t.parentNode) r.push(t);
  4977. return r
  4978. }
  4979. function f(t, i) {
  4980. var o, a, l = [],
  4981. c, f, h;
  4982. return o = i.container(), a = i.offset(), g(o) ? c = s(o, a) : (f = o.childNodes, a >= f.length ? (c = "after", a = f.length - 1) : c = "before", o = f[a]), l.push(u(o)), h = d(t, o), h = r.filter(h, n.negate(e.isBogus)), l = l.concat(r.map(h, function(e) {
  4983. return u(e)
  4984. })), l.reverse().join("/") + "," + c
  4985. }
  4986. function h(t, n, i) {
  4987. var o = a(t);
  4988. return o = r.filter(o, function(e, t) {
  4989. return !g(e) || !g(o[t - 1])
  4990. }), o = r.filter(o, e.matchNodeNames(n)), o[i]
  4991. }
  4992. function p(e, t) {
  4993. for (var n = e, r = 0, o; g(n);) {
  4994. if (o = n.data.length, t >= r && t <= r + o) {
  4995. e = n, t -= r;
  4996. break
  4997. }
  4998. if (!g(n.nextSibling)) {
  4999. e = n, t = o;
  5000. break
  5001. }
  5002. r += o, n = n.nextSibling
  5003. }
  5004. return t > e.data.length && (t = e.data.length), new i(e, t)
  5005. }
  5006. function m(e, t) {
  5007. var n, o, a;
  5008. return t ? (n = t.split(","), t = n[0].split("/"), a = n.length > 1 ? n[1] : "before", o = r.reduce(t, function(e, t) {
  5009. return (t = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(t)) ? ("text()" === t[1] && (t[1] = "#text"), h(e, t[1], parseInt(t[2], 10))) : null
  5010. }, e), o ? g(o) ? p(o, parseInt(a, 10)) : (a = "after" === a ? y(o) + 1 : y(o), new i(o.parentNode, a)) : null) : null
  5011. }
  5012. var g = e.isText,
  5013. v = e.isBogus,
  5014. y = t.nodeIndex;
  5015. return {
  5016. create: f,
  5017. resolve: m
  5018. }
  5019. }), r(j, [d, m, k, q, $, _, T], function(e, t, n, r, i, o, a) {
  5020. function s(s) {
  5021. var c = s.dom;
  5022. this.getBookmark = function(e, u) {
  5023. function d(e, n) {
  5024. var r = 0;
  5025. return t.each(c.select(e), function(e) {
  5026. if ("all" !== e.getAttribute("data-mce-bogus")) return e != n && void r++
  5027. }), r
  5028. }
  5029. function f(e) {
  5030. function t(t) {
  5031. var n, r, i, o = t ? "start" : "end";
  5032. n = e[o + "Container"], r = e[o + "Offset"], 1 == n.nodeType && "TR" == n.nodeName && (i = n.childNodes, n = i[Math.min(t ? r : r - 1, i.length - 1)], n && (r = t ? 0 : n.childNodes.length, e["set" + (t ? "Start" : "End")](n, r)))
  5033. }
  5034. return t(!0), t(), e
  5035. }
  5036. function h(e) {
  5037. function t(e, t) {
  5038. var r = e[t ? "startContainer" : "endContainer"],
  5039. i = e[t ? "startOffset" : "endOffset"],
  5040. o = [],
  5041. a, s, l = 0;
  5042. if (3 == r.nodeType) {
  5043. if (u)
  5044. for (a = r.previousSibling; a && 3 == a.nodeType; a = a.previousSibling) i += a.nodeValue.length;
  5045. o.push(i)
  5046. } else s = r.childNodes, i >= s.length && s.length && (l = 1, i = Math.max(0, s.length - 1)), o.push(c.nodeIndex(s[i], u) + l);
  5047. for (; r && r != n; r = r.parentNode) o.push(c.nodeIndex(r, u));
  5048. return o
  5049. }
  5050. var n = c.getRoot(),
  5051. r = {};
  5052. return r.start = t(e, !0), s.isCollapsed() || (r.end = t(e)), r
  5053. }
  5054. function p(e) {
  5055. function t(e, t) {
  5056. var r;
  5057. if (o.isElement(e) && (e = a.getNode(e, t), l(e))) return e;
  5058. if (n.isCaretContainer(e)) {
  5059. if (o.isText(e) && n.isCaretContainerBlock(e) && (e = e.parentNode), r = e.previousSibling, l(r)) return r;
  5060. if (r = e.nextSibling, l(r)) return r
  5061. }
  5062. }
  5063. return t(e.startContainer, e.startOffset) || t(e.endContainer, e.endOffset)
  5064. }
  5065. var m, g, v, y, b, C, x = "&#xFEFF;",
  5066. w;
  5067. if (2 == e) return C = s.getNode(), b = C ? C.nodeName : null, m = s.getRng(), l(C) || "IMG" == b ? {
  5068. name: b,
  5069. index: d(b, C)
  5070. } : s.tridentSel ? s.tridentSel.getBookmark(e) : (C = p(m), C ? (b = C.tagName, {
  5071. name: b,
  5072. index: d(b, C)
  5073. }) : h(m));
  5074. if (3 == e) return m = s.getRng(), {
  5075. start: r.create(c.getRoot(), i.fromRangeStart(m)),
  5076. end: r.create(c.getRoot(), i.fromRangeEnd(m))
  5077. };
  5078. if (e) return {
  5079. rng: s.getRng()
  5080. };
  5081. if (m = s.getRng(), v = c.uniqueId(), y = s.isCollapsed(), w = "overflow:hidden;line-height:0px", m.duplicate || m.item) {
  5082. if (m.item) return C = m.item(0), b = C.nodeName, {
  5083. name: b,
  5084. index: d(b, C)
  5085. };
  5086. g = m.duplicate();
  5087. try {
  5088. m.collapse(), m.pasteHTML('<span data-mce-type="bookmark" id="' + v + '_start" style="' + w + '">' + x + "</span>"), y || (g.collapse(!1), m.moveToElementText(g.parentElement()), 0 === m.compareEndPoints("StartToEnd", g) && g.move("character", -1), g.pasteHTML('<span data-mce-type="bookmark" id="' + v + '_end" style="' + w + '">' + x + "</span>"))
  5089. } catch (E) {
  5090. return null
  5091. }
  5092. } else {
  5093. if (C = s.getNode(), b = C.nodeName, "IMG" == b) return {
  5094. name: b,
  5095. index: d(b, C)
  5096. };
  5097. g = f(m.cloneRange()), y || (g.collapse(!1), g.insertNode(c.create("span", {
  5098. "data-mce-type": "bookmark",
  5099. id: v + "_end",
  5100. style: w
  5101. }, x))), m = f(m), m.collapse(!0), m.insertNode(c.create("span", {
  5102. "data-mce-type": "bookmark",
  5103. id: v + "_start",
  5104. style: w
  5105. }, x))
  5106. }
  5107. return s.moveToBookmark({
  5108. id: v,
  5109. keep: 1
  5110. }), {
  5111. id: v
  5112. }
  5113. }, this.moveToBookmark = function(n) {
  5114. function i(e) {
  5115. var t = n[e ? "start" : "end"],
  5116. r, i, o, a;
  5117. if (t) {
  5118. for (o = t[0], i = d, r = t.length - 1; r >= 1; r--) {
  5119. if (a = i.childNodes, t[r] > a.length - 1) return;
  5120. i = a[t[r]]
  5121. }
  5122. 3 === i.nodeType && (o = Math.min(t[0], i.nodeValue.length)), 1 === i.nodeType && (o = Math.min(t[0], i.childNodes.length)), e ? u.setStart(i, o) : u.setEnd(i, o)
  5123. }
  5124. return !0
  5125. }
  5126. function o(r) {
  5127. var i = c.get(n.id + "_" + r),
  5128. o, a, s, l, u = n.keep;
  5129. if (i && (o = i.parentNode, "start" == r ? (u ? (o = i.firstChild, a = 1) : a = c.nodeIndex(i), f = h = o, p = m = a) : (u ? (o = i.firstChild, a = 1) : a = c.nodeIndex(i), h = o, m = a), !u)) {
  5130. for (l = i.previousSibling, s = i.nextSibling, t.each(t.grep(i.childNodes), function(e) {
  5131. 3 == e.nodeType && (e.nodeValue = e.nodeValue.replace(/\uFEFF/g, ""))
  5132. }); i = c.get(n.id + "_" + r);) c.remove(i, 1);
  5133. l && s && l.nodeType == s.nodeType && 3 == l.nodeType && !e.opera && (a = l.nodeValue.length, l.appendData(s.nodeValue), c.remove(s), "start" == r ? (f = h = l, p = m = a) : (h = l, m = a))
  5134. }
  5135. }
  5136. function a(t) {
  5137. return !c.isBlock(t) || t.innerHTML || e.ie || (t.innerHTML = '<br data-mce-bogus="1" />'), t
  5138. }
  5139. function l() {
  5140. var e, t;
  5141. return e = c.createRng(), t = r.resolve(c.getRoot(), n.start), e.setStart(t.container(), t.offset()), t = r.resolve(c.getRoot(), n.end), e.setEnd(t.container(), t.offset()), e
  5142. }
  5143. var u, d, f, h, p, m;
  5144. if (n)
  5145. if (t.isArray(n.start)) {
  5146. if (u = c.createRng(), d = c.getRoot(), s.tridentSel) return s.tridentSel.moveToBookmark(n);
  5147. i(!0) && i() && s.setRng(u)
  5148. } else "string" == typeof n.start ? s.setRng(l(n)) : n.id ? (o("start"), o("end"), f && (u = c.createRng(), u.setStart(a(f), p), u.setEnd(a(h), m), s.setRng(u))) : n.name ? s.select(c.select(n.name)[n.index]) : n.rng && s.setRng(n.rng)
  5149. }
  5150. }
  5151. var l = o.isContentEditableFalse;
  5152. return s.isBookmarkNode = function(e) {
  5153. return e && "SPAN" === e.tagName && "bookmark" === e.getAttribute("data-mce-type")
  5154. }, s
  5155. }), r(Y, [y, H, F, T, j, _, d, m, $], function(e, n, r, i, o, a, s, l, c) {
  5156. function u(e, t, i, a) {
  5157. var s = this;
  5158. s.dom = e, s.win = t, s.serializer = i, s.editor = a, s.bookmarkManager = new o(s), s.controlSelection = new r(s, a), s.win.getSelection || (s.tridentSel = new n(s))
  5159. }
  5160. var d = l.each,
  5161. f = l.trim,
  5162. h = s.ie;
  5163. return u.prototype = {
  5164. setCursorLocation: function(e, t) {
  5165. var n = this,
  5166. r = n.dom.createRng();
  5167. e ? (r.setStart(e, t), r.setEnd(e, t), n.setRng(r), n.collapse(!1)) : (n._moveEndPoint(r, n.editor.getBody(), !0), n.setRng(r))
  5168. },
  5169. getContent: function(e) {
  5170. var n = this,
  5171. r = n.getRng(),
  5172. i = n.dom.create("body"),
  5173. o = n.getSel(),
  5174. a, s, l;
  5175. return e = e || {}, a = s = "", e.get = !0, e.format = e.format || "html", e.selection = !0, n.editor.fire("BeforeGetContent", e), "text" == e.format ? n.isCollapsed() ? "" : r.text || (o.toString ? o.toString() : "") : (r.cloneContents ? (l = r.cloneContents(), l && i.appendChild(l)) : r.item !== t || r.htmlText !== t ? (i.innerHTML = "<br>" + (r.item ? r.item(0).outerHTML : r.htmlText), i.removeChild(i.firstChild)) : i.innerHTML = r.toString(), /^\s/.test(i.innerHTML) && (a = " "), /\s+$/.test(i.innerHTML) && (s = " "), e.getInner = !0, e.content = n.isCollapsed() ? "" : a + n.serializer.serialize(i, e) + s, n.editor.fire("GetContent", e), e.content)
  5176. },
  5177. setContent: function(e, t) {
  5178. var n = this,
  5179. r = n.getRng(),
  5180. i, o = n.win.document,
  5181. a, s;
  5182. if (t = t || {
  5183. format: "html"
  5184. }, t.set = !0, t.selection = !0, t.content = e, t.no_events || n.editor.fire("BeforeSetContent", t), e = t.content, r.insertNode) {
  5185. e += '<span id="__caret">_</span>', r.startContainer == o && r.endContainer == o ? o.body.innerHTML = e : (r.deleteContents(), 0 === o.body.childNodes.length ? o.body.innerHTML = e : r.createContextualFragment ? r.insertNode(r.createContextualFragment(e)) : (a = o.createDocumentFragment(), s = o.createElement("div"), a.appendChild(s), s.outerHTML = e, r.insertNode(a))), i = n.dom.get("__caret"), r = o.createRange(), r.setStartBefore(i), r.setEndBefore(i), n.setRng(r), n.dom.remove("__caret");
  5186. try {
  5187. n.setRng(r)
  5188. } catch (l) {}
  5189. } else r.item && (o.execCommand("Delete", !1, null), r = n.getRng()), /^\s+/.test(e) ? (r.pasteHTML('<span id="__mce_tmp">_</span>' + e), n.dom.remove("__mce_tmp")) : r.pasteHTML(e);
  5190. t.no_events || n.editor.fire("SetContent", t)
  5191. },
  5192. getStart: function(e) {
  5193. var t = this,
  5194. n = t.getRng(),
  5195. r, i, o, a;
  5196. if (n.duplicate || n.item) {
  5197. if (n.item) return n.item(0);
  5198. for (o = n.duplicate(), o.collapse(1), r = o.parentElement(), r.ownerDocument !== t.dom.doc && (r = t.dom.getRoot()), i = a = n.parentElement(); a = a.parentNode;)
  5199. if (a == r) {
  5200. r = i;
  5201. break
  5202. }
  5203. return r
  5204. }
  5205. return r = n.startContainer, 1 == r.nodeType && r.hasChildNodes() && (e && n.collapsed || (r = r.childNodes[Math.min(r.childNodes.length - 1, n.startOffset)])), r && 3 == r.nodeType ? r.parentNode : r
  5206. },
  5207. getEnd: function(e) {
  5208. var t = this,
  5209. n = t.getRng(),
  5210. r, i;
  5211. return n.duplicate || n.item ? n.item ? n.item(0) : (n = n.duplicate(), n.collapse(0), r = n.parentElement(), r.ownerDocument !== t.dom.doc && (r = t.dom.getRoot()), r && "BODY" == r.nodeName ? r.lastChild || r : r) : (r = n.endContainer, i = n.endOffset, 1 == r.nodeType && r.hasChildNodes() && (e && n.collapsed || (r = r.childNodes[i > 0 ? i - 1 : i])), r && 3 == r.nodeType ? r.parentNode : r)
  5212. },
  5213. getBookmark: function(e, t) {
  5214. return this.bookmarkManager.getBookmark(e, t)
  5215. },
  5216. moveToBookmark: function(e) {
  5217. return this.bookmarkManager.moveToBookmark(e)
  5218. },
  5219. select: function(e, t) {
  5220. var n = this,
  5221. r = n.dom,
  5222. i = r.createRng(),
  5223. o;
  5224. if (n.lastFocusBookmark = null, e) {
  5225. if (!t && n.controlSelection.controlSelect(e)) return;
  5226. o = r.nodeIndex(e), i.setStart(e.parentNode, o), i.setEnd(e.parentNode, o + 1), t && (n._moveEndPoint(i, e, !0), n._moveEndPoint(i, e)), n.setRng(i)
  5227. }
  5228. return e
  5229. },
  5230. isCollapsed: function() {
  5231. var e = this,
  5232. t = e.getRng(),
  5233. n = e.getSel();
  5234. return !(!t || t.item) && (t.compareEndPoints ? 0 === t.compareEndPoints("StartToEnd", t) : !n || t.collapsed)
  5235. },
  5236. collapse: function(e) {
  5237. var t = this,
  5238. n = t.getRng(),
  5239. r;
  5240. n.item && (r = n.item(0), n = t.win.document.body.createTextRange(), n.moveToElementText(r)), n.collapse(!!e), t.setRng(n)
  5241. },
  5242. getSel: function() {
  5243. var e = this.win;
  5244. return e.getSelection ? e.getSelection() : e.document.selection
  5245. },
  5246. getRng: function(e) {
  5247. function t(e, t, n) {
  5248. try {
  5249. return t.compareBoundaryPoints(e, n)
  5250. } catch (r) {
  5251. return -1
  5252. }
  5253. }
  5254. var n = this,
  5255. r, i, o, a, s, l;
  5256. if (!n.win) return null;
  5257. if (a = n.win.document, "undefined" == typeof a || null === a) return null;
  5258. if (!e && n.lastFocusBookmark) {
  5259. var c = n.lastFocusBookmark;
  5260. return c.startContainer ? (i = a.createRange(), i.setStart(c.startContainer, c.startOffset), i.setEnd(c.endContainer, c.endOffset)) : i = c, i
  5261. }
  5262. if (e && n.tridentSel) return n.tridentSel.getRangeAt(0);
  5263. try {
  5264. (r = n.getSel()) && (i = r.rangeCount > 0 ? r.getRangeAt(0) : r.createRange ? r.createRange() : a.createRange())
  5265. } catch (u) {}
  5266. if (l = n.editor.fire("GetSelectionRange", {
  5267. range: i
  5268. }), l.range !== i) return l.range;
  5269. if (h && i && i.setStart && a.selection) {
  5270. try {
  5271. s = a.selection.createRange()
  5272. } catch (u) {}
  5273. s && s.item && (o = s.item(0), i = a.createRange(), i.setStartBefore(o), i.setEndAfter(o))
  5274. }
  5275. return i || (i = a.createRange ? a.createRange() : a.body.createTextRange()), i.setStart && 9 === i.startContainer.nodeType && i.collapsed && (o = n.dom.getRoot(), i.setStart(o, 0), i.setEnd(o, 0)), n.selectedRange && n.explicitRange && (0 === t(i.START_TO_START, i, n.selectedRange) && 0 === t(i.END_TO_END, i, n.selectedRange) ? i = n.explicitRange : (n.selectedRange = null, n.explicitRange = null)), i
  5276. },
  5277. setRng: function(e, t) {
  5278. var n = this,
  5279. r, i, o;
  5280. if (e)
  5281. if (e.select) {
  5282. n.explicitRange = null;
  5283. try {
  5284. e.select()
  5285. } catch (a) {}
  5286. } else if (n.tridentSel) {
  5287. if (e.cloneRange) try {
  5288. n.tridentSel.addRange(e)
  5289. } catch (a) {}
  5290. } else {
  5291. if (r = n.getSel(), o = n.editor.fire("SetSelectionRange", {
  5292. range: e
  5293. }), e = o.range, r) {
  5294. n.explicitRange = e;
  5295. try {
  5296. r.removeAllRanges(), r.addRange(e)
  5297. } catch (a) {}
  5298. t === !1 && r.extend && (r.collapse(e.endContainer, e.endOffset), r.extend(e.startContainer, e.startOffset)), n.selectedRange = r.rangeCount > 0 ? r.getRangeAt(0) : null
  5299. }
  5300. e.collapsed || e.startContainer != e.endContainer || !r.setBaseAndExtent || s.ie || e.endOffset - e.startOffset < 2 && e.startContainer.hasChildNodes() && (i = e.startContainer.childNodes[e.startOffset], i && "IMG" == i.tagName && n.getSel().setBaseAndExtent(i, 0, i, 1)), n.editor.fire("AfterSetSelectionRange", {
  5301. range: e
  5302. })
  5303. }
  5304. },
  5305. setNode: function(e) {
  5306. var t = this;
  5307. return t.setContent(t.dom.getOuterHTML(e)), e
  5308. },
  5309. getNode: function() {
  5310. function e(e, t) {
  5311. for (var n = e; e && 3 === e.nodeType && 0 === e.length;) e = t ? e.nextSibling : e.previousSibling;
  5312. return e || n
  5313. }
  5314. var t = this,
  5315. n = t.getRng(),
  5316. r, i, o, a, s, l = t.dom.getRoot();
  5317. return n ? (i = n.startContainer, o = n.endContainer, a = n.startOffset, s = n.endOffset, n.setStart ? (r = n.commonAncestorContainer, !n.collapsed && (i == o && s - a < 2 && i.hasChildNodes() && (r = i.childNodes[a]), 3 === i.nodeType && 3 === o.nodeType && (i = i.length === a ? e(i.nextSibling, !0) : i.parentNode, o = 0 === s ? e(o.previousSibling, !1) : o.parentNode, i && i === o)) ? i : r && 3 == r.nodeType ? r.parentNode : r) : (r = n.item ? n.item(0) : n.parentElement(), r.ownerDocument !== t.win.document && (r = l), r)) : l
  5318. },
  5319. getSelectedBlocks: function(t, n) {
  5320. var r = this,
  5321. i = r.dom,
  5322. o, a, s = [];
  5323. if (a = i.getRoot(), t = i.getParent(t || r.getStart(), i.isBlock), n = i.getParent(n || r.getEnd(), i.isBlock), t && t != a && s.push(t), t && n && t != n) {
  5324. o = t;
  5325. for (var l = new e(t, a);
  5326. (o = l.next()) && o != n;) i.isBlock(o) && s.push(o)
  5327. }
  5328. return n && t != n && n != a && s.push(n), s
  5329. },
  5330. isForward: function() {
  5331. var e = this.dom,
  5332. t = this.getSel(),
  5333. n, r;
  5334. return !(t && t.anchorNode && t.focusNode) || (n = e.createRng(), n.setStart(t.anchorNode, t.anchorOffset), n.collapse(!0), r = e.createRng(), r.setStart(t.focusNode, t.focusOffset), r.collapse(!0), n.compareBoundaryPoints(n.START_TO_START, r) <= 0)
  5335. },
  5336. normalize: function() {
  5337. var e = this,
  5338. t = e.getRng();
  5339. return s.range && new i(e.dom).normalize(t) && e.setRng(t, e.isForward()), t
  5340. },
  5341. selectorChanged: function(e, t) {
  5342. var n = this,
  5343. r;
  5344. return n.selectorChangedData || (n.selectorChangedData = {}, r = {}, n.editor.on("NodeChange", function(e) {
  5345. var t = e.element,
  5346. i = n.dom,
  5347. o = i.getParents(t, null, i.getRoot()),
  5348. a = {};
  5349. d(n.selectorChangedData, function(e, t) {
  5350. d(o, function(n) {
  5351. if (i.is(n, t)) return r[t] || (d(e, function(e) {
  5352. e(!0, {
  5353. node: n,
  5354. selector: t,
  5355. parents: o
  5356. })
  5357. }), r[t] = e), a[t] = e, !1
  5358. })
  5359. }), d(r, function(e, n) {
  5360. a[n] || (delete r[n], d(e, function(e) {
  5361. e(!1, {
  5362. node: t,
  5363. selector: n,
  5364. parents: o
  5365. })
  5366. }))
  5367. })
  5368. })), n.selectorChangedData[e] || (n.selectorChangedData[e] = []), n.selectorChangedData[e].push(t), n
  5369. },
  5370. getScrollContainer: function() {
  5371. for (var e, t = this.dom.getRoot(); t && "BODY" != t.nodeName;) {
  5372. if (t.scrollHeight > t.clientHeight) {
  5373. e = t;
  5374. break
  5375. }
  5376. t = t.parentNode
  5377. }
  5378. return e
  5379. },
  5380. scrollIntoView: function(e, t) {
  5381. function n(e) {
  5382. for (var t = 0, n = 0, r = e; r && r.nodeType;) t += r.offsetLeft || 0, n += r.offsetTop || 0, r = r.offsetParent;
  5383. return {
  5384. x: t,
  5385. y: n
  5386. }
  5387. }
  5388. var r, i, o = this,
  5389. s = o.dom,
  5390. l = s.getRoot(),
  5391. c, u, d = 0;
  5392. if (a.isElement(e)) {
  5393. if (t === !1 && (d = e.offsetHeight), "BODY" != l.nodeName) {
  5394. var f = o.getScrollContainer();
  5395. if (f) return r = n(e).y - n(f).y + d, u = f.clientHeight, c = f.scrollTop, void((r < c || r + 25 > c + u) && (f.scrollTop = r < c ? r : r - u + 25))
  5396. }
  5397. i = s.getViewPort(o.editor.getWin()), r = s.getPos(e).y + d, c = i.y, u = i.h, (r < i.y || r + 25 > c + u) && o.editor.getWin().scrollTo(0, r < c ? r : r - u + 25)
  5398. }
  5399. },
  5400. placeCaretAt: function(e, t) {
  5401. this.setRng(i.getCaretRangeFromPoint(e, t, this.editor.getDoc()))
  5402. },
  5403. _moveEndPoint: function(t, n, r) {
  5404. var i = n,
  5405. o = new e(n, i),
  5406. a = this.dom.schema.getNonEmptyElements();
  5407. do {
  5408. if (3 == n.nodeType && 0 !== f(n.nodeValue).length) return void(r ? t.setStart(n, 0) : t.setEnd(n, n.nodeValue.length));
  5409. if (a[n.nodeName] && !/^(TD|TH)$/.test(n.nodeName)) return void(r ? t.setStartBefore(n) : "BR" == n.nodeName ? t.setEndBefore(n) : t.setEndAfter(n));
  5410. if (s.ie && s.ie < 11 && this.dom.isBlock(n) && this.dom.isEmpty(n)) return void(r ? t.setStart(n, 0) : t.setEnd(n, 0))
  5411. } while (n = r ? o.next() : o.prev());
  5412. "BODY" == i.nodeName && (r ? t.setStart(i, 0) : t.setEnd(i, i.childNodes.length))
  5413. },
  5414. getBoundingClientRect: function() {
  5415. var e = this.getRng();
  5416. return e.collapsed ? c.fromRangeStart(e).getClientRects()[0] : e.getBoundingClientRect()
  5417. },
  5418. destroy: function() {
  5419. this.win = null, this.controlSelection.destroy()
  5420. }
  5421. }, u
  5422. }), r(X, [j, m], function(e, t) {
  5423. function n(t) {
  5424. this.compare = function(n, i) {
  5425. function o(e) {
  5426. var n = {};
  5427. return r(t.getAttribs(e), function(r) {
  5428. var i = r.nodeName.toLowerCase();
  5429. 0 !== i.indexOf("_") && "style" !== i && 0 !== i.indexOf("data-") && (n[i] = t.getAttrib(e, i))
  5430. }), n
  5431. }
  5432. function a(e, t) {
  5433. var n, r;
  5434. for (r in e)
  5435. if (e.hasOwnProperty(r)) {
  5436. if (n = t[r], "undefined" == typeof n) return !1;
  5437. if (e[r] != n) return !1;
  5438. delete t[r]
  5439. }
  5440. for (r in t)
  5441. if (t.hasOwnProperty(r)) return !1;
  5442. return !0
  5443. }
  5444. return n.nodeName == i.nodeName && (!!a(o(n), o(i)) && (!!a(t.parseStyle(t.getAttrib(n, "style")), t.parseStyle(t.getAttrib(i, "style"))) && (!e.isBookmarkNode(n) && !e.isBookmarkNode(i))))
  5445. }
  5446. }
  5447. var r = t.each;
  5448. return n
  5449. }), r(K, [w, m, B], function(e, t, n) {
  5450. function r(e, r) {
  5451. function i(e, t) {
  5452. t.classes.length && c.addClass(e, t.classes.join(" ")), c.setAttribs(e, t.attrs)
  5453. }
  5454. function o(e) {
  5455. var t;
  5456. return u = "string" == typeof e ? {
  5457. name: e,
  5458. classes: [],
  5459. attrs: {}
  5460. } : e, t = c.create(u.name), i(t, u), t
  5461. }
  5462. function a(e, n) {
  5463. var r = "string" != typeof e ? e.nodeName.toLowerCase() : e,
  5464. i = f.getElementRule(r),
  5465. o = i.parentsRequired;
  5466. return !(!o || !o.length) && (n && t.inArray(o, n) !== -1 ? n : o[0])
  5467. }
  5468. function s(e, n, r) {
  5469. var i, l, u, d = n.length && n[0],
  5470. f = d && d.name;
  5471. if (u = a(e, f)) f == u ? (l = n[0], n = n.slice(1)) : l = u;
  5472. else if (d) l = n[0], n = n.slice(1);
  5473. else if (!r) return e;
  5474. return l && (i = o(l), i.appendChild(e)), r && (i || (i = c.create("div"), i.appendChild(e)), t.each(r, function(t) {
  5475. var n = o(t);
  5476. i.insertBefore(n, e)
  5477. })), s(i, n, l && l.siblings)
  5478. }
  5479. var l, u, d, f = r && r.schema || new n({});
  5480. return e && e.length ? (u = e[0], l = o(u), d = c.create("div"), d.appendChild(s(l, e.slice(1), u.siblings)), d) : ""
  5481. }
  5482. function i(e, t) {
  5483. return r(a(e, t))
  5484. }
  5485. function o(e) {
  5486. var n, r = {
  5487. classes: [],
  5488. attrs: {}
  5489. };
  5490. return e = r.selector = t.trim(e), "*" !== e && (n = e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g, function(e, n, i, o, a) {
  5491. switch (n) {
  5492. case "#":
  5493. r.attrs.id = i;
  5494. break;
  5495. case ".":
  5496. r.classes.push(i);
  5497. break;
  5498. case ":":
  5499. t.inArray("checked disabled enabled read-only required".split(" "), i) !== -1 && (r.attrs[i] = i)
  5500. }
  5501. if ("[" == o) {
  5502. var s = a.match(/([\w\-]+)(?:\=\"([^\"]+))?/);
  5503. s && (r.attrs[s[1]] = s[2])
  5504. }
  5505. return ""
  5506. })), r.name = n || "div", r
  5507. }
  5508. function a(e) {
  5509. return e && "string" == typeof e ? (e = e.split(/\s*,\s*/)[0], e = e.replace(/\s*(~\+|~|\+|>)\s*/g, "$1"), t.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/), function(e) {
  5510. var n = t.map(e.split(/(?:~\+|~|\+)/), o),
  5511. r = n.pop();
  5512. return n.length && (r.siblings = n), r
  5513. }).reverse()) : []
  5514. }
  5515. function s(e, t) {
  5516. function n(e) {
  5517. return e.replace(/%(\w+)/g, "")
  5518. }
  5519. var i, o, s, u, d = "",
  5520. f, h;
  5521. if (h = e.settings.preview_styles, h === !1) return "";
  5522. if ("string" != typeof h && (h = "font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"), "string" == typeof t) {
  5523. if (t = e.formatter.get(t), !t) return;
  5524. t = t[0]
  5525. }
  5526. return "preview" in t && (h = t.preview, h === !1) ? "" : (i = t.block || t.inline || "span", u = a(t.selector), u.length ? (u[0].name || (u[0].name = i), i = t.selector, o = r(u)) : o = r([i]), s = c.select(i, o)[0] || o.firstChild, l(t.styles, function(e, t) {
  5527. e = n(e), e && c.setStyle(s, t, e)
  5528. }), l(t.attributes, function(e, t) {
  5529. e = n(e), e && c.setAttrib(s, t, e)
  5530. }), l(t.classes, function(e) {
  5531. e = n(e), c.hasClass(s, e) || c.addClass(s, e)
  5532. }), e.fire("PreviewFormats"), c.setStyles(o, {
  5533. position: "absolute",
  5534. left: -65535
  5535. }), e.getBody().appendChild(o), f = c.getStyle(e.getBody(), "fontSize", !0), f = /px$/.test(f) ? parseInt(f, 10) : 0, l(h.split(" "), function(t) {
  5536. var n = c.getStyle(s, t, !0);
  5537. if (!("background-color" == t && /transparent|rgba\s*\([^)]+,\s*0\)/.test(n) && (n = c.getStyle(e.getBody(), t, !0), "#ffffff" == c.toHex(n).toLowerCase()) || "color" == t && "#000000" == c.toHex(n).toLowerCase())) {
  5538. if ("font-size" == t && /em|%$/.test(n)) {
  5539. if (0 === f) return;
  5540. n = parseFloat(n, 10) / (/%$/.test(n) ? 100 : 1), n = n * f + "px"
  5541. }
  5542. "border" == t && n && (d += "padding:0 2px;"), d += t + ":" + n + ";"
  5543. }
  5544. }), e.fire("AfterPreviewFormats"), c.remove(o), d)
  5545. }
  5546. var l = t.each,
  5547. c = e.DOM;
  5548. return {
  5549. getCssText: s,
  5550. parseSelector: a,
  5551. selectorToHtml: i
  5552. }
  5553. }), r(G, [p, _, g], function(e, t, n) {
  5554. function r(e, t) {
  5555. var n = o[e];
  5556. n || (o[e] = n = []), o[e].push(t)
  5557. }
  5558. function i(e, t) {
  5559. s(o[e], function(e) {
  5560. e(t)
  5561. })
  5562. }
  5563. var o = {},
  5564. a = e.filter,
  5565. s = e.each;
  5566. return r("pre", function(r) {
  5567. function i(t) {
  5568. return c(t.previousSibling) && e.indexOf(u, t.previousSibling) != -1
  5569. }
  5570. function o(e, t) {
  5571. n(t).remove(), n(e).append("<br><br>").append(t.childNodes)
  5572. }
  5573. var l = r.selection.getRng(),
  5574. c, u;
  5575. c = t.matchNodeNames("pre"), l.collapsed || (u = r.selection.getSelectedBlocks(), s(a(a(u, c), i), function(e) {
  5576. o(e.previousSibling, e)
  5577. }))
  5578. }), {
  5579. postProcess: i
  5580. }
  5581. }), r(J, [y, T, j, X, m, K, G], function(e, t, n, r, i, o, a) {
  5582. return function(s) {
  5583. function l(e) {
  5584. return e.nodeType && (e = e.nodeName), !!s.schema.getTextBlockElements()[e.toLowerCase()]
  5585. }
  5586. function c(e) {
  5587. return /^(TH|TD)$/.test(e.nodeName)
  5588. }
  5589. function u(e) {
  5590. return e && /^(IMG)$/.test(e.nodeName)
  5591. }
  5592. function d(e, t) {
  5593. return Y.getParents(e, t, Y.getRoot())
  5594. }
  5595. function f(e) {
  5596. return 1 === e.nodeType && "_mce_caret" === e.id
  5597. }
  5598. function h() {
  5599. g({
  5600. valigntop: [{
  5601. selector: "td,th",
  5602. styles: {
  5603. verticalAlign: "top"
  5604. }
  5605. }],
  5606. valignmiddle: [{
  5607. selector: "td,th",
  5608. styles: {
  5609. verticalAlign: "middle"
  5610. }
  5611. }],
  5612. valignbottom: [{
  5613. selector: "td,th",
  5614. styles: {
  5615. verticalAlign: "bottom"
  5616. }
  5617. }],
  5618. alignleft: [{
  5619. selector: "figure.image",
  5620. collapsed: !1,
  5621. classes: "align-left",
  5622. ceFalseOverride: !0,
  5623. preview: "font-family font-size"
  5624. }, {
  5625. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  5626. styles: {
  5627. textAlign: "left"
  5628. },
  5629. inherit: !1,
  5630. preview: !1,
  5631. defaultBlock: "div"
  5632. }, {
  5633. selector: "img,table",
  5634. collapsed: !1,
  5635. styles: {
  5636. "float": "left"
  5637. },
  5638. preview: "font-family font-size"
  5639. }],
  5640. aligncenter: [{
  5641. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  5642. styles: {
  5643. textAlign: "center"
  5644. },
  5645. inherit: !1,
  5646. preview: !1,
  5647. defaultBlock: "div"
  5648. }, {
  5649. selector: "figure.image",
  5650. collapsed: !1,
  5651. classes: "align-center",
  5652. ceFalseOverride: !0,
  5653. preview: "font-family font-size"
  5654. }, {
  5655. selector: "img",
  5656. collapsed: !1,
  5657. styles: {
  5658. display: "block",
  5659. marginLeft: "auto",
  5660. marginRight: "auto"
  5661. },
  5662. preview: !1
  5663. }, {
  5664. selector: "table",
  5665. collapsed: !1,
  5666. styles: {
  5667. marginLeft: "auto",
  5668. marginRight: "auto"
  5669. },
  5670. preview: "font-family font-size"
  5671. }],
  5672. alignright: [{
  5673. selector: "figure.image",
  5674. collapsed: !1,
  5675. classes: "align-right",
  5676. ceFalseOverride: !0,
  5677. preview: "font-family font-size"
  5678. }, {
  5679. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  5680. styles: {
  5681. textAlign: "right"
  5682. },
  5683. inherit: !1,
  5684. preview: "font-family font-size",
  5685. defaultBlock: "div"
  5686. }, {
  5687. selector: "img,table",
  5688. collapsed: !1,
  5689. styles: {
  5690. "float": "right"
  5691. },
  5692. preview: "font-family font-size"
  5693. }],
  5694. alignjustify: [{
  5695. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  5696. styles: {
  5697. textAlign: "justify"
  5698. },
  5699. inherit: !1,
  5700. defaultBlock: "div",
  5701. preview: "font-family font-size"
  5702. }],
  5703. bold: [{
  5704. inline: "strong",
  5705. remove: "all"
  5706. }, {
  5707. inline: "span",
  5708. styles: {
  5709. fontWeight: "bold"
  5710. }
  5711. }, {
  5712. inline: "b",
  5713. remove: "all"
  5714. }],
  5715. italic: [{
  5716. inline: "em",
  5717. remove: "all"
  5718. }, {
  5719. inline: "span",
  5720. styles: {
  5721. fontStyle: "italic"
  5722. }
  5723. }, {
  5724. inline: "i",
  5725. remove: "all"
  5726. }],
  5727. underline: [{
  5728. inline: "span",
  5729. styles: {
  5730. textDecoration: "underline"
  5731. },
  5732. exact: !0
  5733. }, {
  5734. inline: "u",
  5735. remove: "all"
  5736. }],
  5737. strikethrough: [{
  5738. inline: "span",
  5739. styles: {
  5740. textDecoration: "line-through"
  5741. },
  5742. exact: !0
  5743. }, {
  5744. inline: "strike",
  5745. remove: "all"
  5746. }],
  5747. forecolor: {
  5748. inline: "span",
  5749. styles: {
  5750. color: "%value"
  5751. },
  5752. links: !0,
  5753. remove_similar: !0
  5754. },
  5755. hilitecolor: {
  5756. inline: "span",
  5757. styles: {
  5758. backgroundColor: "%value"
  5759. },
  5760. links: !0,
  5761. remove_similar: !0
  5762. },
  5763. fontname: {
  5764. inline: "span",
  5765. styles: {
  5766. fontFamily: "%value"
  5767. }
  5768. },
  5769. fontsize: {
  5770. inline: "span",
  5771. styles: {
  5772. fontSize: "%value"
  5773. }
  5774. },
  5775. fontsize_class: {
  5776. inline: "span",
  5777. attributes: {
  5778. "class": "%value"
  5779. }
  5780. },
  5781. blockquote: {
  5782. block: "blockquote",
  5783. wrapper: 1,
  5784. remove: "all"
  5785. },
  5786. subscript: {
  5787. inline: "sub"
  5788. },
  5789. superscript: {
  5790. inline: "sup"
  5791. },
  5792. code: {
  5793. inline: "code"
  5794. },
  5795. link: {
  5796. inline: "a",
  5797. selector: "a",
  5798. remove: "all",
  5799. split: !0,
  5800. deep: !0,
  5801. onmatch: function() {
  5802. return !0
  5803. },
  5804. onformat: function(e, t, n) {
  5805. ue(n, function(t, n) {
  5806. Y.setAttrib(e, n, t)
  5807. })
  5808. }
  5809. },
  5810. removeformat: [{
  5811. selector: "b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",
  5812. remove: "all",
  5813. split: !0,
  5814. expand: !1,
  5815. block_expand: !0,
  5816. deep: !0
  5817. }, {
  5818. selector: "span",
  5819. attributes: ["style", "class"],
  5820. remove: "empty",
  5821. split: !0,
  5822. expand: !1,
  5823. deep: !0
  5824. }, {
  5825. selector: "*",
  5826. attributes: ["style", "class"],
  5827. split: !1,
  5828. expand: !1,
  5829. deep: !0
  5830. }]
  5831. }), ue("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/), function(e) {
  5832. g(e, {
  5833. block: e,
  5834. remove: "all"
  5835. })
  5836. }), g(s.settings.formats)
  5837. }
  5838. function p() {
  5839. s.addShortcut("meta+b", "bold_desc", "Bold"), s.addShortcut("meta+i", "italic_desc", "Italic"), s.addShortcut("meta+u", "underline_desc", "Underline");
  5840. for (var e = 1; e <= 6; e++) s.addShortcut("access+" + e, "", ["FormatBlock", !1, "h" + e]);
  5841. s.addShortcut("access+7", "", ["FormatBlock", !1, "p"]), s.addShortcut("access+8", "", ["FormatBlock", !1, "div"]), s.addShortcut("access+9", "", ["FormatBlock", !1, "address"])
  5842. }
  5843. function m(e) {
  5844. return e ? j[e] : j
  5845. }
  5846. function g(e, t) {
  5847. e && ("string" != typeof e ? ue(e, function(e, t) {
  5848. g(t, e)
  5849. }) : (t = t.length ? t : [t], ue(t, function(e) {
  5850. e.deep === oe && (e.deep = !e.selector), e.split === oe && (e.split = !e.selector || e.inline), e.remove === oe && e.selector && !e.inline && (e.remove = "none"), e.selector && e.inline && (e.mixed = !0, e.block_expand = !0), "string" == typeof e.classes && (e.classes = e.classes.split(/\s+/))
  5851. }), j[e] = t))
  5852. }
  5853. function v(e) {
  5854. return e && j[e] && delete j[e], j
  5855. }
  5856. function y(e, t) {
  5857. var n = m(t);
  5858. if (n)
  5859. for (var r = 0; r < n.length; r++)
  5860. if (n[r].inherit === !1 && Y.is(e, n[r].selector)) return !0;
  5861. return !1
  5862. }
  5863. function b(e) {
  5864. var t;
  5865. return s.dom.getParent(e, function(e) {
  5866. return t = s.dom.getStyle(e, "text-decoration"), t && "none" !== t
  5867. }), t
  5868. }
  5869. function C(e) {
  5870. var t;
  5871. 1 === e.nodeType && e.parentNode && 1 === e.parentNode.nodeType && (t = b(e.parentNode), s.dom.getStyle(e, "color") && t ? s.dom.setStyle(e, "text-decoration", t) : s.dom.getStyle(e, "text-decoration") === t && s.dom.setStyle(e, "text-decoration", null));
  5872. }
  5873. function x(t, n, r) {
  5874. function i(e, t) {
  5875. if (t = t || h, e) {
  5876. if (t.onformat && t.onformat(e, t, n, r), ue(t.styles, function(t, r) {
  5877. Y.setStyle(e, r, M(t, n))
  5878. }), t.styles) {
  5879. var i = Y.getAttrib(e, "style");
  5880. i && e.setAttribute("data-mce-style", i)
  5881. }
  5882. ue(t.attributes, function(t, r) {
  5883. Y.setAttrib(e, r, M(t, n))
  5884. }), ue(t.classes, function(t) {
  5885. t = M(t, n), Y.hasClass(e, t) || Y.addClass(e, t)
  5886. })
  5887. }
  5888. }
  5889. function o(e, t) {
  5890. var n = !1;
  5891. return !!h.selector && (ue(e, function(e) {
  5892. if (!("collapsed" in e && e.collapsed !== v)) return Y.is(t, e.selector) && !f(t) ? (i(t, e), n = !0, !1) : void 0
  5893. }), n)
  5894. }
  5895. function c() {
  5896. function t(t, n) {
  5897. var i = new e(n);
  5898. for (r = i.prev2(); r; r = i.prev2()) {
  5899. if (3 == r.nodeType && r.data.length > 0) return r;
  5900. if (r.childNodes.length > 1 || r == t || "BR" == r.tagName) return r
  5901. }
  5902. }
  5903. var n = s.selection.getRng(),
  5904. i = n.startContainer,
  5905. o = n.endContainer;
  5906. if (i != o && 0 === n.endOffset) {
  5907. var a = t(i, o),
  5908. l = 3 == a.nodeType ? a.data.length : a.childNodes.length;
  5909. n.setEnd(a, l)
  5910. }
  5911. return n
  5912. }
  5913. function u(e, r, a) {
  5914. var s = [],
  5915. c, u, p = !0;
  5916. c = h.inline || h.block, u = Y.create(c), i(u), K.walk(e, function(e) {
  5917. function r(e) {
  5918. var g, v, y, b;
  5919. if (b = p, g = e.nodeName.toLowerCase(), v = e.parentNode.nodeName.toLowerCase(), 1 === e.nodeType && ae(e) && (b = p, p = "true" === ae(e), y = !0), B(g, "br")) return m = 0, void(h.block && Y.remove(e));
  5920. if (h.wrapper && N(e, t, n)) return void(m = 0);
  5921. if (p && !y && h.block && !h.wrapper && l(g) && G(v, c)) return e = Y.rename(e, c), i(e), s.push(e), void(m = 0);
  5922. if (h.selector) {
  5923. var C = o(d, e);
  5924. if (!h.inline || C) return void(m = 0)
  5925. }!p || y || !G(c, g) || !G(v, c) || !a && 3 === e.nodeType && 1 === e.nodeValue.length && 65279 === e.nodeValue.charCodeAt(0) || f(e) || h.inline && J(e) ? (m = 0, ue(de(e.childNodes), r), y && (p = b), m = 0) : (m || (m = Y.clone(u, ne), e.parentNode.insertBefore(m, e), s.push(m)), m.appendChild(e))
  5926. }
  5927. var m;
  5928. ue(e, r)
  5929. }), h.links === !0 && ue(s, function(e) {
  5930. function t(e) {
  5931. "A" === e.nodeName && i(e, h), ue(de(e.childNodes), t)
  5932. }
  5933. t(e)
  5934. }), ue(s, function(e) {
  5935. function r(e) {
  5936. var t = 0;
  5937. return ue(e.childNodes, function(e) {
  5938. P(e) || ce(e) || t++
  5939. }), t
  5940. }
  5941. function o(e) {
  5942. var t, n;
  5943. return ue(e.childNodes, function(e) {
  5944. if (1 == e.nodeType && !ce(e) && !f(e)) return t = e, ne
  5945. }), t && !ce(t) && A(t, h) && (n = Y.clone(t, ne), i(n), Y.replace(n, e, re), Y.remove(t, 1)), n || e
  5946. }
  5947. var a;
  5948. if (a = r(e), (s.length > 1 || !J(e)) && 0 === a) return void Y.remove(e, 1);
  5949. if (h.inline || h.wrapper) {
  5950. if (h.exact || 1 !== a || (e = o(e)), ue(d, function(t) {
  5951. ue(Y.select(t.inline, e), function(e) {
  5952. ce(e) || F(t, n, e, t.exact ? e : null)
  5953. })
  5954. }), N(e.parentNode, t, n)) return Y.remove(e, 1), e = 0, re;
  5955. h.merge_with_parents && Y.getParent(e.parentNode, function(r) {
  5956. if (N(r, t, n)) return Y.remove(e, 1), e = 0, re
  5957. }), e && h.merge_siblings !== !1 && (e = W(U(e), e), e = W(e, U(e, re)))
  5958. }
  5959. })
  5960. }
  5961. var d = m(t),
  5962. h = d[0],
  5963. p, g, v = !r && X.isCollapsed();
  5964. if ("false" !== ae(X.getNode())) {
  5965. if (h) {
  5966. if (r) r.nodeType ? o(d, r) || (g = Y.createRng(), g.setStartBefore(r), g.setEndAfter(r), u(H(g, d), null, !0)) : u(r, null, !0);
  5967. else if (v && h.inline && !Y.select("td[data-mce-selected],th[data-mce-selected]").length) $("apply", t, n);
  5968. else {
  5969. var y = s.selection.getNode();
  5970. Q || !d[0].defaultBlock || Y.getParent(y, Y.isBlock) || x(d[0].defaultBlock), s.selection.setRng(c()), p = X.getBookmark(), u(H(X.getRng(re), d), p), h.styles && (h.styles.color || h.styles.textDecoration) && (fe(y, C, "childNodes"), C(y)), X.moveToBookmark(p), q(X.getRng(re)), s.nodeChanged()
  5971. }
  5972. a.postProcess(t, s)
  5973. }
  5974. } else {
  5975. r = X.getNode();
  5976. for (var b = 0, w = d.length; b < w; b++)
  5977. if (d[b].ceFalseOverride && Y.is(r, d[b].selector)) return void i(r, d[b])
  5978. }
  5979. }
  5980. function w(e, t, n, r) {
  5981. function i(e) {
  5982. var n, r, o, a, s;
  5983. if (1 === e.nodeType && ae(e) && (a = y, y = "true" === ae(e), s = !0), n = de(e.childNodes), y && !s)
  5984. for (r = 0, o = h.length; r < o && !F(h[r], t, e, e); r++);
  5985. if (p.deep && n.length) {
  5986. for (r = 0, o = n.length; r < o; r++) i(n[r]);
  5987. s && (y = a)
  5988. }
  5989. }
  5990. function o(n) {
  5991. var i;
  5992. return ue(d(n.parentNode).reverse(), function(n) {
  5993. var o;
  5994. i || "_start" == n.id || "_end" == n.id || (o = N(n, e, t, r), o && o.split !== !1 && (i = n))
  5995. }), i
  5996. }
  5997. function a(e, n, r, i) {
  5998. var o, a, s, l, c, u;
  5999. if (e) {
  6000. for (u = e.parentNode, o = n.parentNode; o && o != u; o = o.parentNode) {
  6001. for (a = Y.clone(o, ne), c = 0; c < h.length; c++)
  6002. if (F(h[c], t, a, a)) {
  6003. a = 0;
  6004. break
  6005. }
  6006. a && (s && a.appendChild(s), l || (l = a), s = a)
  6007. }!i || p.mixed && J(e) || (n = Y.split(e, n)), s && (r.parentNode.insertBefore(s, r), l.appendChild(r))
  6008. }
  6009. return n
  6010. }
  6011. function l(e) {
  6012. return a(o(e), e, e, !0)
  6013. }
  6014. function u(e) {
  6015. var t = Y.get(e ? "_start" : "_end"),
  6016. n = t[e ? "firstChild" : "lastChild"];
  6017. return ce(n) && (n = n[e ? "firstChild" : "lastChild"]), 3 == n.nodeType && 0 === n.data.length && (n = e ? t.previousSibling || t.nextSibling : t.nextSibling || t.previousSibling), Y.remove(t, !0), n
  6018. }
  6019. function f(e) {
  6020. var t, n, r = e.commonAncestorContainer;
  6021. if (e = H(e, h, re), p.split) {
  6022. if (t = V(e, re), n = V(e), t != n) {
  6023. if (/^(TR|TH|TD)$/.test(t.nodeName) && t.firstChild && (t = "TR" == t.nodeName ? t.firstChild.firstChild || t : t.firstChild || t), r && /^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName) && c(n) && n.firstChild && (n = n.firstChild || n), Y.isChildOf(t, n) && !J(n) && !c(t) && !c(n)) return t = O(t, "span", {
  6024. id: "_start",
  6025. "data-mce-type": "bookmark"
  6026. }), l(t), void(t = u(re));
  6027. t = O(t, "span", {
  6028. id: "_start",
  6029. "data-mce-type": "bookmark"
  6030. }), n = O(n, "span", {
  6031. id: "_end",
  6032. "data-mce-type": "bookmark"
  6033. }), l(t), l(n), t = u(re), n = u()
  6034. } else t = n = l(t);
  6035. e.startContainer = t.parentNode ? t.parentNode : t, e.startOffset = Z(t), e.endContainer = n.parentNode ? n.parentNode : n, e.endOffset = Z(n) + 1
  6036. }
  6037. K.walk(e, function(e) {
  6038. ue(e, function(e) {
  6039. i(e), 1 === e.nodeType && "underline" === s.dom.getStyle(e, "text-decoration") && e.parentNode && "underline" === b(e.parentNode) && F({
  6040. deep: !1,
  6041. exact: !0,
  6042. inline: "span",
  6043. styles: {
  6044. textDecoration: "underline"
  6045. }
  6046. }, null, e)
  6047. })
  6048. })
  6049. }
  6050. var h = m(e),
  6051. p = h[0],
  6052. g, v, y = !0;
  6053. if (n) return void(n.nodeType ? (v = Y.createRng(), v.setStartBefore(n), v.setEndAfter(n), f(v)) : f(n));
  6054. if ("false" !== ae(X.getNode())) X.isCollapsed() && p.inline && !Y.select("td[data-mce-selected],th[data-mce-selected]").length ? $("remove", e, t, r) : (g = X.getBookmark(), f(X.getRng(re)), X.moveToBookmark(g), p.inline && _(e, t, X.getStart()) && q(X.getRng(!0)), s.nodeChanged());
  6055. else {
  6056. n = X.getNode();
  6057. for (var C = 0, x = h.length; C < x && (!h[C].ceFalseOverride || !F(h[C], t, n, n)); C++);
  6058. }
  6059. }
  6060. function E(e, t, n) {
  6061. var r = m(e);
  6062. !_(e, t, n) || "toggle" in r[0] && !r[0].toggle ? x(e, t, n) : w(e, t, n)
  6063. }
  6064. function N(e, t, n, r) {
  6065. function i(e, t, i) {
  6066. var o, a, s = t[i],
  6067. l;
  6068. if (t.onmatch) return t.onmatch(e, t, i);
  6069. if (s)
  6070. if (s.length === oe) {
  6071. for (o in s)
  6072. if (s.hasOwnProperty(o)) {
  6073. if (a = "attributes" === i ? Y.getAttrib(e, o) : D(e, o), r && !a && !t.exact) return;
  6074. if ((!r || t.exact) && !B(a, L(M(s[o], n), o))) return
  6075. }
  6076. } else
  6077. for (l = 0; l < s.length; l++)
  6078. if ("attributes" === i ? Y.getAttrib(e, s[l]) : D(e, s[l])) return t;
  6079. return t
  6080. }
  6081. var o = m(t),
  6082. a, s, l;
  6083. if (o && e)
  6084. for (s = 0; s < o.length; s++)
  6085. if (a = o[s], A(e, a) && i(e, a, "attributes") && i(e, a, "styles")) {
  6086. if (l = a.classes)
  6087. for (s = 0; s < l.length; s++)
  6088. if (!Y.hasClass(e, l[s])) return;
  6089. return a
  6090. }
  6091. }
  6092. function _(e, t, n) {
  6093. function r(n) {
  6094. var r = Y.getRoot();
  6095. return n !== r && (n = Y.getParent(n, function(n) {
  6096. return !!y(n, e) || (n.parentNode === r || !!N(n, e, t, !0))
  6097. }), N(n, e, t))
  6098. }
  6099. var i;
  6100. return n ? r(n) : (n = X.getNode(), r(n) ? re : (i = X.getStart(), i != n && r(i) ? re : ne))
  6101. }
  6102. function S(e, t) {
  6103. var n, r = [],
  6104. i = {};
  6105. return n = X.getStart(), Y.getParent(n, function(n) {
  6106. var o, a;
  6107. for (o = 0; o < e.length; o++) a = e[o], !i[a] && N(n, a, t) && (i[a] = !0, r.push(a))
  6108. }, Y.getRoot()), r
  6109. }
  6110. function k(e) {
  6111. var t = m(e),
  6112. n, r, i, o, a;
  6113. if (t)
  6114. for (n = X.getStart(), r = d(n), o = t.length - 1; o >= 0; o--) {
  6115. if (a = t[o].selector, !a || t[o].defaultBlock) return re;
  6116. for (i = r.length - 1; i >= 0; i--)
  6117. if (Y.is(r[i], a)) return re
  6118. }
  6119. return ne
  6120. }
  6121. function T(e, t, n) {
  6122. var r;
  6123. return ie || (ie = {}, r = {}, s.on("NodeChange", function(e) {
  6124. var t = d(e.element),
  6125. n = {};
  6126. t = i.grep(t, function(e) {
  6127. return 1 == e.nodeType && !e.getAttribute("data-mce-bogus")
  6128. }), ue(ie, function(e, i) {
  6129. ue(t, function(o) {
  6130. return N(o, i, {}, e.similar) ? (r[i] || (ue(e, function(e) {
  6131. e(!0, {
  6132. node: o,
  6133. format: i,
  6134. parents: t
  6135. })
  6136. }), r[i] = e), n[i] = e, !1) : !y(o, i) && void 0
  6137. })
  6138. }), ue(r, function(i, o) {
  6139. n[o] || (delete r[o], ue(i, function(n) {
  6140. n(!1, {
  6141. node: e.element,
  6142. format: o,
  6143. parents: t
  6144. })
  6145. }))
  6146. })
  6147. })), ue(e.split(","), function(e) {
  6148. ie[e] || (ie[e] = [], ie[e].similar = n), ie[e].push(t)
  6149. }), this
  6150. }
  6151. function R(e) {
  6152. return o.getCssText(s, e)
  6153. }
  6154. function A(e, t) {
  6155. return B(e, t.inline) ? re : B(e, t.block) ? re : t.selector ? 1 == e.nodeType && Y.is(e, t.selector) : void 0
  6156. }
  6157. function B(e, t) {
  6158. return e = e || "", t = t || "", e = "" + (e.nodeName || e), t = "" + (t.nodeName || t), e.toLowerCase() == t.toLowerCase()
  6159. }
  6160. function D(e, t) {
  6161. return L(Y.getStyle(e, t), t)
  6162. }
  6163. function L(e, t) {
  6164. return "color" != t && "backgroundColor" != t || (e = Y.toHex(e)), "fontWeight" == t && 700 == e && (e = "bold"), "fontFamily" == t && (e = e.replace(/[\'\"]/g, "").replace(/,\s+/g, ",")), "" + e
  6165. }
  6166. function M(e, t) {
  6167. return "string" != typeof e ? e = e(t) : t && (e = e.replace(/%(\w+)/g, function(e, n) {
  6168. return t[n] || e
  6169. })), e
  6170. }
  6171. function P(e) {
  6172. return e && 3 === e.nodeType && /^([\t \r\n]+|)$/.test(e.nodeValue)
  6173. }
  6174. function O(e, t, n) {
  6175. var r = Y.create(t, n);
  6176. return e.parentNode.insertBefore(r, e), r.appendChild(e), r
  6177. }
  6178. function H(t, n, r) {
  6179. function i(e) {
  6180. function t(e) {
  6181. return "BR" == e.nodeName && e.getAttribute("data-mce-bogus") && !e.nextSibling
  6182. }
  6183. var r, i, o, a, s;
  6184. if (r = i = e ? g : y, a = e ? "previousSibling" : "nextSibling", s = Y.getRoot(), 3 == r.nodeType && !P(r) && (e ? v > 0 : b < r.nodeValue.length)) return r;
  6185. for (;;) {
  6186. if (!n[0].block_expand && J(i)) return i;
  6187. for (o = i[a]; o; o = o[a])
  6188. if (!ce(o) && !P(o) && !t(o)) return i;
  6189. if (i == s || i.parentNode == s) {
  6190. r = i;
  6191. break
  6192. }
  6193. i = i.parentNode
  6194. }
  6195. return r
  6196. }
  6197. function o(e, t) {
  6198. for (t === oe && (t = 3 === e.nodeType ? e.length : e.childNodes.length); e && e.hasChildNodes();) e = e.childNodes[t], e && (t = 3 === e.nodeType ? e.length : e.childNodes.length);
  6199. return {
  6200. node: e,
  6201. offset: t
  6202. }
  6203. }
  6204. function a(e) {
  6205. for (var t = e; t;) {
  6206. if (1 === t.nodeType && ae(t)) return "false" === ae(t) ? t : e;
  6207. t = t.parentNode
  6208. }
  6209. return e
  6210. }
  6211. function c(t, n, i) {
  6212. function o(e, t) {
  6213. var n, o, a = e.nodeValue;
  6214. return "undefined" == typeof t && (t = i ? a.length : 0), i ? (n = a.lastIndexOf(" ", t), o = a.lastIndexOf("\xa0", t), n = n > o ? n : o, n === -1 || r || n++) : (n = a.indexOf(" ", t), o = a.indexOf("\xa0", t), n = n !== -1 && (o === -1 || n < o) ? n : o), n
  6215. }
  6216. var a, l, c, u;
  6217. if (3 === t.nodeType) {
  6218. if (c = o(t, n), c !== -1) return {
  6219. container: t,
  6220. offset: c
  6221. };
  6222. u = t
  6223. }
  6224. for (a = new e(t, Y.getParent(t, J) || s.getBody()); l = a[i ? "prev" : "next"]();)
  6225. if (3 === l.nodeType) {
  6226. if (u = l, c = o(l), c !== -1) return {
  6227. container: l,
  6228. offset: c
  6229. }
  6230. } else if (J(l)) break;
  6231. if (u) return n = i ? 0 : u.length, {
  6232. container: u,
  6233. offset: n
  6234. }
  6235. }
  6236. function u(e, r) {
  6237. var i, o, a, s;
  6238. for (3 == e.nodeType && 0 === e.nodeValue.length && e[r] && (e = e[r]), i = d(e), o = 0; o < i.length; o++)
  6239. for (a = 0; a < n.length; a++)
  6240. if (s = n[a], !("collapsed" in s && s.collapsed !== t.collapsed) && Y.is(i[o], s.selector)) return i[o];
  6241. return e
  6242. }
  6243. function f(e, t) {
  6244. var r, i = Y.getRoot();
  6245. if (n[0].wrapper || (r = Y.getParent(e, n[0].block, i)), r || (r = Y.getParent(3 == e.nodeType ? e.parentNode : e, function(e) {
  6246. return e != i && l(e)
  6247. })), r && n[0].wrapper && (r = d(r, "ul,ol").reverse()[0] || r), !r)
  6248. for (r = e; r[t] && !J(r[t]) && (r = r[t], !B(r, "br")););
  6249. return r || e
  6250. }
  6251. var h, p, m, g = t.startContainer,
  6252. v = t.startOffset,
  6253. y = t.endContainer,
  6254. b = t.endOffset;
  6255. if (1 == g.nodeType && g.hasChildNodes() && (h = g.childNodes.length - 1, g = g.childNodes[v > h ? h : v], 3 == g.nodeType && (v = 0)), 1 == y.nodeType && y.hasChildNodes() && (h = y.childNodes.length - 1, y = y.childNodes[b > h ? h : b - 1], 3 == y.nodeType && (b = y.nodeValue.length)), g = a(g), y = a(y), (ce(g.parentNode) || ce(g)) && (g = ce(g) ? g : g.parentNode, g = g.nextSibling || g, 3 == g.nodeType && (v = 0)), (ce(y.parentNode) || ce(y)) && (y = ce(y) ? y : y.parentNode, y = y.previousSibling || y, 3 == y.nodeType && (b = y.length)), n[0].inline && (t.collapsed && (m = c(g, v, !0), m && (g = m.container, v = m.offset), m = c(y, b), m && (y = m.container, b = m.offset)), p = o(y, b), p.node)) {
  6256. for (; p.node && 0 === p.offset && p.node.previousSibling;) p = o(p.node.previousSibling);
  6257. p.node && p.offset > 0 && 3 === p.node.nodeType && " " === p.node.nodeValue.charAt(p.offset - 1) && p.offset > 1 && (y = p.node, y.splitText(p.offset - 1))
  6258. }
  6259. return (n[0].inline || n[0].block_expand) && (n[0].inline && 3 == g.nodeType && 0 !== v || (g = i(!0)), n[0].inline && 3 == y.nodeType && b !== y.nodeValue.length || (y = i())), n[0].selector && n[0].expand !== ne && !n[0].inline && (g = u(g, "previousSibling"), y = u(y, "nextSibling")), (n[0].block || n[0].selector) && (g = f(g, "previousSibling"), y = f(y, "nextSibling"), n[0].block && (J(g) || (g = i(!0)), J(y) || (y = i()))), 1 == g.nodeType && (v = Z(g), g = g.parentNode), 1 == y.nodeType && (b = Z(y) + 1, y = y.parentNode), {
  6260. startContainer: g,
  6261. startOffset: v,
  6262. endContainer: y,
  6263. endOffset: b
  6264. }
  6265. }
  6266. function I(e, t) {
  6267. return t.links && "A" == e.tagName
  6268. }
  6269. function F(e, t, n, r) {
  6270. var i, o, a;
  6271. if (!A(n, e) && !I(n, e)) return ne;
  6272. if ("all" != e.remove)
  6273. for (ue(e.styles, function(i, o) {
  6274. i = L(M(i, t), o), "number" == typeof o && (o = i, r = 0), (e.remove_similar || !r || B(D(r, o), i)) && Y.setStyle(n, o, ""), a = 1
  6275. }), a && "" === Y.getAttrib(n, "style") && (n.removeAttribute("style"), n.removeAttribute("data-mce-style")), ue(e.attributes, function(e, i) {
  6276. var o;
  6277. if (e = M(e, t), "number" == typeof i && (i = e, r = 0), !r || B(Y.getAttrib(r, i), e)) {
  6278. if ("class" == i && (e = Y.getAttrib(n, i), e && (o = "", ue(e.split(/\s+/), function(e) {
  6279. /mce\-\w+/.test(e) && (o += (o ? " " : "") + e)
  6280. }), o))) return void Y.setAttrib(n, i, o);
  6281. "class" == i && n.removeAttribute("className"), te.test(i) && n.removeAttribute("data-mce-" + i), n.removeAttribute(i)
  6282. }
  6283. }), ue(e.classes, function(e) {
  6284. e = M(e, t), r && !Y.hasClass(r, e) || Y.removeClass(n, e)
  6285. }), o = Y.getAttribs(n), i = 0; i < o.length; i++) {
  6286. var s = o[i].nodeName;
  6287. if (0 !== s.indexOf("_") && 0 !== s.indexOf("data-")) return ne
  6288. }
  6289. return "none" != e.remove ? (z(n, e), re) : void 0
  6290. }
  6291. function z(e, t) {
  6292. function n(e, t, n) {
  6293. return e = U(e, t, n), !e || "BR" == e.nodeName || J(e)
  6294. }
  6295. var r = e.parentNode,
  6296. i;
  6297. t.block && (Q ? r == Y.getRoot() && (t.list_block && B(e, t.list_block) || ue(de(e.childNodes), function(e) {
  6298. G(Q, e.nodeName.toLowerCase()) ? i ? i.appendChild(e) : (i = O(e, Q), Y.setAttribs(i, s.settings.forced_root_block_attrs)) : i = 0
  6299. })) : J(e) && !J(r) && (n(e, ne) || n(e.firstChild, re, 1) || e.insertBefore(Y.create("br"), e.firstChild), n(e, re) || n(e.lastChild, ne, 1) || e.appendChild(Y.create("br")))), t.selector && t.inline && !B(t.inline, e) || Y.remove(e, 1)
  6300. }
  6301. function U(e, t, n) {
  6302. if (e)
  6303. for (t = t ? "nextSibling" : "previousSibling", e = n ? e : e[t]; e; e = e[t])
  6304. if (1 == e.nodeType || !P(e)) return e
  6305. }
  6306. function W(e, t) {
  6307. function n(e, t) {
  6308. for (i = e; i; i = i[t]) {
  6309. if (3 == i.nodeType && 0 !== i.nodeValue.length) return e;
  6310. if (1 == i.nodeType && !ce(i)) return i
  6311. }
  6312. return e
  6313. }
  6314. var i, o, a = new r(Y);
  6315. if (e && t && (e = n(e, "previousSibling"), t = n(t, "nextSibling"), a.compare(e, t))) {
  6316. for (i = e.nextSibling; i && i != t;) o = i, i = i.nextSibling, e.appendChild(o);
  6317. return Y.remove(t), ue(de(t.childNodes), function(t) {
  6318. e.appendChild(t)
  6319. }), e
  6320. }
  6321. return t
  6322. }
  6323. function V(t, n) {
  6324. var r, i, o;
  6325. return r = t[n ? "startContainer" : "endContainer"], i = t[n ? "startOffset" : "endOffset"], 1 == r.nodeType && (o = r.childNodes.length - 1, !n && i && i--, r = r.childNodes[i > o ? o : i]), 3 === r.nodeType && n && i >= r.nodeValue.length && (r = new e(r, s.getBody()).next() || r), 3 !== r.nodeType || n || 0 !== i || (r = new e(r, s.getBody()).prev() || r), r
  6326. }
  6327. function $(t, n, r, i) {
  6328. function o(e) {
  6329. var t = Y.create("span", {
  6330. id: g,
  6331. "data-mce-bogus": !0,
  6332. style: v ? "color:red" : ""
  6333. });
  6334. return e && t.appendChild(s.getDoc().createTextNode(ee)), t
  6335. }
  6336. function a(e, t) {
  6337. for (; e;) {
  6338. if (3 === e.nodeType && e.nodeValue !== ee || e.childNodes.length > 1) return !1;
  6339. t && 1 === e.nodeType && t.push(e), e = e.firstChild
  6340. }
  6341. return !0
  6342. }
  6343. function c(e) {
  6344. for (; e;) {
  6345. if (e.id === g) return e;
  6346. e = e.parentNode
  6347. }
  6348. }
  6349. function u(t) {
  6350. var n;
  6351. if (t)
  6352. for (n = new e(t, t), t = n.current(); t; t = n.next())
  6353. if (3 === t.nodeType) return t
  6354. }
  6355. function d(e, t) {
  6356. var n, r;
  6357. if (e) r = X.getRng(!0), a(e) ? (t !== !1 && (r.setStartBefore(e), r.setEndBefore(e)), Y.remove(e)) : (n = u(e), n.nodeValue.charAt(0) === ee && (n.deleteData(0, 1), r.startContainer == n && r.startOffset > 0 && r.setStart(n, r.startOffset - 1), r.endContainer == n && r.endOffset > 0 && r.setEnd(n, r.endOffset - 1)), Y.remove(e, 1)), X.setRng(r);
  6358. else if (e = c(X.getStart()), !e)
  6359. for (; e = Y.get(g);) d(e, !1)
  6360. }
  6361. function f() {
  6362. var e, t, i, a, s, l, d;
  6363. e = X.getRng(!0), a = e.startOffset, l = e.startContainer, d = l.nodeValue, t = c(X.getStart()), t && (i = u(t)), d && a > 0 && a < d.length && /\w/.test(d.charAt(a)) && /\w/.test(d.charAt(a - 1)) ? (s = X.getBookmark(), e.collapse(!0), e = H(e, m(n)), e = K.split(e), x(n, r, e), X.moveToBookmark(s)) : (t && i.nodeValue === ee ? x(n, r, t) : (t = o(!0), i = t.firstChild, e.insertNode(t), a = 1, x(n, r, t)), X.setCursorLocation(i, a))
  6364. }
  6365. function h() {
  6366. var e = X.getRng(!0),
  6367. t, a, s, c, u, d, f = [],
  6368. h, p;
  6369. for (t = e.startContainer, a = e.startOffset, u = t, 3 == t.nodeType && (a != t.nodeValue.length && (c = !0), u = u.parentNode); u;) {
  6370. if (N(u, n, r, i)) {
  6371. d = u;
  6372. break
  6373. }
  6374. u.nextSibling && (c = !0), f.push(u), u = u.parentNode
  6375. }
  6376. if (d)
  6377. if (c) s = X.getBookmark(), e.collapse(!0), e = H(e, m(n), !0), e = K.split(e), w(n, r, e), X.moveToBookmark(s);
  6378. else {
  6379. for (p = o(), u = p, h = f.length - 1; h >= 0; h--) u.appendChild(Y.clone(f[h], !1)), u = u.firstChild;
  6380. u.appendChild(Y.doc.createTextNode(ee)), u = u.firstChild;
  6381. var g = Y.getParent(d, l);
  6382. g && Y.isEmpty(g) ? d.parentNode.replaceChild(p, d) : Y.insertAfter(p, d), X.setCursorLocation(u, 1), Y.isEmpty(d) && Y.remove(d)
  6383. }
  6384. }
  6385. function p() {
  6386. var e;
  6387. e = c(X.getStart()), e && !Y.isEmpty(e) && fe(e, function(e) {
  6388. 1 != e.nodeType || e.id === g || Y.isEmpty(e) || Y.setAttrib(e, "data-mce-bogus", null)
  6389. }, "childNodes")
  6390. }
  6391. var g = "_mce_caret",
  6392. v = s.settings.caret_debug;
  6393. s._hasCaretEvents || (le = function() {
  6394. var e = [],
  6395. t;
  6396. if (a(c(X.getStart()), e))
  6397. for (t = e.length; t--;) Y.setAttrib(e[t], "data-mce-bogus", "1")
  6398. }, se = function(e) {
  6399. var t = e.keyCode;
  6400. d(), 8 == t && X.isCollapsed() && X.getStart().innerHTML == ee && d(c(X.getStart())), 37 != t && 39 != t || d(c(X.getStart())), p()
  6401. }, s.on("SetContent", function(e) {
  6402. e.selection && p()
  6403. }), s._hasCaretEvents = !0), "apply" == t ? f() : h()
  6404. }
  6405. function q(t) {
  6406. var n = t.startContainer,
  6407. r = t.startOffset,
  6408. i, o, a, s, l;
  6409. if ((t.startContainer != t.endContainer || !u(t.startContainer.childNodes[t.startOffset])) && (3 == n.nodeType && r >= n.nodeValue.length && (r = Z(n), n = n.parentNode, i = !0), 1 == n.nodeType))
  6410. for (s = n.childNodes, n = s[Math.min(r, s.length - 1)], o = new e(n, Y.getParent(n, Y.isBlock)), (r > s.length - 1 || i) && o.next(), a = o.current(); a; a = o.next())
  6411. if (3 == a.nodeType && !P(a)) return l = Y.create("a", {
  6412. "data-mce-bogus": "all"
  6413. }, ee), a.parentNode.insertBefore(l, a), t.setStart(a, 0), X.setRng(t), void Y.remove(l)
  6414. }
  6415. var j = {},
  6416. Y = s.dom,
  6417. X = s.selection,
  6418. K = new t(Y),
  6419. G = s.schema.isValidChild,
  6420. J = Y.isBlock,
  6421. Q = s.settings.forced_root_block,
  6422. Z = Y.nodeIndex,
  6423. ee = "\ufeff",
  6424. te = /^(src|href|style)$/,
  6425. ne = !1,
  6426. re = !0,
  6427. ie, oe, ae = Y.getContentEditable,
  6428. se, le, ce = n.isBookmarkNode,
  6429. ue = i.each,
  6430. de = i.grep,
  6431. fe = i.walk,
  6432. he = i.extend;
  6433. he(this, {
  6434. get: m,
  6435. register: g,
  6436. unregister: v,
  6437. apply: x,
  6438. remove: w,
  6439. toggle: E,
  6440. match: _,
  6441. matchAll: S,
  6442. matchNode: N,
  6443. canApply: k,
  6444. formatChanged: T,
  6445. getCssText: R
  6446. }), h(), p(), s.on("BeforeGetContent", function(e) {
  6447. le && "raw" != e.format && le()
  6448. }), s.on("mouseup keydown", function(e) {
  6449. se && se(e)
  6450. })
  6451. }
  6452. }), r(Q, [], function() {
  6453. var e = 0,
  6454. t = 1,
  6455. n = 2,
  6456. r = function(r, i) {
  6457. var o = r.length + i.length + 2,
  6458. a = new Array(o),
  6459. s = new Array(o),
  6460. l = function(e, t, n) {
  6461. return {
  6462. start: e,
  6463. end: t,
  6464. diag: n
  6465. }
  6466. },
  6467. c = function(o, a, s, l, u) {
  6468. var f = d(o, a, s, l);
  6469. if (null === f || f.start === a && f.diag === a - l || f.end === o && f.diag === o - s)
  6470. for (var h = o, p = s; h < a || p < l;) h < a && p < l && r[h] === i[p] ? (u.push([e, r[h]]), ++h, ++p) : a - o > l - s ? (u.push([n, r[h]]), ++h) : (u.push([t, i[p]]), ++p);
  6471. else {
  6472. c(o, f.start, s, f.start - f.diag, u);
  6473. for (var m = f.start; m < f.end; ++m) u.push([e, r[m]]);
  6474. c(f.end, a, f.end - f.diag, l, u)
  6475. }
  6476. },
  6477. u = function(e, t, n, o) {
  6478. for (var a = e; a - t < o && a < n && r[a] === i[a - t];) ++a;
  6479. return l(e, a, t)
  6480. },
  6481. d = function(e, t, n, o) {
  6482. var l = t - e,
  6483. c = o - n;
  6484. if (0 === l || 0 === c) return null;
  6485. var d = l - c,
  6486. f = c + l,
  6487. h = (f % 2 === 0 ? f : f + 1) / 2;
  6488. a[1 + h] = e, s[1 + h] = t + 1;
  6489. for (var p = 0; p <= h; ++p) {
  6490. for (var m = -p; m <= p; m += 2) {
  6491. var g = m + h;
  6492. m === -p || m != p && a[g - 1] < a[g + 1] ? a[g] = a[g + 1] : a[g] = a[g - 1] + 1;
  6493. for (var v = a[g], y = v - e + n - m; v < t && y < o && r[v] === i[y];) a[g] = ++v, ++y;
  6494. if (d % 2 != 0 && d - p <= m && m <= d + p && s[g - d] <= a[g]) return u(s[g - d], m + e - n, t, o)
  6495. }
  6496. for (m = d - p; m <= d + p; m += 2) {
  6497. for (g = m + h - d, m === d - p || m != d + p && s[g + 1] <= s[g - 1] ? s[g] = s[g + 1] - 1 : s[g] = s[g - 1], v = s[g] - 1, y = v - e + n - m; v >= e && y >= n && r[v] === i[y];) s[g] = v--, y--;
  6498. if (d % 2 === 0 && -p <= m && m <= p && s[g] <= a[g + d]) return u(s[g], m + e - n, t, o)
  6499. }
  6500. }
  6501. },
  6502. f = [];
  6503. return c(0, r.length, 0, i.length, f), f
  6504. };
  6505. return {
  6506. KEEP: e,
  6507. DELETE: n,
  6508. INSERT: t,
  6509. diff: r
  6510. }
  6511. }), r(Z, [p, C, Q], function(e, t, n) {
  6512. var r = function(e) {
  6513. return 1 === e.nodeType ? e.outerHTML : 3 === e.nodeType ? t.encodeRaw(e.data, !1) : 8 === e.nodeType ? "<!--" + e.data + "-->" : ""
  6514. },
  6515. i = function(e) {
  6516. var t, n, r;
  6517. for (r = document.createElement("div"), t = document.createDocumentFragment(), e && (r.innerHTML = e); n = r.firstChild;) t.appendChild(n);
  6518. return t
  6519. },
  6520. o = function(e, t, n) {
  6521. var r = i(t);
  6522. if (e.hasChildNodes() && n < e.childNodes.length) {
  6523. var o = e.childNodes[n];
  6524. o.parentNode.insertBefore(r, o)
  6525. } else e.appendChild(r)
  6526. },
  6527. a = function(e, t) {
  6528. if (e.hasChildNodes() && t < e.childNodes.length) {
  6529. var n = e.childNodes[t];
  6530. n.parentNode.removeChild(n)
  6531. }
  6532. },
  6533. s = function(t, r) {
  6534. var i = 0;
  6535. e.each(t, function(e) {
  6536. e[0] === n.KEEP ? i++ : e[0] === n.INSERT ? (o(r, e[1], i), i++) : e[0] === n.DELETE && a(r, i)
  6537. })
  6538. },
  6539. l = function(t) {
  6540. return e.map(t.childNodes, r)
  6541. },
  6542. c = function(t, i) {
  6543. var o = e.map(i.childNodes, r);
  6544. return s(n.diff(o, t), i), i
  6545. };
  6546. return {
  6547. read: l,
  6548. write: c
  6549. }
  6550. }), r(ee, [p, Z], function(e, t) {
  6551. var n = function(e) {
  6552. return e.indexOf("</iframe>") !== -1
  6553. },
  6554. r = function(e) {
  6555. return {
  6556. type: "fragmented",
  6557. fragments: e,
  6558. content: "",
  6559. bookmark: null,
  6560. beforeBookmark: null
  6561. }
  6562. },
  6563. i = function(e) {
  6564. return {
  6565. type: "complete",
  6566. fragments: null,
  6567. content: e,
  6568. bookmark: null,
  6569. beforeBookmark: null
  6570. }
  6571. },
  6572. o = function(o) {
  6573. var a, s;
  6574. return a = t.read(o.getBody()), s = e.map(a, function(e) {
  6575. return o.serializer.trimContent(e)
  6576. }).join(""), n(s) ? r(a) : i(s)
  6577. },
  6578. a = function(e, n, r) {
  6579. "fragmented" === n.type ? t.write(n.fragments, e.getBody()) : e.setContent(n.content, {
  6580. format: "raw"
  6581. }), e.selection.moveToBookmark(r ? n.beforeBookmark : n.bookmark)
  6582. },
  6583. s = function(e) {
  6584. return "fragmented" === e.type ? e.fragments.join("") : e.content
  6585. },
  6586. l = function(e, t) {
  6587. return s(e) === s(t)
  6588. };
  6589. return {
  6590. createFragmentedLevel: r,
  6591. createCompleteLevel: i,
  6592. createFromEditor: o,
  6593. applyToEditor: a,
  6594. isEq: l
  6595. }
  6596. }), r(te, [I, m, ee, d], function(e, t, n, r) {
  6597. return function(e) {
  6598. function i(t) {
  6599. e.setDirty(t)
  6600. }
  6601. function o(e) {
  6602. s.typing = !1, s.add({}, e)
  6603. }
  6604. function a() {
  6605. s.typing && (s.typing = !1, s.add())
  6606. }
  6607. var s = this,
  6608. l = 0,
  6609. c = [],
  6610. u, d, f = 0;
  6611. return e.on("init", function() {
  6612. s.add()
  6613. }), e.on("BeforeExecCommand", function(e) {
  6614. var t = e.command;
  6615. "Undo" !== t && "Redo" !== t && "mceRepaint" !== t && (a(), s.beforeChange())
  6616. }), e.on("ExecCommand", function(e) {
  6617. var t = e.command;
  6618. "Undo" !== t && "Redo" !== t && "mceRepaint" !== t && o(e)
  6619. }), e.on("ObjectResizeStart Cut", function() {
  6620. s.beforeChange()
  6621. }), e.on("SaveContent ObjectResized blur", o), e.on("DragEnd", o), e.on("KeyUp", function(t) {
  6622. var a = t.keyCode;
  6623. t.isDefaultPrevented() || ((a >= 33 && a <= 36 || a >= 37 && a <= 40 || 45 === a || t.ctrlKey) && (o(), e.nodeChanged()), (46 === a || 8 === a || r.mac && (91 === a || 93 === a)) && e.nodeChanged(), d && s.typing && (e.isDirty() || (i(c[0] && !n.isEq(n.createFromEditor(e), c[0])), e.isDirty() && e.fire("change", {
  6624. level: c[0],
  6625. lastLevel: null
  6626. })), e.fire("TypingUndo"), d = !1, e.nodeChanged()))
  6627. }), e.on("KeyDown", function(e) {
  6628. var t = e.keyCode;
  6629. if (!e.isDefaultPrevented()) {
  6630. if (t >= 33 && t <= 36 || t >= 37 && t <= 40 || 45 === t) return void(s.typing && o(e));
  6631. var n = e.ctrlKey && !e.altKey || e.metaKey;
  6632. !(t < 16 || t > 20) || 224 === t || 91 === t || s.typing || n || (s.beforeChange(), s.typing = !0, s.add({}, e), d = !0)
  6633. }
  6634. }), e.on("MouseDown", function(e) {
  6635. s.typing && o(e)
  6636. }), e.addShortcut("meta+z", "", "Undo"), e.addShortcut("meta+y,meta+shift+z", "", "Redo"), e.on("AddUndo Undo Redo ClearUndos", function(t) {
  6637. t.isDefaultPrevented() || e.nodeChanged()
  6638. }), s = {
  6639. data: c,
  6640. typing: !1,
  6641. beforeChange: function() {
  6642. f || (u = e.selection.getBookmark(2, !0))
  6643. },
  6644. add: function(r, o) {
  6645. var a, s = e.settings,
  6646. d, h;
  6647. if (h = n.createFromEditor(e), r = r || {}, r = t.extend(r, h), f || e.removed) return null;
  6648. if (d = c[l], e.fire("BeforeAddUndo", {
  6649. level: r,
  6650. lastLevel: d,
  6651. originalEvent: o
  6652. }).isDefaultPrevented()) return null;
  6653. if (d && n.isEq(d, r)) return null;
  6654. if (c[l] && (c[l].beforeBookmark = u), s.custom_undo_redo_levels && c.length > s.custom_undo_redo_levels) {
  6655. for (a = 0; a < c.length - 1; a++) c[a] = c[a + 1];
  6656. c.length--, l = c.length
  6657. }
  6658. r.bookmark = e.selection.getBookmark(2, !0), l < c.length - 1 && (c.length = l + 1), c.push(r), l = c.length - 1;
  6659. var p = {
  6660. level: r,
  6661. lastLevel: d,
  6662. originalEvent: o
  6663. };
  6664. return e.fire("AddUndo", p), l > 0 && (i(!0), e.fire("change", p)), r
  6665. },
  6666. undo: function() {
  6667. var t;
  6668. return s.typing && (s.add(), s.typing = !1), l > 0 && (t = c[--l], n.applyToEditor(e, t, !0), i(!0), e.fire("undo", {
  6669. level: t
  6670. })), t
  6671. },
  6672. redo: function() {
  6673. var t;
  6674. return l < c.length - 1 && (t = c[++l], n.applyToEditor(e, t, !1), i(!0), e.fire("redo", {
  6675. level: t
  6676. })), t
  6677. },
  6678. clear: function() {
  6679. c = [], l = 0, s.typing = !1, s.data = c, e.fire("ClearUndos")
  6680. },
  6681. hasUndo: function() {
  6682. return l > 0 || s.typing && c[0] && !n.isEq(n.createFromEditor(e), c[0])
  6683. },
  6684. hasRedo: function() {
  6685. return l < c.length - 1 && !s.typing
  6686. },
  6687. transact: function(e) {
  6688. a(), s.beforeChange();
  6689. try {
  6690. f++, e()
  6691. } finally {
  6692. f--
  6693. }
  6694. return s.add()
  6695. },
  6696. extra: function(t, r) {
  6697. var i, o;
  6698. s.transact(t) && (o = c[l].bookmark, i = c[l - 1], n.applyToEditor(e, i, !0), s.transact(r) && (c[l - 1].beforeBookmark = o))
  6699. }
  6700. }
  6701. }
  6702. }), r(ne, [y, T, k, d], function(e, t, n, r) {
  6703. var i = r.ie && r.ie < 11;
  6704. return function(o) {
  6705. function a(a) {
  6706. function p(e) {
  6707. return e && s.isBlock(e) && !/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName) && !/^(fixed|absolute)/i.test(e.style.position) && "true" !== s.getContentEditable(e)
  6708. }
  6709. function m(e) {
  6710. return e && /^(TD|TH|CAPTION)$/.test(e.nodeName)
  6711. }
  6712. function g(e) {
  6713. var t;
  6714. s.isBlock(e) && (t = l.getRng(), e.appendChild(s.create("span", null, "\xa0")), l.select(e), e.lastChild.outerHTML = "", l.setRng(t))
  6715. }
  6716. function v(e) {
  6717. var t = e,
  6718. n = [],
  6719. r;
  6720. if (t) {
  6721. for (; t = t.firstChild;) {
  6722. if (s.isBlock(t)) return;
  6723. 1 != t.nodeType || f[t.nodeName.toLowerCase()] || n.push(t)
  6724. }
  6725. for (r = n.length; r--;) t = n[r], !t.hasChildNodes() || t.firstChild == t.lastChild && "" === t.firstChild.nodeValue ? s.remove(t) : "A" == t.nodeName && " " === (t.innerText || t.textContent) && s.remove(t)
  6726. }
  6727. }
  6728. function y(t) {
  6729. function n(e) {
  6730. for (; e;) {
  6731. if (1 == e.nodeType || 3 == e.nodeType && e.data && /[\r\n\s]/.test(e.data)) return e;
  6732. e = e.nextSibling
  6733. }
  6734. }
  6735. var i, o, a, c = t,
  6736. u;
  6737. if (t) {
  6738. if (r.ie && r.ie < 9 && P && P.firstChild && P.firstChild == P.lastChild && "BR" == P.firstChild.tagName && s.remove(P.firstChild), /^(LI|DT|DD)$/.test(t.nodeName)) {
  6739. var d = n(t.firstChild);
  6740. d && /^(UL|OL|DL)$/.test(d.nodeName) && t.insertBefore(s.doc.createTextNode("\xa0"), t.firstChild)
  6741. }
  6742. if (a = s.createRng(), r.ie || t.normalize(), t.hasChildNodes()) {
  6743. for (i = new e(t, t); o = i.current();) {
  6744. if (3 == o.nodeType) {
  6745. a.setStart(o, 0), a.setEnd(o, 0);
  6746. break
  6747. }
  6748. if (h[o.nodeName.toLowerCase()]) {
  6749. a.setStartBefore(o), a.setEndBefore(o);
  6750. break
  6751. }
  6752. c = o, o = i.next()
  6753. }
  6754. o || (a.setStart(c, 0), a.setEnd(c, 0))
  6755. } else "BR" == t.nodeName ? t.nextSibling && s.isBlock(t.nextSibling) ? ((!O || O < 9) && (u = s.create("br"), t.parentNode.insertBefore(u, t)), a.setStartBefore(t), a.setEndBefore(t)) : (a.setStartAfter(t), a.setEndAfter(t)) : (a.setStart(t, 0), a.setEnd(t, 0));
  6756. l.setRng(a), s.remove(u), l.scrollIntoView(t)
  6757. }
  6758. }
  6759. function b(e) {
  6760. var t = c.forced_root_block;
  6761. t && t.toLowerCase() === e.tagName.toLowerCase() && s.setAttribs(e, c.forced_root_block_attrs)
  6762. }
  6763. function C(e) {
  6764. e.innerHTML = i ? "" : '<br data-mce-bogus="1">'
  6765. }
  6766. function x(e) {
  6767. var t = L,
  6768. n, r, o, a = d.getTextInlineElements();
  6769. if (e || "TABLE" == U ? (n = s.create(e || V), b(n)) : n = P.cloneNode(!1), o = n, c.keep_styles !== !1)
  6770. do
  6771. if (a[t.nodeName]) {
  6772. if ("_mce_caret" == t.id) continue;
  6773. r = t.cloneNode(!1), s.setAttrib(r, "id", ""), n.hasChildNodes() ? (r.appendChild(n.firstChild), n.appendChild(r)) : (o = r, n.appendChild(r))
  6774. }
  6775. while ((t = t.parentNode) && t != D);
  6776. return i || (o.innerHTML = '<br data-mce-bogus="1">'), n
  6777. }
  6778. function w(t) {
  6779. var n, r, i;
  6780. if (3 == L.nodeType && (t ? M > 0 : M < L.nodeValue.length)) return !1;
  6781. if (L.parentNode == P && $ && !t) return !0;
  6782. if (t && 1 == L.nodeType && L == P.firstChild) return !0;
  6783. if ("TABLE" === L.nodeName || L.previousSibling && "TABLE" == L.previousSibling.nodeName) return $ && !t || !$ && t;
  6784. for (n = new e(L, P), 3 == L.nodeType && (t && 0 === M ? n.prev() : t || M != L.nodeValue.length || n.next()); r = n.current();) {
  6785. if (1 === r.nodeType) {
  6786. if (!r.getAttribute("data-mce-bogus") && (i = r.nodeName.toLowerCase(), f[i] && "br" !== i)) return !1
  6787. } else if (3 === r.nodeType && !/^[ \t\r\n]*$/.test(r.nodeValue)) return !1;
  6788. t ? n.prev() : n.next()
  6789. }
  6790. return !0
  6791. }
  6792. function E(e, t) {
  6793. var n, r, i, a, l, c, u = V || "P";
  6794. if (r = s.getParent(e, s.isBlock), !r || !p(r)) {
  6795. if (r = r || D, c = r == o.getBody() || m(r) ? r.nodeName.toLowerCase() : r.parentNode.nodeName.toLowerCase(), !r.hasChildNodes()) return n = s.create(u), b(n), r.appendChild(n), A.setStart(n, 0), A.setEnd(n, 0), n;
  6796. for (a = e; a.parentNode != r;) a = a.parentNode;
  6797. for (; a && !s.isBlock(a);) i = a, a = a.previousSibling;
  6798. if (i && d.isValidChild(c, u.toLowerCase())) {
  6799. for (n = s.create(u), b(n), i.parentNode.insertBefore(n, i), a = i; a && !s.isBlock(a);) l = a.nextSibling, n.appendChild(a), a = l;
  6800. A.setStart(e, t), A.setEnd(e, t)
  6801. }
  6802. }
  6803. return e
  6804. }
  6805. function N() {
  6806. function e(e) {
  6807. for (var t = z[e ? "firstChild" : "lastChild"]; t && 1 != t.nodeType;) t = t[e ? "nextSibling" : "previousSibling"];
  6808. return t === P
  6809. }
  6810. function t() {
  6811. var e = z.parentNode;
  6812. return /^(LI|DT|DD)$/.test(e.nodeName) ? e : z
  6813. }
  6814. if (z != o.getBody()) {
  6815. var n = z.parentNode.nodeName;
  6816. /^(OL|UL|LI)$/.test(n) && (V = "LI"), I = V ? x(V) : s.create("BR"), e(!0) && e() ? "LI" == n ? s.insertAfter(I, t()) : s.replace(I, z) : e(!0) ? "LI" == n ? (s.insertAfter(I, t()), I.appendChild(s.doc.createTextNode(" ")), I.appendChild(z)) : z.parentNode.insertBefore(I, z) : e() ? (s.insertAfter(I, t()), g(I)) : (z = t(), B = A.cloneRange(), B.setStartAfter(P), B.setEndAfter(z), F = B.extractContents(), "LI" == V && "LI" == F.firstChild.nodeName ? (I = F.firstChild, s.insertAfter(F, z)) : (s.insertAfter(F, z), s.insertAfter(I, z))), s.remove(P), y(I), u.add()
  6817. }
  6818. }
  6819. function _() {
  6820. o.execCommand("InsertLineBreak", !1, a)
  6821. }
  6822. function S(e) {
  6823. do 3 === e.nodeType && (e.nodeValue = e.nodeValue.replace(/^[\r\n]+/, "")), e = e.firstChild; while (e)
  6824. }
  6825. function k(e) {
  6826. var t = s.getRoot(),
  6827. n, r;
  6828. for (n = e; n !== t && "false" !== s.getContentEditable(n);) "true" === s.getContentEditable(n) && (r = n), n = n.parentNode;
  6829. return n !== t ? r : t
  6830. }
  6831. function T(e) {
  6832. var t;
  6833. i || (e.normalize(), t = e.lastChild, t && !/^(left|right)$/gi.test(s.getStyle(t, "float", !0)) || s.add(e, "br"))
  6834. }
  6835. function R() {
  6836. I = /^(H[1-6]|PRE|FIGURE)$/.test(U) && "HGROUP" != W ? x(V) : x(), c.end_container_on_empty_block && p(z) && s.isEmpty(P) ? I = s.split(z, P) : s.insertAfter(I, P), y(I)
  6837. }
  6838. var A, B, D, L, M, P, O, H, I, F, z, U, W, V, $;
  6839. if (A = l.getRng(!0), !a.isDefaultPrevented()) {
  6840. if (!A.collapsed) return void o.execCommand("Delete");
  6841. if (new t(s).normalize(A), L = A.startContainer, M = A.startOffset, V = (c.force_p_newlines ? "p" : "") || c.forced_root_block, V = V ? V.toUpperCase() : "", O = s.doc.documentMode, H = a.shiftKey, 1 == L.nodeType && L.hasChildNodes() && ($ = M > L.childNodes.length - 1, L = L.childNodes[Math.min(M, L.childNodes.length - 1)] || L, M = $ && 3 == L.nodeType ? L.nodeValue.length : 0), D = k(L)) {
  6842. if (u.beforeChange(), !s.isBlock(D) && D != s.getRoot()) return void(V && !H || _());
  6843. if ((V && !H || !V && H) && (L = E(L, M)), P = s.getParent(L, s.isBlock), z = P ? s.getParent(P.parentNode, s.isBlock) : null, U = P ? P.nodeName.toUpperCase() : "", W = z ? z.nodeName.toUpperCase() : "", "LI" != W || a.ctrlKey || (P = z, U = W), o.undoManager.typing && (o.undoManager.typing = !1, o.undoManager.add()), /^(LI|DT|DD)$/.test(U)) {
  6844. if (!V && H) return void _();
  6845. if (s.isEmpty(P)) return void N()
  6846. }
  6847. if ("PRE" == U && c.br_in_pre !== !1) {
  6848. if (!H) return void _()
  6849. } else if (!V && !H && "LI" != U || V && H) return void _();
  6850. V && P === o.getBody() || (V = V || "P", n.isCaretContainerBlock(P) ? I = n.showCaretContainerBlock(P) : w() ? R() : w(!0) ? (I = P.parentNode.insertBefore(x(), P), g(I), y(P)) : (B = A.cloneRange(), B.setEndAfter(P), F = B.extractContents(), S(F), I = F.firstChild, s.insertAfter(F, P), v(I), T(P), s.isEmpty(P) && C(P), I.normalize(), s.isEmpty(I) ? (s.remove(I), R()) : y(I)), s.setAttrib(I, "id", ""), o.fire("NewBlock", {
  6851. newBlock: I
  6852. }), u.typing = !1, u.add())
  6853. }
  6854. }
  6855. }
  6856. var s = o.dom,
  6857. l = o.selection,
  6858. c = o.settings,
  6859. u = o.undoManager,
  6860. d = o.schema,
  6861. f = d.getNonEmptyElements(),
  6862. h = d.getMoveCaretBeforeOnEnterElements();
  6863. o.on("keydown", function(e) {
  6864. 13 == e.keyCode && a(e) !== !1 && e.preventDefault()
  6865. })
  6866. }
  6867. }), r(re, [], function() {
  6868. return function(e) {
  6869. function t() {
  6870. var t = i.getStart(),
  6871. s = e.getBody(),
  6872. l, c, u, d, f, h, p, m = -16777215,
  6873. g, v, y, b, C;
  6874. if (C = n.forced_root_block, t && 1 === t.nodeType && C) {
  6875. for (; t && t != s;) {
  6876. if (a[t.nodeName]) return;
  6877. t = t.parentNode
  6878. }
  6879. if (l = i.getRng(), l.setStart) {
  6880. c = l.startContainer, u = l.startOffset, d = l.endContainer, f = l.endOffset;
  6881. try {
  6882. v = e.getDoc().activeElement === s
  6883. } catch (x) {}
  6884. } else l.item && (t = l.item(0), l = e.getDoc().body.createTextRange(), l.moveToElementText(t)), v = l.parentElement().ownerDocument === e.getDoc(), y = l.duplicate(), y.collapse(!0), u = y.move("character", m) * -1, y.collapsed || (y = l.duplicate(), y.collapse(!1), f = y.move("character", m) * -1 - u);
  6885. for (t = s.firstChild, b = s.nodeName.toLowerCase(); t;)
  6886. if ((3 === t.nodeType || 1 == t.nodeType && !a[t.nodeName]) && o.isValidChild(b, C.toLowerCase())) {
  6887. if (3 === t.nodeType && 0 === t.nodeValue.length) {
  6888. p = t, t = t.nextSibling, r.remove(p);
  6889. continue
  6890. }
  6891. h || (h = r.create(C, e.settings.forced_root_block_attrs), t.parentNode.insertBefore(h, t), g = !0), p = t, t = t.nextSibling, h.appendChild(p)
  6892. } else h = null, t = t.nextSibling;
  6893. if (g && v) {
  6894. if (l.setStart) l.setStart(c, u), l.setEnd(d, f), i.setRng(l);
  6895. else try {
  6896. l = e.getDoc().body.createTextRange(), l.moveToElementText(s), l.collapse(!0), l.moveStart("character", u), f > 0 && l.moveEnd("character", f), l.select()
  6897. } catch (x) {}
  6898. e.nodeChanged()
  6899. }
  6900. }
  6901. }
  6902. var n = e.settings,
  6903. r = e.dom,
  6904. i = e.selection,
  6905. o = e.schema,
  6906. a = o.getBlockElements();
  6907. n.forced_root_block && e.on("NodeChange", t)
  6908. }
  6909. }), r(ie, [z, y, _, $, k, U], function(e, t, n, r, i, o) {
  6910. function a(e) {
  6911. return e > 0
  6912. }
  6913. function s(e) {
  6914. return e < 0
  6915. }
  6916. function l(e, t) {
  6917. for (var n; n = e(t);)
  6918. if (!N(n)) return n;
  6919. return null
  6920. }
  6921. function c(e, n, r, i, o) {
  6922. var c = new t(e, i);
  6923. if (s(n)) {
  6924. if ((x(e) || N(e)) && (e = l(c.prev, !0), r(e))) return e;
  6925. for (; e = l(c.prev, o);)
  6926. if (r(e)) return e
  6927. }
  6928. if (a(n)) {
  6929. if ((x(e) || N(e)) && (e = l(c.next, !0), r(e))) return e;
  6930. for (; e = l(c.next, o);)
  6931. if (r(e)) return e
  6932. }
  6933. return null
  6934. }
  6935. function u(e, t) {
  6936. for (e = e.parentNode; e && e != t; e = e.parentNode)
  6937. if (C(e)) return e;
  6938. return t
  6939. }
  6940. function d(e, t) {
  6941. for (; e && e != t;) {
  6942. if (w(e)) return e;
  6943. e = e.parentNode
  6944. }
  6945. return null
  6946. }
  6947. function f(e, t, n) {
  6948. return d(e.container(), n) == d(t.container(), n)
  6949. }
  6950. function h(e, t, n) {
  6951. return u(e.container(), n) == u(t.container(), n)
  6952. }
  6953. function p(e, t) {
  6954. var n, r;
  6955. return t ? (n = t.container(), r = t.offset(), S(n) ? n.childNodes[r + e] : null) : null
  6956. }
  6957. function m(e, t) {
  6958. var n = t.ownerDocument.createRange();
  6959. return e ? (n.setStartBefore(t), n.setEndBefore(t)) : (n.setStartAfter(t), n.setEndAfter(t)), n
  6960. }
  6961. function g(e, t, n) {
  6962. return d(t, e) == d(n, e)
  6963. }
  6964. function v(e, t, n) {
  6965. var r, i;
  6966. for (i = e ? "previousSibling" : "nextSibling"; n && n != t;) {
  6967. if (r = n[i], E(r) && (r = r[i]), x(r)) {
  6968. if (g(t, r, n)) return r;
  6969. break
  6970. }
  6971. if (k(r)) break;
  6972. n = n.parentNode
  6973. }
  6974. return null
  6975. }
  6976. function y(e, t, r) {
  6977. var o, a, s, l, c = _(v, !0, t),
  6978. u = _(v, !1, t);
  6979. if (a = r.startContainer, s = r.startOffset, i.isCaretContainerBlock(a)) {
  6980. if (S(a) || (a = a.parentNode), l = a.getAttribute("data-mce-caret"), "before" == l && (o = a.nextSibling, x(o))) return T(o);
  6981. if ("after" == l && (o = a.previousSibling, x(o))) return R(o)
  6982. }
  6983. if (!r.collapsed) return r;
  6984. if (n.isText(a)) {
  6985. if (E(a)) {
  6986. if (1 === e) {
  6987. if (o = u(a)) return T(o);
  6988. if (o = c(a)) return R(o)
  6989. }
  6990. if (e === -1) {
  6991. if (o = c(a)) return R(o);
  6992. if (o = u(a)) return T(o)
  6993. }
  6994. return r
  6995. }
  6996. if (i.endsWithCaretContainer(a) && s >= a.data.length - 1) return 1 === e && (o = u(a)) ? T(o) : r;
  6997. if (i.startsWithCaretContainer(a) && s <= 1) return e === -1 && (o = c(a)) ? R(o) : r;
  6998. if (s === a.data.length) return o = u(a), o ? T(o) : r;
  6999. if (0 === s) return o = c(a), o ? R(o) : r
  7000. }
  7001. return r
  7002. }
  7003. function b(e, t) {
  7004. return x(p(e, t))
  7005. }
  7006. var C = n.isContentEditableTrue,
  7007. x = n.isContentEditableFalse,
  7008. w = n.matchStyleValues("display", "block table table-cell table-caption"),
  7009. E = i.isCaretContainer,
  7010. N = i.isCaretContainerBlock,
  7011. _ = e.curry,
  7012. S = n.isElement,
  7013. k = o.isCaretCandidate,
  7014. T = _(m, !0),
  7015. R = _(m, !1);
  7016. return {
  7017. isForwards: a,
  7018. isBackwards: s,
  7019. findNode: c,
  7020. getEditingHost: u,
  7021. getParentBlock: d,
  7022. isInSameBlock: f,
  7023. isInSameEditingHost: h,
  7024. isBeforeContentEditableFalse: _(b, 0),
  7025. isAfterContentEditableFalse: _(b, -1),
  7026. normalizeRange: y
  7027. }
  7028. }), r(oe, [_, U, $, ie, p, z], function(e, t, n, r, i, o) {
  7029. function a(e, t) {
  7030. for (var n = []; e && e != t;) n.push(e), e = e.parentNode;
  7031. return n
  7032. }
  7033. function s(e, t) {
  7034. return e.hasChildNodes() && t < e.childNodes.length ? e.childNodes[t] : null
  7035. }
  7036. function l(e, t) {
  7037. if (m(e)) {
  7038. if (v(t.previousSibling) && !f(t.previousSibling)) return n.before(t);
  7039. if (f(t)) return n(t, 0)
  7040. }
  7041. if (g(e)) {
  7042. if (v(t.nextSibling) && !f(t.nextSibling)) return n.after(t);
  7043. if (f(t)) return n(t, t.data.length)
  7044. }
  7045. return g(e) ? p(t) ? n.before(t) : n.after(t) : n.before(t)
  7046. }
  7047. function c(t, i) {
  7048. var o;
  7049. return !!e.isBr(t) && (o = u(1, n.after(t), i), !!o && !r.isInSameBlock(n.before(t), n.before(o), i))
  7050. }
  7051. function u(e, t, p) {
  7052. var C, x, w, E, N, _, S;
  7053. if (!h(p) || !t) return null;
  7054. if (S = t, C = S.container(), x = S.offset(), f(C)) {
  7055. if (g(e) && x > 0) return n(C, --x);
  7056. if (m(e) && x < C.length) return n(C, ++x);
  7057. w = C
  7058. } else {
  7059. if (g(e) && x > 0 && (E = s(C, x - 1), v(E))) return !y(E) && (N = r.findNode(E, e, b, E)) ? f(N) ? n(N, N.data.length) : n.after(N) : f(E) ? n(E, E.data.length) : n.before(E);
  7060. if (m(e) && x < C.childNodes.length && (E = s(C, x), v(E))) return c(E, p) ? u(e, n.after(E), p) : !y(E) && (N = r.findNode(E, e, b, E)) ? f(N) ? n(N, 0) : n.before(N) : f(E) ? n(E, 0) : n.after(E);
  7061. w = S.getNode()
  7062. }
  7063. return (m(e) && S.isAtEnd() || g(e) && S.isAtStart()) && (w = r.findNode(w, e, o.constant(!0), p, !0), b(w)) ? l(e, w) : (E = r.findNode(w, e, b, p), _ = i.last(i.filter(a(C, p), d)), !_ || E && _.contains(E) ? E ? l(e, E) : null : S = m(e) ? n.after(_) : n.before(_))
  7064. }
  7065. var d = e.isContentEditableFalse,
  7066. f = e.isText,
  7067. h = e.isElement,
  7068. p = e.isBr,
  7069. m = r.isForwards,
  7070. g = r.isBackwards,
  7071. v = t.isCaretCandidate,
  7072. y = t.isAtomic,
  7073. b = t.isEditableCaretCandidate;
  7074. return function(e) {
  7075. return {
  7076. next: function(t) {
  7077. return u(1, t, e)
  7078. },
  7079. prev: function(t) {
  7080. return u(-1, t, e)
  7081. }
  7082. }
  7083. }
  7084. }), r(ae, [m, oe, $], function(e, t, n) {
  7085. var r = function(e) {
  7086. var t = e.firstChild,
  7087. n = e.lastChild;
  7088. return t && "meta" === t.name && (t = t.next), n && "mce_marker" === n.attr("id") && (n = n.prev), !(!t || t !== n) && ("ul" === t.name || "ol" === t.name)
  7089. },
  7090. i = function(e) {
  7091. var t = e.firstChild,
  7092. n = e.lastChild;
  7093. return t && "META" === t.nodeName && t.parentNode.removeChild(t), n && "mce_marker" === n.id && n.parentNode.removeChild(n), e
  7094. },
  7095. o = function(e, t, n) {
  7096. var r = t.serialize(n),
  7097. o = e.createFragment(r);
  7098. return i(o)
  7099. },
  7100. a = function(t) {
  7101. return e.grep(t.childNodes, function(e) {
  7102. return "LI" === e.nodeName
  7103. })
  7104. },
  7105. s = function(e) {
  7106. return !e.firstChild
  7107. },
  7108. l = function(e) {
  7109. return e.length > 0 && s(e[e.length - 1]) ? e.slice(0, -1) : e
  7110. },
  7111. c = function(e, t) {
  7112. var n = e.getParent(t, e.isBlock);
  7113. return n && "LI" === n.nodeName ? n : null
  7114. },
  7115. u = function(e, t) {
  7116. return !!c(e, t)
  7117. },
  7118. d = function(e, t) {
  7119. var n = t.cloneRange(),
  7120. r = t.cloneRange();
  7121. return n.setStartBefore(e), r.setEndAfter(e), [n.cloneContents(), r.cloneContents()]
  7122. },
  7123. f = function(e, r) {
  7124. var i = n.before(e),
  7125. o = new t(r),
  7126. a = o.next(i);
  7127. return a ? a.toRange() : null
  7128. },
  7129. h = function(e, r) {
  7130. var i = n.after(e),
  7131. o = new t(r),
  7132. a = o.prev(i);
  7133. return a ? a.toRange() : null
  7134. },
  7135. p = function(t, n, r, i) {
  7136. var o = d(t, i),
  7137. a = t.parentNode;
  7138. return a.insertBefore(o[0], t), e.each(n, function(e) {
  7139. a.insertBefore(e, t)
  7140. }), a.insertBefore(o[1], t), a.removeChild(t), h(n[n.length - 1], r)
  7141. },
  7142. m = function(t, n, r) {
  7143. var i = t.parentNode;
  7144. return e.each(n, function(e) {
  7145. i.insertBefore(e, t)
  7146. }), f(t, r)
  7147. },
  7148. g = function(e, t, n, r) {
  7149. return r.insertAfter(t.reverse(), e), h(t[0], n)
  7150. },
  7151. v = function(e, r, i, s) {
  7152. var u = o(r, e, s),
  7153. d = c(r, i.startContainer),
  7154. f = l(a(u.firstChild)),
  7155. h = 1,
  7156. v = 2,
  7157. y = r.getRoot(),
  7158. b = function(e) {
  7159. var o = n.fromRangeStart(i),
  7160. a = new t(r.getRoot()),
  7161. s = e === h ? a.prev(o) : a.next(o);
  7162. return !s || c(r, s.getNode()) !== d
  7163. };
  7164. return b(h) ? m(d, f, y) : b(v) ? g(d, f, y, r) : p(d, f, y, i)
  7165. };
  7166. return {
  7167. isListFragment: r,
  7168. insertAtCaret: v,
  7169. isParentBlockLi: u,
  7170. trimListItems: l,
  7171. listItems: a
  7172. }
  7173. }), r(se, [d, m, P, oe, $, X, _, ae], function(e, t, n, r, i, o, a, s) {
  7174. var l = a.matchNodeNames("td th"),
  7175. c = function(a, c, u) {
  7176. function d(e) {
  7177. function t(e) {
  7178. return r[e] && 3 == r[e].nodeType
  7179. }
  7180. var n, r, i;
  7181. return n = D.getRng(!0), r = n.startContainer, i = n.startOffset, 3 == r.nodeType && (i > 0 ? e = e.replace(/^&nbsp;/, " ") : t("previousSibling") || (e = e.replace(/^ /, "&nbsp;")), i < r.length ? e = e.replace(/&nbsp;(<br>|)$/, " ") : t("nextSibling") || (e = e.replace(/(&nbsp;| )(<br>|)$/, "&nbsp;"))), e
  7182. }
  7183. function f() {
  7184. var e, t, n;
  7185. e = D.getRng(!0), t = e.startContainer, n = e.startOffset, 3 == t.nodeType && e.collapsed && ("\xa0" === t.data[n] ? (t.deleteData(n, 1), /[\u00a0| ]$/.test(c) || (c += " ")) : "\xa0" === t.data[n - 1] && (t.deleteData(n - 1, 1), /[\u00a0| ]$/.test(c) || (c = " " + c)))
  7186. }
  7187. function h() {
  7188. if (A) {
  7189. var e = a.getBody(),
  7190. n = new o(L);
  7191. t.each(L.select("*[data-mce-fragment]"), function(t) {
  7192. for (var r = t.parentNode; r && r != e; r = r.parentNode) B[t.nodeName.toLowerCase()] && n.compare(r, t) && L.remove(t, !0)
  7193. })
  7194. }
  7195. }
  7196. function p(e) {
  7197. for (var t = e; t = t.walk();) 1 === t.type && t.attr("data-mce-fragment", "1")
  7198. }
  7199. function m(e) {
  7200. t.each(e.getElementsByTagName("*"), function(e) {
  7201. e.removeAttribute("data-mce-fragment")
  7202. })
  7203. }
  7204. function g(e) {
  7205. return !!e.getAttribute("data-mce-fragment")
  7206. }
  7207. function v(e) {
  7208. return e && !a.schema.getShortEndedElements()[e.nodeName]
  7209. }
  7210. function y(t) {
  7211. function n(e) {
  7212. for (var t = a.getBody(); e && e !== t; e = e.parentNode)
  7213. if ("false" === a.dom.getContentEditable(e)) return e;
  7214. return null
  7215. }
  7216. function o(e) {
  7217. var t = i.fromRangeStart(e),
  7218. n = new r(a.getBody());
  7219. if (t = n.next(t)) return t.toRange()
  7220. }
  7221. var s, c, u;
  7222. if (t) {
  7223. if (D.scrollIntoView(t), s = n(t)) return L.remove(t), void D.select(s);
  7224. S = L.createRng(), k = t.previousSibling, k && 3 == k.nodeType ? (S.setStart(k, k.nodeValue.length), e.ie || (T = t.nextSibling, T && 3 == T.nodeType && (k.appendData(T.data), T.parentNode.removeChild(T)))) : (S.setStartBefore(t), S.setEndBefore(t)), c = L.getParent(t, L.isBlock), L.remove(t), c && L.isEmpty(c) && (a.$(c).empty(), S.setStart(c, 0), S.setEnd(c, 0), l(c) || g(c) || !(u = o(S)) ? L.add(c, L.create("br", {
  7225. "data-mce-bogus": "1"
  7226. })) : (S = u, L.remove(c))), D.setRng(S)
  7227. }
  7228. }
  7229. var b, C, x, w, E, N, _, S, k, T, R, A, B = a.schema.getTextInlineElements(),
  7230. D = a.selection,
  7231. L = a.dom;
  7232. /^ | $/.test(c) && (c = d(c)), b = a.parser, A = u.merge, C = new n({
  7233. validate: a.settings.validate
  7234. }, a.schema), R = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>', N = {
  7235. content: c,
  7236. format: "html",
  7237. selection: !0
  7238. }, a.fire("BeforeSetContent", N), c = N.content, c.indexOf("{$caret}") == -1 && (c += "{$caret}"), c = c.replace(/\{\$caret\}/, R), S = D.getRng();
  7239. var M = S.startContainer || (S.parentElement ? S.parentElement() : null),
  7240. P = a.getBody();
  7241. M === P && D.isCollapsed() && L.isBlock(P.firstChild) && v(P.firstChild) && L.isEmpty(P.firstChild) && (S = L.createRng(), S.setStart(P.firstChild, 0), S.setEnd(P.firstChild, 0), D.setRng(S)), D.isCollapsed() || (a.selection.setRng(a.selection.getRng()), a.getDoc().execCommand("Delete", !1, null), f()), x = D.getNode();
  7242. var O = {
  7243. context: x.nodeName.toLowerCase(),
  7244. data: u.data
  7245. };
  7246. if (E = b.parse(c, O), u.paste === !0 && s.isListFragment(E) && s.isParentBlockLi(L, x)) return S = s.insertAtCaret(C, L, a.selection.getRng(!0), E), a.selection.setRng(S), void a.fire("SetContent", N);
  7247. if (p(E), k = E.lastChild, "mce_marker" == k.attr("id"))
  7248. for (_ = k, k = k.prev; k; k = k.walk(!0))
  7249. if (3 == k.type || !L.isBlock(k.name)) {
  7250. a.schema.isValidChild(k.parent.name, "span") && k.parent.insert(_, k, "br" === k.name);
  7251. break
  7252. }
  7253. if (a._selectionOverrides.showBlockCaretContainer(x), O.invalid) {
  7254. for (D.setContent(R), x = D.getNode(), w = a.getBody(), 9 == x.nodeType ? x = k = w : k = x; k !== w;) x = k, k = k.parentNode;
  7255. c = x == w ? w.innerHTML : L.getOuterHTML(x), c = C.serialize(b.parse(c.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i, function() {
  7256. return C.serialize(E)
  7257. }))), x == w ? L.setHTML(w, c) : L.setOuterHTML(x, c)
  7258. } else c = C.serialize(E), k = x.firstChild, T = x.lastChild, !k || k === T && "BR" === k.nodeName ? L.setHTML(x, c) : D.setContent(c);
  7259. h(), y(L.get("mce_marker")), m(a.getBody()), a.fire("SetContent", N), a.addVisual()
  7260. },
  7261. u = function(e) {
  7262. var n;
  7263. return "string" != typeof e ? (n = t.extend({
  7264. paste: e.paste,
  7265. data: {
  7266. paste: e.paste
  7267. }
  7268. }, e), {
  7269. content: e.content,
  7270. details: n
  7271. }) : {
  7272. content: e,
  7273. details: {}
  7274. }
  7275. },
  7276. d = function(e, t) {
  7277. var n = u(t);
  7278. c(e, n.content, n.details)
  7279. };
  7280. return {
  7281. insertAtCaret: d
  7282. }
  7283. }), r(le, [d, m, T, y, se], function(e, n, r, i, o) {
  7284. var a = n.each,
  7285. s = n.extend,
  7286. l = n.map,
  7287. c = n.inArray,
  7288. u = n.explode,
  7289. d = e.ie && e.ie < 11,
  7290. f = !0,
  7291. h = !1;
  7292. return function(n) {
  7293. function p(e, t, r, i) {
  7294. var o, s, l = 0;
  7295. if (/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e) || i && i.skip_focus || n.focus(), i = n.fire("BeforeExecCommand", {
  7296. command: e,
  7297. ui: t,
  7298. value: r
  7299. }), i.isDefaultPrevented()) return !1;
  7300. if (s = e.toLowerCase(), o = B.exec[s]) return o(s, t, r), n.fire("ExecCommand", {
  7301. command: e,
  7302. ui: t,
  7303. value: r
  7304. }), !0;
  7305. if (a(n.plugins, function(i) {
  7306. if (i.execCommand && i.execCommand(e, t, r)) return n.fire("ExecCommand", {
  7307. command: e,
  7308. ui: t,
  7309. value: r
  7310. }), l = !0, !1
  7311. }), l) return l;
  7312. if (n.theme && n.theme.execCommand && n.theme.execCommand(e, t, r)) return n.fire("ExecCommand", {
  7313. command: e,
  7314. ui: t,
  7315. value: r
  7316. }), !0;
  7317. try {
  7318. l = n.getDoc().execCommand(e, t, r)
  7319. } catch (c) {}
  7320. return !!l && (n.fire("ExecCommand", {
  7321. command: e,
  7322. ui: t,
  7323. value: r
  7324. }), !0)
  7325. }
  7326. function m(e) {
  7327. var t;
  7328. if (!n.quirks.isHidden()) {
  7329. if (e = e.toLowerCase(), t = B.state[e]) return t(e);
  7330. try {
  7331. return n.getDoc().queryCommandState(e)
  7332. } catch (r) {}
  7333. return !1
  7334. }
  7335. }
  7336. function g(e) {
  7337. var t;
  7338. if (!n.quirks.isHidden()) {
  7339. if (e = e.toLowerCase(), t = B.value[e]) return t(e);
  7340. try {
  7341. return n.getDoc().queryCommandValue(e)
  7342. } catch (r) {}
  7343. }
  7344. }
  7345. function v(e, t) {
  7346. t = t || "exec", a(e, function(e, n) {
  7347. a(n.toLowerCase().split(","), function(n) {
  7348. B[t][n] = e
  7349. })
  7350. })
  7351. }
  7352. function y(e, t, r) {
  7353. e = e.toLowerCase(), B.exec[e] = function(e, i, o, a) {
  7354. return t.call(r || n, i, o, a)
  7355. }
  7356. }
  7357. function b(e) {
  7358. if (e = e.toLowerCase(), B.exec[e]) return !0;
  7359. try {
  7360. return n.getDoc().queryCommandSupported(e)
  7361. } catch (t) {}
  7362. return !1
  7363. }
  7364. function C(e, t, r) {
  7365. e = e.toLowerCase(), B.state[e] = function() {
  7366. return t.call(r || n)
  7367. }
  7368. }
  7369. function x(e, t, r) {
  7370. e = e.toLowerCase(), B.value[e] = function() {
  7371. return t.call(r || n)
  7372. }
  7373. }
  7374. function w(e) {
  7375. return e = e.toLowerCase(), !!B.exec[e]
  7376. }
  7377. function E(e, r, i) {
  7378. return r === t && (r = h), i === t && (i = null), n.getDoc().execCommand(e, r, i)
  7379. }
  7380. function N(e) {
  7381. return A.match(e)
  7382. }
  7383. function _(e, r) {
  7384. A.toggle(e, r ? {
  7385. value: r
  7386. } : t), n.nodeChanged()
  7387. }
  7388. function S(e) {
  7389. L = R.getBookmark(e)
  7390. }
  7391. function k() {
  7392. R.moveToBookmark(L)
  7393. }
  7394. var T, R, A, B = {
  7395. state: {},
  7396. exec: {},
  7397. value: {}
  7398. },
  7399. D = n.settings,
  7400. L;
  7401. n.on("PreInit", function() {
  7402. T = n.dom, R = n.selection, D = n.settings, A = n.formatter
  7403. }), s(this, {
  7404. execCommand: p,
  7405. queryCommandState: m,
  7406. queryCommandValue: g,
  7407. queryCommandSupported: b,
  7408. addCommands: v,
  7409. addCommand: y,
  7410. addQueryStateHandler: C,
  7411. addQueryValueHandler: x,
  7412. hasCustomCommand: w
  7413. }), v({
  7414. "mceResetDesignMode,mceBeginUndoLevel": function() {},
  7415. "mceEndUndoLevel,mceAddUndoLevel": function() {
  7416. n.undoManager.add()
  7417. },
  7418. "Cut,Copy,Paste": function(t) {
  7419. var r = n.getDoc(),
  7420. i;
  7421. try {
  7422. E(t)
  7423. } catch (o) {
  7424. i = f
  7425. }
  7426. if ("paste" !== t || r.queryCommandEnabled(t) || (i = !0), i || !r.queryCommandSupported(t)) {
  7427. var a = n.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");
  7428. e.mac && (a = a.replace(/Ctrl\+/g, "\u2318+")), n.notificationManager.open({
  7429. text: a,
  7430. type: "error"
  7431. })
  7432. }
  7433. },
  7434. unlink: function() {
  7435. if (R.isCollapsed()) {
  7436. var e = n.dom.getParent(n.selection.getStart(), "a");
  7437. return void(e && n.dom.remove(e, !0))
  7438. }
  7439. A.remove("link")
  7440. },
  7441. "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone": function(e) {
  7442. var t = e.substring(7);
  7443. "full" == t && (t = "justify"), a("left,center,right,justify".split(","), function(e) {
  7444. t != e && A.remove("align" + e)
  7445. }), "none" != t && _("align" + t)
  7446. },
  7447. "InsertUnorderedList,InsertOrderedList": function(e) {
  7448. var t, n;
  7449. E(e), t = T.getParent(R.getNode(), "ol,ul"), t && (n = t.parentNode, /^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName) && (S(), T.split(n, t), k()))
  7450. },
  7451. "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": function(e) {
  7452. _(e)
  7453. },
  7454. "ForeColor,HiliteColor,FontName": function(e, t, n) {
  7455. _(e, n)
  7456. },
  7457. FontSize: function(e, t, n) {
  7458. var r, i;
  7459. n >= 1 && n <= 7 && (i = u(D.font_size_style_values), r = u(D.font_size_classes), n = r ? r[n - 1] || n : i[n - 1] || n), _(e, n)
  7460. },
  7461. RemoveFormat: function(e) {
  7462. A.remove(e)
  7463. },
  7464. mceBlockQuote: function() {
  7465. _("blockquote")
  7466. },
  7467. FormatBlock: function(e, t, n) {
  7468. return _(n || "p")
  7469. },
  7470. mceCleanup: function() {
  7471. var e = R.getBookmark();
  7472. n.setContent(n.getContent({
  7473. cleanup: f
  7474. }), {
  7475. cleanup: f
  7476. }), R.moveToBookmark(e)
  7477. },
  7478. mceRemoveNode: function(e, t, r) {
  7479. var i = r || R.getNode();
  7480. i != n.getBody() && (S(), n.dom.remove(i, f), k())
  7481. },
  7482. mceSelectNodeDepth: function(e, t, r) {
  7483. var i = 0;
  7484. T.getParent(R.getNode(), function(e) {
  7485. if (1 == e.nodeType && i++ == r) return R.select(e), h
  7486. }, n.getBody())
  7487. },
  7488. mceSelectNode: function(e, t, n) {
  7489. R.select(n)
  7490. },
  7491. mceInsertContent: function(e, t, r) {
  7492. o.insertAtCaret(n, r)
  7493. },
  7494. mceInsertRawHTML: function(e, t, r) {
  7495. R.setContent("tiny_mce_marker"), n.setContent(n.getContent().replace(/tiny_mce_marker/g, function() {
  7496. return r
  7497. }))
  7498. },
  7499. mceToggleFormat: function(e, t, n) {
  7500. _(n)
  7501. },
  7502. mceSetContent: function(e, t, r) {
  7503. n.setContent(r)
  7504. },
  7505. "Indent,Outdent": function(e) {
  7506. var t, r, i;
  7507. t = D.indentation, r = /[a-z%]+$/i.exec(t), t = parseInt(t, 10), m("InsertUnorderedList") || m("InsertOrderedList") ? E(e) : (D.forced_root_block || T.getParent(R.getNode(), T.isBlock) || A.apply("div"), a(R.getSelectedBlocks(), function(o) {
  7508. if ("false" !== T.getContentEditable(o) && "LI" !== o.nodeName) {
  7509. var a = n.getParam("indent_use_margin", !1) ? "margin" : "padding";
  7510. a = "TABLE" === o.nodeName ? "margin" : a, a += "rtl" == T.getStyle(o, "direction", !0) ? "Right" : "Left", "outdent" == e ? (i = Math.max(0, parseInt(o.style[a] || 0, 10) - t), T.setStyle(o, a, i ? i + r : "")) : (i = parseInt(o.style[a] || 0, 10) + t + r, T.setStyle(o, a, i))
  7511. }
  7512. }))
  7513. },
  7514. mceRepaint: function() {},
  7515. InsertHorizontalRule: function() {
  7516. n.execCommand("mceInsertContent", !1, "<hr />")
  7517. },
  7518. mceToggleVisualAid: function() {
  7519. n.hasVisual = !n.hasVisual, n.addVisual()
  7520. },
  7521. mceReplaceContent: function(e, t, r) {
  7522. n.execCommand("mceInsertContent", !1, r.replace(/\{\$selection\}/g, R.getContent({
  7523. format: "text"
  7524. })))
  7525. },
  7526. mceInsertLink: function(e, t, n) {
  7527. var r;
  7528. "string" == typeof n && (n = {
  7529. href: n
  7530. }), r = T.getParent(R.getNode(), "a"), n.href = n.href.replace(" ", "%20"), r && n.href || A.remove("link"), n.href && A.apply("link", n, r)
  7531. },
  7532. selectAll: function() {
  7533. var e = T.getRoot(),
  7534. t;
  7535. R.getRng().setStart ? (t = T.createRng(), t.setStart(e, 0), t.setEnd(e, e.childNodes.length), R.setRng(t)) : (t = R.getRng(), t.item || (t.moveToElementText(e), t.select()))
  7536. },
  7537. "delete": function() {
  7538. E("Delete");
  7539. var e = n.getBody();
  7540. T.isEmpty(e) && (n.setContent(""), e.firstChild && T.isBlock(e.firstChild) ? n.selection.setCursorLocation(e.firstChild, 0) : n.selection.setCursorLocation(e, 0))
  7541. },
  7542. mceNewDocument: function() {
  7543. n.setContent("")
  7544. },
  7545. InsertLineBreak: function(e, t, o) {
  7546. function a() {
  7547. for (var e = new i(m, v), t, r = n.schema.getNonEmptyElements(); t = e.next();)
  7548. if (r[t.nodeName.toLowerCase()] || t.length > 0) return !0
  7549. }
  7550. var s = o,
  7551. l, c, u, h = R.getRng(!0);
  7552. new r(T).normalize(h);
  7553. var p = h.startOffset,
  7554. m = h.startContainer;
  7555. if (1 == m.nodeType && m.hasChildNodes()) {
  7556. var g = p > m.childNodes.length - 1;
  7557. m = m.childNodes[Math.min(p, m.childNodes.length - 1)] || m, p = g && 3 == m.nodeType ? m.nodeValue.length : 0
  7558. }
  7559. var v = T.getParent(m, T.isBlock),
  7560. y = v ? v.nodeName.toUpperCase() : "",
  7561. b = v ? T.getParent(v.parentNode, T.isBlock) : null,
  7562. C = b ? b.nodeName.toUpperCase() : "",
  7563. x = s && s.ctrlKey;
  7564. "LI" != C || x || (v = b, y = C), m && 3 == m.nodeType && p >= m.nodeValue.length && (d || a() || (l = T.create("br"), h.insertNode(l), h.setStartAfter(l), h.setEndAfter(l), c = !0)), l = T.create("br"), h.insertNode(l);
  7565. var w = T.doc.documentMode;
  7566. return d && "PRE" == y && (!w || w < 8) && l.parentNode.insertBefore(T.doc.createTextNode("\r"), l), u = T.create("span", {}, "&nbsp;"), l.parentNode.insertBefore(u, l), R.scrollIntoView(u), T.remove(u), c ? (h.setStartBefore(l), h.setEndBefore(l)) : (h.setStartAfter(l), h.setEndAfter(l)), R.setRng(h), n.undoManager.add(), f
  7567. }
  7568. }), v({
  7569. "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull": function(e) {
  7570. var t = "align" + e.substring(7),
  7571. n = R.isCollapsed() ? [T.getParent(R.getNode(), T.isBlock)] : R.getSelectedBlocks(),
  7572. r = l(n, function(e) {
  7573. return !!A.matchNode(e, t)
  7574. });
  7575. return c(r, f) !== -1
  7576. },
  7577. "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": function(e) {
  7578. return N(e)
  7579. },
  7580. mceBlockQuote: function() {
  7581. return N("blockquote")
  7582. },
  7583. Outdent: function() {
  7584. var e;
  7585. if (D.inline_styles) {
  7586. if ((e = T.getParent(R.getStart(), T.isBlock)) && parseInt(e.style.paddingLeft, 10) > 0) return f;
  7587. if ((e = T.getParent(R.getEnd(), T.isBlock)) && parseInt(e.style.paddingLeft, 10) > 0) return f
  7588. }
  7589. return m("InsertUnorderedList") || m("InsertOrderedList") || !D.inline_styles && !!T.getParent(R.getNode(), "BLOCKQUOTE")
  7590. },
  7591. "InsertUnorderedList,InsertOrderedList": function(e) {
  7592. var t = T.getParent(R.getNode(), "ul,ol");
  7593. return t && ("insertunorderedlist" === e && "UL" === t.tagName || "insertorderedlist" === e && "OL" === t.tagName)
  7594. }
  7595. }, "state"), v({
  7596. "FontSize,FontName": function(e) {
  7597. var t = 0,
  7598. n;
  7599. return (n = T.getParent(R.getNode(), "span")) && (t = "fontsize" == e ? n.style.fontSize : n.style.fontFamily.replace(/, /g, ",").replace(/[\'\"]/g, "").toLowerCase()), t
  7600. }
  7601. }, "value"), v({
  7602. Undo: function() {
  7603. n.undoManager.undo()
  7604. },
  7605. Redo: function() {
  7606. n.undoManager.redo()
  7607. }
  7608. })
  7609. }
  7610. }), r(ce, [m], function(e) {
  7611. function t(e, o) {
  7612. var a = this,
  7613. s, l;
  7614. if (e = r(e), o = a.settings = o || {}, s = o.base_uri, /^([\w\-]+):([^\/]{2})/i.test(e) || /^\s*#/.test(e)) return void(a.source = e);
  7615. var c = 0 === e.indexOf("//");
  7616. 0 !== e.indexOf("/") || c || (e = (s ? s.protocol || "http" : "http") + "://mce_host" + e), /^[\w\-]*:?\/\//.test(e) || (l = o.base_uri ? o.base_uri.path : new t(location.href).directory, "" === o.base_uri.protocol ? e = "//mce_host" + a.toAbsPath(l, e) : (e = /([^#?]*)([#?]?.*)/.exec(e), e = (s && s.protocol || "http") + "://mce_host" + a.toAbsPath(l, e[1]) + e[2])), e = e.replace(/@@/g, "(mce_at)"), e = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e), n(i, function(t, n) {
  7617. var r = e[n];
  7618. r && (r = r.replace(/\(mce_at\)/g, "@@")), a[t] = r
  7619. }), s && (a.protocol || (a.protocol = s.protocol), a.userInfo || (a.userInfo = s.userInfo), a.port || "mce_host" !== a.host || (a.port = s.port), a.host && "mce_host" !== a.host || (a.host = s.host), a.source = ""), c && (a.protocol = "")
  7620. }
  7621. var n = e.each,
  7622. r = e.trim,
  7623. i = "source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),
  7624. o = {
  7625. ftp: 21,
  7626. http: 80,
  7627. https: 443,
  7628. mailto: 25
  7629. };
  7630. return t.prototype = {
  7631. setPath: function(e) {
  7632. var t = this;
  7633. e = /^(.*?)\/?(\w+)?$/.exec(e), t.path = e[0], t.directory = e[1], t.file = e[2], t.source = "", t.getURI()
  7634. },
  7635. toRelative: function(e) {
  7636. var n = this,
  7637. r;
  7638. if ("./" === e) return e;
  7639. if (e = new t(e, {
  7640. base_uri: n
  7641. }), "mce_host" != e.host && n.host != e.host && e.host || n.port != e.port || n.protocol != e.protocol && "" !== e.protocol) return e.getURI();
  7642. var i = n.getURI(),
  7643. o = e.getURI();
  7644. return i == o || "/" == i.charAt(i.length - 1) && i.substr(0, i.length - 1) == o ? i : (r = n.toRelPath(n.path, e.path), e.query && (r += "?" + e.query), e.anchor && (r += "#" + e.anchor), r)
  7645. },
  7646. toAbsolute: function(e, n) {
  7647. return e = new t(e, {
  7648. base_uri: this
  7649. }), e.getURI(n && this.isSameOrigin(e))
  7650. },
  7651. isSameOrigin: function(e) {
  7652. if (this.host == e.host && this.protocol == e.protocol) {
  7653. if (this.port == e.port) return !0;
  7654. var t = o[this.protocol];
  7655. if (t && (this.port || t) == (e.port || t)) return !0
  7656. }
  7657. return !1
  7658. },
  7659. toRelPath: function(e, t) {
  7660. var n, r = 0,
  7661. i = "",
  7662. o, a;
  7663. if (e = e.substring(0, e.lastIndexOf("/")), e = e.split("/"), n = t.split("/"), e.length >= n.length)
  7664. for (o = 0, a = e.length; o < a; o++)
  7665. if (o >= n.length || e[o] != n[o]) {
  7666. r = o + 1;
  7667. break
  7668. }
  7669. if (e.length < n.length)
  7670. for (o = 0, a = n.length; o < a; o++)
  7671. if (o >= e.length || e[o] != n[o]) {
  7672. r = o + 1;
  7673. break
  7674. }
  7675. if (1 === r) return t;
  7676. for (o = 0, a = e.length - (r - 1); o < a; o++) i += "../";
  7677. for (o = r - 1, a = n.length; o < a; o++) i += o != r - 1 ? "/" + n[o] : n[o];
  7678. return i
  7679. },
  7680. toAbsPath: function(e, t) {
  7681. var r, i = 0,
  7682. o = [],
  7683. a, s;
  7684. for (a = /\/$/.test(t) ? "/" : "", e = e.split("/"), t = t.split("/"), n(e, function(e) {
  7685. e && o.push(e)
  7686. }), e = o, r = t.length - 1, o = []; r >= 0; r--) 0 !== t[r].length && "." !== t[r] && (".." !== t[r] ? i > 0 ? i-- : o.push(t[r]) : i++);
  7687. return r = e.length - i, s = r <= 0 ? o.reverse().join("/") : e.slice(0, r).join("/") + "/" + o.reverse().join("/"), 0 !== s.indexOf("/") && (s = "/" + s), a && s.lastIndexOf("/") !== s.length - 1 && (s += a), s
  7688. },
  7689. getURI: function(e) {
  7690. var t, n = this;
  7691. return n.source && !e || (t = "", e || (t += n.protocol ? n.protocol + "://" : "//", n.userInfo && (t += n.userInfo + "@"), n.host && (t += n.host), n.port && (t += ":" + n.port)), n.path && (t += n.path), n.query && (t += "?" + n.query), n.anchor && (t += "#" + n.anchor), n.source = t), n.source
  7692. }
  7693. }, t.parseDataUri = function(e) {
  7694. var t, n;
  7695. return e = decodeURIComponent(e).split(","), n = /data:([^;]+)/.exec(e[0]), n && (t = n[1]), {
  7696. type: t,
  7697. data: e[1]
  7698. }
  7699. }, t.getDocumentBaseUrl = function(e) {
  7700. var t;
  7701. return t = 0 !== e.protocol.indexOf("http") && "file:" !== e.protocol ? e.href : e.protocol + "//" + e.host + e.pathname, /^[^:]+:\/\/\/?[^\/]+\//.test(t) && (t = t.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, ""), /[\/\\]$/.test(t) || (t += "/")), t
  7702. }, t
  7703. }), r(ue, [m], function(e) {
  7704. function t() {}
  7705. var n = e.each,
  7706. r = e.extend,
  7707. i, o;
  7708. return t.extend = i = function(e) {
  7709. function t() {
  7710. var e, t, n, r = this;
  7711. if (!o && (r.init && r.init.apply(r, arguments), t = r.Mixins))
  7712. for (e = t.length; e--;) n = t[e], n.init && n.init.apply(r, arguments)
  7713. }
  7714. function a() {
  7715. return this
  7716. }
  7717. function s(e, t) {
  7718. return function() {
  7719. var n = this,
  7720. r = n._super,
  7721. i;
  7722. return n._super = c[e], i = t.apply(n, arguments), n._super = r, i
  7723. }
  7724. }
  7725. var l = this,
  7726. c = l.prototype,
  7727. u, d, f;
  7728. o = !0, u = new l, o = !1, e.Mixins && (n(e.Mixins, function(t) {
  7729. for (var n in t) "init" !== n && (e[n] = t[n])
  7730. }), c.Mixins && (e.Mixins = c.Mixins.concat(e.Mixins))), e.Methods && n(e.Methods.split(","), function(t) {
  7731. e[t] = a
  7732. }), e.Properties && n(e.Properties.split(","), function(t) {
  7733. var n = "_" + t;
  7734. e[t] = function(e) {
  7735. var t = this,
  7736. r;
  7737. return e !== r ? (t[n] = e, t) : t[n]
  7738. }
  7739. }), e.Statics && n(e.Statics, function(e, n) {
  7740. t[n] = e
  7741. }), e.Defaults && c.Defaults && (e.Defaults = r({}, c.Defaults, e.Defaults));
  7742. for (d in e) f = e[d], "function" == typeof f && c[d] ? u[d] = s(d, f) : u[d] = f;
  7743. return t.prototype = u, t.constructor = t, t.extend = i, t
  7744. }, t
  7745. }), r(de, [m], function(e) {
  7746. function t(t) {
  7747. function n() {
  7748. return !1
  7749. }
  7750. function r() {
  7751. return !0
  7752. }
  7753. function i(e, i) {
  7754. var o, s, l, c;
  7755. if (e = e.toLowerCase(), i = i || {}, i.type = e, i.target || (i.target = u), i.preventDefault || (i.preventDefault = function() {
  7756. i.isDefaultPrevented = r
  7757. }, i.stopPropagation = function() {
  7758. i.isPropagationStopped = r
  7759. }, i.stopImmediatePropagation = function() {
  7760. i.isImmediatePropagationStopped = r
  7761. }, i.isDefaultPrevented = n, i.isPropagationStopped = n, i.isImmediatePropagationStopped = n), t.beforeFire && t.beforeFire(i), o = d[e])
  7762. for (s = 0, l = o.length; s < l; s++) {
  7763. if (c = o[s], c.once && a(e, c.func), i.isImmediatePropagationStopped()) return i.stopPropagation(), i;
  7764. if (c.func.call(u, i) === !1) return i.preventDefault(), i
  7765. }
  7766. return i
  7767. }
  7768. function o(t, r, i, o) {
  7769. var a, s, l;
  7770. if (r === !1 && (r = n), r)
  7771. for (r = {
  7772. func: r
  7773. }, o && e.extend(r, o), s = t.toLowerCase().split(" "), l = s.length; l--;) t = s[l], a = d[t], a || (a = d[t] = [], f(t, !0)), i ? a.unshift(r) : a.push(r);
  7774. return c
  7775. }
  7776. function a(e, t) {
  7777. var n, r, i, o, a;
  7778. if (e)
  7779. for (o = e.toLowerCase().split(" "), n = o.length; n--;) {
  7780. if (e = o[n], r = d[e], !e) {
  7781. for (i in d) f(i, !1), delete d[i];
  7782. return c
  7783. }
  7784. if (r) {
  7785. if (t)
  7786. for (a = r.length; a--;) r[a].func === t && (r = r.slice(0, a).concat(r.slice(a + 1)), d[e] = r);
  7787. else r.length = 0;
  7788. r.length || (f(e, !1), delete d[e])
  7789. }
  7790. } else {
  7791. for (e in d) f(e, !1);
  7792. d = {}
  7793. }
  7794. return c
  7795. }
  7796. function s(e, t, n) {
  7797. return o(e, t, n, {
  7798. once: !0
  7799. })
  7800. }
  7801. function l(e) {
  7802. return e = e.toLowerCase(), !(!d[e] || 0 === d[e].length)
  7803. }
  7804. var c = this,
  7805. u, d = {},
  7806. f;
  7807. t = t || {}, u = t.scope || c, f = t.toggleEvent || n, c.fire = i, c.on = o, c.off = a, c.once = s, c.has = l
  7808. }
  7809. var n = e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend", " ");
  7810. return t.isNative = function(e) {
  7811. return !!n[e.toLowerCase()]
  7812. }, t
  7813. }), r(fe, [], function() {
  7814. function e(e) {
  7815. this.create = e.create
  7816. }
  7817. return e.create = function(t, n) {
  7818. return new e({
  7819. create: function(e, r) {
  7820. function i(t) {
  7821. e.set(r, t.value)
  7822. }
  7823. function o(e) {
  7824. t.set(n, e.value)
  7825. }
  7826. var a;
  7827. return e.on("change:" + r, o), t.on("change:" + n, i), a = e._bindings, a || (a = e._bindings = [], e.on("destroy", function() {
  7828. for (var e = a.length; e--;) a[e]()
  7829. })), a.push(function() {
  7830. t.off("change:" + n, i)
  7831. }), t.get(n)
  7832. }
  7833. })
  7834. }, e
  7835. }), r(he, [de], function(e) {
  7836. function t(t) {
  7837. return t._eventDispatcher || (t._eventDispatcher = new e({
  7838. scope: t,
  7839. toggleEvent: function(n, r) {
  7840. e.isNative(n) && t.toggleNativeEvent && t.toggleNativeEvent(n, r)
  7841. }
  7842. })), t._eventDispatcher
  7843. }
  7844. return {
  7845. fire: function(e, n, r) {
  7846. var i = this;
  7847. if (i.removed && "remove" !== e) return n;
  7848. if (n = t(i).fire(e, n, r), r !== !1 && i.parent)
  7849. for (var o = i.parent(); o && !n.isPropagationStopped();) o.fire(e, n, !1), o = o.parent();
  7850. return n
  7851. },
  7852. on: function(e, n, r) {
  7853. return t(this).on(e, n, r)
  7854. },
  7855. off: function(e, n) {
  7856. return t(this).off(e, n)
  7857. },
  7858. once: function(e, n) {
  7859. return t(this).once(e, n)
  7860. },
  7861. hasEventListeners: function(e) {
  7862. return t(this).has(e)
  7863. }
  7864. }
  7865. }), r(pe, [fe, he, ue, m], function(e, t, n, r) {
  7866. function i(e) {
  7867. return e.nodeType > 0
  7868. }
  7869. function o(e, t) {
  7870. var n, a;
  7871. if (e === t) return !0;
  7872. if (null === e || null === t) return e === t;
  7873. if ("object" != typeof e || "object" != typeof t) return e === t;
  7874. if (r.isArray(t)) {
  7875. if (e.length !== t.length) return !1;
  7876. for (n = e.length; n--;)
  7877. if (!o(e[n], t[n])) return !1
  7878. }
  7879. if (i(e) || i(t)) return e === t;
  7880. a = {};
  7881. for (n in t) {
  7882. if (!o(e[n], t[n])) return !1;
  7883. a[n] = !0
  7884. }
  7885. for (n in e)
  7886. if (!a[n] && !o(e[n], t[n])) return !1;
  7887. return !0
  7888. }
  7889. return n.extend({
  7890. Mixins: [t],
  7891. init: function(t) {
  7892. var n, r;
  7893. t = t || {};
  7894. for (n in t) r = t[n], r instanceof e && (t[n] = r.create(this, n));
  7895. this.data = t
  7896. },
  7897. set: function(t, n) {
  7898. var r, i, a = this.data[t];
  7899. if (n instanceof e && (n = n.create(this, t)), "object" == typeof t) {
  7900. for (r in t) this.set(r, t[r]);
  7901. return this
  7902. }
  7903. return o(a, n) || (this.data[t] = n, i = {
  7904. target: this,
  7905. name: t,
  7906. value: n,
  7907. oldValue: a
  7908. }, this.fire("change:" + t, i), this.fire("change", i)), this
  7909. },
  7910. get: function(e) {
  7911. return this.data[e]
  7912. },
  7913. has: function(e) {
  7914. return e in this.data
  7915. },
  7916. bind: function(t) {
  7917. return e.create(this, t)
  7918. },
  7919. destroy: function() {
  7920. this.fire("destroy")
  7921. }
  7922. })
  7923. }), r(me, [ue], function(e) {
  7924. function t(e) {
  7925. for (var t = [], n = e.length, r; n--;) r = e[n], r.__checked || (t.push(r), r.__checked = 1);
  7926. for (n = t.length; n--;) delete t[n].__checked;
  7927. return t
  7928. }
  7929. var n = /^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,
  7930. r = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
  7931. i = /^\s*|\s*$/g,
  7932. o, a = e.extend({
  7933. init: function(e) {
  7934. function t(e) {
  7935. if (e) return e = e.toLowerCase(),
  7936. function(t) {
  7937. return "*" === e || t.type === e
  7938. }
  7939. }
  7940. function o(e) {
  7941. if (e) return function(t) {
  7942. return t._name === e
  7943. }
  7944. }
  7945. function a(e) {
  7946. if (e) return e = e.split("."),
  7947. function(t) {
  7948. for (var n = e.length; n--;)
  7949. if (!t.classes.contains(e[n])) return !1;
  7950. return !0
  7951. }
  7952. }
  7953. function s(e, t, n) {
  7954. if (e) return function(r) {
  7955. var i = r[e] ? r[e]() : "";
  7956. return t ? "=" === t ? i === n : "*=" === t ? i.indexOf(n) >= 0 : "~=" === t ? (" " + i + " ").indexOf(" " + n + " ") >= 0 : "!=" === t ? i != n : "^=" === t ? 0 === i.indexOf(n) : "$=" === t && i.substr(i.length - n.length) === n : !!n
  7957. }
  7958. }
  7959. function l(e) {
  7960. var t;
  7961. if (e) return e = /(?:not\((.+)\))|(.+)/i.exec(e), e[1] ? (t = u(e[1], []), function(e) {
  7962. return !d(e, t)
  7963. }) : (e = e[2], function(t, n, r) {
  7964. return "first" === e ? 0 === n : "last" === e ? n === r - 1 : "even" === e ? n % 2 === 0 : "odd" === e ? n % 2 === 1 : !!t[e] && t[e]()
  7965. })
  7966. }
  7967. function c(e, r, c) {
  7968. function u(e) {
  7969. e && r.push(e)
  7970. }
  7971. var d;
  7972. return d = n.exec(e.replace(i, "")), u(t(d[1])), u(o(d[2])), u(a(d[3])), u(s(d[4], d[5], d[6])), u(l(d[7])), r.pseudo = !!d[7], r.direct = c, r
  7973. }
  7974. function u(e, t) {
  7975. var n = [],
  7976. i, o, a;
  7977. do
  7978. if (r.exec(""), o = r.exec(e), o && (e = o[3], n.push(o[1]), o[2])) {
  7979. i = o[3];
  7980. break
  7981. }
  7982. while (o);
  7983. for (i && u(i, t), e = [], a = 0; a < n.length; a++) ">" != n[a] && e.push(c(n[a], [], ">" === n[a - 1]));
  7984. return t.push(e), t
  7985. }
  7986. var d = this.match;
  7987. this._selectors = u(e, [])
  7988. },
  7989. match: function(e, t) {
  7990. var n, r, i, o, a, s, l, c, u, d, f, h, p;
  7991. for (t = t || this._selectors, n = 0, r = t.length; n < r; n++) {
  7992. for (a = t[n], o = a.length, p = e, h = 0, i = o - 1; i >= 0; i--)
  7993. for (c = a[i]; p;) {
  7994. if (c.pseudo)
  7995. for (f = p.parent().items(), u = d = f.length; u-- && f[u] !== p;);
  7996. for (s = 0, l = c.length; s < l; s++)
  7997. if (!c[s](p, u, d)) {
  7998. s = l + 1;
  7999. break
  8000. }
  8001. if (s === l) {
  8002. h++;
  8003. break
  8004. }
  8005. if (i === o - 1) break;
  8006. p = p.parent()
  8007. }
  8008. if (h === o) return !0
  8009. }
  8010. return !1
  8011. },
  8012. find: function(e) {
  8013. function n(e, t, i) {
  8014. var o, a, s, l, c, u = t[i];
  8015. for (o = 0, a = e.length; o < a; o++) {
  8016. for (c = e[o], s = 0, l = u.length; s < l; s++)
  8017. if (!u[s](c, o, a)) {
  8018. s = l + 1;
  8019. break
  8020. }
  8021. if (s === l) i == t.length - 1 ? r.push(c) : c.items && n(c.items(), t, i + 1);
  8022. else if (u.direct) return;
  8023. c.items && n(c.items(), t, i)
  8024. }
  8025. }
  8026. var r = [],
  8027. i, s, l = this._selectors;
  8028. if (e.items) {
  8029. for (i = 0, s = l.length; i < s; i++) n(e.items(), l[i], 0);
  8030. s > 1 && (r = t(r))
  8031. }
  8032. return o || (o = a.Collection), new o(r)
  8033. }
  8034. });
  8035. return a
  8036. }), r(ge, [m, me, ue], function(e, t, n) {
  8037. var r, i, o = Array.prototype.push,
  8038. a = Array.prototype.slice;
  8039. return i = {
  8040. length: 0,
  8041. init: function(e) {
  8042. e && this.add(e)
  8043. },
  8044. add: function(t) {
  8045. var n = this;
  8046. return e.isArray(t) ? o.apply(n, t) : t instanceof r ? n.add(t.toArray()) : o.call(n, t), n
  8047. },
  8048. set: function(e) {
  8049. var t = this,
  8050. n = t.length,
  8051. r;
  8052. for (t.length = 0, t.add(e), r = t.length; r < n; r++) delete t[r];
  8053. return t
  8054. },
  8055. filter: function(e) {
  8056. var n = this,
  8057. i, o, a = [],
  8058. s, l;
  8059. for ("string" == typeof e ? (e = new t(e), l = function(t) {
  8060. return e.match(t)
  8061. }) : l = e, i = 0, o = n.length; i < o; i++) s = n[i], l(s) && a.push(s);
  8062. return new r(a)
  8063. },
  8064. slice: function() {
  8065. return new r(a.apply(this, arguments))
  8066. },
  8067. eq: function(e) {
  8068. return e === -1 ? this.slice(e) : this.slice(e, +e + 1)
  8069. },
  8070. each: function(t) {
  8071. return e.each(this, t), this
  8072. },
  8073. toArray: function() {
  8074. return e.toArray(this)
  8075. },
  8076. indexOf: function(e) {
  8077. for (var t = this, n = t.length; n-- && t[n] !== e;);
  8078. return n
  8079. },
  8080. reverse: function() {
  8081. return new r(e.toArray(this).reverse())
  8082. },
  8083. hasClass: function(e) {
  8084. return !!this[0] && this[0].classes.contains(e)
  8085. },
  8086. prop: function(e, t) {
  8087. var n = this,
  8088. r, i;
  8089. return t !== r ? (n.each(function(n) {
  8090. n[e] && n[e](t)
  8091. }), n) : (i = n[0], i && i[e] ? i[e]() : void 0)
  8092. },
  8093. exec: function(t) {
  8094. var n = this,
  8095. r = e.toArray(arguments).slice(1);
  8096. return n.each(function(e) {
  8097. e[t] && e[t].apply(e, r)
  8098. }), n
  8099. },
  8100. remove: function() {
  8101. for (var e = this.length; e--;) this[e].remove();
  8102. return this
  8103. },
  8104. addClass: function(e) {
  8105. return this.each(function(t) {
  8106. t.classes.add(e)
  8107. })
  8108. },
  8109. removeClass: function(e) {
  8110. return this.each(function(t) {
  8111. t.classes.remove(e)
  8112. })
  8113. }
  8114. }, e.each("fire on off show hide append prepend before after reflow".split(" "), function(t) {
  8115. i[t] = function() {
  8116. var n = e.toArray(arguments);
  8117. return this.each(function(e) {
  8118. t in e && e[t].apply(e, n)
  8119. }), this
  8120. }
  8121. }), e.each("text name disabled active selected checked visible parent value data".split(" "), function(e) {
  8122. i[e] = function(t) {
  8123. return this.prop(e, t)
  8124. }
  8125. }), r = n.extend(i), t.Collection = r, r
  8126. }), r(ve, [d, m, w], function(e, t, n) {
  8127. var r = 0,
  8128. i = {
  8129. id: function() {
  8130. return "mceu_" + r++
  8131. },
  8132. create: function(e, r, i) {
  8133. var o = document.createElement(e);
  8134. return n.DOM.setAttribs(o, r), "string" == typeof i ? o.innerHTML = i : t.each(i, function(e) {
  8135. e.nodeType && o.appendChild(e)
  8136. }), o
  8137. },
  8138. createFragment: function(e) {
  8139. return n.DOM.createFragment(e)
  8140. },
  8141. getWindowSize: function() {
  8142. return n.DOM.getViewPort()
  8143. },
  8144. getSize: function(e) {
  8145. var t, n;
  8146. if (e.getBoundingClientRect) {
  8147. var r = e.getBoundingClientRect();
  8148. t = Math.max(r.width || r.right - r.left, e.offsetWidth), n = Math.max(r.height || r.bottom - r.bottom, e.offsetHeight)
  8149. } else t = e.offsetWidth, n = e.offsetHeight;
  8150. return {
  8151. width: t,
  8152. height: n
  8153. }
  8154. },
  8155. getPos: function(e, t) {
  8156. return n.DOM.getPos(e, t || i.getContainer())
  8157. },
  8158. getContainer: function() {
  8159. return e.container ? e.container : document.body
  8160. },
  8161. getViewPort: function(e) {
  8162. return n.DOM.getViewPort(e)
  8163. },
  8164. get: function(e) {
  8165. return document.getElementById(e)
  8166. },
  8167. addClass: function(e, t) {
  8168. return n.DOM.addClass(e, t)
  8169. },
  8170. removeClass: function(e, t) {
  8171. return n.DOM.removeClass(e, t)
  8172. },
  8173. hasClass: function(e, t) {
  8174. return n.DOM.hasClass(e, t)
  8175. },
  8176. toggleClass: function(e, t, r) {
  8177. return n.DOM.toggleClass(e, t, r)
  8178. },
  8179. css: function(e, t, r) {
  8180. return n.DOM.setStyle(e, t, r)
  8181. },
  8182. getRuntimeStyle: function(e, t) {
  8183. return n.DOM.getStyle(e, t, !0)
  8184. },
  8185. on: function(e, t, r, i) {
  8186. return n.DOM.bind(e, t, r, i)
  8187. },
  8188. off: function(e, t, r) {
  8189. return n.DOM.unbind(e, t, r)
  8190. },
  8191. fire: function(e, t, r) {
  8192. return n.DOM.fire(e, t, r)
  8193. },
  8194. innerHtml: function(e, t) {
  8195. n.DOM.setHTML(e, t)
  8196. }
  8197. };
  8198. return i
  8199. }), r(ye, [], function() {
  8200. return {
  8201. parseBox: function(e) {
  8202. var t, n = 10;
  8203. if (e) return "number" == typeof e ? (e = e || 0, {
  8204. top: e,
  8205. left: e,
  8206. bottom: e,
  8207. right: e
  8208. }) : (e = e.split(" "), t = e.length, 1 === t ? e[1] = e[2] = e[3] = e[0] : 2 === t ? (e[2] = e[0], e[3] = e[1]) : 3 === t && (e[3] = e[1]), {
  8209. top: parseInt(e[0], n) || 0,
  8210. right: parseInt(e[1], n) || 0,
  8211. bottom: parseInt(e[2], n) || 0,
  8212. left: parseInt(e[3], n) || 0
  8213. })
  8214. },
  8215. measureBox: function(e, t) {
  8216. function n(t) {
  8217. var n = document.defaultView;
  8218. return n ? (t = t.replace(/[A-Z]/g, function(e) {
  8219. return "-" + e
  8220. }), n.getComputedStyle(e, null).getPropertyValue(t)) : e.currentStyle[t]
  8221. }
  8222. function r(e) {
  8223. var t = parseFloat(n(e), 10);
  8224. return isNaN(t) ? 0 : t
  8225. }
  8226. return {
  8227. top: r(t + "TopWidth"),
  8228. right: r(t + "RightWidth"),
  8229. bottom: r(t + "BottomWidth"),
  8230. left: r(t + "LeftWidth")
  8231. }
  8232. }
  8233. }
  8234. }), r(be, [m], function(e) {
  8235. function t() {}
  8236. function n(e) {
  8237. this.cls = [], this.cls._map = {}, this.onchange = e || t, this.prefix = ""
  8238. }
  8239. return e.extend(n.prototype, {
  8240. add: function(e) {
  8241. return e && !this.contains(e) && (this.cls._map[e] = !0, this.cls.push(e), this._change()), this
  8242. },
  8243. remove: function(e) {
  8244. if (this.contains(e)) {
  8245. for (var t = 0; t < this.cls.length && this.cls[t] !== e; t++);
  8246. this.cls.splice(t, 1), delete this.cls._map[e], this._change()
  8247. }
  8248. return this
  8249. },
  8250. toggle: function(e, t) {
  8251. var n = this.contains(e);
  8252. return n !== t && (n ? this.remove(e) : this.add(e), this._change()), this
  8253. },
  8254. contains: function(e) {
  8255. return !!this.cls._map[e]
  8256. },
  8257. _change: function() {
  8258. delete this.clsValue, this.onchange.call(this)
  8259. }
  8260. }), n.prototype.toString = function() {
  8261. var e;
  8262. if (this.clsValue) return this.clsValue;
  8263. e = "";
  8264. for (var t = 0; t < this.cls.length; t++) t > 0 && (e += " "), e += this.prefix + this.cls[t];
  8265. return e
  8266. }, n
  8267. }), r(Ce, [u], function(e) {
  8268. var t = {},
  8269. n;
  8270. return {
  8271. add: function(r) {
  8272. var i = r.parent();
  8273. if (i) {
  8274. if (!i._layout || i._layout.isNative()) return;
  8275. t[i._id] || (t[i._id] = i), n || (n = !0, e.requestAnimationFrame(function() {
  8276. var e, r;
  8277. n = !1;
  8278. for (e in t) r = t[e], r.state.get("rendered") && r.reflow();
  8279. t = {}
  8280. }, document.body))
  8281. }
  8282. },
  8283. remove: function(e) {
  8284. t[e._id] && delete t[e._id]
  8285. }
  8286. }
  8287. }), r(xe, [ue, m, de, pe, ge, ve, g, ye, be, Ce], function(e, t, n, r, i, o, a, s, l, c) {
  8288. function u(e) {
  8289. return e._eventDispatcher || (e._eventDispatcher = new n({
  8290. scope: e,
  8291. toggleEvent: function(t, r) {
  8292. r && n.isNative(t) && (e._nativeEvents || (e._nativeEvents = {}), e._nativeEvents[t] = !0, e.state.get("rendered") && d(e))
  8293. }
  8294. })), e._eventDispatcher
  8295. }
  8296. function d(e) {
  8297. function t(t) {
  8298. var n = e.getParentCtrl(t.target);
  8299. n && n.fire(t.type, t)
  8300. }
  8301. function n() {
  8302. var e = c._lastHoverCtrl;
  8303. e && (e.fire("mouseleave", {
  8304. target: e.getEl()
  8305. }), e.parents().each(function(e) {
  8306. e.fire("mouseleave", {
  8307. target: e.getEl()
  8308. })
  8309. }), c._lastHoverCtrl = null)
  8310. }
  8311. function r(t) {
  8312. var n = e.getParentCtrl(t.target),
  8313. r = c._lastHoverCtrl,
  8314. i = 0,
  8315. o, a, s;
  8316. if (n !== r) {
  8317. if (c._lastHoverCtrl = n, a = n.parents().toArray().reverse(), a.push(n), r) {
  8318. for (s = r.parents().toArray().reverse(), s.push(r), i = 0; i < s.length && a[i] === s[i]; i++);
  8319. for (o = s.length - 1; o >= i; o--) r = s[o], r.fire("mouseleave", {
  8320. target: r.getEl()
  8321. })
  8322. }
  8323. for (o = i; o < a.length; o++) n = a[o], n.fire("mouseenter", {
  8324. target: n.getEl()
  8325. })
  8326. }
  8327. }
  8328. function i(t) {
  8329. t.preventDefault(), "mousewheel" == t.type ? (t.deltaY = -.025 * t.wheelDelta, t.wheelDeltaX && (t.deltaX = -.025 * t.wheelDeltaX)) : (t.deltaX = 0, t.deltaY = t.detail), t = e.fire("wheel", t)
  8330. }
  8331. var o, s, l, c, u, d;
  8332. if (u = e._nativeEvents) {
  8333. for (l = e.parents().toArray(), l.unshift(e), o = 0, s = l.length; !c && o < s; o++) c = l[o]._eventsRoot;
  8334. for (c || (c = l[l.length - 1] || e), e._eventsRoot = c, s = o, o = 0; o < s; o++) l[o]._eventsRoot = c;
  8335. var p = c._delegates;
  8336. p || (p = c._delegates = {});
  8337. for (d in u) {
  8338. if (!u) return !1;
  8339. "wheel" !== d || h ? ("mouseenter" === d || "mouseleave" === d ? c._hasMouseEnter || (a(c.getEl()).on("mouseleave", n).on("mouseover", r), c._hasMouseEnter = 1) : p[d] || (a(c.getEl()).on(d, t), p[d] = !0), u[d] = !1) : f ? a(e.getEl()).on("mousewheel", i) : a(e.getEl()).on("DOMMouseScroll", i)
  8340. }
  8341. }
  8342. }
  8343. var f = "onmousewheel" in document,
  8344. h = !1,
  8345. p = "mce-",
  8346. m, g = 0,
  8347. v = {
  8348. Statics: {
  8349. classPrefix: p
  8350. },
  8351. isRtl: function() {
  8352. return m.rtl
  8353. },
  8354. classPrefix: p,
  8355. init: function(e) {
  8356. function n(e) {
  8357. var t;
  8358. for (e = e.split(" "), t = 0; t < e.length; t++) i.classes.add(e[t])
  8359. }
  8360. var i = this,
  8361. o, c;
  8362. i.settings = e = t.extend({}, i.Defaults, e), i._id = e.id || "mceu_" + g++, i._aria = {
  8363. role: e.role
  8364. }, i._elmCache = {}, i.$ = a, i.state = new r({
  8365. visible: !0,
  8366. active: !1,
  8367. disabled: !1,
  8368. value: ""
  8369. }), i.data = new r(e.data), i.classes = new l(function() {
  8370. i.state.get("rendered") && (i.getEl().className = this.toString())
  8371. }), i.classes.prefix = i.classPrefix, o = e.classes, o && (i.Defaults && (c = i.Defaults.classes, c && o != c && n(c)), n(o)), t.each("title text name visible disabled active value".split(" "), function(t) {
  8372. t in e && i[t](e[t])
  8373. }), i.on("click", function() {
  8374. if (i.disabled()) return !1
  8375. }), i.settings = e, i.borderBox = s.parseBox(e.border), i.paddingBox = s.parseBox(e.padding), i.marginBox = s.parseBox(e.margin), e.hidden && i.hide()
  8376. },
  8377. Properties: "parent,name",
  8378. getContainerElm: function() {
  8379. return o.getContainer()
  8380. },
  8381. getParentCtrl: function(e) {
  8382. for (var t, n = this.getRoot().controlIdLookup; e && n && !(t = n[e.id]);) e = e.parentNode;
  8383. return t
  8384. },
  8385. initLayoutRect: function() {
  8386. var e = this,
  8387. t = e.settings,
  8388. n, r, i = e.getEl(),
  8389. a, l, c, u, d, f, h, p;
  8390. n = e.borderBox = e.borderBox || s.measureBox(i, "border"), e.paddingBox = e.paddingBox || s.measureBox(i, "padding"), e.marginBox = e.marginBox || s.measureBox(i, "margin"), p = o.getSize(i), f = t.minWidth, h = t.minHeight, c = f || p.width, u = h || p.height, a = t.width, l = t.height, d = t.autoResize, d = "undefined" != typeof d ? d : !a && !l, a = a || c, l = l || u;
  8391. var m = n.left + n.right,
  8392. g = n.top + n.bottom,
  8393. v = t.maxWidth || 65535,
  8394. y = t.maxHeight || 65535;
  8395. return e._layoutRect = r = {
  8396. x: t.x || 0,
  8397. y: t.y || 0,
  8398. w: a,
  8399. h: l,
  8400. deltaW: m,
  8401. deltaH: g,
  8402. contentW: a - m,
  8403. contentH: l - g,
  8404. innerW: a - m,
  8405. innerH: l - g,
  8406. startMinWidth: f || 0,
  8407. startMinHeight: h || 0,
  8408. minW: Math.min(c, v),
  8409. minH: Math.min(u, y),
  8410. maxW: v,
  8411. maxH: y,
  8412. autoResize: d,
  8413. scrollW: 0
  8414. }, e._lastLayoutRect = {}, r
  8415. },
  8416. layoutRect: function(e) {
  8417. var t = this,
  8418. n = t._layoutRect,
  8419. r, i, o, a, s, l;
  8420. return n || (n = t.initLayoutRect()), e ? (o = n.deltaW, a = n.deltaH, e.x !== s && (n.x = e.x), e.y !== s && (n.y = e.y), e.minW !== s && (n.minW = e.minW), e.minH !== s && (n.minH = e.minH), i = e.w, i !== s && (i = i < n.minW ? n.minW : i, i = i > n.maxW ? n.maxW : i, n.w = i, n.innerW = i - o), i = e.h, i !== s && (i = i < n.minH ? n.minH : i, i = i > n.maxH ? n.maxH : i, n.h = i, n.innerH = i - a), i = e.innerW, i !== s && (i = i < n.minW - o ? n.minW - o : i, i = i > n.maxW - o ? n.maxW - o : i, n.innerW = i, n.w = i + o), i = e.innerH, i !== s && (i = i < n.minH - a ? n.minH - a : i, i = i > n.maxH - a ? n.maxH - a : i, n.innerH = i, n.h = i + a), e.contentW !== s && (n.contentW = e.contentW), e.contentH !== s && (n.contentH = e.contentH), r = t._lastLayoutRect, r.x === n.x && r.y === n.y && r.w === n.w && r.h === n.h || (l = m.repaintControls, l && l.map && !l.map[t._id] && (l.push(t), l.map[t._id] = !0), r.x = n.x, r.y = n.y, r.w = n.w, r.h = n.h), t) : n
  8421. },
  8422. repaint: function() {
  8423. var e = this,
  8424. t, n, r, i, o, a, s, l, c, u;
  8425. c = document.createRange ? function(e) {
  8426. return e
  8427. } : Math.round, t = e.getEl().style, i = e._layoutRect, l = e._lastRepaintRect || {}, o = e.borderBox, a = o.left + o.right, s = o.top + o.bottom, i.x !== l.x && (t.left = c(i.x) + "px", l.x = i.x), i.y !== l.y && (t.top = c(i.y) + "px", l.y = i.y), i.w !== l.w && (u = c(i.w - a), t.width = (u >= 0 ? u : 0) + "px", l.w = i.w), i.h !== l.h && (u = c(i.h - s), t.height = (u >= 0 ? u : 0) + "px", l.h = i.h), e._hasBody && i.innerW !== l.innerW && (u = c(i.innerW), r = e.getEl("body"), r && (n = r.style, n.width = (u >= 0 ? u : 0) + "px"), l.innerW = i.innerW), e._hasBody && i.innerH !== l.innerH && (u = c(i.innerH), r = r || e.getEl("body"), r && (n = n || r.style, n.height = (u >= 0 ? u : 0) + "px"), l.innerH = i.innerH), e._lastRepaintRect = l, e.fire("repaint", {}, !1)
  8428. },
  8429. updateLayoutRect: function() {
  8430. var e = this;
  8431. e.parent()._lastRect = null, o.css(e.getEl(), {
  8432. width: "",
  8433. height: ""
  8434. }), e._layoutRect = e._lastRepaintRect = e._lastLayoutRect = null, e.initLayoutRect()
  8435. },
  8436. on: function(e, t) {
  8437. function n(e) {
  8438. var t, n;
  8439. return "string" != typeof e ? e : function(i) {
  8440. return t || r.parentsAndSelf().each(function(r) {
  8441. var i = r.settings.callbacks;
  8442. if (i && (t = i[e])) return n = r, !1
  8443. }), t ? t.call(n, i) : (i.action = e, void this.fire("execute", i))
  8444. }
  8445. }
  8446. var r = this;
  8447. return u(r).on(e, n(t)), r
  8448. },
  8449. off: function(e, t) {
  8450. return u(this).off(e, t), this
  8451. },
  8452. fire: function(e, t, n) {
  8453. var r = this;
  8454. if (t = t || {}, t.control || (t.control = r), t = u(r).fire(e, t), n !== !1 && r.parent)
  8455. for (var i = r.parent(); i && !t.isPropagationStopped();) i.fire(e, t, !1), i = i.parent();
  8456. return t
  8457. },
  8458. hasEventListeners: function(e) {
  8459. return u(this).has(e)
  8460. },
  8461. parents: function(e) {
  8462. var t = this,
  8463. n, r = new i;
  8464. for (n = t.parent(); n; n = n.parent()) r.add(n);
  8465. return e && (r = r.filter(e)), r
  8466. },
  8467. parentsAndSelf: function(e) {
  8468. return new i(this).add(this.parents(e))
  8469. },
  8470. next: function() {
  8471. var e = this.parent().items();
  8472. return e[e.indexOf(this) + 1]
  8473. },
  8474. prev: function() {
  8475. var e = this.parent().items();
  8476. return e[e.indexOf(this) - 1]
  8477. },
  8478. innerHtml: function(e) {
  8479. return this.$el.html(e), this
  8480. },
  8481. getEl: function(e) {
  8482. var t = e ? this._id + "-" + e : this._id;
  8483. return this._elmCache[t] || (this._elmCache[t] = a("#" + t)[0]), this._elmCache[t]
  8484. },
  8485. show: function() {
  8486. return this.visible(!0)
  8487. },
  8488. hide: function() {
  8489. return this.visible(!1)
  8490. },
  8491. focus: function() {
  8492. try {
  8493. this.getEl().focus()
  8494. } catch (e) {}
  8495. return this
  8496. },
  8497. blur: function() {
  8498. return this.getEl().blur(), this
  8499. },
  8500. aria: function(e, t) {
  8501. var n = this,
  8502. r = n.getEl(n.ariaTarget);
  8503. return "undefined" == typeof t ? n._aria[e] : (n._aria[e] = t, n.state.get("rendered") && r.setAttribute("role" == e ? e : "aria-" + e, t), n)
  8504. },
  8505. encode: function(e, t) {
  8506. return t !== !1 && (e = this.translate(e)), (e || "").replace(/[&<>"]/g, function(e) {
  8507. return "&#" + e.charCodeAt(0) + ";"
  8508. })
  8509. },
  8510. translate: function(e) {
  8511. return m.translate ? m.translate(e) : e
  8512. },
  8513. before: function(e) {
  8514. var t = this,
  8515. n = t.parent();
  8516. return n && n.insert(e, n.items().indexOf(t), !0), t
  8517. },
  8518. after: function(e) {
  8519. var t = this,
  8520. n = t.parent();
  8521. return n && n.insert(e, n.items().indexOf(t)), t
  8522. },
  8523. remove: function() {
  8524. var e = this,
  8525. t = e.getEl(),
  8526. n = e.parent(),
  8527. r, i;
  8528. if (e.items) {
  8529. var o = e.items().toArray();
  8530. for (i = o.length; i--;) o[i].remove()
  8531. }
  8532. n && n.items && (r = [], n.items().each(function(t) {
  8533. t !== e && r.push(t)
  8534. }), n.items().set(r), n._lastRect = null), e._eventsRoot && e._eventsRoot == e && a(t).off();
  8535. var s = e.getRoot().controlIdLookup;
  8536. return s && delete s[e._id], t && t.parentNode && t.parentNode.removeChild(t), e.state.set("rendered", !1), e.state.destroy(), e.fire("remove"), e
  8537. },
  8538. renderBefore: function(e) {
  8539. return a(e).before(this.renderHtml()), this.postRender(), this
  8540. },
  8541. renderTo: function(e) {
  8542. return a(e || this.getContainerElm()).append(this.renderHtml()), this.postRender(), this
  8543. },
  8544. preRender: function() {},
  8545. render: function() {},
  8546. renderHtml: function() {
  8547. return '<div id="' + this._id + '" class="' + this.classes + '"></div>'
  8548. },
  8549. postRender: function() {
  8550. var e = this,
  8551. t = e.settings,
  8552. n, r, i, o, s;
  8553. e.$el = a(e.getEl()), e.state.set("rendered", !0);
  8554. for (o in t) 0 === o.indexOf("on") && e.on(o.substr(2), t[o]);
  8555. if (e._eventsRoot) {
  8556. for (i = e.parent(); !s && i; i = i.parent()) s = i._eventsRoot;
  8557. if (s)
  8558. for (o in s._nativeEvents) e._nativeEvents[o] = !0
  8559. }
  8560. d(e), t.style && (n = e.getEl(), n && (n.setAttribute("style", t.style), n.style.cssText = t.style)), e.settings.border && (r = e.borderBox, e.$el.css({
  8561. "border-top-width": r.top,
  8562. "border-right-width": r.right,
  8563. "border-bottom-width": r.bottom,
  8564. "border-left-width": r.left
  8565. }));
  8566. var l = e.getRoot();
  8567. l.controlIdLookup || (l.controlIdLookup = {}), l.controlIdLookup[e._id] = e;
  8568. for (var u in e._aria) e.aria(u, e._aria[u]);
  8569. e.state.get("visible") === !1 && (e.getEl().style.display = "none"), e.bindStates(), e.state.on("change:visible", function(t) {
  8570. var n = t.value,
  8571. r;
  8572. e.state.get("rendered") && (e.getEl().style.display = n === !1 ? "none" : "", e.getEl().getBoundingClientRect()), r = e.parent(), r && (r._lastRect = null), e.fire(n ? "show" : "hide"), c.add(e)
  8573. }), e.fire("postrender", {}, !1)
  8574. },
  8575. bindStates: function() {},
  8576. scrollIntoView: function(e) {
  8577. function t(e, t) {
  8578. var n, r, i = e;
  8579. for (n = r = 0; i && i != t && i.nodeType;) n += i.offsetLeft || 0, r += i.offsetTop || 0, i = i.offsetParent;
  8580. return {
  8581. x: n,
  8582. y: r
  8583. }
  8584. }
  8585. var n = this.getEl(),
  8586. r = n.parentNode,
  8587. i, o, a, s, l, c, u = t(n, r);
  8588. return i = u.x, o = u.y, a = n.offsetWidth, s = n.offsetHeight, l = r.clientWidth, c = r.clientHeight, "end" == e ? (i -= l - a, o -= c - s) : "center" == e && (i -= l / 2 - a / 2, o -= c / 2 - s / 2), r.scrollLeft = i, r.scrollTop = o, this
  8589. },
  8590. getRoot: function() {
  8591. for (var e = this, t, n = []; e;) {
  8592. if (e.rootControl) {
  8593. t = e.rootControl;
  8594. break
  8595. }
  8596. n.push(e), t = e, e = e.parent()
  8597. }
  8598. t || (t = this);
  8599. for (var r = n.length; r--;) n[r].rootControl = t;
  8600. return t
  8601. },
  8602. reflow: function() {
  8603. c.remove(this);
  8604. var e = this.parent();
  8605. return e._layout && !e._layout.isNative() && e.reflow(), this
  8606. }
  8607. };
  8608. return t.each("text title visible disabled active value".split(" "), function(e) {
  8609. v[e] = function(t) {
  8610. return 0 === arguments.length ? this.state.get(e) : ("undefined" != typeof t && this.state.set(e, t), this)
  8611. }
  8612. }), m = e.extend(v)
  8613. }), r(we, [], function() {
  8614. var e = {},
  8615. t;
  8616. return {
  8617. add: function(t, n) {
  8618. e[t.toLowerCase()] = n
  8619. },
  8620. has: function(t) {
  8621. return !!e[t.toLowerCase()]
  8622. },
  8623. create: function(n, r) {
  8624. var i, o, a;
  8625. if (!t) {
  8626. a = tinymce.ui;
  8627. for (o in a) e[o.toLowerCase()] = a[o];
  8628. t = !0
  8629. }
  8630. if ("string" == typeof n ? (r = r || {}, r.type = n) : (r = n, n = r.type), n = n.toLowerCase(), i = e[n], !i) throw new Error("Could not find control by type: " + n);
  8631. return i = new i(r), i.type = n, i
  8632. }
  8633. }
  8634. }), r(Ee, [], function() {
  8635. return function(e) {
  8636. function t(e) {
  8637. return e && 1 === e.nodeType
  8638. }
  8639. function n(e) {
  8640. return e = e || C, t(e) ? e.getAttribute("role") : null
  8641. }
  8642. function r(e) {
  8643. for (var t, r = e || C; r = r.parentNode;)
  8644. if (t = n(r)) return t
  8645. }
  8646. function i(e) {
  8647. var n = C;
  8648. if (t(n)) return n.getAttribute("aria-" + e)
  8649. }
  8650. function o(e) {
  8651. var t = e.tagName.toUpperCase();
  8652. return "INPUT" == t || "TEXTAREA" == t || "SELECT" == t
  8653. }
  8654. function a(e) {
  8655. return !(!o(e) || e.hidden) || !!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))
  8656. }
  8657. function s(e) {
  8658. function t(e) {
  8659. if (1 == e.nodeType && "none" != e.style.display && !e.disabled) {
  8660. a(e) && n.push(e);
  8661. for (var r = 0; r < e.childNodes.length; r++) t(e.childNodes[r])
  8662. }
  8663. }
  8664. var n = [];
  8665. return t(e || b.getEl()), n
  8666. }
  8667. function l(e) {
  8668. var t, n;
  8669. e = e || x, n = e.parents().toArray(), n.unshift(e);
  8670. for (var r = 0; r < n.length && (t = n[r], !t.settings.ariaRoot); r++);
  8671. return t
  8672. }
  8673. function c(e) {
  8674. var t = l(e),
  8675. n = s(t.getEl());
  8676. t.settings.ariaRemember && "lastAriaIndex" in t ? u(t.lastAriaIndex, n) : u(0, n)
  8677. }
  8678. function u(e, t) {
  8679. return e < 0 ? e = t.length - 1 : e >= t.length && (e = 0), t[e] && t[e].focus(), e
  8680. }
  8681. function d(e, t) {
  8682. var n = -1,
  8683. r = l();
  8684. t = t || s(r.getEl());
  8685. for (var i = 0; i < t.length; i++) t[i] === C && (n = i);
  8686. n += e, r.lastAriaIndex = u(n, t)
  8687. }
  8688. function f() {
  8689. var e = r();
  8690. "tablist" == e ? d(-1, s(C.parentNode)) : x.parent().submenu ? v() : d(-1)
  8691. }
  8692. function h() {
  8693. var e = n(),
  8694. t = r();
  8695. "tablist" == t ? d(1, s(C.parentNode)) : "menuitem" == e && "menu" == t && i("haspopup") ? y() : d(1)
  8696. }
  8697. function p() {
  8698. d(-1)
  8699. }
  8700. function m() {
  8701. var e = n(),
  8702. t = r();
  8703. "menuitem" == e && "menubar" == t ? y() : "button" == e && i("haspopup") ? y({
  8704. key: "down"
  8705. }) : d(1)
  8706. }
  8707. function g(e) {
  8708. var t = r();
  8709. if ("tablist" == t) {
  8710. var n = s(x.getEl("body"))[0];
  8711. n && n.focus()
  8712. } else d(e.shiftKey ? -1 : 1)
  8713. }
  8714. function v() {
  8715. x.fire("cancel")
  8716. }
  8717. function y(e) {
  8718. e = e || {}, x.fire("click", {
  8719. target: C,
  8720. aria: e
  8721. })
  8722. }
  8723. var b = e.root,
  8724. C, x;
  8725. try {
  8726. C = document.activeElement
  8727. } catch (w) {
  8728. C = document.body
  8729. }
  8730. return x = b.getParentCtrl(C), b.on("keydown", function(e) {
  8731. function t(e, t) {
  8732. o(C) || "slider" !== n(C) && t(e) !== !1 && e.preventDefault()
  8733. }
  8734. if (!e.isDefaultPrevented()) switch (e.keyCode) {
  8735. case 37:
  8736. t(e, f);
  8737. break;
  8738. case 39:
  8739. t(e, h);
  8740. break;
  8741. case 38:
  8742. t(e, p);
  8743. break;
  8744. case 40:
  8745. t(e, m);
  8746. break;
  8747. case 27:
  8748. v();
  8749. break;
  8750. case 14:
  8751. case 13:
  8752. case 32:
  8753. t(e, y);
  8754. break;
  8755. case 9:
  8756. g(e) !== !1 && e.preventDefault()
  8757. }
  8758. }), b.on("focusin", function(e) {
  8759. C = e.target, x = e.control
  8760. }), {
  8761. focusFirst: c
  8762. }
  8763. }
  8764. }), r(Ne, [xe, ge, me, we, Ee, m, g, be, Ce], function(e, t, n, r, i, o, a, s, l) {
  8765. var c = {};
  8766. return e.extend({
  8767. init: function(e) {
  8768. var n = this;
  8769. n._super(e), e = n.settings, e.fixed && n.state.set("fixed", !0), n._items = new t, n.isRtl() && n.classes.add("rtl"), n.bodyClasses = new s(function() {
  8770. n.state.get("rendered") && (n.getEl("body").className = this.toString())
  8771. }), n.bodyClasses.prefix = n.classPrefix, n.classes.add("container"), n.bodyClasses.add("container-body"), e.containerCls && n.classes.add(e.containerCls), n._layout = r.create((e.layout || "") + "layout"), n.settings.items ? n.add(n.settings.items) : n.add(n.render()), n._hasBody = !0
  8772. },
  8773. items: function() {
  8774. return this._items
  8775. },
  8776. find: function(e) {
  8777. return e = c[e] = c[e] || new n(e), e.find(this)
  8778. },
  8779. add: function(e) {
  8780. var t = this;
  8781. return t.items().add(t.create(e)).parent(t), t
  8782. },
  8783. focus: function(e) {
  8784. var t = this,
  8785. n, r, i;
  8786. return e && (r = t.keyboardNav || t.parents().eq(-1)[0].keyboardNav) ? void r.focusFirst(t) : (i = t.find("*"), t.statusbar && i.add(t.statusbar.items()), i.each(function(e) {
  8787. return e.settings.autofocus ? (n = null, !1) : void(e.canFocus && (n = n || e))
  8788. }), n && n.focus(), t)
  8789. },
  8790. replace: function(e, t) {
  8791. for (var n, r = this.items(), i = r.length; i--;)
  8792. if (r[i] === e) {
  8793. r[i] = t;
  8794. break
  8795. }
  8796. i >= 0 && (n = t.getEl(), n && n.parentNode.removeChild(n), n = e.getEl(), n && n.parentNode.removeChild(n)), t.parent(this)
  8797. },
  8798. create: function(t) {
  8799. var n = this,
  8800. i, a = [];
  8801. return o.isArray(t) || (t = [t]), o.each(t, function(t) {
  8802. t && (t instanceof e || ("string" == typeof t && (t = {
  8803. type: t
  8804. }), i = o.extend({}, n.settings.defaults, t), t.type = i.type = i.type || t.type || n.settings.defaultType || (i.defaults ? i.defaults.type : null), t = r.create(i)), a.push(t))
  8805. }), a
  8806. },
  8807. renderNew: function() {
  8808. var e = this;
  8809. return e.items().each(function(t, n) {
  8810. var r;
  8811. t.parent(e), t.state.get("rendered") || (r = e.getEl("body"), r.hasChildNodes() && n <= r.childNodes.length - 1 ? a(r.childNodes[n]).before(t.renderHtml()) : a(r).append(t.renderHtml()), t.postRender(), l.add(t))
  8812. }), e._layout.applyClasses(e.items().filter(":visible")), e._lastRect = null, e
  8813. },
  8814. append: function(e) {
  8815. return this.add(e).renderNew()
  8816. },
  8817. prepend: function(e) {
  8818. var t = this;
  8819. return t.items().set(t.create(e).concat(t.items().toArray())), t.renderNew()
  8820. },
  8821. insert: function(e, t, n) {
  8822. var r = this,
  8823. i, o, a;
  8824. return e = r.create(e), i = r.items(), !n && t < i.length - 1 && (t += 1), t >= 0 && t < i.length && (o = i.slice(0, t).toArray(), a = i.slice(t).toArray(), i.set(o.concat(e, a))), r.renderNew()
  8825. },
  8826. fromJSON: function(e) {
  8827. var t = this;
  8828. for (var n in e) t.find("#" + n).value(e[n]);
  8829. return t
  8830. },
  8831. toJSON: function() {
  8832. var e = this,
  8833. t = {};
  8834. return e.find("*").each(function(e) {
  8835. var n = e.name(),
  8836. r = e.value();
  8837. n && "undefined" != typeof r && (t[n] = r)
  8838. }), t
  8839. },
  8840. renderHtml: function() {
  8841. var e = this,
  8842. t = e._layout,
  8843. n = this.settings.role;
  8844. return e.preRender(), t.preRender(e), '<div id="' + e._id + '" class="' + e.classes + '"' + (n ? ' role="' + this.settings.role + '"' : "") + '><div id="' + e._id + '-body" class="' + e.bodyClasses + '">' + (e.settings.html || "") + t.renderHtml(e) + "</div></div>"
  8845. },
  8846. postRender: function() {
  8847. var e = this,
  8848. t;
  8849. return e.items().exec("postRender"), e._super(), e._layout.postRender(e), e.state.set("rendered", !0), e.settings.style && e.$el.css(e.settings.style), e.settings.border && (t = e.borderBox, e.$el.css({
  8850. "border-top-width": t.top,
  8851. "border-right-width": t.right,
  8852. "border-bottom-width": t.bottom,
  8853. "border-left-width": t.left
  8854. })), e.parent() || (e.keyboardNav = new i({
  8855. root: e
  8856. })), e
  8857. },
  8858. initLayoutRect: function() {
  8859. var e = this,
  8860. t = e._super();
  8861. return e._layout.recalc(e), t
  8862. },
  8863. recalc: function() {
  8864. var e = this,
  8865. t = e._layoutRect,
  8866. n = e._lastRect;
  8867. if (!n || n.w != t.w || n.h != t.h) return e._layout.recalc(e), t = e.layoutRect(), e._lastRect = {
  8868. x: t.x,
  8869. y: t.y,
  8870. w: t.w,
  8871. h: t.h
  8872. }, !0
  8873. },
  8874. reflow: function() {
  8875. var t;
  8876. if (l.remove(this), this.visible()) {
  8877. for (e.repaintControls = [], e.repaintControls.map = {}, this.recalc(), t = e.repaintControls.length; t--;) e.repaintControls[t].repaint();
  8878. "flow" !== this.settings.layout && "stack" !== this.settings.layout && this.repaint(), e.repaintControls = []
  8879. }
  8880. return this
  8881. }
  8882. })
  8883. }), r(_e, [g], function(e) {
  8884. function t(e) {
  8885. var t, n, r, i, o, a, s, l, c = Math.max;
  8886. return t = e.documentElement, n = e.body, r = c(t.scrollWidth, n.scrollWidth), i = c(t.clientWidth, n.clientWidth), o = c(t.offsetWidth, n.offsetWidth), a = c(t.scrollHeight, n.scrollHeight), s = c(t.clientHeight, n.clientHeight), l = c(t.offsetHeight, n.offsetHeight), {
  8887. width: r < o ? i : r,
  8888. height: a < l ? s : a
  8889. }
  8890. }
  8891. function n(e) {
  8892. var t, n;
  8893. if (e.changedTouches)
  8894. for (t = "screenX screenY pageX pageY clientX clientY".split(" "), n = 0; n < t.length; n++) e[t[n]] = e.changedTouches[0][t[n]]
  8895. }
  8896. return function(r, i) {
  8897. function o() {
  8898. return s.getElementById(i.handle || r)
  8899. }
  8900. var a, s = i.document || document,
  8901. l, c, u, d, f, h;
  8902. i = i || {}, c = function(r) {
  8903. var c = t(s),
  8904. p, m;
  8905. n(r), r.preventDefault(), l = r.button, p = o(), f = r.screenX, h = r.screenY, m = window.getComputedStyle ? window.getComputedStyle(p, null).getPropertyValue("cursor") : p.runtimeStyle.cursor, a = e("<div></div>").css({
  8906. position: "absolute",
  8907. top: 0,
  8908. left: 0,
  8909. width: c.width,
  8910. height: c.height,
  8911. zIndex: 2147483647,
  8912. opacity: 1e-4,
  8913. cursor: m
  8914. }).appendTo(s.body), e(s).on("mousemove touchmove", d).on("mouseup touchend", u), i.start(r)
  8915. }, d = function(e) {
  8916. return n(e), e.button !== l ? u(e) : (e.deltaX = e.screenX - f, e.deltaY = e.screenY - h, e.preventDefault(), void i.drag(e))
  8917. }, u = function(t) {
  8918. n(t), e(s).off("mousemove touchmove", d).off("mouseup touchend", u), a.remove(), i.stop && i.stop(t)
  8919. }, this.destroy = function() {
  8920. e(o()).off()
  8921. }, e(o()).on("mousedown touchstart", c)
  8922. }
  8923. }), r(Se, [g, _e], function(e, t) {
  8924. return {
  8925. init: function() {
  8926. var e = this;
  8927. e.on("repaint", e.renderScroll)
  8928. },
  8929. renderScroll: function() {
  8930. function n() {
  8931. function t(t, a, s, l, c, u) {
  8932. var d, f, h, p, m, g, v, y, b;
  8933. if (f = i.getEl("scroll" + t)) {
  8934. if (y = a.toLowerCase(), b = s.toLowerCase(), e(i.getEl("absend")).css(y, i.layoutRect()[l] - 1), !c) return void e(f).css("display", "none");
  8935. e(f).css("display", "block"), d = i.getEl("body"), h = i.getEl("scroll" + t + "t"), p = d["client" + s] - 2 * o, p -= n && r ? f["client" + u] : 0, m = d["scroll" + s], g = p / m, v = {}, v[y] = d["offset" + a] + o, v[b] = p, e(f).css(v), v = {}, v[y] = d["scroll" + a] * g, v[b] = p * g, e(h).css(v)
  8936. }
  8937. }
  8938. var n, r, a;
  8939. a = i.getEl("body"), n = a.scrollWidth > a.clientWidth, r = a.scrollHeight > a.clientHeight, t("h", "Left", "Width", "contentW", n, "Height"), t("v", "Top", "Height", "contentH", r, "Width")
  8940. }
  8941. function r() {
  8942. function n(n, r, a, s, l) {
  8943. var c, u = i._id + "-scroll" + n,
  8944. d = i.classPrefix;
  8945. e(i.getEl()).append('<div id="' + u + '" class="' + d + "scrollbar " + d + "scrollbar-" + n + '"><div id="' + u + 't" class="' + d + 'scrollbar-thumb"></div></div>'), i.draghelper = new t(u + "t", {
  8946. start: function() {
  8947. c = i.getEl("body")["scroll" + r], e("#" + u).addClass(d + "active")
  8948. },
  8949. drag: function(e) {
  8950. var t, u, d, f, h = i.layoutRect();
  8951. u = h.contentW > h.innerW, d = h.contentH > h.innerH, f = i.getEl("body")["client" + a] - 2 * o, f -= u && d ? i.getEl("scroll" + n)["client" + l] : 0, t = f / i.getEl("body")["scroll" + a], i.getEl("body")["scroll" + r] = c + e["delta" + s] / t
  8952. },
  8953. stop: function() {
  8954. e("#" + u).removeClass(d + "active")
  8955. }
  8956. })
  8957. }
  8958. i.classes.add("scroll"), n("v", "Top", "Height", "Y", "Width"), n("h", "Left", "Width", "X", "Height")
  8959. }
  8960. var i = this,
  8961. o = 2;
  8962. i.settings.autoScroll && (i._hasScroll || (i._hasScroll = !0, r(), i.on("wheel", function(e) {
  8963. var t = i.getEl("body");
  8964. t.scrollLeft += 10 * (e.deltaX || 0), t.scrollTop += 10 * e.deltaY, n()
  8965. }), e(i.getEl("body")).on("scroll", n)), n())
  8966. }
  8967. }
  8968. }), r(ke, [Ne, Se], function(e, t) {
  8969. return e.extend({
  8970. Defaults: {
  8971. layout: "fit",
  8972. containerCls: "panel"
  8973. },
  8974. Mixins: [t],
  8975. renderHtml: function() {
  8976. var e = this,
  8977. t = e._layout,
  8978. n = e.settings.html;
  8979. return e.preRender(), t.preRender(e), "undefined" == typeof n ? n = '<div id="' + e._id + '-body" class="' + e.bodyClasses + '">' + t.renderHtml(e) + "</div>" : ("function" == typeof n && (n = n.call(e)), e._hasBody = !1), '<div id="' + e._id + '" class="' + e.classes + '" hidefocus="1" tabindex="-1" role="group">' + (e._preBodyHtml || "") + n + "</div>"
  8980. }
  8981. })
  8982. }), r(Te, [ve], function(e) {
  8983. function t(t, n, r) {
  8984. var i, o, a, s, l, c, u, d, f, h;
  8985. return f = e.getViewPort(), o = e.getPos(n), a = o.x, s = o.y, t.state.get("fixed") && "static" == e.getRuntimeStyle(document.body, "position") && (a -= f.x, s -= f.y), i = t.getEl(), h = e.getSize(i), l = h.width, c = h.height, h = e.getSize(n), u = h.width, d = h.height, r = (r || "").split(""), "b" === r[0] && (s += d), "r" === r[1] && (a += u), "c" === r[0] && (s += Math.round(d / 2)), "c" === r[1] && (a += Math.round(u / 2)), "b" === r[3] && (s -= c), "r" === r[4] && (a -= l), "c" === r[3] && (s -= Math.round(c / 2)), "c" === r[4] && (a -= Math.round(l / 2)), {
  8986. x: a,
  8987. y: s,
  8988. w: l,
  8989. h: c
  8990. }
  8991. }
  8992. return {
  8993. testMoveRel: function(n, r) {
  8994. for (var i = e.getViewPort(), o = 0; o < r.length; o++) {
  8995. var a = t(this, n, r[o]);
  8996. if (this.state.get("fixed")) {
  8997. if (a.x > 0 && a.x + a.w < i.w && a.y > 0 && a.y + a.h < i.h) return r[o]
  8998. } else if (a.x > i.x && a.x + a.w < i.w + i.x && a.y > i.y && a.y + a.h < i.h + i.y) return r[o]
  8999. }
  9000. return r[0]
  9001. },
  9002. moveRel: function(e, n) {
  9003. "string" != typeof n && (n = this.testMoveRel(e, n));
  9004. var r = t(this, e, n);
  9005. return this.moveTo(r.x, r.y)
  9006. },
  9007. moveBy: function(e, t) {
  9008. var n = this,
  9009. r = n.layoutRect();
  9010. return n.moveTo(r.x + e, r.y + t), n
  9011. },
  9012. moveTo: function(t, n) {
  9013. function r(e, t, n) {
  9014. return e < 0 ? 0 : e + n > t ? (e = t - n, e < 0 ? 0 : e) : e
  9015. }
  9016. var i = this;
  9017. if (i.settings.constrainToViewport) {
  9018. var o = e.getViewPort(window),
  9019. a = i.layoutRect();
  9020. t = r(t, o.w + o.x, a.w), n = r(n, o.h + o.y, a.h)
  9021. }
  9022. return i.state.get("rendered") ? i.layoutRect({
  9023. x: t,
  9024. y: n
  9025. }).repaint() : (i.settings.x = t, i.settings.y = n), i.fire("move", {
  9026. x: t,
  9027. y: n
  9028. }), i
  9029. }
  9030. }
  9031. }), r(Re, [ve], function(e) {
  9032. return {
  9033. resizeToContent: function() {
  9034. this._layoutRect.autoResize = !0, this._lastRect = null, this.reflow()
  9035. },
  9036. resizeTo: function(t, n) {
  9037. if (t <= 1 || n <= 1) {
  9038. var r = e.getWindowSize();
  9039. t = t <= 1 ? t * r.w : t, n = n <= 1 ? n * r.h : n
  9040. }
  9041. return this._layoutRect.autoResize = !1, this.layoutRect({
  9042. minW: t,
  9043. minH: n,
  9044. w: t,
  9045. h: n
  9046. }).reflow()
  9047. },
  9048. resizeBy: function(e, t) {
  9049. var n = this,
  9050. r = n.layoutRect();
  9051. return n.resizeTo(r.w + e, r.h + t)
  9052. }
  9053. }
  9054. }), r(Ae, [ke, Te, Re, ve, g, u], function(e, t, n, r, i, o) {
  9055. function a(e, t) {
  9056. for (; e;) {
  9057. if (e == t) return !0;
  9058. e = e.parent()
  9059. }
  9060. }
  9061. function s(e) {
  9062. for (var t = v.length; t--;) {
  9063. var n = v[t],
  9064. r = n.getParentCtrl(e.target);
  9065. if (n.settings.autohide) {
  9066. if (r && (a(r, n) || n.parent() === r)) continue;
  9067. e = n.fire("autohide", {
  9068. target: e.target
  9069. }), e.isDefaultPrevented() || n.hide()
  9070. }
  9071. }
  9072. }
  9073. function l() {
  9074. p || (p = function(e) {
  9075. 2 != e.button && s(e)
  9076. }, i(document).on("click touchstart", p))
  9077. }
  9078. function c() {
  9079. m || (m = function() {
  9080. var e;
  9081. for (e = v.length; e--;) d(v[e])
  9082. }, i(window).on("scroll", m))
  9083. }
  9084. function u() {
  9085. if (!g) {
  9086. var e = document.documentElement,
  9087. t = e.clientWidth,
  9088. n = e.clientHeight;
  9089. g = function() {
  9090. document.all && t == e.clientWidth && n == e.clientHeight || (t = e.clientWidth, n = e.clientHeight, C.hideAll())
  9091. }, i(window).on("resize", g)
  9092. }
  9093. }
  9094. function d(e) {
  9095. function t(t, n) {
  9096. for (var r, i = 0; i < v.length; i++)
  9097. if (v[i] != e)
  9098. for (r = v[i].parent(); r && (r = r.parent());) r == e && v[i].fixed(t).moveBy(0, n).repaint()
  9099. }
  9100. var n = r.getViewPort().y;
  9101. e.settings.autofix && (e.state.get("fixed") ? e._autoFixY > n && (e.fixed(!1).layoutRect({
  9102. y: e._autoFixY
  9103. }).repaint(), t(!1, e._autoFixY - n)) : (e._autoFixY = e.layoutRect().y, e._autoFixY < n && (e.fixed(!0).layoutRect({
  9104. y: 0
  9105. }).repaint(), t(!0, n - e._autoFixY))))
  9106. }
  9107. function f(e, t) {
  9108. var n, r = C.zIndex || 65535,
  9109. o;
  9110. if (e) y.push(t);
  9111. else
  9112. for (n = y.length; n--;) y[n] === t && y.splice(n, 1);
  9113. if (y.length)
  9114. for (n = 0; n < y.length; n++) y[n].modal && (r++, o = y[n]), y[n].getEl().style.zIndex = r, y[n].zIndex = r, r++;
  9115. var a = i("#" + t.classPrefix + "modal-block", t.getContainerElm())[0];
  9116. o ? i(a).css("z-index", o.zIndex - 1) : a && (a.parentNode.removeChild(a), b = !1), C.currentZIndex = r
  9117. }
  9118. function h(e) {
  9119. var t;
  9120. for (t = v.length; t--;) v[t] === e && v.splice(t, 1);
  9121. for (t = y.length; t--;) y[t] === e && y.splice(t, 1)
  9122. }
  9123. var p, m, g, v = [],
  9124. y = [],
  9125. b, C = e.extend({
  9126. Mixins: [t, n],
  9127. init: function(e) {
  9128. var t = this;
  9129. t._super(e), t._eventsRoot = t, t.classes.add("floatpanel"), e.autohide && (l(), u(), v.push(t)), e.autofix && (c(), t.on("move", function() {
  9130. d(this)
  9131. })), t.on("postrender show", function(e) {
  9132. if (e.control == t) {
  9133. var n, r = t.classPrefix;
  9134. t.modal && !b && (n = i("#" + r + "modal-block", t.getContainerElm()), n[0] || (n = i('<div id="' + r + 'modal-block" class="' + r + "reset " + r + 'fade"></div>').appendTo(t.getContainerElm())), o.setTimeout(function() {
  9135. n.addClass(r + "in"), i(t.getEl()).addClass(r + "in")
  9136. }), b = !0), f(!0, t)
  9137. }
  9138. }), t.on("show", function() {
  9139. t.parents().each(function(e) {
  9140. if (e.state.get("fixed")) return t.fixed(!0), !1
  9141. })
  9142. }), e.popover && (t._preBodyHtml = '<div class="' + t.classPrefix + 'arrow"></div>', t.classes.add("popover").add("bottom").add(t.isRtl() ? "end" : "start")), t.aria("label", e.ariaLabel), t.aria("labelledby", t._id), t.aria("describedby", t.describedBy || t._id + "-none")
  9143. },
  9144. fixed: function(e) {
  9145. var t = this;
  9146. if (t.state.get("fixed") != e) {
  9147. if (t.state.get("rendered")) {
  9148. var n = r.getViewPort();
  9149. e ? t.layoutRect().y -= n.y : t.layoutRect().y += n.y
  9150. }
  9151. t.classes.toggle("fixed", e), t.state.set("fixed", e)
  9152. }
  9153. return t
  9154. },
  9155. show: function() {
  9156. var e = this,
  9157. t, n = e._super();
  9158. for (t = v.length; t-- && v[t] !== e;);
  9159. return t === -1 && v.push(e), n
  9160. },
  9161. hide: function() {
  9162. return h(this), f(!1, this), this._super()
  9163. },
  9164. hideAll: function() {
  9165. C.hideAll()
  9166. },
  9167. close: function() {
  9168. var e = this;
  9169. return e.fire("close").isDefaultPrevented() || (e.remove(), f(!1, e)), e
  9170. },
  9171. remove: function() {
  9172. h(this), this._super()
  9173. },
  9174. postRender: function() {
  9175. var e = this;
  9176. return e.settings.bodyRole && this.getEl("body").setAttribute("role", e.settings.bodyRole), e._super()
  9177. }
  9178. });
  9179. return C.hideAll = function() {
  9180. for (var e = v.length; e--;) {
  9181. var t = v[e];
  9182. t && t.settings.autohide && (t.hide(), v.splice(e, 1))
  9183. }
  9184. }, C
  9185. }), r(Be, [Ae, ke, ve, g, _e, ye, d, u], function(e, t, n, r, i, o, a, s) {
  9186. function l(e) {
  9187. var t = "width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",
  9188. n = r("meta[name=viewport]")[0],
  9189. i;
  9190. a.overrideViewPort !== !1 && (n || (n = document.createElement("meta"), n.setAttribute("name", "viewport"), document.getElementsByTagName("head")[0].appendChild(n)), i = n.getAttribute("content"), i && "undefined" != typeof h && (h = i), n.setAttribute("content", e ? t : h))
  9191. }
  9192. function c(e, t) {
  9193. u() && t === !1 && r([document.documentElement, document.body]).removeClass(e + "fullscreen")
  9194. }
  9195. function u() {
  9196. for (var e = 0; e < f.length; e++)
  9197. if (f[e]._fullscreen) return !0;
  9198. return !1
  9199. }
  9200. function d() {
  9201. function e() {
  9202. var e, t = n.getWindowSize(),
  9203. r;
  9204. for (e = 0; e < f.length; e++) r = f[e].layoutRect(), f[e].moveTo(f[e].settings.x || Math.max(0, t.w / 2 - r.w / 2), f[e].settings.y || Math.max(0, t.h / 2 - r.h / 2))
  9205. }
  9206. if (!a.desktop) {
  9207. var t = {
  9208. w: window.innerWidth,
  9209. h: window.innerHeight
  9210. };
  9211. s.setInterval(function() {
  9212. var e = window.innerWidth,
  9213. n = window.innerHeight;
  9214. t.w == e && t.h == n || (t = {
  9215. w: e,
  9216. h: n
  9217. }, r(window).trigger("resize"))
  9218. }, 100)
  9219. }
  9220. r(window).on("resize", e)
  9221. }
  9222. var f = [],
  9223. h = "",
  9224. p = e.extend({
  9225. modal: !0,
  9226. Defaults: {
  9227. border: 1,
  9228. layout: "flex",
  9229. containerCls: "panel",
  9230. role: "dialog",
  9231. callbacks: {
  9232. submit: function() {
  9233. this.fire("submit", {
  9234. data: this.toJSON()
  9235. })
  9236. },
  9237. close: function() {
  9238. this.close()
  9239. }
  9240. }
  9241. },
  9242. init: function(e) {
  9243. var r = this;
  9244. r._super(e), r.isRtl() && r.classes.add("rtl"), r.classes.add("window"), r.bodyClasses.add("window-body"), r.state.set("fixed", !0), e.buttons && (r.statusbar = new t({
  9245. layout: "flex",
  9246. border: "1 0 0 0",
  9247. spacing: 3,
  9248. padding: 10,
  9249. align: "center",
  9250. pack: r.isRtl() ? "start" : "end",
  9251. defaults: {
  9252. type: "button"
  9253. },
  9254. items: e.buttons
  9255. }), r.statusbar.classes.add("foot"), r.statusbar.parent(r)), r.on("click", function(e) {
  9256. var t = r.classPrefix + "close";
  9257. (n.hasClass(e.target, t) || n.hasClass(e.target.parentNode, t)) && r.close()
  9258. }), r.on("cancel", function() {
  9259. r.close()
  9260. }), r.aria("describedby", r.describedBy || r._id + "-none"), r.aria("label", e.title), r._fullscreen = !1
  9261. },
  9262. recalc: function() {
  9263. var e = this,
  9264. t = e.statusbar,
  9265. r, i, o, a;
  9266. e._fullscreen && (e.layoutRect(n.getWindowSize()), e.layoutRect().contentH = e.layoutRect().innerH), e._super(), r = e.layoutRect(), e.settings.title && !e._fullscreen && (i = r.headerW, i > r.w && (o = r.x - Math.max(0, i / 2), e.layoutRect({
  9267. w: i,
  9268. x: o
  9269. }), a = !0)), t && (t.layoutRect({
  9270. w: e.layoutRect().innerW
  9271. }).recalc(), i = t.layoutRect().minW + r.deltaW, i > r.w && (o = r.x - Math.max(0, i - r.w), e.layoutRect({
  9272. w: i,
  9273. x: o
  9274. }), a = !0)), a && e.recalc()
  9275. },
  9276. initLayoutRect: function() {
  9277. var e = this,
  9278. t = e._super(),
  9279. r = 0,
  9280. i;
  9281. if (e.settings.title && !e._fullscreen) {
  9282. i = e.getEl("head");
  9283. var o = n.getSize(i);
  9284. t.headerW = o.width, t.headerH = o.height, r += t.headerH
  9285. }
  9286. e.statusbar && (r += e.statusbar.layoutRect().h), t.deltaH += r, t.minH += r, t.h += r;
  9287. var a = n.getWindowSize();
  9288. return t.x = e.settings.x || Math.max(0, a.w / 2 - t.w / 2), t.y = e.settings.y || Math.max(0, a.h / 2 - t.h / 2), t
  9289. },
  9290. renderHtml: function() {
  9291. var e = this,
  9292. t = e._layout,
  9293. n = e._id,
  9294. r = e.classPrefix,
  9295. i = e.settings,
  9296. o = "",
  9297. a = "",
  9298. s = i.html;
  9299. return e.preRender(), t.preRender(e), i.title && (o = '<div id="' + n + '-head" class="' + r + 'window-head"><div id="' + n + '-title" class="' + r + 'title">' + e.encode(i.title) + '</div><div id="' + n + '-dragh" class="' + r + 'dragh"></div><button type="button" class="' + r + 'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'), i.url && (s = '<iframe src="' + i.url + '" tabindex="-1"></iframe>'), "undefined" == typeof s && (s = t.renderHtml(e)), e.statusbar && (a = e.statusbar.renderHtml()), '<div id="' + n + '" class="' + e.classes + '" hidefocus="1"><div class="' + e.classPrefix + 'reset" role="application">' + o + '<div id="' + n + '-body" class="' + e.bodyClasses + '">' + s + "</div>" + a + "</div></div>"
  9300. },
  9301. fullscreen: function(e) {
  9302. var t = this,
  9303. i = document.documentElement,
  9304. a, l = t.classPrefix,
  9305. c;
  9306. if (e != t._fullscreen)
  9307. if (r(window).on("resize", function() {
  9308. var e;
  9309. if (t._fullscreen)
  9310. if (a) t._timer || (t._timer = s.setTimeout(function() {
  9311. var e = n.getWindowSize();
  9312. t.moveTo(0, 0).resizeTo(e.w, e.h), t._timer = 0
  9313. }, 50));
  9314. else {
  9315. e = (new Date).getTime();
  9316. var r = n.getWindowSize();
  9317. t.moveTo(0, 0).resizeTo(r.w, r.h), (new Date).getTime() - e > 50 && (a = !0)
  9318. }
  9319. }), c = t.layoutRect(), t._fullscreen = e, e) {
  9320. t._initial = {
  9321. x: c.x,
  9322. y: c.y,
  9323. w: c.w,
  9324. h: c.h
  9325. }, t.borderBox = o.parseBox("0"), t.getEl("head").style.display = "none", c.deltaH -= c.headerH + 2, r([i, document.body]).addClass(l + "fullscreen"), t.classes.add("fullscreen");
  9326. var u = n.getWindowSize();
  9327. t.moveTo(0, 0).resizeTo(u.w, u.h)
  9328. } else t.borderBox = o.parseBox(t.settings.border), t.getEl("head").style.display = "", c.deltaH += c.headerH, r([i, document.body]).removeClass(l + "fullscreen"), t.classes.remove("fullscreen"), t.moveTo(t._initial.x, t._initial.y).resizeTo(t._initial.w, t._initial.h);
  9329. return t.reflow()
  9330. },
  9331. postRender: function() {
  9332. var e = this,
  9333. t;
  9334. setTimeout(function() {
  9335. e.classes.add("in"), e.fire("open")
  9336. }, 0), e._super(), e.statusbar && e.statusbar.postRender(), e.focus(), this.dragHelper = new i(e._id + "-dragh", {
  9337. start: function() {
  9338. t = {
  9339. x: e.layoutRect().x,
  9340. y: e.layoutRect().y
  9341. }
  9342. },
  9343. drag: function(n) {
  9344. e.moveTo(t.x + n.deltaX, t.y + n.deltaY)
  9345. }
  9346. }), e.on("submit", function(t) {
  9347. t.isDefaultPrevented() || e.close()
  9348. }), f.push(e), l(!0)
  9349. },
  9350. submit: function() {
  9351. return this.fire("submit", {
  9352. data: this.toJSON()
  9353. })
  9354. },
  9355. remove: function() {
  9356. var e = this,
  9357. t;
  9358. for (e.dragHelper.destroy(), e._super(), e.statusbar && this.statusbar.remove(), c(e.classPrefix, !1), t = f.length; t--;) f[t] === e && f.splice(t, 1);
  9359. l(f.length > 0)
  9360. },
  9361. getContentWindow: function() {
  9362. var e = this.getEl().getElementsByTagName("iframe")[0];
  9363. return e ? e.contentWindow : null
  9364. }
  9365. });
  9366. return d(), p
  9367. }), r(De, [Be], function(e) {
  9368. var t = e.extend({
  9369. init: function(e) {
  9370. e = {
  9371. border: 1,
  9372. padding: 20,
  9373. layout: "flex",
  9374. pack: "center",
  9375. align: "center",
  9376. containerCls: "panel",
  9377. autoScroll: !0,
  9378. buttons: {
  9379. type: "button",
  9380. text: "Ok",
  9381. action: "ok"
  9382. },
  9383. items: {
  9384. type: "label",
  9385. multiline: !0,
  9386. maxWidth: 500,
  9387. maxHeight: 200
  9388. }
  9389. }, this._super(e)
  9390. },
  9391. Statics: {
  9392. OK: 1,
  9393. OK_CANCEL: 2,
  9394. YES_NO: 3,
  9395. YES_NO_CANCEL: 4,
  9396. msgBox: function(n) {
  9397. function r(e, t, n) {
  9398. return {
  9399. type: "button",
  9400. text: e,
  9401. subtype: n ? "primary" : "",
  9402. onClick: function(e) {
  9403. e.control.parents()[1].close(), o(t)
  9404. }
  9405. }
  9406. }
  9407. var i, o = n.callback || function() {};
  9408. switch (n.buttons) {
  9409. case t.OK_CANCEL:
  9410. i = [r("Ok", !0, !0), r("Cancel", !1)];
  9411. break;
  9412. case t.YES_NO:
  9413. case t.YES_NO_CANCEL:
  9414. i = [r("Yes", 1, !0), r("No", 0)], n.buttons == t.YES_NO_CANCEL && i.push(r("Cancel", -1));
  9415. break;
  9416. default:
  9417. i = [r("Ok", !0, !0)]
  9418. }
  9419. return new e({
  9420. padding: 20,
  9421. x: n.x,
  9422. y: n.y,
  9423. minWidth: 300,
  9424. minHeight: 100,
  9425. layout: "flex",
  9426. pack: "center",
  9427. align: "center",
  9428. buttons: i,
  9429. title: n.title,
  9430. role: "alertdialog",
  9431. items: {
  9432. type: "label",
  9433. multiline: !0,
  9434. maxWidth: 500,
  9435. maxHeight: 200,
  9436. text: n.text
  9437. },
  9438. onPostRender: function() {
  9439. this.aria("describedby", this.items()[0]._id)
  9440. },
  9441. onClose: n.onClose,
  9442. onCancel: function() {
  9443. o(!1)
  9444. }
  9445. }).renderTo(document.body).reflow()
  9446. },
  9447. alert: function(e, n) {
  9448. return "string" == typeof e && (e = {
  9449. text: e
  9450. }), e.callback = n, t.msgBox(e)
  9451. },
  9452. confirm: function(e, n) {
  9453. return "string" == typeof e && (e = {
  9454. text: e
  9455. }), e.callback = n, e.buttons = t.OK_CANCEL, t.msgBox(e)
  9456. }
  9457. }
  9458. });
  9459. return t
  9460. }), r(Le, [Be, De], function(e, t) {
  9461. return function(n) {
  9462. function r() {
  9463. if (s.length) return s[s.length - 1]
  9464. }
  9465. function i(e) {
  9466. n.fire("OpenWindow", {
  9467. win: e
  9468. })
  9469. }
  9470. function o(e) {
  9471. n.fire("CloseWindow", {
  9472. win: e
  9473. })
  9474. }
  9475. var a = this,
  9476. s = [];
  9477. a.windows = s, n.on("remove", function() {
  9478. for (var e = s.length; e--;) s[e].close()
  9479. }), a.open = function(t, r) {
  9480. var a;
  9481. return n.editorManager.setActive(n), t.title = t.title || " ", t.url = t.url || t.file, t.url && (t.width = parseInt(t.width || 320, 10), t.height = parseInt(t.height || 240, 10)), t.body && (t.items = {
  9482. defaults: t.defaults,
  9483. type: t.bodyType || "form",
  9484. items: t.body,
  9485. data: t.data,
  9486. callbacks: t.commands
  9487. }), t.url || t.buttons || (t.buttons = [{
  9488. text: "Ok",
  9489. subtype: "primary",
  9490. onclick: function() {
  9491. a.find("form")[0].submit()
  9492. }
  9493. }, {
  9494. text: "Cancel",
  9495. onclick: function() {
  9496. a.close()
  9497. }
  9498. }]), a = new e(t), s.push(a), a.on("close", function() {
  9499. for (var e = s.length; e--;) s[e] === a && s.splice(e, 1);
  9500. s.length || n.focus(), o(a)
  9501. }), t.data && a.on("postRender", function() {
  9502. this.find("*").each(function(e) {
  9503. var n = e.name();
  9504. n in t.data && e.value(t.data[n])
  9505. })
  9506. }), a.features = t || {}, a.params = r || {}, 1 === s.length && n.nodeChanged(), a = a.renderTo().reflow(), i(a), a
  9507. }, a.alert = function(e, r, a) {
  9508. var s;
  9509. s = t.alert(e, function() {
  9510. r ? r.call(a || this) : n.focus()
  9511. }), s.on("close", function() {
  9512. o(s)
  9513. }), i(s)
  9514. }, a.confirm = function(e, n, r) {
  9515. var a;
  9516. a = t.confirm(e, function(e) {
  9517. n.call(r || this, e)
  9518. }), a.on("close", function() {
  9519. o(a)
  9520. }), i(a)
  9521. }, a.close = function() {
  9522. r() && r().close()
  9523. }, a.getParams = function() {
  9524. return r() ? r().params : null
  9525. }, a.setParams = function(e) {
  9526. r() && (r().params = e)
  9527. }, a.getWindows = function() {
  9528. return s
  9529. }
  9530. }
  9531. }), r(Me, [xe, Te], function(e, t) {
  9532. return e.extend({
  9533. Mixins: [t],
  9534. Defaults: {
  9535. classes: "widget tooltip tooltip-n"
  9536. },
  9537. renderHtml: function() {
  9538. var e = this,
  9539. t = e.classPrefix;
  9540. return '<div id="' + e._id + '" class="' + e.classes + '" role="presentation"><div class="' + t + 'tooltip-arrow"></div><div class="' + t + 'tooltip-inner">' + e.encode(e.state.get("text")) + "</div></div>"
  9541. },
  9542. bindStates: function() {
  9543. var e = this;
  9544. return e.state.on("change:text", function(t) {
  9545. e.getEl().lastChild.innerHTML = e.encode(t.value)
  9546. }), e._super()
  9547. },
  9548. repaint: function() {
  9549. var e = this,
  9550. t, n;
  9551. t = e.getEl().style, n = e._layoutRect, t.left = n.x + "px", t.top = n.y + "px", t.zIndex = 131070
  9552. }
  9553. })
  9554. }), r(Pe, [xe, Me], function(e, t) {
  9555. var n, r = e.extend({
  9556. init: function(e) {
  9557. var t = this;
  9558. t._super(e), e = t.settings, t.canFocus = !0, e.tooltip && r.tooltips !== !1 && (t.on("mouseenter", function(n) {
  9559. var r = t.tooltip().moveTo(-65535);
  9560. if (n.control == t) {
  9561. var i = r.text(e.tooltip).show().testMoveRel(t.getEl(), ["bc-tc", "bc-tl", "bc-tr"]);
  9562. r.classes.toggle("tooltip-n", "bc-tc" == i), r.classes.toggle("tooltip-nw", "bc-tl" == i), r.classes.toggle("tooltip-ne", "bc-tr" == i), r.moveRel(t.getEl(), i)
  9563. } else r.hide()
  9564. }), t.on("mouseleave mousedown click", function() {
  9565. t.tooltip().hide()
  9566. })), t.aria("label", e.ariaLabel || e.tooltip)
  9567. },
  9568. tooltip: function() {
  9569. return n || (n = new t({
  9570. type: "tooltip"
  9571. }), n.renderTo()), n
  9572. },
  9573. postRender: function() {
  9574. var e = this,
  9575. t = e.settings;
  9576. e._super(), e.parent() || !t.width && !t.height || (e.initLayoutRect(), e.repaint()), t.autofocus && e.focus()
  9577. },
  9578. bindStates: function() {
  9579. function e(e) {
  9580. n.aria("disabled", e), n.classes.toggle("disabled", e)
  9581. }
  9582. function t(e) {
  9583. n.aria("pressed", e), n.classes.toggle("active", e)
  9584. }
  9585. var n = this;
  9586. return n.state.on("change:disabled", function(t) {
  9587. e(t.value)
  9588. }), n.state.on("change:active", function(e) {
  9589. t(e.value)
  9590. }), n.state.get("disabled") && e(!0), n.state.get("active") && t(!0), n._super()
  9591. },
  9592. remove: function() {
  9593. this._super(), n && (n.remove(), n = null)
  9594. }
  9595. });
  9596. return r
  9597. }), r(Oe, [Pe], function(e) {
  9598. return e.extend({
  9599. Defaults: {
  9600. value: 0
  9601. },
  9602. init: function(e) {
  9603. var t = this;
  9604. t._super(e), t.classes.add("progress"), t.settings.filter || (t.settings.filter = function(e) {
  9605. return Math.round(e)
  9606. })
  9607. },
  9608. renderHtml: function() {
  9609. var e = this,
  9610. t = e._id,
  9611. n = this.classPrefix;
  9612. return '<div id="' + t + '" class="' + e.classes + '"><div class="' + n + 'bar-container"><div class="' + n + 'bar"></div></div><div class="' + n + 'text">0%</div></div>'
  9613. },
  9614. postRender: function() {
  9615. var e = this;
  9616. return e._super(), e.value(e.settings.value), e
  9617. },
  9618. bindStates: function() {
  9619. function e(e) {
  9620. e = t.settings.filter(e), t.getEl().lastChild.innerHTML = e + "%", t.getEl().firstChild.firstChild.style.width = e + "%"
  9621. }
  9622. var t = this;
  9623. return t.state.on("change:value", function(t) {
  9624. e(t.value)
  9625. }), e(t.state.get("value")), t._super()
  9626. }
  9627. })
  9628. }), r(He, [xe, Te, Oe, u], function(e, t, n, r) {
  9629. return e.extend({
  9630. Mixins: [t],
  9631. Defaults: {
  9632. classes: "widget notification"
  9633. },
  9634. init: function(e) {
  9635. var t = this;
  9636. t._super(e), e.text && t.text(e.text), e.icon && (t.icon = e.icon), e.color && (t.color = e.color), e.type && t.classes.add("notification-" + e.type), e.timeout && (e.timeout < 0 || e.timeout > 0) && !e.closeButton ? t.closeButton = !1 : (t.classes.add("has-close"), t.closeButton = !0), e.progressBar && (t.progressBar = new n), t.on("click", function(e) {
  9637. e.target.className.indexOf(t.classPrefix + "close") != -1 && t.close()
  9638. })
  9639. },
  9640. renderHtml: function() {
  9641. var e = this,
  9642. t = e.classPrefix,
  9643. n = "",
  9644. r = "",
  9645. i = "",
  9646. o = "";
  9647. return e.icon && (n = '<i class="' + t + "ico " + t + "i-" + e.icon + '"></i>'), e.color && (o = ' style="background-color: ' + e.color + '"'), e.closeButton && (r = '<button type="button" class="' + t + 'close" aria-hidden="true">\xd7</button>'), e.progressBar && (i = e.progressBar.renderHtml()), '<div id="' + e._id + '" class="' + e.classes + '"' + o + ' role="presentation">' + n + '<div class="' + t + 'notification-inner">' + e.state.get("text") + "</div>" + i + r + "</div>"
  9648. },
  9649. postRender: function() {
  9650. var e = this;
  9651. return r.setTimeout(function() {
  9652. e.$el.addClass(e.classPrefix + "in")
  9653. }), e._super()
  9654. },
  9655. bindStates: function() {
  9656. var e = this;
  9657. return e.state.on("change:text", function(t) {
  9658. e.getEl().childNodes[1].innerHTML = t.value
  9659. }), e.progressBar && e.progressBar.bindStates(), e._super()
  9660. },
  9661. close: function() {
  9662. var e = this;
  9663. return e.fire("close").isDefaultPrevented() || e.remove(), e
  9664. },
  9665. repaint: function() {
  9666. var e = this,
  9667. t, n;
  9668. t = e.getEl().style, n = e._layoutRect, t.left = n.x + "px", t.top = n.y + "px", t.zIndex = 65534
  9669. }
  9670. })
  9671. }), r(Ie, [He, u, m], function(e, t, n) {
  9672. return function(r) {
  9673. function i() {
  9674. if (f.length) return f[f.length - 1]
  9675. }
  9676. function o() {
  9677. t.requestAnimationFrame(function() {
  9678. a(), s()
  9679. })
  9680. }
  9681. function a() {
  9682. for (var e = 0; e < f.length; e++) f[e].moveTo(0, 0)
  9683. }
  9684. function s() {
  9685. if (f.length > 0) {
  9686. var e = f.slice(0, 1)[0],
  9687. t = r.inline ? r.getElement() : r.getContentAreaContainer();
  9688. if (e.moveRel(t, "tc-tc"), f.length > 1)
  9689. for (var n = 1; n < f.length; n++) f[n].moveRel(f[n - 1].getEl(), "bc-tc")
  9690. }
  9691. }
  9692. function l(e, t) {
  9693. if (!u(t)) return null;
  9694. var r = n.grep(e, function(e) {
  9695. return c(t, e)
  9696. });
  9697. return 0 === r.length ? null : r[0]
  9698. }
  9699. function c(e, t) {
  9700. return e.type === t.settings.type && e.text === t.settings.text
  9701. }
  9702. function u(e) {
  9703. return !e.progressBar && !e.timeout
  9704. }
  9705. var d = this,
  9706. f = [];
  9707. d.notifications = f, r.on("remove", function() {
  9708. for (var e = f.length; e--;) f[e].close()
  9709. }), r.on("ResizeEditor", s), r.on("ResizeWindow", o), d.open = function(t) {
  9710. if (!r.removed) {
  9711. var n;
  9712. r.editorManager.setActive(r);
  9713. var i = l(f, t);
  9714. return null === i ? (n = new e(t), f.push(n), t.timeout > 0 && (n.timer = setTimeout(function() {
  9715. n.close()
  9716. }, t.timeout)), n.on("close", function() {
  9717. var e = f.length;
  9718. for (n.timer && r.getWin().clearTimeout(n.timer); e--;) f[e] === n && f.splice(e, 1);
  9719. s()
  9720. }), n.renderTo(), s()) : n = i, n
  9721. }
  9722. }, d.close = function() {
  9723. i() && i().close()
  9724. }, d.getNotifications = function() {
  9725. return f
  9726. }, r.on("SkinLoaded", function() {
  9727. var e = r.settings.service_message;
  9728. e && r.notificationManager.open({
  9729. text: e,
  9730. type: "warning",
  9731. timeout: 0,
  9732. icon: ""
  9733. })
  9734. })
  9735. }
  9736. }), r(Fe, [w], function(e) {
  9737. function t(t, n, r) {
  9738. for (var i = []; n && n != t; n = n.parentNode) i.push(e.nodeIndex(n, r));
  9739. return i
  9740. }
  9741. function n(e, t) {
  9742. var n, r, i;
  9743. for (r = e, n = t.length - 1; n >= 0; n--) {
  9744. if (i = r.childNodes, t[n] > i.length - 1) return null;
  9745. r = i[t[n]]
  9746. }
  9747. return r
  9748. }
  9749. return {
  9750. create: t,
  9751. resolve: n
  9752. }
  9753. }), r(ze, [I, T, y, Fe, A, C, d, m, u, k, $, oe], function(e, t, n, r, i, o, a, s, l, c, u, d) {
  9754. return function(f) {
  9755. function h(e, t) {
  9756. try {
  9757. f.getDoc().execCommand(e, !1, t)
  9758. } catch (n) {}
  9759. }
  9760. function p() {
  9761. var e = f.getDoc().documentMode;
  9762. return e ? e : 6
  9763. }
  9764. function m(e) {
  9765. return e.isDefaultPrevented()
  9766. }
  9767. function g(e) {
  9768. var t, n;
  9769. e.dataTransfer && (f.selection.isCollapsed() && "IMG" == e.target.tagName && re.select(e.target), t = f.selection.getContent(), t.length > 0 && (n = ue + escape(f.id) + "," + escape(t), e.dataTransfer.setData(de, n)))
  9770. }
  9771. function v(e) {
  9772. var t;
  9773. return e.dataTransfer && (t = e.dataTransfer.getData(de), t && t.indexOf(ue) >= 0) ? (t = t.substr(ue.length).split(","), {
  9774. id: unescape(t[0]),
  9775. html: unescape(t[1])
  9776. }) : null
  9777. }
  9778. function y(e) {
  9779. f.queryCommandSupported("mceInsertClipboardContent") ? f.execCommand("mceInsertClipboardContent", !1, {
  9780. content: e
  9781. }) : f.execCommand("mceInsertContent", !1, e)
  9782. }
  9783. function b() {
  9784. function i(e) {
  9785. var t = x.schema.getBlockElements(),
  9786. n = f.getBody();
  9787. if ("BR" != e.nodeName) return !1;
  9788. for (; e != n && !t[e.nodeName]; e = e.parentNode)
  9789. if (e.nextSibling) return !1;
  9790. return !0
  9791. }
  9792. function o(e, t) {
  9793. var n;
  9794. for (n = e.nextSibling; n && n != t; n = n.nextSibling)
  9795. if ((3 != n.nodeType || 0 !== Z.trim(n.data).length) && n !== t) return !1;
  9796. return n === t
  9797. }
  9798. function a(e, t, r) {
  9799. var o, a, s;
  9800. if (x.isChildOf(e, f.getBody()))
  9801. for (s = x.schema.getNonEmptyElements(), o = new n(r || e, e); a = o[t ? "next" : "prev"]();) {
  9802. if (s[a.nodeName] && !i(a)) return a;
  9803. if (3 == a.nodeType && a.data.length > 0) return a
  9804. }
  9805. }
  9806. function c(e) {
  9807. var n, r, i, o, s;
  9808. if (!e.collapsed && (n = x.getParent(t.getNode(e.startContainer, e.startOffset), x.isBlock), r = x.getParent(t.getNode(e.endContainer, e.endOffset), x.isBlock), s = f.schema.getTextBlockElements(), n != r && s[n.nodeName] && s[r.nodeName] && "false" !== x.getContentEditable(n) && "false" !== x.getContentEditable(r))) return e.deleteContents(), i = a(n, !1), o = a(r, !0), x.isEmpty(r) || Z(n).append(r.childNodes), Z(r).remove(), i ? 1 == i.nodeType ? "BR" == i.nodeName ? (e.setStartBefore(i), e.setEndBefore(i)) : (e.setStartAfter(i), e.setEndAfter(i)) : (e.setStart(i, i.data.length), e.setEnd(i, i.data.length)) : o && (1 == o.nodeType ? (e.setStartBefore(o), e.setEndBefore(o)) : (e.setStart(o, 0), e.setEnd(o, 0))), w.setRng(e), !0
  9809. }
  9810. function u(e, n) {
  9811. var r, i, s, l, c, u;
  9812. if (!e.collapsed) return e;
  9813. if (c = e.startContainer, u = e.startOffset, 3 == c.nodeType)
  9814. if (n) {
  9815. if (u < c.data.length) return e
  9816. } else if (u > 0) return e;
  9817. r = t.getNode(c, u), s = x.getParent(r, x.isBlock), i = a(f.getBody(), n, r), l = x.getParent(i, x.isBlock);
  9818. var d = 1 === c.nodeType && u > c.childNodes.length - 1;
  9819. if (!r || !i) return e;
  9820. if (l && s != l)
  9821. if (n) {
  9822. if (!o(s, l)) return e;
  9823. 1 == r.nodeType ? "BR" == r.nodeName ? e.setStartBefore(r) : e.setStartAfter(r) : e.setStart(r, r.data.length), 1 == i.nodeType ? e.setEnd(i, 0) : e.setEndBefore(i)
  9824. } else {
  9825. if (!o(l, s)) return e;
  9826. 1 == i.nodeType ? "BR" == i.nodeName ? e.setStartBefore(i) : e.setStartAfter(i) : e.setStart(i, i.data.length), 1 == r.nodeType && d ? e.setEndAfter(r) : e.setEndBefore(r)
  9827. }
  9828. return e
  9829. }
  9830. function d(e) {
  9831. var t = w.getRng();
  9832. if (t = u(t, e), c(t)) return !0
  9833. }
  9834. function h(e, t) {
  9835. function n(e, n) {
  9836. return m = Z(n).parents().filter(function(e, t) {
  9837. return !!f.schema.getTextInlineElements()[t.nodeName]
  9838. }), l = e.cloneNode(!1), m = s.map(m, function(e) {
  9839. return e = e.cloneNode(!1), l.hasChildNodes() ? (e.appendChild(l.firstChild), l.appendChild(e)) : l.appendChild(e), l.appendChild(e), e
  9840. }), m.length ? (p = x.create("br"), m[0].appendChild(p), x.replace(l, e), t.setStartBefore(p), t.setEndBefore(p), f.selection.setRng(t), p) : null
  9841. }
  9842. function i(e) {
  9843. return e && f.schema.getTextBlockElements()[e.tagName]
  9844. }
  9845. var o, a, l, c, u, d, h, p, m;
  9846. if (t.collapsed && (d = t.startContainer, h = t.startOffset, a = x.getParent(d, x.isBlock), i(a)))
  9847. if (1 == d.nodeType) {
  9848. if (d = d.childNodes[h], d && "BR" != d.tagName) return;
  9849. if (u = e ? a.nextSibling : a.previousSibling, x.isEmpty(a) && i(u) && x.isEmpty(u) && n(a, d)) return x.remove(u), !0
  9850. } else if (3 == d.nodeType) {
  9851. if (o = r.create(a, d), c = a.cloneNode(!0), d = r.resolve(c, o), e) {
  9852. if (h >= d.data.length) return;
  9853. d.deleteData(h, 1)
  9854. } else {
  9855. if (h <= 0) return;
  9856. d.deleteData(h - 1, 1)
  9857. }
  9858. if (x.isEmpty(c)) return n(a, d)
  9859. }
  9860. }
  9861. function p(e) {
  9862. var t, n, r;
  9863. d(e) || (s.each(f.getBody().getElementsByTagName("*"), function(e) {
  9864. "SPAN" == e.tagName && e.setAttribute("mce-data-marked", 1), !e.hasAttribute("data-mce-style") && e.hasAttribute("style") && f.dom.setAttrib(e, "style", f.dom.getAttrib(e, "style"))
  9865. }), t = new E(function() {}), t.observe(f.getDoc(), {
  9866. childList: !0,
  9867. attributes: !0,
  9868. subtree: !0,
  9869. attributeFilter: ["style"]
  9870. }), f.getDoc().execCommand(e ? "ForwardDelete" : "Delete", !1, null), n = f.selection.getRng(), r = n.startContainer.parentNode, s.each(t.takeRecords(), function(e) {
  9871. if (x.isChildOf(e.target, f.getBody())) {
  9872. if ("style" == e.attributeName) {
  9873. var t = e.target.getAttribute("data-mce-style");
  9874. t ? e.target.setAttribute("style", t) : e.target.removeAttribute("style")
  9875. }
  9876. s.each(e.addedNodes, function(e) {
  9877. if ("SPAN" == e.nodeName && !e.getAttribute("mce-data-marked")) {
  9878. var t, i;
  9879. e == r && (t = n.startOffset, i = e.firstChild), x.remove(e, !0), i && (n.setStart(i, t), n.setEnd(i, t), f.selection.setRng(n))
  9880. }
  9881. })
  9882. }
  9883. }), t.disconnect(), s.each(f.dom.select("span[mce-data-marked]"), function(e) {
  9884. e.removeAttribute("mce-data-marked")
  9885. }))
  9886. }
  9887. function b(e) {
  9888. f.undoManager.transact(function() {
  9889. p(e)
  9890. })
  9891. }
  9892. var C = f.getDoc(),
  9893. x = f.dom,
  9894. w = f.selection,
  9895. E = window.MutationObserver,
  9896. N, _;
  9897. E || (N = !0, E = function() {
  9898. function e(e) {
  9899. var t = e.relatedNode || e.target;
  9900. n.push({
  9901. target: t,
  9902. addedNodes: [t]
  9903. })
  9904. }
  9905. function t(e) {
  9906. var t = e.relatedNode || e.target;
  9907. n.push({
  9908. target: t,
  9909. attributeName: e.attrName
  9910. })
  9911. }
  9912. var n = [],
  9913. r;
  9914. this.observe = function(n) {
  9915. r = n, r.addEventListener("DOMSubtreeModified", e, !1), r.addEventListener("DOMNodeInsertedIntoDocument", e, !1), r.addEventListener("DOMNodeInserted", e, !1), r.addEventListener("DOMAttrModified", t, !1)
  9916. }, this.disconnect = function() {
  9917. r.removeEventListener("DOMSubtreeModified", e, !1), r.removeEventListener("DOMNodeInsertedIntoDocument", e, !1), r.removeEventListener("DOMNodeInserted", e, !1), r.removeEventListener("DOMAttrModified", t, !1)
  9918. }, this.takeRecords = function() {
  9919. return n
  9920. }
  9921. }), f.on("keydown", function(e) {
  9922. var t = e.keyCode == te,
  9923. n = e.ctrlKey || e.metaKey;
  9924. if (!m(e) && (t || e.keyCode == ee)) {
  9925. var r = f.selection.getRng(),
  9926. i = r.startContainer,
  9927. o = r.startOffset;
  9928. if (t && e.shiftKey) return;
  9929. if (h(t, r)) return void e.preventDefault();
  9930. if (!n && r.collapsed && 3 == i.nodeType && (t ? o < i.data.length : o > 0)) return;
  9931. e.preventDefault(), n && f.selection.getSel().modify("extend", t ? "forward" : "backward", e.metaKey ? "lineboundary" : "word"), p(t)
  9932. }
  9933. }), f.on("keypress", function(t) {
  9934. if (!m(t) && !w.isCollapsed() && t.charCode > 31 && !e.metaKeyPressed(t)) {
  9935. var n, r, i, o, a, s;
  9936. n = f.selection.getRng(), s = String.fromCharCode(t.charCode), t.preventDefault(), r = Z(n.startContainer).parents().filter(function(e, t) {
  9937. return !!f.schema.getTextInlineElements()[t.nodeName]
  9938. }), p(!0), r = r.filter(function(e, t) {
  9939. return !Z.contains(f.getBody(), t)
  9940. }), r.length ? (i = x.createFragment(), r.each(function(e, t) {
  9941. t = t.cloneNode(!1), i.hasChildNodes() ? (t.appendChild(i.firstChild), i.appendChild(t)) : (a = t, i.appendChild(t)), i.appendChild(t)
  9942. }), a.appendChild(f.getDoc().createTextNode(s)), o = x.getParent(n.startContainer, x.isBlock), x.isEmpty(o) ? Z(o).empty().append(i) : n.insertNode(i), n.setStart(a.firstChild, 1), n.setEnd(a.firstChild, 1), f.selection.setRng(n)) : f.selection.setContent(s)
  9943. }
  9944. }), f.addCommand("Delete", function() {
  9945. p()
  9946. }), f.addCommand("ForwardDelete", function() {
  9947. p(!0)
  9948. }), N || (f.on("dragstart", function(e) {
  9949. _ = w.getRng(), g(e)
  9950. }), f.on("drop", function(e) {
  9951. if (!m(e)) {
  9952. var n = v(e);
  9953. n && (e.preventDefault(), l.setEditorTimeout(f, function() {
  9954. var r = t.getCaretRangeFromPoint(e.x, e.y, C);
  9955. _ && (w.setRng(_), _ = null, b()), w.setRng(r), y(n.html)
  9956. }))
  9957. }
  9958. }), f.on("cut", function(e) {
  9959. m(e) || !e.clipboardData || f.selection.isCollapsed() || (e.preventDefault(), e.clipboardData.clearData(), e.clipboardData.setData("text/html", f.selection.getContent()), e.clipboardData.setData("text/plain", f.selection.getContent({
  9960. format: "text"
  9961. })), l.setEditorTimeout(f, function() {
  9962. b(!0)
  9963. }))
  9964. }))
  9965. }
  9966. function C() {
  9967. function e(e) {
  9968. var t = ne.create("body"),
  9969. n = e.cloneContents();
  9970. return t.appendChild(n), re.serializer.serialize(t, {
  9971. format: "html"
  9972. })
  9973. }
  9974. function n(n) {
  9975. if (!n.setStart) {
  9976. if (n.item) return !1;
  9977. var r = n.duplicate();
  9978. return r.moveToElementText(f.getBody()), t.compareRanges(n, r)
  9979. }
  9980. var i = e(n),
  9981. o = ne.createRng();
  9982. o.selectNode(f.getBody());
  9983. var a = e(o);
  9984. return i === a
  9985. }
  9986. f.on("keydown", function(e) {
  9987. var t = e.keyCode,
  9988. r, i;
  9989. if (!m(e) && (t == te || t == ee)) {
  9990. if (r = f.selection.isCollapsed(), i = f.getBody(), r && !ne.isEmpty(i)) return;
  9991. if (!r && !n(f.selection.getRng())) return;
  9992. e.preventDefault(), f.setContent(""), i.firstChild && ne.isBlock(i.firstChild) ? f.selection.setCursorLocation(i.firstChild, 0) : f.selection.setCursorLocation(i, 0), f.nodeChanged()
  9993. }
  9994. })
  9995. }
  9996. function x() {
  9997. f.shortcuts.add("meta+a", null, "SelectAll")
  9998. }
  9999. function w() {
  10000. f.settings.content_editable || ne.bind(f.getDoc(), "mousedown mouseup", function(e) {
  10001. var t;
  10002. if (e.target == f.getDoc().documentElement)
  10003. if (t = re.getRng(), f.getBody().focus(), "mousedown" == e.type) {
  10004. if (c.isCaretContainer(t.startContainer)) return;
  10005. re.placeCaretAt(e.clientX, e.clientY)
  10006. } else re.setRng(t)
  10007. })
  10008. }
  10009. function E() {
  10010. f.on("keydown", function(e) {
  10011. if (!m(e) && e.keyCode === ee) {
  10012. if (!f.getBody().getElementsByTagName("hr").length) return;
  10013. if (re.isCollapsed() && 0 === re.getRng(!0).startOffset) {
  10014. var t = re.getNode(),
  10015. n = t.previousSibling;
  10016. if ("HR" == t.nodeName) return ne.remove(t), void e.preventDefault();
  10017. n && n.nodeName && "hr" === n.nodeName.toLowerCase() && (ne.remove(n), e.preventDefault())
  10018. }
  10019. }
  10020. })
  10021. }
  10022. function N() {
  10023. window.Range.prototype.getClientRects || f.on("mousedown", function(e) {
  10024. if (!m(e) && "HTML" === e.target.nodeName) {
  10025. var t = f.getBody();
  10026. t.blur(), l.setEditorTimeout(f, function() {
  10027. t.focus()
  10028. })
  10029. }
  10030. })
  10031. }
  10032. function _() {
  10033. f.on("click", function(e) {
  10034. var t = e.target;
  10035. /^(IMG|HR)$/.test(t.nodeName) && "false" !== ne.getContentEditableParent(t) && (e.preventDefault(), re.getSel().setBaseAndExtent(t, 0, t, 1), f.nodeChanged()), "A" == t.nodeName && ne.hasClass(t, "mce-item-anchor") && (e.preventDefault(), re.select(t))
  10036. })
  10037. }
  10038. function S() {
  10039. function e() {
  10040. var e = ne.getAttribs(re.getStart().cloneNode(!1));
  10041. return function() {
  10042. var t = re.getStart();
  10043. t !== f.getBody() && (ne.setAttrib(t, "style", null), Q(e, function(e) {
  10044. t.setAttributeNode(e.cloneNode(!0))
  10045. }))
  10046. }
  10047. }
  10048. function t() {
  10049. return !re.isCollapsed() && ne.getParent(re.getStart(), ne.isBlock) != ne.getParent(re.getEnd(), ne.isBlock)
  10050. }
  10051. f.on("keypress", function(n) {
  10052. var r;
  10053. if (!m(n) && (8 == n.keyCode || 46 == n.keyCode) && t()) return r = e(), f.getDoc().execCommand("delete", !1, null), r(), n.preventDefault(), !1
  10054. }), ne.bind(f.getDoc(), "cut", function(n) {
  10055. var r;
  10056. !m(n) && t() && (r = e(), l.setEditorTimeout(f, function() {
  10057. r()
  10058. }))
  10059. })
  10060. }
  10061. function k() {
  10062. document.body.setAttribute("role", "application")
  10063. }
  10064. function T() {
  10065. f.on("keydown", function(e) {
  10066. if (!m(e) && e.keyCode === ee && re.isCollapsed() && 0 === re.getRng(!0).startOffset) {
  10067. var t = re.getNode().previousSibling;
  10068. if (t && t.nodeName && "table" === t.nodeName.toLowerCase()) return e.preventDefault(), !1
  10069. }
  10070. })
  10071. }
  10072. function R() {
  10073. p() > 7 || (h("RespectVisibilityInDesign", !0), f.contentStyles.push(".mceHideBrInPre pre br {display: none}"), ne.addClass(f.getBody(), "mceHideBrInPre"), oe.addNodeFilter("pre", function(e) {
  10074. for (var t = e.length, n, r, o, a; t--;)
  10075. for (n = e[t].getAll("br"), r = n.length; r--;) o = n[r], a = o.prev, a && 3 === a.type && "\n" != a.value.charAt(a.value - 1) ? a.value += "\n" : o.parent.insert(new i("#text", 3), o, !0).value = "\n"
  10076. }), ae.addNodeFilter("pre", function(e) {
  10077. for (var t = e.length, n, r, i, o; t--;)
  10078. for (n = e[t].getAll("br"), r = n.length; r--;) i = n[r], o = i.prev, o && 3 == o.type && (o.value = o.value.replace(/\r?\n$/, ""))
  10079. }))
  10080. }
  10081. function A() {
  10082. ne.bind(f.getBody(), "mouseup", function() {
  10083. var e, t = re.getNode();
  10084. "IMG" == t.nodeName && ((e = ne.getStyle(t, "width")) && (ne.setAttrib(t, "width", e.replace(/[^0-9%]+/g, "")), ne.setStyle(t, "width", "")), (e = ne.getStyle(t, "height")) && (ne.setAttrib(t, "height", e.replace(/[^0-9%]+/g, "")), ne.setStyle(t, "height", "")))
  10085. })
  10086. }
  10087. function B() {
  10088. f.on("keydown", function(t) {
  10089. var n, r, i, o, a;
  10090. if (!m(t) && t.keyCode == e.BACKSPACE && (n = re.getRng(), r = n.startContainer, i = n.startOffset, o = ne.getRoot(), a = r, n.collapsed && 0 === i)) {
  10091. for (; a && a.parentNode && a.parentNode.firstChild == a && a.parentNode != o;) a = a.parentNode;
  10092. "BLOCKQUOTE" === a.tagName && (f.formatter.toggle("blockquote", null, a), n = ne.createRng(), n.setStart(r, 0), n.setEnd(r, 0), re.setRng(n))
  10093. }
  10094. })
  10095. }
  10096. function D() {
  10097. function e() {
  10098. K(), h("StyleWithCSS", !1), h("enableInlineTableEditing", !1), ie.object_resizing || h("enableObjectResizing", !1)
  10099. }
  10100. ie.readonly || f.on("BeforeExecCommand MouseDown", e)
  10101. }
  10102. function L() {
  10103. function e() {
  10104. Q(ne.select("a"), function(e) {
  10105. var t = e.parentNode,
  10106. n = ne.getRoot();
  10107. if (t.lastChild === e) {
  10108. for (; t && !ne.isBlock(t);) {
  10109. if (t.parentNode.lastChild !== t || t === n) return;
  10110. t = t.parentNode
  10111. }
  10112. ne.add(t, "br", {
  10113. "data-mce-bogus": 1
  10114. })
  10115. }
  10116. })
  10117. }
  10118. f.on("SetContent ExecCommand", function(t) {
  10119. "setcontent" != t.type && "mceInsertLink" !== t.command || e()
  10120. })
  10121. }
  10122. function M() {
  10123. ie.forced_root_block && f.on("init", function() {
  10124. h("DefaultParagraphSeparator", ie.forced_root_block)
  10125. })
  10126. }
  10127. function P() {
  10128. f.on("keydown", function(e) {
  10129. var t;
  10130. m(e) || e.keyCode != ee || (t = f.getDoc().selection.createRange(), t && t.item && (e.preventDefault(), f.undoManager.beforeChange(), ne.remove(t.item(0)), f.undoManager.add()))
  10131. })
  10132. }
  10133. function O() {
  10134. var e;
  10135. p() >= 10 && (e = "", Q("p div h1 h2 h3 h4 h5 h6".split(" "), function(t, n) {
  10136. e += (n > 0 ? "," : "") + t + ":empty"
  10137. }), f.contentStyles.push(e + "{padding-right: 1px !important}"))
  10138. }
  10139. function H() {
  10140. p() < 9 && (oe.addNodeFilter("noscript", function(e) {
  10141. for (var t = e.length, n, r; t--;) n = e[t], r = n.firstChild, r && n.attr("data-mce-innertext", r.value)
  10142. }), ae.addNodeFilter("noscript", function(e) {
  10143. for (var t = e.length, n, r, a; t--;) n = e[t], r = e[t].firstChild, r ? r.value = o.decode(r.value) : (a = n.attributes.map["data-mce-innertext"], a && (n.attr("data-mce-innertext", null), r = new i("#text", 3), r.value = a, r.raw = !0, n.append(r)))
  10144. }))
  10145. }
  10146. function I() {
  10147. function e(e, t) {
  10148. var n = i.createTextRange();
  10149. try {
  10150. n.moveToPoint(e, t)
  10151. } catch (r) {
  10152. n = null
  10153. }
  10154. return n
  10155. }
  10156. function t(t) {
  10157. var r;
  10158. t.button ? (r = e(t.x, t.y), r && (r.compareEndPoints("StartToStart", a) > 0 ? r.setEndPoint("StartToStart", a) : r.setEndPoint("EndToEnd", a), r.select())) : n()
  10159. }
  10160. function n() {
  10161. var e = r.selection.createRange();
  10162. a && !e.item && 0 === e.compareEndPoints("StartToEnd", e) && a.select(), ne.unbind(r, "mouseup", n), ne.unbind(r, "mousemove", t), a = o = 0
  10163. }
  10164. var r = ne.doc,
  10165. i = r.body,
  10166. o, a, s;
  10167. r.documentElement.unselectable = !0, ne.bind(r, "mousedown contextmenu", function(i) {
  10168. if ("HTML" === i.target.nodeName) {
  10169. if (o && n(), s = r.documentElement, s.scrollHeight > s.clientHeight) return;
  10170. o = 1, a = e(i.x, i.y), a && (ne.bind(r, "mouseup", n), ne.bind(r, "mousemove", t), ne.getRoot().focus(), a.select())
  10171. }
  10172. })
  10173. }
  10174. function F() {
  10175. f.on("keyup focusin mouseup", function(t) {
  10176. 65 == t.keyCode && e.metaKeyPressed(t) || re.normalize()
  10177. }, !0)
  10178. }
  10179. function z() {
  10180. f.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")
  10181. }
  10182. function U() {
  10183. f.inline || f.on("keydown", function() {
  10184. document.activeElement == document.body && f.getWin().focus()
  10185. })
  10186. }
  10187. function W() {
  10188. f.inline || (f.contentStyles.push("body {min-height: 150px}"), f.on("click", function(e) {
  10189. var t;
  10190. if ("HTML" == e.target.nodeName) {
  10191. if (a.ie > 11) return void f.getBody().focus();
  10192. t = f.selection.getRng(), f.getBody().focus(), f.selection.setRng(t), f.selection.normalize(), f.nodeChanged()
  10193. }
  10194. }))
  10195. }
  10196. function V() {
  10197. a.mac && f.on("keydown", function(t) {
  10198. !e.metaKeyPressed(t) || t.shiftKey || 37 != t.keyCode && 39 != t.keyCode || (t.preventDefault(), f.selection.getSel().modify("move", 37 == t.keyCode ? "backward" : "forward", "lineboundary"))
  10199. })
  10200. }
  10201. function $() {
  10202. h("AutoUrlDetect", !1)
  10203. }
  10204. function q() {
  10205. f.on("click", function(e) {
  10206. var t = e.target;
  10207. do
  10208. if ("A" === t.tagName) return void e.preventDefault();
  10209. while (t = t.parentNode)
  10210. }), f.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")
  10211. }
  10212. function j() {
  10213. f.on("init", function() {
  10214. f.dom.bind(f.getBody(), "submit", function(e) {
  10215. e.preventDefault()
  10216. })
  10217. })
  10218. }
  10219. function Y() {
  10220. oe.addNodeFilter("br", function(e) {
  10221. for (var t = e.length; t--;) "Apple-interchange-newline" == e[t].attr("class") && e[t].remove()
  10222. })
  10223. }
  10224. function X() {
  10225. f.on("dragstart", function(e) {
  10226. g(e)
  10227. }), f.on("drop", function(e) {
  10228. if (!m(e)) {
  10229. var n = v(e);
  10230. if (n && n.id != f.id) {
  10231. e.preventDefault();
  10232. var r = t.getCaretRangeFromPoint(e.x, e.y, f.getDoc());
  10233. re.setRng(r), y(n.html)
  10234. }
  10235. }
  10236. })
  10237. }
  10238. function K() {}
  10239. function G() {
  10240. var e;
  10241. return se ? (e = f.selection.getSel(), !e || !e.rangeCount || 0 === e.rangeCount) : 0
  10242. }
  10243. function J() {
  10244. function t(e) {
  10245. var t = new d(e.getBody()),
  10246. n = e.selection.getRng(),
  10247. r = u.fromRangeStart(n),
  10248. i = u.fromRangeEnd(n);
  10249. return !e.selection.isCollapsed() && !t.prev(r) && !t.next(i)
  10250. }
  10251. f.on("keypress", function(n) {
  10252. !m(n) && !re.isCollapsed() && n.charCode > 31 && !e.metaKeyPressed(n) && t(f) && (n.preventDefault(), f.setContent(String.fromCharCode(n.charCode)), f.selection.select(f.getBody(), !0), f.selection.collapse(!1), f.nodeChanged())
  10253. }), f.on("keydown", function(e) {
  10254. var n = e.keyCode;
  10255. m(e) || n != te && n != ee || t(f) && (e.preventDefault(), f.setContent(""), f.nodeChanged())
  10256. })
  10257. }
  10258. var Q = s.each,
  10259. Z = f.$,
  10260. ee = e.BACKSPACE,
  10261. te = e.DELETE,
  10262. ne = f.dom,
  10263. re = f.selection,
  10264. ie = f.settings,
  10265. oe = f.parser,
  10266. ae = f.serializer,
  10267. se = a.gecko,
  10268. le = a.ie,
  10269. ce = a.webkit,
  10270. ue = "data:text/mce-internal,",
  10271. de = le ? "Text" : "URL";
  10272. return B(), C(), a.windowsPhone || F(), ce && (J(), b(), w(), _(), M(), j(), T(), Y(), a.iOS ? (U(), W(), q()) : x()), le && a.ie < 11 && (E(), k(), R(), A(), P(), O(), H(), I()), a.ie >= 11 && (W(), T()), a.ie && (x(), $(), X()), se && (J(), E(), N(), S(), D(), L(), z(), V(), T()), {
  10273. refreshContentEditable: K,
  10274. isHidden: G
  10275. }
  10276. }
  10277. }), r(Ue, [he, w, m], function(e, t, n) {
  10278. function r(e, t) {
  10279. return "selectionchange" == t ? e.getDoc() : !e.inline && /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t) ? e.getDoc().documentElement : e.settings.event_root ? (e.eventRoot || (e.eventRoot = o.select(e.settings.event_root)[0]), e.eventRoot) : e.getBody()
  10280. }
  10281. function i(e, t) {
  10282. function n(e) {
  10283. return !e.hidden && !e.readonly
  10284. }
  10285. var i = r(e, t),
  10286. s;
  10287. if (e.delegates || (e.delegates = {}), !e.delegates[t])
  10288. if (e.settings.event_root) {
  10289. if (a || (a = {}, e.editorManager.on("removeEditor", function() {
  10290. var t;
  10291. if (!e.editorManager.activeEditor && a) {
  10292. for (t in a) e.dom.unbind(r(e, t));
  10293. a = null
  10294. }
  10295. })), a[t]) return;
  10296. s = function(r) {
  10297. for (var i = r.target, a = e.editorManager.editors, s = a.length; s--;) {
  10298. var l = a[s].getBody();
  10299. (l === i || o.isChildOf(i, l)) && n(a[s]) && a[s].fire(t, r)
  10300. }
  10301. }, a[t] = s, o.bind(i, t, s)
  10302. } else s = function(r) {
  10303. n(e) && e.fire(t, r)
  10304. }, o.bind(i, t, s), e.delegates[t] = s
  10305. }
  10306. var o = t.DOM,
  10307. a, s = {
  10308. bindPendingEventDelegates: function() {
  10309. var e = this;
  10310. n.each(e._pendingNativeEvents, function(t) {
  10311. i(e, t)
  10312. })
  10313. },
  10314. toggleNativeEvent: function(e, t) {
  10315. var n = this;
  10316. "focus" != e && "blur" != e && (t ? n.initialized ? i(n, e) : n._pendingNativeEvents ? n._pendingNativeEvents.push(e) : n._pendingNativeEvents = [e] : n.initialized && (n.dom.unbind(r(n, e), e, n.delegates[e]), delete n.delegates[e]))
  10317. },
  10318. unbindAllNativeEvents: function() {
  10319. var e = this,
  10320. t;
  10321. if (e.delegates) {
  10322. for (t in e.delegates) e.dom.unbind(r(e, t), t, e.delegates[t]);
  10323. delete e.delegates
  10324. }
  10325. e.inline || (e.getBody().onload = null, e.dom.unbind(e.getWin()), e.dom.unbind(e.getDoc())), e.dom.unbind(e.getBody()), e.dom.unbind(e.getContainer())
  10326. }
  10327. };
  10328. return s = n.extend({}, e, s)
  10329. }), r(We, [], function() {
  10330. function e(e, t, n) {
  10331. try {
  10332. e.getDoc().execCommand(t, !1, n)
  10333. } catch (r) {}
  10334. }
  10335. function t(e) {
  10336. var t, n;
  10337. return t = e.getBody(), n = function(t) {
  10338. e.dom.getParents(t.target, "a").length > 0 && t.preventDefault()
  10339. }, e.dom.bind(t, "click", n), {
  10340. unbind: function() {
  10341. e.dom.unbind(t, "click", n)
  10342. }
  10343. }
  10344. }
  10345. function n(n, r) {
  10346. n._clickBlocker && (n._clickBlocker.unbind(), n._clickBlocker = null), r ? (n._clickBlocker = t(n), n.selection.controlSelection.hideResizeRect(), n.readonly = !0, n.getBody().contentEditable = !1) : (n.readonly = !1, n.getBody().contentEditable = !0, e(n, "StyleWithCSS", !1), e(n, "enableInlineTableEditing", !1), e(n, "enableObjectResizing", !1), n.focus(), n.nodeChanged())
  10347. }
  10348. function r(e, t) {
  10349. var r = e.readonly ? "readonly" : "design";
  10350. t != r && (e.initialized ? n(e, "readonly" == t) : e.on("init", function() {
  10351. n(e, "readonly" == t)
  10352. }), e.fire("SwitchMode", {
  10353. mode: t
  10354. }))
  10355. }
  10356. return {
  10357. setMode: r
  10358. }
  10359. }), r(Ve, [m, d], function(e, t) {
  10360. var n = e.each,
  10361. r = e.explode,
  10362. i = {
  10363. f9: 120,
  10364. f10: 121,
  10365. f11: 122
  10366. },
  10367. o = e.makeMap("alt,ctrl,shift,meta,access");
  10368. return function(a) {
  10369. function s(e) {
  10370. var a, s, l = {};
  10371. n(r(e, "+"), function(e) {
  10372. e in o ? l[e] = !0 : /^[0-9]{2,}$/.test(e) ? l.keyCode = parseInt(e, 10) : (l.charCode = e.charCodeAt(0), l.keyCode = i[e] || e.toUpperCase().charCodeAt(0))
  10373. }), a = [l.keyCode];
  10374. for (s in o) l[s] ? a.push(s) : l[s] = !1;
  10375. return l.id = a.join(","), l.access && (l.alt = !0, t.mac ? l.ctrl = !0 : l.shift = !0), l.meta && (t.mac ? l.meta = !0 : (l.ctrl = !0, l.meta = !1)), l
  10376. }
  10377. function l(t, n, i, o) {
  10378. var l;
  10379. return l = e.map(r(t, ">"), s), l[l.length - 1] = e.extend(l[l.length - 1], {
  10380. func: i,
  10381. scope: o || a
  10382. }), e.extend(l[0], {
  10383. desc: a.translate(n),
  10384. subpatterns: l.slice(1)
  10385. })
  10386. }
  10387. function c(e) {
  10388. return e.altKey || e.ctrlKey || e.metaKey
  10389. }
  10390. function u(e) {
  10391. return "keydown" === e.type && e.keyCode >= 112 && e.keyCode <= 123
  10392. }
  10393. function d(e, t) {
  10394. return !!t && (t.ctrl == e.ctrlKey && t.meta == e.metaKey && (t.alt == e.altKey && t.shift == e.shiftKey && (!!(e.keyCode == t.keyCode || e.charCode && e.charCode == t.charCode) && (e.preventDefault(), !0))))
  10395. }
  10396. function f(e) {
  10397. return e.func ? e.func.call(e.scope) : null
  10398. }
  10399. var h = this,
  10400. p = {},
  10401. m = [];
  10402. a.on("keyup keypress keydown", function(e) {
  10403. !c(e) && !u(e) || e.isDefaultPrevented() || (n(p, function(t) {
  10404. if (d(e, t)) return m = t.subpatterns.slice(0), "keydown" == e.type && f(t), !0
  10405. }), d(e, m[0]) && (1 === m.length && "keydown" == e.type && f(m[0]), m.shift()))
  10406. }), h.add = function(t, i, o, s) {
  10407. var c;
  10408. return c = o, "string" == typeof o ? o = function() {
  10409. a.execCommand(c, !1, null)
  10410. } : e.isArray(c) && (o = function() {
  10411. a.execCommand(c[0], c[1], c[2])
  10412. }), n(r(e.trim(t.toLowerCase())), function(e) {
  10413. var t = l(e, i, o, s);
  10414. p[t.id] = t
  10415. }), !0
  10416. }, h.remove = function(e) {
  10417. var t = l(e);
  10418. return !!p[t.id] && (delete p[t.id], !0)
  10419. }
  10420. }
  10421. }), r($e, [c, m, z], function(e, t, n) {
  10422. return function(r, i) {
  10423. function o(e) {
  10424. var t, n;
  10425. return n = {
  10426. "image/jpeg": "jpg",
  10427. "image/jpg": "jpg",
  10428. "image/gif": "gif",
  10429. "image/png": "png"
  10430. }, t = n[e.blob().type.toLowerCase()] || "dat", e.filename() + "." + t
  10431. }
  10432. function a(e, t) {
  10433. return e ? e.replace(/\/$/, "") + "/" + t.replace(/^\//, "") : t
  10434. }
  10435. function s(e) {
  10436. return {
  10437. id: e.id,
  10438. blob: e.blob,
  10439. base64: e.base64,
  10440. filename: n.constant(o(e))
  10441. }
  10442. }
  10443. function l(e, t, n, r) {
  10444. var o, s;
  10445. o = new XMLHttpRequest, o.open("POST", i.url), o.withCredentials = i.credentials, o.upload.onprogress = function(e) {
  10446. r(e.loaded / e.total * 100)
  10447. }, o.onerror = function() {
  10448. n("Image upload failed due to a XHR Transport error. Code: " + o.status)
  10449. }, o.onload = function() {
  10450. var e;
  10451. return 200 != o.status ? void n("HTTP Error: " + o.status) : (e = JSON.parse(o.responseText), e && "string" == typeof e.location ? void t(a(i.basePath, e.location)) : void n("Invalid JSON: " + o.responseText))
  10452. }, s = new FormData, s.append("file", e.blob(), e.filename()), o.send(s)
  10453. }
  10454. function c() {
  10455. return new e(function(e) {
  10456. e([])
  10457. })
  10458. }
  10459. function u(e, t) {
  10460. return {
  10461. url: t,
  10462. blobInfo: e,
  10463. status: !0
  10464. }
  10465. }
  10466. function d(e, t) {
  10467. return {
  10468. url: "",
  10469. blobInfo: e,
  10470. status: !1,
  10471. error: t
  10472. }
  10473. }
  10474. function f(e, n) {
  10475. t.each(y[e], function(e) {
  10476. e(n)
  10477. }), delete y[e]
  10478. }
  10479. function h(t, n, i) {
  10480. return r.markPending(t.blobUri()), new e(function(e) {
  10481. var o, a, l = function() {};
  10482. try {
  10483. var c = function() {
  10484. o && (o.close(), a = l)
  10485. },
  10486. h = function(n) {
  10487. c(), r.markUploaded(t.blobUri(), n), f(t.blobUri(), u(t, n)), e(u(t, n))
  10488. },
  10489. p = function() {
  10490. c(), r.removeFailed(t.blobUri()), f(t.blobUri(), d(t, p)), e(d(t, p))
  10491. };
  10492. a = function(e) {
  10493. e < 0 || e > 100 || (o || (o = i()), o.progressBar.value(e))
  10494. }, n(s(t), h, p, a)
  10495. } catch (m) {
  10496. e(d(t, m.message))
  10497. }
  10498. })
  10499. }
  10500. function p(e) {
  10501. return e === l
  10502. }
  10503. function m(t) {
  10504. var n = t.blobUri();
  10505. return new e(function(e) {
  10506. y[n] = y[n] || [], y[n].push(e)
  10507. })
  10508. }
  10509. function g(n, o) {
  10510. return n = t.grep(n, function(e) {
  10511. return !r.isUploaded(e.blobUri())
  10512. }), e.all(t.map(n, function(e) {
  10513. return r.isPending(e.blobUri()) ? m(e) : h(e, i.handler, o)
  10514. }))
  10515. }
  10516. function v(e, t) {
  10517. return !i.url && p(i.handler) ? c() : g(e, t)
  10518. }
  10519. var y = {};
  10520. return i = t.extend({
  10521. credentials: !1,
  10522. handler: l
  10523. }, i), {
  10524. upload: v
  10525. }
  10526. }
  10527. }), r(qe, [c], function(e) {
  10528. function t(t) {
  10529. return new e(function(e) {
  10530. var n = new XMLHttpRequest;
  10531. n.open("GET", t, !0), n.responseType = "blob", n.onload = function() {
  10532. 200 == this.status && e(this.response)
  10533. }, n.send()
  10534. })
  10535. }
  10536. function n(e) {
  10537. var t, n;
  10538. return e = decodeURIComponent(e).split(","), n = /data:([^;]+)/.exec(e[0]), n && (t = n[1]), {
  10539. type: t,
  10540. data: e[1]
  10541. }
  10542. }
  10543. function r(t) {
  10544. return new e(function(e) {
  10545. var r, i, o;
  10546. t = n(t);
  10547. try {
  10548. r = atob(t.data)
  10549. } catch (a) {
  10550. return void e(new Blob([]))
  10551. }
  10552. for (i = new Uint8Array(r.length), o = 0; o < i.length; o++) i[o] = r.charCodeAt(o);
  10553. e(new Blob([i], {
  10554. type: t.type
  10555. }))
  10556. })
  10557. }
  10558. function i(e) {
  10559. return 0 === e.indexOf("blob:") ? t(e) : 0 === e.indexOf("data:") ? r(e) : null
  10560. }
  10561. function o(t) {
  10562. return new e(function(e) {
  10563. var n = new FileReader;
  10564. n.onloadend = function() {
  10565. e(n.result)
  10566. }, n.readAsDataURL(t)
  10567. })
  10568. }
  10569. return {
  10570. uriToBlob: i,
  10571. blobToDataUri: o,
  10572. parseDataUri: n
  10573. }
  10574. }), r(je, [c, p, z, qe, d], function(e, t, n, r, i) {
  10575. var o = 0;
  10576. return function(a, s) {
  10577. function l(l, u) {
  10578. function d(e, t) {
  10579. var n, i;
  10580. return 0 === e.src.indexOf("blob:") ? (i = s.getByUri(e.src), void(i && t({
  10581. image: e,
  10582. blobInfo: i
  10583. }))) : (n = r.parseDataUri(e.src).data, i = s.findFirst(function(e) {
  10584. return e.base64() === n
  10585. }), void(i ? t({
  10586. image: e,
  10587. blobInfo: i
  10588. }) : r.uriToBlob(e.src).then(function(r) {
  10589. var i = "blobid" + o++,
  10590. a = s.create(i, r, n);
  10591. s.add(a), t({
  10592. image: e,
  10593. blobInfo: a
  10594. })
  10595. })))
  10596. }
  10597. var f, h;
  10598. return u || (u = n.constant(!0)), f = t.filter(l.getElementsByTagName("img"), function(e) {
  10599. var t = e.src;
  10600. return !!i.fileApi && (!e.hasAttribute("data-mce-bogus") && (!e.hasAttribute("data-mce-placeholder") && (!(!t || t == i.transparentSrc) && (0 === t.indexOf("blob:") ? !a.isUploaded(t) : 0 === t.indexOf("data:") && u(e)))))
  10601. }), h = t.map(f, function(t) {
  10602. var n;
  10603. return c[t.src] ? new e(function(e) {
  10604. c[t.src].then(function(n) {
  10605. e({
  10606. image: t,
  10607. blobInfo: n.blobInfo
  10608. })
  10609. })
  10610. }) : (n = new e(function(e) {
  10611. d(t, e)
  10612. }).then(function(e) {
  10613. return delete c[e.image.src], e
  10614. })["catch"](function(e) {
  10615. return delete c[t.src], e
  10616. }), c[t.src] = n, n)
  10617. }), e.all(h)
  10618. }
  10619. var c = {};
  10620. return {
  10621. findAll: l
  10622. }
  10623. }
  10624. }), r(Ye, [p, z], function(e, t) {
  10625. return function() {
  10626. function n(e, t, n, r) {
  10627. return {
  10628. id: u(e),
  10629. filename: u(r || e),
  10630. blob: u(t),
  10631. base64: u(n),
  10632. blobUri: u(URL.createObjectURL(t))
  10633. }
  10634. }
  10635. function r(e) {
  10636. i(e.id()) || c.push(e)
  10637. }
  10638. function i(e) {
  10639. return o(function(t) {
  10640. return t.id() === e
  10641. })
  10642. }
  10643. function o(t) {
  10644. return e.filter(c, t)[0]
  10645. }
  10646. function a(e) {
  10647. return o(function(t) {
  10648. return t.blobUri() == e
  10649. })
  10650. }
  10651. function s(t) {
  10652. c = e.filter(c, function(e) {
  10653. return e.blobUri() !== t || (URL.revokeObjectURL(e.blobUri()), !1)
  10654. })
  10655. }
  10656. function l() {
  10657. e.each(c, function(e) {
  10658. URL.revokeObjectURL(e.blobUri())
  10659. }), c = []
  10660. }
  10661. var c = [],
  10662. u = t.constant;
  10663. return {
  10664. create: n,
  10665. add: r,
  10666. get: i,
  10667. getByUri: a,
  10668. findFirst: o,
  10669. removeByUri: s,
  10670. destroy: l
  10671. }
  10672. }
  10673. }), r(Xe, [], function() {
  10674. return function() {
  10675. function e(e, t) {
  10676. return {
  10677. status: e,
  10678. resultUri: t
  10679. }
  10680. }
  10681. function t(e) {
  10682. return e in d
  10683. }
  10684. function n(e) {
  10685. var t = d[e];
  10686. return t ? t.resultUri : null
  10687. }
  10688. function r(e) {
  10689. return !!t(e) && d[e].status === c
  10690. }
  10691. function i(e) {
  10692. return !!t(e) && d[e].status === u
  10693. }
  10694. function o(t) {
  10695. d[t] = e(c, null)
  10696. }
  10697. function a(t, n) {
  10698. d[t] = e(u, n)
  10699. }
  10700. function s(e) {
  10701. delete d[e]
  10702. }
  10703. function l() {
  10704. d = {}
  10705. }
  10706. var c = 1,
  10707. u = 2,
  10708. d = {};
  10709. return {
  10710. hasBlobUri: t,
  10711. getResultUri: n,
  10712. isPending: r,
  10713. isUploaded: i,
  10714. markPending: o,
  10715. markUploaded: a,
  10716. removeFailed: s,
  10717. destroy: l
  10718. }
  10719. }
  10720. }), r(Ke, [p, $e, je, Ye, Xe], function(e, t, n, r, i) {
  10721. return function(o) {
  10722. function a(e) {
  10723. return function(t) {
  10724. return o.selection ? e(t) : []
  10725. }
  10726. }
  10727. function s() {
  10728. return "?" + (new Date).getTime()
  10729. }
  10730. function l(e, t, n) {
  10731. var r = 0;
  10732. do r = e.indexOf(t, r), r !== -1 && (e = e.substring(0, r) + n + e.substr(r + t.length), r += n.length - t.length + 1); while (r !== -1);
  10733. return e
  10734. }
  10735. function c(e, t, n) {
  10736. return e = l(e, 'src="' + t + '"', 'src="' + n + '"'), e = l(e, 'data-mce-src="' + t + '"', 'data-mce-src="' + n + '"')
  10737. }
  10738. function u(t, n) {
  10739. e.each(o.undoManager.data, function(r) {
  10740. "fragmented" === r.type ? r.fragments = e.map(r.fragments, function(e) {
  10741. return c(e, t, n)
  10742. }) : r.content = c(r.content, t, n)
  10743. })
  10744. }
  10745. function d() {
  10746. return o.notificationManager.open({
  10747. text: o.translate("Image uploading..."),
  10748. type: "info",
  10749. timeout: -1,
  10750. progressBar: !0
  10751. })
  10752. }
  10753. function f(e, t) {
  10754. b.removeByUri(e.src), u(e.src, t), o.$(e).attr({
  10755. src: w.images_reuse_filename ? t + s() : t,
  10756. "data-mce-src": o.convertURL(t, "src")
  10757. })
  10758. }
  10759. function h(n) {
  10760. return C || (C = new t(E, {
  10761. url: w.images_upload_url,
  10762. basePath: w.images_upload_base_path,
  10763. credentials: w.images_upload_credentials,
  10764. handler: w.images_upload_handler
  10765. })), g().then(a(function(t) {
  10766. var r;
  10767. return r = e.map(t, function(e) {
  10768. return e.blobInfo
  10769. }), C.upload(r, d).then(a(function(r) {
  10770. return r = e.map(r, function(e, n) {
  10771. var r = t[n].image;
  10772. return e.status && o.settings.images_replace_blob_uris !== !1 && f(r, e.url), {
  10773. element: r,
  10774. status: e.status
  10775. }
  10776. }), n && n(r), r
  10777. }))
  10778. }))
  10779. }
  10780. function p(e) {
  10781. if (w.automatic_uploads !== !1) return h(e)
  10782. }
  10783. function m(e) {
  10784. return !w.images_dataimg_filter || w.images_dataimg_filter(e)
  10785. }
  10786. function g() {
  10787. return x || (x = new n(E, b)), x.findAll(o.getBody(), m).then(a(function(t) {
  10788. return e.each(t, function(e) {
  10789. u(e.image.src, e.blobInfo.blobUri()), e.image.src = e.blobInfo.blobUri(), e.image.removeAttribute("data-mce-src")
  10790. }), t
  10791. }))
  10792. }
  10793. function v() {
  10794. b.destroy(), E.destroy(), x = C = null
  10795. }
  10796. function y(t) {
  10797. return t.replace(/src="(blob:[^"]+)"/g, function(t, n) {
  10798. var r = E.getResultUri(n);
  10799. if (r) return 'src="' + r + '"';
  10800. var i = b.getByUri(n);
  10801. return i || (i = e.reduce(o.editorManager.editors, function(e, t) {
  10802. return e || t.editorUpload.blobCache.getByUri(n)
  10803. }, null)), i ? 'src="data:' + i.blob().type + ";base64," + i.base64() + '"' : t
  10804. })
  10805. }
  10806. var b = new r,
  10807. C, x, w = o.settings,
  10808. E = new i;
  10809. return o.on("setContent", function() {
  10810. o.settings.automatic_uploads !== !1 ? p() : g()
  10811. }), o.on("RawSaveContent", function(e) {
  10812. e.content = y(e.content)
  10813. }), o.on("getContent", function(e) {
  10814. e.source_view || "raw" == e.format || (e.content = y(e.content))
  10815. }), o.on("PostRender", function() {
  10816. o.parser.addNodeFilter("img", function(t) {
  10817. e.each(t, function(e) {
  10818. var t = e.attr("src");
  10819. if (!b.getByUri(t)) {
  10820. var n = E.getResultUri(t);
  10821. n && e.attr("src", n)
  10822. }
  10823. })
  10824. })
  10825. }), {
  10826. blobCache: b,
  10827. uploadImages: h,
  10828. uploadImagesAuto: p,
  10829. scanForImages: g,
  10830. destroy: v
  10831. }
  10832. }
  10833. }), r(Ge, [k, $, _, T, g, W, u], function(e, t, n, r, i, o, a) {
  10834. var s = n.isContentEditableFalse;
  10835. return function(t, n) {
  10836. function r(e, n) {
  10837. var r = o.collapse(e.getBoundingClientRect(), n),
  10838. i, a, s, l, c;
  10839. return "BODY" == t.tagName ? (i = t.ownerDocument.documentElement, a = t.scrollLeft || i.scrollLeft, s = t.scrollTop || i.scrollTop) : (c = t.getBoundingClientRect(), a = t.scrollLeft - c.left, s = t.scrollTop - c.top), r.left += a, r.right += a, r.top += s, r.bottom += s, r.width = 1, l = e.offsetWidth - e.clientWidth, l > 0 && (n && (l *= -1), r.left += l, r.right += l), r
  10840. }
  10841. function l() {
  10842. var n, r, o, a, s;
  10843. for (n = i("*[contentEditable=false]", t), a = 0; a < n.length; a++) r = n[a], o = r.previousSibling, e.endsWithCaretContainer(o) && (s = o.data, 1 == s.length ? o.parentNode.removeChild(o) : o.deleteData(s.length - 1, 1)), o = r.nextSibling, e.startsWithCaretContainer(o) && (s = o.data, 1 == s.length ? o.parentNode.removeChild(o) : o.deleteData(0, 1));
  10844. return null
  10845. }
  10846. function c(o, a) {
  10847. var l, c;
  10848. return u(), n(a) ? (g = e.insertBlock("p", a, o), l = r(a, o), i(g).css("top", l.top), m = i('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(l).appendTo(t), o && m.addClass("mce-visual-caret-before"), d(), c = a.ownerDocument.createRange(), c.setStart(g, 0), c.setEnd(g, 0), c) : (g = e.insertInline(a, o), c = a.ownerDocument.createRange(), s(g.nextSibling) ? (c.setStart(g, 0), c.setEnd(g, 0)) : (c.setStart(g, 1), c.setEnd(g, 1)), c)
  10849. }
  10850. function u() {
  10851. l(), g && (e.remove(g), g = null), m && (m.remove(), m = null), clearInterval(p)
  10852. }
  10853. function d() {
  10854. p = a.setInterval(function() {
  10855. i("div.mce-visual-caret", t).toggleClass("mce-visual-caret-hidden")
  10856. }, 500)
  10857. }
  10858. function f() {
  10859. a.clearInterval(p)
  10860. }
  10861. function h() {
  10862. return ".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"
  10863. }
  10864. var p, m, g;
  10865. return {
  10866. show: c,
  10867. hide: u,
  10868. getCss: h,
  10869. destroy: f
  10870. }
  10871. }
  10872. }), r(Je, [p, _, W], function(e, t, n) {
  10873. function r(i) {
  10874. function o(t) {
  10875. return e.map(t, function(e) {
  10876. return e = n.clone(e), e.node = i, e
  10877. })
  10878. }
  10879. if (e.isArray(i)) return e.reduce(i, function(e, t) {
  10880. return e.concat(r(t))
  10881. }, []);
  10882. if (t.isElement(i)) return o(i.getClientRects());
  10883. if (t.isText(i)) {
  10884. var a = i.ownerDocument.createRange();
  10885. return a.setStart(i, 0), a.setEnd(i, i.data.length), o(a.getClientRects())
  10886. }
  10887. }
  10888. return {
  10889. getClientRects: r
  10890. }
  10891. }), r(Qe, [z, p, Je, U, ie, oe, $, W], function(e, t, n, r, i, o, a, s) {
  10892. function l(e, t, n, o) {
  10893. for (; o = i.findNode(o, e, r.isEditableCaretCandidate, t);)
  10894. if (n(o)) return
  10895. }
  10896. function c(e, r, i, o, a, s) {
  10897. function c(o) {
  10898. var s, l, c;
  10899. for (c = n.getClientRects(o), e == -1 && (c = c.reverse()), s = 0; s < c.length; s++)
  10900. if (l = c[s], !i(l, h)) {
  10901. if (f.length > 0 && r(l, t.last(f)) && u++, l.line = u, a(l)) return !0;
  10902. f.push(l)
  10903. }
  10904. }
  10905. var u = 0,
  10906. d, f = [],
  10907. h;
  10908. return (h = t.last(s.getClientRects())) ? (d = s.getNode(), c(d), l(e, o, c, d), f) : f
  10909. }
  10910. function u(e, t) {
  10911. return t.line > e
  10912. }
  10913. function d(e, t) {
  10914. return t.line === e
  10915. }
  10916. function f(e, n, r, i) {
  10917. function l(n) {
  10918. return 1 == e ? t.last(n.getClientRects()) : t.last(n.getClientRects())
  10919. }
  10920. var c = new o(n),
  10921. u, d, f, h, p = [],
  10922. m = 0,
  10923. g, v;
  10924. 1 == e ? (u = c.next, d = s.isBelow, f = s.isAbove, h = a.after(i)) : (u = c.prev, d = s.isAbove, f = s.isBelow, h = a.before(i)), v = l(h);
  10925. do
  10926. if (h.isVisible() && (g = l(h), !f(g, v))) {
  10927. if (p.length > 0 && d(g, t.last(p)) && m++, g = s.clone(g), g.position = h, g.line = m, r(g)) return p;
  10928. p.push(g)
  10929. }
  10930. while (h = u(h));
  10931. return p
  10932. }
  10933. var h = e.curry,
  10934. p = h(c, -1, s.isAbove, s.isBelow),
  10935. m = h(c, 1, s.isBelow, s.isAbove);
  10936. return {
  10937. upUntil: p,
  10938. downUntil: m,
  10939. positionsUntil: f,
  10940. isAboveLine: h(u),
  10941. isLine: h(d)
  10942. }
  10943. }), r(Ze, [z, p, _, Je, W, ie, U], function(e, t, n, r, i, o, a) {
  10944. function s(e, t) {
  10945. return Math.abs(e.left - t)
  10946. }
  10947. function l(e, t) {
  10948. return Math.abs(e.right - t)
  10949. }
  10950. function c(e, n) {
  10951. function r(e, t) {
  10952. return e >= t.left && e <= t.right
  10953. }
  10954. return t.reduce(e, function(e, t) {
  10955. var i, o;
  10956. return i = Math.min(s(e, n), l(e, n)), o = Math.min(s(t, n), l(t, n)), r(n, t) ? t : r(n, e) ? e : o == i && m(t.node) ? t : o < i ? t : e
  10957. })
  10958. }
  10959. function u(e, t, n, r) {
  10960. for (; r = g(r, e, a.isEditableCaretCandidate, t);)
  10961. if (n(r)) return
  10962. }
  10963. function d(e, n) {
  10964. function o(e, i) {
  10965. var o;
  10966. return o = t.filter(r.getClientRects(i), function(t) {
  10967. return !e(t, n)
  10968. }), a = a.concat(o), 0 === o.length
  10969. }
  10970. var a = [];
  10971. return a.push(n), u(-1, e, v(o, i.isAbove), n.node), u(1, e, v(o, i.isBelow), n.node), a
  10972. }
  10973. function f(e) {
  10974. return t.filter(t.toArray(e.getElementsByTagName("*")), m)
  10975. }
  10976. function h(e, t) {
  10977. return {
  10978. node: e.node,
  10979. before: s(e, t) < l(e, t)
  10980. }
  10981. }
  10982. function p(e, n, i) {
  10983. var o, a;
  10984. return o = r.getClientRects(f(e)), o = t.filter(o, function(e) {
  10985. return i >= e.top && i <= e.bottom
  10986. }), a = c(o, n), a && (a = c(d(e, a), n), a && m(a.node)) ? h(a, n) : null
  10987. }
  10988. var m = n.isContentEditableFalse,
  10989. g = o.findNode,
  10990. v = e.curry;
  10991. return {
  10992. findClosestClientRect: c,
  10993. findLineNodeRects: d,
  10994. closestCaret: p
  10995. }
  10996. }), r(et, [], function() {
  10997. var e = function(e) {
  10998. var t, n, r, i;
  10999. return i = e.getBoundingClientRect(), t = e.ownerDocument, n = t.documentElement, r = t.defaultView, {
  11000. top: i.top + r.pageYOffset - n.clientTop,
  11001. left: i.left + r.pageXOffset - n.clientLeft
  11002. }
  11003. },
  11004. t = function(t) {
  11005. return t.inline ? e(t.getBody()) : {
  11006. left: 0,
  11007. top: 0
  11008. }
  11009. },
  11010. n = function(e) {
  11011. var t = e.getBody();
  11012. return e.inline ? {
  11013. left: t.scrollLeft,
  11014. top: t.scrollTop
  11015. } : {
  11016. left: 0,
  11017. top: 0
  11018. }
  11019. },
  11020. r = function(e) {
  11021. var t = e.getBody(),
  11022. n = e.getDoc().documentElement,
  11023. r = {
  11024. left: t.scrollLeft,
  11025. top: t.scrollTop
  11026. },
  11027. i = {
  11028. left: t.scrollLeft || n.scrollLeft,
  11029. top: t.scrollTop || n.scrollTop
  11030. };
  11031. return e.inline ? r : i
  11032. },
  11033. i = function(t, n) {
  11034. if (n.target.ownerDocument !== t.getDoc()) {
  11035. var i = e(t.getContentAreaContainer()),
  11036. o = r(t);
  11037. return {
  11038. left: n.pageX - i.left + o.left,
  11039. top: n.pageY - i.top + o.top
  11040. }
  11041. }
  11042. return {
  11043. left: n.pageX,
  11044. top: n.pageY
  11045. }
  11046. },
  11047. o = function(e, t, n) {
  11048. return {
  11049. pageX: n.left - e.left + t.left,
  11050. pageY: n.top - e.top + t.top
  11051. }
  11052. },
  11053. a = function(e, r) {
  11054. return o(t(e), n(e), i(e, r))
  11055. };
  11056. return {
  11057. calc: a
  11058. }
  11059. }), r(tt, [_, p, z, u, w, et], function(e, t, n, r, i, o) {
  11060. var a = e.isContentEditableFalse,
  11061. s = e.isContentEditableTrue,
  11062. l = function(e) {
  11063. return a(e)
  11064. },
  11065. c = function(e, t, n) {
  11066. return t !== n && !e.dom.isChildOf(t, n) && !a(t)
  11067. },
  11068. u = function(e) {
  11069. var t = e.cloneNode(!0);
  11070. return t.removeAttribute("data-mce-selected"), t
  11071. },
  11072. d = function(e, t, n, r) {
  11073. var i = t.cloneNode(!0);
  11074. e.dom.setStyles(i, {
  11075. width: n,
  11076. height: r
  11077. }), e.dom.setAttrib(i, "data-mce-selected", null);
  11078. var o = e.dom.create("div", {
  11079. "class": "mce-drag-container",
  11080. "data-mce-bogus": "all",
  11081. unselectable: "on",
  11082. contenteditable: "false"
  11083. });
  11084. return e.dom.setStyles(o, {
  11085. position: "absolute",
  11086. opacity: .5,
  11087. overflow: "hidden",
  11088. border: 0,
  11089. padding: 0,
  11090. margin: 0,
  11091. width: n,
  11092. height: r
  11093. }), e.dom.setStyles(i, {
  11094. margin: 0,
  11095. boxSizing: "border-box"
  11096. }), o.appendChild(i), o
  11097. },
  11098. f = function(e, t) {
  11099. e.parentNode !== t && t.appendChild(e)
  11100. },
  11101. h = function(e, t, n, r, i, o) {
  11102. var a = 0,
  11103. s = 0;
  11104. e.style.left = t.pageX + "px", e.style.top = t.pageY + "px", t.pageX + n > i && (a = t.pageX + n - i), t.pageY + r > o && (s = t.pageY + r - o), e.style.width = n - a + "px", e.style.height = r - s + "px"
  11105. },
  11106. p = function(e) {
  11107. e && e.parentNode && e.parentNode.removeChild(e)
  11108. },
  11109. m = function(e) {
  11110. return 0 === e.button
  11111. },
  11112. g = function(e) {
  11113. return e.element
  11114. },
  11115. v = function(e, t) {
  11116. return {
  11117. pageX: t.pageX - e.relX,
  11118. pageY: t.pageY + 5
  11119. }
  11120. },
  11121. y = function(e, r) {
  11122. return function(i) {
  11123. if (m(i)) {
  11124. var o = t.find(r.dom.getParents(i.target), n.or(a, s));
  11125. if (l(o)) {
  11126. var c = r.dom.getPos(o),
  11127. u = r.getBody(),
  11128. f = r.getDoc().documentElement;
  11129. e.element = o, e.screenX = i.screenX, e.screenY = i.screenY, e.maxX = (r.inline ? u.scrollWidth : f.offsetWidth) - 2, e.maxY = (r.inline ? u.scrollHeight : f.offsetHeight) - 2, e.relX = i.pageX - c.x, e.relY = i.pageY - c.y, e.width = o.offsetWidth, e.height = o.offsetHeight, e.ghost = d(r, o, e.width, e.height)
  11130. }
  11131. }
  11132. }
  11133. },
  11134. b = function(e, t) {
  11135. var n = r.throttle(function(e, n) {
  11136. t._selectionOverrides.hideFakeCaret(), t.selection.placeCaretAt(e, n)
  11137. }, 0);
  11138. return function(r) {
  11139. var i = Math.max(Math.abs(r.screenX - e.screenX), Math.abs(r.screenY - e.screenY));
  11140. if (g(e) && !e.dragging && i > 10) {
  11141. var a = t.fire("dragstart", {
  11142. target: e.element
  11143. });
  11144. if (a.isDefaultPrevented()) return;
  11145. e.dragging = !0, t.focus()
  11146. }
  11147. if (e.dragging) {
  11148. var s = v(e, o.calc(t, r));
  11149. f(e.ghost, t.getBody()), h(e.ghost, s, e.width, e.height, e.maxX, e.maxY), n(r.clientX, r.clientY)
  11150. }
  11151. }
  11152. },
  11153. C = function(e) {
  11154. var t = e.getSel().getRangeAt(0),
  11155. n = t.startContainer;
  11156. return 3 === n.nodeType ? n.parentNode : n
  11157. },
  11158. x = function(e, t) {
  11159. return function(n) {
  11160. if (e.dragging && c(t, C(t.selection), e.element)) {
  11161. var r = u(e.element),
  11162. i = t.fire("drop", {
  11163. targetClone: r,
  11164. clientX: n.clientX,
  11165. clientY: n.clientY
  11166. });
  11167. i.isDefaultPrevented() || (r = i.targetClone, t.undoManager.transact(function() {
  11168. p(e.element), t.insertContent(t.dom.getOuterHTML(r)), t._selectionOverrides.hideFakeCaret()
  11169. }))
  11170. }
  11171. E(e)
  11172. }
  11173. },
  11174. w = function(e, t) {
  11175. return function() {
  11176. E(e), e.dragging && t.fire("dragend")
  11177. }
  11178. },
  11179. E = function(e) {
  11180. e.dragging = !1, e.element = null, p(e.ghost)
  11181. },
  11182. N = function(e) {
  11183. var t = {},
  11184. n, r, o, a, s, l;
  11185. n = i.DOM, l = document, r = y(t, e), o = b(t, e), a = x(t, e), s = w(t, e), e.on("mousedown", r), e.on("mousemove", o), e.on("mouseup", a), n.bind(l, "mousemove", o), n.bind(l, "mouseup", s), e.on("remove", function() {
  11186. n.unbind(l, "mousemove", o), n.unbind(l, "mouseup", s)
  11187. })
  11188. },
  11189. _ = function(e) {
  11190. e.on("drop", function(t) {
  11191. var n = "undefined" != typeof t.clientX ? e.getDoc().elementFromPoint(t.clientX, t.clientY) : null;
  11192. (a(n) || a(e.dom.getContentEditableParent(n))) && t.preventDefault()
  11193. })
  11194. },
  11195. S = function(e) {
  11196. N(e), _(e)
  11197. };
  11198. return {
  11199. init: S
  11200. }
  11201. }), r(nt, [d, oe, $, k, ie, Ge, Qe, Ze, _, T, W, I, z, p, u, tt], function(e, t, n, r, i, o, a, s, l, c, u, d, f, h, p, m) {
  11202. function g(e, t) {
  11203. for (; t = e(t);)
  11204. if (t.isVisible()) return t;
  11205. return t
  11206. }
  11207. function v(c) {
  11208. function v(e) {
  11209. return c.dom.hasClass(e, "mce-offscreen-selection")
  11210. }
  11211. function _() {
  11212. var e = c.dom.get(le);
  11213. return e ? e.getElementsByTagName("*")[0] : e
  11214. }
  11215. function S(e) {
  11216. return c.dom.isBlock(e)
  11217. }
  11218. function k(e) {
  11219. e && c.selection.setRng(e)
  11220. }
  11221. function T() {
  11222. return c.selection.getRng()
  11223. }
  11224. function R(e, t) {
  11225. c.selection.scrollIntoView(e, t)
  11226. }
  11227. function A(e, t, n) {
  11228. var r;
  11229. return r = c.fire("ShowCaret", {
  11230. target: t,
  11231. direction: e,
  11232. before: n
  11233. }), r.isDefaultPrevented() ? null : (R(t, e === -1), se.show(n, t))
  11234. }
  11235. function B(e) {
  11236. var t;
  11237. return t = c.fire("BeforeObjectSelected", {
  11238. target: e
  11239. }), t.isDefaultPrevented() ? null : D(e)
  11240. }
  11241. function D(e) {
  11242. var t = e.ownerDocument.createRange();
  11243. return t.selectNode(e), t
  11244. }
  11245. function L(e, t) {
  11246. var n = i.isInSameBlock(e, t);
  11247. return !(n || !l.isBr(e.getNode())) || n
  11248. }
  11249. function M(e, t) {
  11250. return t = i.normalizeRange(e, re, t), e == -1 ? n.fromRangeStart(t) : n.fromRangeEnd(t)
  11251. }
  11252. function P(e) {
  11253. return r.isCaretContainerBlock(e.startContainer)
  11254. }
  11255. function O(e, t, n, r) {
  11256. var i, o, a, s;
  11257. return !r.collapsed && (i = N(r), C(i)) ? A(e, i, e == -1) : (s = P(r), o = M(e, r), n(o) ? B(o.getNode(e == -1)) : (o = t(o)) ? n(o) ? A(e, o.getNode(e == -1), 1 == e) : (a = t(o), n(a) && L(o, a) ? A(e, a.getNode(e == -1), 1 == e) : s ? $(o.toRange()) : null) : s ? r : null)
  11258. }
  11259. function H(e, t, n) {
  11260. var r, i, o, l, c, u, d, f, p;
  11261. if (p = N(n), r = M(e, n), i = t(re, a.isAboveLine(1), r), o = h.filter(i, a.isLine(1)), c = h.last(r.getClientRects()), E(r) && (p = r.getNode()), w(r) && (p = r.getNode(!0)), !c) return null;
  11262. if (u = c.left, l = s.findClosestClientRect(o, u), l && C(l.node)) return d = Math.abs(u - l.left), f = Math.abs(u - l.right), A(e, l.node, d < f);
  11263. if (p) {
  11264. var m = a.positionsUntil(e, re, a.isAboveLine(1), p);
  11265. if (l = s.findClosestClientRect(h.filter(m, a.isLine(1)), u)) return $(l.position.toRange());
  11266. if (l = h.last(h.filter(m, a.isLine(0)))) return $(l.position.toRange())
  11267. }
  11268. }
  11269. function I(t, r) {
  11270. function i() {
  11271. var t = c.dom.create(c.settings.forced_root_block);
  11272. return (!e.ie || e.ie >= 11) && (t.innerHTML = '<br data-mce-bogus="1">'), t
  11273. }
  11274. var o, a, s;
  11275. if (r.collapsed && c.settings.forced_root_block) {
  11276. if (o = c.dom.getParent(r.startContainer, "PRE"), !o) return;
  11277. a = 1 == t ? oe(n.fromRangeStart(r)) : ae(n.fromRangeStart(r)), a || (s = i(), 1 == t ? c.$(o).after(s) : c.$(o).before(s), c.selection.select(s, !0), c.selection.collapse())
  11278. }
  11279. }
  11280. function F(e, t, n, r) {
  11281. var i;
  11282. return (i = O(e, t, n, r)) ? i : (i = I(e, r), i ? i : null)
  11283. }
  11284. function z(e, t, n) {
  11285. var r;
  11286. return (r = H(e, t, n)) ? r : (r = I(e, n), r ? r : null)
  11287. }
  11288. function U() {
  11289. return ue("*[data-mce-caret]")[0]
  11290. }
  11291. function W(e) {
  11292. e.hasAttribute("data-mce-caret") && (r.showCaretContainerBlock(e), k(T()), R(e[0]))
  11293. }
  11294. function V(e) {
  11295. var t, r;
  11296. return e = i.normalizeRange(1, re, e), t = n.fromRangeStart(e), C(t.getNode()) ? A(1, t.getNode(), !t.isAtEnd()) : C(t.getNode(!0)) ? A(1, t.getNode(!0), !1) : (r = c.dom.getParent(t.getNode(), f.or(C, b)), C(r) ? A(1, r, !1) : null)
  11297. }
  11298. function $(e) {
  11299. var t;
  11300. return e && e.collapsed ? (t = V(e), t ? t : e) : e
  11301. }
  11302. function q(e) {
  11303. var t, i, o, a;
  11304. return C(e) ? (C(e.previousSibling) && (o = e.previousSibling), i = ae(n.before(e)), i || (t = oe(n.after(e))), t && x(t.getNode()) && (a = t.getNode()), r.remove(e.previousSibling), r.remove(e.nextSibling), c.dom.remove(e), c.dom.isEmpty(c.getBody()) ? (c.setContent(""), void c.focus()) : o ? n.after(o).toRange() : a ? n.before(a).toRange() : i ? i.toRange() : t ? t.toRange() : null) : null
  11305. }
  11306. function j(e) {
  11307. var t = c.schema.getTextBlockElements();
  11308. return e.nodeName in t
  11309. }
  11310. function Y(e) {
  11311. return c.dom.isEmpty(e)
  11312. }
  11313. function X(e, t, r) {
  11314. var i = c.dom,
  11315. o, a, s, l;
  11316. if (o = i.getParent(t.getNode(), i.isBlock), a = i.getParent(r.getNode(), i.isBlock), e === -1) {
  11317. if (l = r.getNode(!0), w(r) && S(l)) return j(o) ? (Y(o) && i.remove(o), n.after(l).toRange()) : q(r.getNode(!0))
  11318. } else if (l = t.getNode(), E(t) && S(l)) return j(a) ? (Y(a) && i.remove(a), n.before(l).toRange()) : q(t.getNode());
  11319. if (o === a || !j(o) || !j(a)) return null;
  11320. for (; s = o.firstChild;) a.appendChild(s);
  11321. return c.dom.remove(o), r.toRange()
  11322. }
  11323. function K(e, t, n, i) {
  11324. var o, a, s, l;
  11325. return !i.collapsed && (o = N(i), C(o)) ? $(q(o)) : (a = M(e, i), n(a) && r.isCaretContainerBlock(i.startContainer) ? (l = e == -1 ? ie.prev(a) : ie.next(a), l ? $(l.toRange()) : i) : t(a) ? $(q(a.getNode(e == -1))) : (s = e == -1 ? ie.prev(a) : ie.next(a), t(s) ? e === -1 ? X(e, a, s) : X(e, s, a) : void 0))
  11326. }
  11327. function G() {
  11328. function i(e, t) {
  11329. var n = t(T());
  11330. n && !e.isDefaultPrevented() && (e.preventDefault(), k(n))
  11331. }
  11332. function o(e) {
  11333. for (var t = c.getBody(); e && e != t;) {
  11334. if (b(e) || C(e)) return e;
  11335. e = e.parentNode
  11336. }
  11337. return null
  11338. }
  11339. function l(e, t, n) {
  11340. return !n.collapsed && h.reduce(n.getClientRects(), function(n, r) {
  11341. return n || u.containsXY(r, e, t)
  11342. }, !1)
  11343. }
  11344. function f(e) {
  11345. var t = !1;
  11346. e.on("touchstart", function() {
  11347. t = !1
  11348. }), e.on("touchmove", function() {
  11349. t = !0
  11350. }), e.on("touchend", function(e) {
  11351. var n = o(e.target);
  11352. C(n) && (t || (e.preventDefault(), Z(B(n))))
  11353. })
  11354. }
  11355. function g() {
  11356. var e, t = o(c.selection.getNode());
  11357. b(t) && S(t) && c.dom.isEmpty(t) && (e = c.dom.create("br", {
  11358. "data-mce-bogus": "1"
  11359. }), c.$(t).empty().append(e), c.selection.setRng(n.before(e).toRange()))
  11360. }
  11361. function x(e) {
  11362. var t = U();
  11363. if (t) return "compositionstart" == e.type ? (e.preventDefault(), e.stopPropagation(), void W(t)) : void(r.hasContent(t) && W(t))
  11364. }
  11365. function N(e) {
  11366. var t;
  11367. switch (e.keyCode) {
  11368. case d.DELETE:
  11369. t = g();
  11370. break;
  11371. case d.BACKSPACE:
  11372. t = g()
  11373. }
  11374. t && e.preventDefault()
  11375. }
  11376. var R = y(F, 1, oe, E),
  11377. D = y(F, -1, ae, w),
  11378. L = y(K, 1, E, w),
  11379. M = y(K, -1, w, E),
  11380. P = y(z, -1, a.upUntil),
  11381. O = y(z, 1, a.downUntil);
  11382. c.on("mouseup", function() {
  11383. var e = T();
  11384. e.collapsed && k(V(e))
  11385. }), c.on("click", function(e) {
  11386. var t;
  11387. t = o(e.target), t && (C(t) && (e.preventDefault(), c.focus()), b(t) && c.dom.isChildOf(t, c.selection.getNode()) && ee())
  11388. }), c.on("blur NewBlock", function() {
  11389. ee(), ne()
  11390. });
  11391. var H = function(e) {
  11392. var r = new t(e);
  11393. if (!e.firstChild) return !1;
  11394. var i = n.before(e.firstChild),
  11395. o = r.next(i);
  11396. return o && !E(o) && !w(o)
  11397. },
  11398. I = function(e, t) {
  11399. var n = c.dom.getParent(e, c.dom.isBlock),
  11400. r = c.dom.getParent(t, c.dom.isBlock);
  11401. return n === r
  11402. },
  11403. j = function(e) {
  11404. return !(e.keyCode >= 112 && e.keyCode <= 123)
  11405. },
  11406. Y = function(e, t) {
  11407. var n = c.dom.getParent(e, c.dom.isBlock),
  11408. r = c.dom.getParent(t, c.dom.isBlock);
  11409. return n && !I(n, r) && H(n)
  11410. };
  11411. f(c), c.on("mousedown", function(e) {
  11412. var t;
  11413. if (t = o(e.target)) C(t) ? (e.preventDefault(), Z(B(t))) : l(e.clientX, e.clientY, c.selection.getRng()) || c.selection.placeCaretAt(e.clientX, e.clientY);
  11414. else {
  11415. ee(), ne();
  11416. var n = s.closestCaret(re, e.clientX, e.clientY);
  11417. n && (Y(e.target, n.node) || (e.preventDefault(), c.getBody().focus(), k(A(1, n.node, n.before))))
  11418. }
  11419. }), c.on("keydown", function(e) {
  11420. if (!d.modifierPressed(e)) switch (e.keyCode) {
  11421. case d.RIGHT:
  11422. i(e, R);
  11423. break;
  11424. case d.DOWN:
  11425. i(e, O);
  11426. break;
  11427. case d.LEFT:
  11428. i(e, D);
  11429. break;
  11430. case d.UP:
  11431. i(e, P);
  11432. break;
  11433. case d.DELETE:
  11434. i(e, L);
  11435. break;
  11436. case d.BACKSPACE:
  11437. i(e, M);
  11438. break;
  11439. default:
  11440. C(c.selection.getNode()) && j(e) && e.preventDefault()
  11441. }
  11442. }), c.on("keyup compositionstart", function(e) {
  11443. x(e), N(e)
  11444. }, !0), c.on("cut", function() {
  11445. var e = c.selection.getNode();
  11446. C(e) && p.setEditorTimeout(c, function() {
  11447. k($(q(e)))
  11448. })
  11449. }), c.on("getSelectionRange", function(e) {
  11450. var t = e.range;
  11451. if (ce) {
  11452. if (!ce.parentNode) return void(ce = null);
  11453. t = t.cloneRange(), t.selectNode(ce), e.range = t
  11454. }
  11455. }), c.on("setSelectionRange", function(e) {
  11456. var t;
  11457. t = Z(e.range), t && (e.range = t)
  11458. }), c.on("AfterSetSelectionRange", function(e) {
  11459. var t = e.range;
  11460. Q(t) || ne(), v(t.startContainer.parentNode) || ee()
  11461. }), c.on("focus", function() {
  11462. p.setEditorTimeout(c, function() {
  11463. c.selection.setRng($(c.selection.getRng()))
  11464. }, 0)
  11465. }), c.on("copy", function(t) {
  11466. var n = t.clipboardData;
  11467. if (!t.isDefaultPrevented() && t.clipboardData && !e.ie) {
  11468. var r = _();
  11469. r && (t.preventDefault(), n.clearData(), n.setData("text/html", r.outerHTML), n.setData("text/plain", r.outerText))
  11470. }
  11471. }), m.init(c)
  11472. }
  11473. function J() {
  11474. var e = c.contentStyles,
  11475. t = ".mce-content-body";
  11476. e.push(se.getCss()), e.push(t + " .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}" + t + " *[contentEditable=false] {cursor: default;}" + t + " *[contentEditable=true] {cursor: text;}")
  11477. }
  11478. function Q(e) {
  11479. return r.isCaretContainer(e.startContainer) || r.isCaretContainer(e.endContainer)
  11480. }
  11481. function Z(t) {
  11482. var n, r = c.$,
  11483. i = c.dom,
  11484. o, a, s, l, u, d, f, h, p;
  11485. if (!t) return null;
  11486. if (t.collapsed) {
  11487. if (!Q(t)) {
  11488. if (f = M(1, t), C(f.getNode())) return A(1, f.getNode(), !f.isAtEnd());
  11489. if (C(f.getNode(!0))) return A(1, f.getNode(!0), !1)
  11490. }
  11491. return null
  11492. }
  11493. return s = t.startContainer, l = t.startOffset, u = t.endOffset, 3 == s.nodeType && 0 == l && C(s.parentNode) && (s = s.parentNode, l = i.nodeIndex(s), s = s.parentNode), 1 != s.nodeType ? null : (u == l + 1 && (n = s.childNodes[l]), C(n) ? (h = p = n.cloneNode(!0), d = c.fire("ObjectSelected", {
  11494. target: n,
  11495. targetClone: h
  11496. }), d.isDefaultPrevented() ? null : (h = d.targetClone, o = r("#" + le), 0 === o.length && (o = r('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id", le), o.appendTo(c.getBody())), t = c.dom.createRng(), h === p && e.ie ? (o.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(h), t.setStartAfter(o[0].firstChild.firstChild), t.setEndAfter(h)) : (o.empty().append("\xa0").append(h).append("\xa0"), t.setStart(o[0].firstChild, 1), t.setEnd(o[0].lastChild, 0)), o.css({
  11497. top: i.getPos(n, c.getBody()).y
  11498. }), o[0].focus(), a = c.selection.getSel(), a.removeAllRanges(), a.addRange(t), c.$("*[data-mce-selected]").removeAttr("data-mce-selected"), n.setAttribute("data-mce-selected", 1), ce = n, t)) : null)
  11499. }
  11500. function ee() {
  11501. ce && (ce.removeAttribute("data-mce-selected"), c.$("#" + le).remove(), ce = null)
  11502. }
  11503. function te() {
  11504. se.destroy(), ce = null
  11505. }
  11506. function ne() {
  11507. se.hide()
  11508. }
  11509. var re = c.getBody(),
  11510. ie = new t(re),
  11511. oe = y(g, ie.next),
  11512. ae = y(g, ie.prev),
  11513. se = new o(c.getBody(), S),
  11514. le = "sel-" + c.dom.uniqueId(),
  11515. ce, ue = c.$;
  11516. return e.ceFalse && (G(), J()), {
  11517. showBlockCaretContainer: W,
  11518. hideFakeCaret: ne,
  11519. destroy: te
  11520. }
  11521. }
  11522. var y = f.curry,
  11523. b = l.isContentEditableTrue,
  11524. C = l.isContentEditableFalse,
  11525. x = l.isElement,
  11526. w = i.isAfterContentEditableFalse,
  11527. E = i.isBeforeContentEditableFalse,
  11528. N = c.getSelectedNode;
  11529. return v
  11530. }), r(rt, [], function() {
  11531. var e = 0,
  11532. t = function() {
  11533. var e = function() {
  11534. return Math.round(4294967295 * Math.random()).toString(36)
  11535. },
  11536. t = (new Date).getTime();
  11537. return "s" + t.toString(36) + e() + e() + e()
  11538. },
  11539. n = function(n) {
  11540. return n + e++ +t()
  11541. };
  11542. return {
  11543. uuid: n
  11544. }
  11545. }), r(it, [], function() {
  11546. var e = function(e, t, n) {
  11547. var r = e.sidebars ? e.sidebars : [];
  11548. r.push({
  11549. name: t,
  11550. settings: n
  11551. }), e.sidebars = r
  11552. };
  11553. return {
  11554. add: e
  11555. }
  11556. }), r(ot, [w, g, N, R, A, O, P, Y, J, te, ne, re, le, ce, E, f, Le, Ie, B, L, ze, d, m, u, Ue, We, Ve, Ke, nt, rt, it], function(e, n, r, i, o, a, s, l, c, u, d, f, h, p, m, g, v, y, b, C, x, w, E, N, _, S, k, T, R, A, B) {
  11557. function D(e, t, i) {
  11558. var o = this,
  11559. a, s, l;
  11560. a = o.documentBaseUrl = i.documentBaseURL, s = i.baseURI, l = i.defaultSettings, t = O({
  11561. id: e,
  11562. theme: "modern",
  11563. delta_width: 0,
  11564. delta_height: 0,
  11565. popup_css: "",
  11566. plugins: "",
  11567. document_base_url: a,
  11568. add_form_submit_trigger: !0,
  11569. submit_patch: !0,
  11570. add_unload_trigger: !0,
  11571. convert_urls: !0,
  11572. relative_urls: !0,
  11573. remove_script_host: !0,
  11574. object_resizing: !0,
  11575. doctype: "<!DOCTYPE html>",
  11576. visual: !0,
  11577. font_size_style_values: "xx-small,x-small,small,medium,large,x-large,xx-large",
  11578. font_size_legacy_values: "xx-small,small,medium,large,x-large,xx-large,300%",
  11579. forced_root_block: "p",
  11580. hidden_input: !0,
  11581. padd_empty_editor: !0,
  11582. render_ui: !0,
  11583. indentation: "30px",
  11584. inline_styles: !0,
  11585. convert_fonts_to_spans: !0,
  11586. indent: "simple",
  11587. indent_before: "p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",
  11588. indent_after: "p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",
  11589. validate: !0,
  11590. entity_encoding: "named",
  11591. url_converter: o.convertURL,
  11592. url_converter_scope: o,
  11593. ie7_compat: !0
  11594. }, l, t), l && l.external_plugins && t.external_plugins && (t.external_plugins = O({}, l.external_plugins, t.external_plugins)), o.settings = t, r.language = t.language || "en", r.languageLoad = t.language_load, r.baseURL = i.baseURL, o.id = t.id = e, o.setDirty(!1), o.plugins = {}, o.documentBaseURI = new p(t.document_base_url || a, {
  11595. base_uri: s
  11596. }), o.baseURI = s, o.contentCSS = [], o.contentStyles = [], o.shortcuts = new k(o), o.loadedCSS = {}, o.editorCommands = new h(o), o.suffix = i.suffix, o.editorManager = i, o.inline = t.inline, o.settings.content_editable = o.inline, t.cache_suffix && (w.cacheSuffix = t.cache_suffix.replace(/^[\?\&]+/, "")), t.override_viewport === !1 && (w.overrideViewPort = !1), i.fire("SetupEditor", o), o.execCallback("setup", o), o.$ = n.overrideDefaults(function() {
  11597. return {
  11598. context: o.inline ? o.getBody() : o.getDoc(),
  11599. element: o.getBody()
  11600. }
  11601. })
  11602. }
  11603. var L = e.DOM,
  11604. M = r.ThemeManager,
  11605. P = r.PluginManager,
  11606. O = E.extend,
  11607. H = E.each,
  11608. I = E.explode,
  11609. F = E.inArray,
  11610. z = E.trim,
  11611. U = E.resolve,
  11612. W = g.Event,
  11613. V = w.gecko,
  11614. $ = w.ie;
  11615. return D.prototype = {
  11616. render: function() {
  11617. function e() {
  11618. L.unbind(window, "ready", e), n.render()
  11619. }
  11620. function t() {
  11621. var e = m.ScriptLoader;
  11622. if (r.language && "en" != r.language && !r.language_url && (r.language_url = n.editorManager.baseURL + "/langs/" + r.language + ".js"), r.language_url && e.add(r.language_url), r.theme && "function" != typeof r.theme && "-" != r.theme.charAt(0) && !M.urls[r.theme]) {
  11623. var t = r.theme_url;
  11624. t = t ? n.documentBaseURI.toAbsolute(t) : "" + r.theme + "/theme" + o + ".js", M.load(r.theme, t)
  11625. }
  11626. E.isArray(r.plugins) && (r.plugins = r.plugins.join(" ")), H(r.external_plugins, function(e, t) {
  11627. P.load(t, e), r.plugins += " " + t
  11628. }), H(r.plugins.split(/[ ,]/), function(e) {
  11629. if (e = z(e), e && !P.urls[e])
  11630. if ("-" == e.charAt(0)) {
  11631. e = e.substr(1, e.length);
  11632. var t = P.dependencies(e);
  11633. H(t, function(e) {
  11634. var t = {
  11635. prefix: "plugins/",
  11636. resource: e,
  11637. suffix: "/plugin" + o + ".js"
  11638. };
  11639. e = P.createUrl(t, e), P.load(e.resource, e)
  11640. })
  11641. } else P.load(e, {
  11642. prefix: "plugins/",
  11643. resource: e,
  11644. suffix: "/plugin" + o + ".js"
  11645. })
  11646. }), e.loadQueue(function() {
  11647. n.removed || n.init()
  11648. })
  11649. }
  11650. var n = this,
  11651. r = n.settings,
  11652. i = n.id,
  11653. o = n.suffix;
  11654. if (!W.domLoaded) return void L.bind(window, "ready", e);
  11655. if (n.getElement() && w.contentEditable) {
  11656. r.inline ? n.inline = !0 : (n.orgVisibility = n.getElement().style.visibility, n.getElement().style.visibility = "hidden");
  11657. var a = n.getElement().form || L.getParent(i, "form");
  11658. a && (n.formElement = a, r.hidden_input && !/TEXTAREA|INPUT/i.test(n.getElement().nodeName) && (L.insertAfter(L.create("input", {
  11659. type: "hidden",
  11660. name: i
  11661. }), i), n.hasHiddenInput = !0), n.formEventDelegate = function(e) {
  11662. n.fire(e.type, e)
  11663. }, L.bind(a, "submit reset", n.formEventDelegate), n.on("reset", function() {
  11664. n.setContent(n.startContent, {
  11665. format: "raw"
  11666. })
  11667. }), !r.submit_patch || a.submit.nodeType || a.submit.length || a._mceOldSubmit || (a._mceOldSubmit = a.submit, a.submit = function() {
  11668. return n.editorManager.triggerSave(), n.setDirty(!1), a._mceOldSubmit(a)
  11669. })), n.windowManager = new v(n), n.notificationManager = new y(n), "xml" == r.encoding && n.on("GetContent", function(e) {
  11670. e.save && (e.content = L.encode(e.content))
  11671. }), r.add_form_submit_trigger && n.on("submit", function() {
  11672. n.initialized && n.save()
  11673. }), r.add_unload_trigger && (n._beforeUnload = function() {
  11674. !n.initialized || n.destroyed || n.isHidden() || n.save({
  11675. format: "raw",
  11676. no_events: !0,
  11677. set_dirty: !1
  11678. })
  11679. }, n.editorManager.on("BeforeUnload", n._beforeUnload)), n.editorManager.add(n), t()
  11680. }
  11681. },
  11682. init: function() {
  11683. function e(n) {
  11684. var r = P.get(n),
  11685. i, o;
  11686. if (i = P.urls[n] || t.documentBaseUrl.replace(/\/$/, ""), n = z(n), r && F(m, n) === -1) {
  11687. if (H(P.dependencies(n), function(t) {
  11688. e(t)
  11689. }), t.plugins[n]) return;
  11690. o = new r(t, i, t.$), t.plugins[n] = o, o.init && (o.init(t, i), m.push(n))
  11691. }
  11692. }
  11693. var t = this,
  11694. n = t.settings,
  11695. r = t.getElement(),
  11696. i, o, a, s, l, c, u, d, f, h, p, m = [];
  11697. if (t.rtl = n.rtl_ui || t.editorManager.i18n.rtl, t.editorManager.i18n.setCode(n.language), n.aria_label = n.aria_label || L.getAttrib(r, "aria-label", t.getLang("aria.rich_text_area")), t.fire("ScriptsLoaded"), n.theme && ("function" != typeof n.theme ? (n.theme = n.theme.replace(/-/, ""), c = M.get(n.theme), t.theme = new c(t, M.urls[n.theme]), t.theme.init && t.theme.init(t, M.urls[n.theme] || t.documentBaseUrl.replace(/\/$/, ""), t.$)) : t.theme = n.theme), H(n.plugins.replace(/\-/g, "").split(/[ ,]/), e), n.render_ui && t.theme && (t.orgDisplay = r.style.display, "function" != typeof n.theme ? (i = n.width || r.style.width || r.offsetWidth, o = n.height || r.style.height || r.offsetHeight, a = n.min_height || 100, h = /^[0-9\.]+(|px)$/i, h.test("" + i) && (i = Math.max(parseInt(i, 10), 100)), h.test("" + o) && (o = Math.max(parseInt(o, 10), a)), l = t.theme.renderUI({
  11698. targetNode: r,
  11699. width: i,
  11700. height: o,
  11701. deltaWidth: n.delta_width,
  11702. deltaHeight: n.delta_height
  11703. }), n.content_editable || (o = (l.iframeHeight || o) + ("number" == typeof o ? l.deltaHeight || 0 : ""), o < a && (o = a))) : (l = n.theme(t, r), l.editorContainer.nodeType && (l.editorContainer.id = l.editorContainer.id || t.id + "_parent"), l.iframeContainer.nodeType && (l.iframeContainer.id = l.iframeContainer.id || t.id + "_iframecontainer"), o = l.iframeHeight || r.offsetHeight), t.editorContainer = l.editorContainer), n.content_css && H(I(n.content_css), function(e) {
  11704. t.contentCSS.push(t.documentBaseURI.toAbsolute(e))
  11705. }), n.content_style && t.contentStyles.push(n.content_style), n.content_editable) return r = s = l = null, t.initContentBody();
  11706. if (t.iframeHTML = n.doctype + "<html><head>", n.document_base_url != t.documentBaseUrl && (t.iframeHTML += '<base href="' + t.documentBaseURI.getURI() + '" />'), !w.caretAfter && n.ie7_compat && (t.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=7" />'), t.iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />', !/#$/.test(document.location.href))
  11707. for (p = 0; p < t.contentCSS.length; p++) {
  11708. var g = t.contentCSS[p];
  11709. t.iframeHTML += '<link type="text/css" rel="stylesheet" href="' + E._addCacheSuffix(g) + '" />', t.loadedCSS[g] = !0
  11710. }
  11711. d = n.body_id || "tinymce", d.indexOf("=") != -1 && (d = t.getParam("body_id", "", "hash"), d = d[t.id] || d), f = n.body_class || "", f.indexOf("=") != -1 && (f = t.getParam("body_class", "", "hash"), f = f[t.id] || ""), n.content_security_policy && (t.iframeHTML += '<meta http-equiv="Content-Security-Policy" content="' + n.content_security_policy + '" />'), t.iframeHTML += '</head><body id="' + d + '" class="mce-content-body ' + f + '" data-id="' + t.id + '"><br></body></html>';
  11712. var v = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinymce.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';
  11713. document.domain != location.hostname && w.ie && w.ie < 12 && (u = v);
  11714. var y = L.create("iframe", {
  11715. id: t.id + "_ifr",
  11716. frameBorder: "0",
  11717. allowTransparency: "true",
  11718. title: t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),
  11719. style: {
  11720. width: "100%",
  11721. height: o,
  11722. display: "block"
  11723. }
  11724. });
  11725. if (y.onload = function() {
  11726. y.onload = null, t.fire("load")
  11727. }, L.setAttrib(y, "src", u || 'javascript:""'), t.contentAreaContainer = l.iframeContainer, t.iframeElement = y, s = L.add(l.iframeContainer, y), $) try {
  11728. t.getDoc()
  11729. } catch (b) {
  11730. s.src = u = v
  11731. }
  11732. l.editorContainer && (L.get(l.editorContainer).style.display = t.orgDisplay, t.hidden = L.isHidden(l.editorContainer)), t.getElement().style.display = "none", L.setAttrib(t.id, "aria-hidden", !0), u || t.initContentBody(), r = s = l = null
  11733. },
  11734. initContentBody: function(t) {
  11735. var n = this,
  11736. r = n.settings,
  11737. s = n.getElement(),
  11738. h = n.getDoc(),
  11739. p, m;
  11740. r.inline || (n.getElement().style.visibility = n.orgVisibility), t || r.content_editable || (h.open(), h.write(n.iframeHTML), h.close()), r.content_editable && (n.on("remove", function() {
  11741. var e = this.getBody();
  11742. L.removeClass(e, "mce-content-body"), L.removeClass(e, "mce-edit-focus"), L.setAttrib(e, "contentEditable", null)
  11743. }), L.addClass(s, "mce-content-body"), n.contentDocument = h = r.content_document || document, n.contentWindow = r.content_window || window, n.bodyElement = s, r.content_document = r.content_window = null, r.root_name = s.nodeName.toLowerCase()), p = n.getBody(), p.disabled = !0, n.readonly = r.readonly, n.readonly || (n.inline && "static" == L.getStyle(p, "position", !0) && (p.style.position = "relative"), p.contentEditable = n.getParam("content_editable_state", !0)), p.disabled = !1, n.editorUpload = new T(n), n.schema = new b(r), n.dom = new e(h, {
  11744. keep_values: !0,
  11745. url_converter: n.convertURL,
  11746. url_converter_scope: n,
  11747. hex_colors: r.force_hex_style_colors,
  11748. class_filter: r.class_filter,
  11749. update_styles: !0,
  11750. root_element: n.inline ? n.getBody() : null,
  11751. collect: r.content_editable,
  11752. schema: n.schema,
  11753. onSetAttrib: function(e) {
  11754. n.fire("SetAttrib", e)
  11755. }
  11756. }), n.parser = new C(r, n.schema), n.parser.addAttributeFilter("src,href,style,tabindex", function(e, t) {
  11757. for (var r = e.length, i, o = n.dom, a, s; r--;)
  11758. if (i = e[r], a = i.attr(t), s = "data-mce-" + t, !i.attributes.map[s]) {
  11759. if (0 === a.indexOf("data:") || 0 === a.indexOf("blob:")) continue;
  11760. "style" === t ? (a = o.serializeStyle(o.parseStyle(a), i.name), a.length || (a = null), i.attr(s, a), i.attr(t, a)) : "tabindex" === t ? (i.attr(s, a), i.attr(t, null)) : i.attr(s, n.convertURL(a, t, i.name))
  11761. }
  11762. }), n.parser.addNodeFilter("script", function(e) {
  11763. for (var t = e.length, n, r; t--;) n = e[t], r = n.attr("type") || "no/type", 0 !== r.indexOf("mce-") && n.attr("type", "mce-" + r)
  11764. }), n.parser.addNodeFilter("#cdata", function(e) {
  11765. for (var t = e.length, n; t--;) n = e[t], n.type = 8, n.name = "#comment", n.value = "[CDATA[" + n.value + "]]"
  11766. }), n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div", function(e) {
  11767. for (var t = e.length, r, i = n.schema.getNonEmptyElements(); t--;) r = e[t], r.isEmpty(i) && (r.append(new o("br", 1)).shortEnded = !0)
  11768. }), n.serializer = new a(r, n), n.selection = new l(n.dom, n.getWin(), n.serializer, n), n.formatter = new c(n), n.undoManager = new u(n), n.forceBlocks = new f(n), n.enterKey = new d(n), n._nodeChangeDispatcher = new i(n), n._selectionOverrides = new R(n), n.fire("PreInit"), r.browser_spellcheck || r.gecko_spellcheck || (h.body.spellcheck = !1, L.setAttrib(p, "spellcheck", "false")), n.quirks = new x(n), n.fire("PostRender"), r.directionality && (p.dir = r.directionality), r.nowrap && (p.style.whiteSpace = "nowrap"), r.protect && n.on("BeforeSetContent", function(e) {
  11769. H(r.protect, function(t) {
  11770. e.content = e.content.replace(t, function(e) {
  11771. return "<!--mce:protected " + escape(e) + "-->"
  11772. })
  11773. })
  11774. }), n.on("SetContent", function() {
  11775. n.addVisual(n.getBody())
  11776. }), r.padd_empty_editor && n.on("PostProcess", function(e) {
  11777. e.content = e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/, "")
  11778. }), n.load({
  11779. initial: !0,
  11780. format: "html"
  11781. }), n.startContent = n.getContent({
  11782. format: "raw"
  11783. }), n.initialized = !0, n.bindPendingEventDelegates(), n.fire("init"), n.focus(!0), n.nodeChanged({
  11784. initial: !0
  11785. }), n.execCallback("init_instance_callback", n), n.on("compositionstart compositionend", function(e) {
  11786. n.composing = "compositionstart" === e.type
  11787. }), n.contentStyles.length > 0 && (m = "", H(n.contentStyles, function(e) {
  11788. m += e + "\r\n"
  11789. }), n.dom.addStyle(m)), H(n.contentCSS, function(e) {
  11790. n.loadedCSS[e] || (n.dom.loadCSS(e), n.loadedCSS[e] = !0)
  11791. }), r.auto_focus && N.setEditorTimeout(n, function() {
  11792. var e;
  11793. e = r.auto_focus === !0 ? n : n.editorManager.get(r.auto_focus), e.destroyed || e.focus()
  11794. }, 100), s = h = p = null
  11795. },
  11796. focus: function(e) {
  11797. function t(e) {
  11798. return n.dom.getParent(e, function(e) {
  11799. return "true" === n.dom.getContentEditable(e)
  11800. })
  11801. }
  11802. var n = this,
  11803. r = n.selection,
  11804. i = n.settings.content_editable,
  11805. o, a, s = n.getDoc(),
  11806. l = n.getBody(),
  11807. c;
  11808. if (!e) {
  11809. if (o = r.getRng(), o.item && (a = o.item(0)), n.quirks.refreshContentEditable(), c = t(r.getNode()), n.$.contains(l, c)) return c.focus(), r.normalize(), void n.editorManager.setActive(n);
  11810. if (i || (w.opera || n.getBody().focus(), n.getWin().focus()), V || i) {
  11811. if (l.setActive) try {
  11812. l.setActive()
  11813. } catch (u) {
  11814. l.focus()
  11815. } else l.focus();
  11816. i && r.normalize()
  11817. }
  11818. a && a.ownerDocument == s && (o = s.body.createControlRange(), o.addElement(a), o.select())
  11819. }
  11820. n.editorManager.setActive(n)
  11821. },
  11822. execCallback: function(e) {
  11823. var t = this,
  11824. n = t.settings[e],
  11825. r;
  11826. if (n) return t.callbackLookup && (r = t.callbackLookup[e]) && (n = r.func, r = r.scope), "string" == typeof n && (r = n.replace(/\.\w+$/, ""), r = r ? U(r) : 0, n = U(n), t.callbackLookup = t.callbackLookup || {}, t.callbackLookup[e] = {
  11827. func: n,
  11828. scope: r
  11829. }), n.apply(r || t, Array.prototype.slice.call(arguments, 1))
  11830. },
  11831. translate: function(e) {
  11832. var t = this.settings.language || "en",
  11833. n = this.editorManager.i18n;
  11834. return e ? (e = n.data[t + "." + e] || e.replace(/\{\#([^\}]+)\}/g, function(e, r) {
  11835. return n.data[t + "." + r] || "{#" + r + "}"
  11836. }), this.editorManager.translate(e)) : ""
  11837. },
  11838. getLang: function(e, n) {
  11839. return this.editorManager.i18n.data[(this.settings.language || "en") + "." + e] || (n !== t ? n : "{#" + e + "}")
  11840. },
  11841. getParam: function(e, t, n) {
  11842. var r = e in this.settings ? this.settings[e] : t,
  11843. i;
  11844. return "hash" === n ? (i = {}, "string" == typeof r ? H(r.indexOf("=") > 0 ? r.split(/[;,](?![^=;,]*(?:[;,]|$))/) : r.split(","), function(e) {
  11845. e = e.split("="), e.length > 1 ? i[z(e[0])] = z(e[1]) : i[z(e[0])] = z(e)
  11846. }) : i = r, i) : r
  11847. },
  11848. nodeChanged: function(e) {
  11849. this._nodeChangeDispatcher.nodeChanged(e)
  11850. },
  11851. addButton: function(e, t) {
  11852. var n = this;
  11853. t.cmd && (t.onclick = function() {
  11854. n.execCommand(t.cmd)
  11855. }), t.text || t.icon || (t.icon = e), n.buttons = n.buttons || {}, t.tooltip = t.tooltip || t.title, n.buttons[e] = t
  11856. },
  11857. addSidebar: function(e, t) {
  11858. return B.add(this, e, t)
  11859. },
  11860. addMenuItem: function(e, t) {
  11861. var n = this;
  11862. t.cmd && (t.onclick = function() {
  11863. n.execCommand(t.cmd)
  11864. }), n.menuItems = n.menuItems || {}, n.menuItems[e] = t
  11865. },
  11866. addContextToolbar: function(e, t) {
  11867. var n = this,
  11868. r;
  11869. n.contextToolbars = n.contextToolbars || [], "string" == typeof e && (r = e, e = function(e) {
  11870. return n.dom.is(e, r)
  11871. }), n.contextToolbars.push({
  11872. id: A.uuid("mcet"),
  11873. predicate: e,
  11874. items: t
  11875. })
  11876. },
  11877. addCommand: function(e, t, n) {
  11878. this.editorCommands.addCommand(e, t, n)
  11879. },
  11880. addQueryStateHandler: function(e, t, n) {
  11881. this.editorCommands.addQueryStateHandler(e, t, n)
  11882. },
  11883. addQueryValueHandler: function(e, t, n) {
  11884. this.editorCommands.addQueryValueHandler(e, t, n)
  11885. },
  11886. addShortcut: function(e, t, n, r) {
  11887. this.shortcuts.add(e, t, n, r)
  11888. },
  11889. execCommand: function(e, t, n, r) {
  11890. return this.editorCommands.execCommand(e, t, n, r)
  11891. },
  11892. queryCommandState: function(e) {
  11893. return this.editorCommands.queryCommandState(e)
  11894. },
  11895. queryCommandValue: function(e) {
  11896. return this.editorCommands.queryCommandValue(e)
  11897. },
  11898. queryCommandSupported: function(e) {
  11899. return this.editorCommands.queryCommandSupported(e)
  11900. },
  11901. show: function() {
  11902. var e = this;
  11903. e.hidden && (e.hidden = !1, e.inline ? e.getBody().contentEditable = !0 : (L.show(e.getContainer()), L.hide(e.id)), e.load(), e.fire("show"))
  11904. },
  11905. hide: function() {
  11906. var e = this,
  11907. t = e.getDoc();
  11908. e.hidden || ($ && t && !e.inline && t.execCommand("SelectAll"), e.save(), e.inline ? (e.getBody().contentEditable = !1, e == e.editorManager.focusedEditor && (e.editorManager.focusedEditor = null)) : (L.hide(e.getContainer()), L.setStyle(e.id, "display", e.orgDisplay)), e.hidden = !0, e.fire("hide"))
  11909. },
  11910. isHidden: function() {
  11911. return !!this.hidden
  11912. },
  11913. setProgressState: function(e, t) {
  11914. this.fire("ProgressState", {
  11915. state: e,
  11916. time: t
  11917. })
  11918. },
  11919. load: function(e) {
  11920. var n = this,
  11921. r = n.getElement(),
  11922. i;
  11923. if (r) return e = e || {}, e.load = !0, i = n.setContent(r.value !== t ? r.value : r.innerHTML, e), e.element = r, e.no_events || n.fire("LoadContent", e), e.element = r = null, i
  11924. },
  11925. save: function(e) {
  11926. var t = this,
  11927. n = t.getElement(),
  11928. r, i;
  11929. if (n && t.initialized) return e = e || {}, e.save = !0, e.element = n, r = e.content = t.getContent(e), e.no_events || t.fire("SaveContent", e), "raw" == e.format && t.fire("RawSaveContent", e), r = e.content, /TEXTAREA|INPUT/i.test(n.nodeName) ? n.value = r : (t.inline || (n.innerHTML = r), (i = L.getParent(t.id, "form")) && H(i.elements, function(e) {
  11930. if (e.name == t.id) return e.value = r, !1
  11931. })), e.element = n = null, e.set_dirty !== !1 && t.setDirty(!1), r
  11932. },
  11933. setContent: function(e, t) {
  11934. var n = this,
  11935. r = n.getBody(),
  11936. i, o;
  11937. return t = t || {}, t.format = t.format || "html", t.set = !0, t.content = e, t.no_events || n.fire("BeforeSetContent", t), e = t.content, 0 === e.length || /^\s+$/.test(e) ? (o = $ && $ < 11 ? "" : '<br data-mce-bogus="1">', "TABLE" == r.nodeName ? e = "<tr><td>" + o + "</td></tr>" : /^(UL|OL)$/.test(r.nodeName) && (e = "<li>" + o + "</li>"), i = n.settings.forced_root_block, i && n.schema.isValidChild(r.nodeName.toLowerCase(), i.toLowerCase()) ? (e = o, e = n.dom.createHTML(i, n.settings.forced_root_block_attrs, e)) : $ || e || (e = '<br data-mce-bogus="1">'), n.dom.setHTML(r, e), n.fire("SetContent", t)) : ("raw" !== t.format && (e = new s({
  11938. validate: n.validate
  11939. }, n.schema).serialize(n.parser.parse(e, {
  11940. isRootContent: !0
  11941. }))), t.content = z(e), n.dom.setHTML(r, t.content), t.no_events || n.fire("SetContent", t)), t.content
  11942. },
  11943. getContent: function(e) {
  11944. var t = this,
  11945. n, r = t.getBody();
  11946. return e = e || {}, e.format = e.format || "html", e.get = !0, e.getInner = !0, e.no_events || t.fire("BeforeGetContent", e), n = "raw" == e.format ? t.serializer.getTrimmedContent() : "text" == e.format ? r.innerText || r.textContent : t.serializer.serialize(r, e), "text" != e.format ? e.content = z(n) : e.content = n, e.no_events || t.fire("GetContent", e), e.content
  11947. },
  11948. insertContent: function(e, t) {
  11949. t && (e = O({
  11950. content: e
  11951. }, t)), this.execCommand("mceInsertContent", !1, e)
  11952. },
  11953. isDirty: function() {
  11954. return !this.isNotDirty
  11955. },
  11956. setDirty: function(e) {
  11957. var t = !this.isNotDirty;
  11958. this.isNotDirty = !e, e && e != t && this.fire("dirty")
  11959. },
  11960. setMode: function(e) {
  11961. S.setMode(this, e)
  11962. },
  11963. getContainer: function() {
  11964. var e = this;
  11965. return e.container || (e.container = L.get(e.editorContainer || e.id + "_parent")), e.container
  11966. },
  11967. getContentAreaContainer: function() {
  11968. return this.contentAreaContainer
  11969. },
  11970. getElement: function() {
  11971. return this.targetElm || (this.targetElm = L.get(this.id)), this.targetElm
  11972. },
  11973. getWin: function() {
  11974. var e = this,
  11975. t;
  11976. return e.contentWindow || (t = e.iframeElement, t && (e.contentWindow = t.contentWindow)), e.contentWindow
  11977. },
  11978. getDoc: function() {
  11979. var e = this,
  11980. t;
  11981. return e.contentDocument || (t = e.getWin(), t && (e.contentDocument = t.document)), e.contentDocument
  11982. },
  11983. getBody: function() {
  11984. var e = this.getDoc();
  11985. return this.bodyElement || (e ? e.body : null)
  11986. },
  11987. convertURL: function(e, t, n) {
  11988. var r = this,
  11989. i = r.settings;
  11990. return i.urlconverter_callback ? r.execCallback("urlconverter_callback", e, n, !0, t) : !i.convert_urls || n && "LINK" == n.nodeName || 0 === e.indexOf("file:") || 0 === e.length ? e : i.relative_urls ? r.documentBaseURI.toRelative(e) : e = r.documentBaseURI.toAbsolute(e, i.remove_script_host)
  11991. },
  11992. addVisual: function(e) {
  11993. var n = this,
  11994. r = n.settings,
  11995. i = n.dom,
  11996. o;
  11997. e = e || n.getBody(), n.hasVisual === t && (n.hasVisual = r.visual), H(i.select("table,a", e), function(e) {
  11998. var t;
  11999. switch (e.nodeName) {
  12000. case "TABLE":
  12001. return o = r.visual_table_class || "mce-item-table", t = i.getAttrib(e, "border"), void(t && "0" != t || !n.hasVisual ? i.removeClass(e, o) : i.addClass(e, o));
  12002. case "A":
  12003. return void(i.getAttrib(e, "href", !1) || (t = i.getAttrib(e, "name") || e.id, o = r.visual_anchor_class || "mce-item-anchor", t && n.hasVisual ? i.addClass(e, o) : i.removeClass(e, o)))
  12004. }
  12005. }), n.fire("VisualAid", {
  12006. element: e,
  12007. hasVisual: n.hasVisual
  12008. })
  12009. },
  12010. remove: function() {
  12011. var e = this;
  12012. e.removed || (e.save(), e.removed = 1, e.unbindAllNativeEvents(), e.hasHiddenInput && L.remove(e.getElement().nextSibling), e.inline || ($ && $ < 10 && e.getDoc().execCommand("SelectAll", !1, null), L.setStyle(e.id, "display", e.orgDisplay), e.getBody().onload = null), e.fire("remove"), e.editorManager.remove(e), L.remove(e.getContainer()), e._selectionOverrides.destroy(), e.editorUpload.destroy(), e.destroy())
  12013. },
  12014. destroy: function(e) {
  12015. var t = this,
  12016. n;
  12017. if (!t.destroyed) {
  12018. if (!e && !t.removed) return void t.remove();
  12019. e || (t.editorManager.off("beforeunload", t._beforeUnload), t.theme && t.theme.destroy && t.theme.destroy(), t.selection.destroy(), t.dom.destroy()), n = t.formElement, n && (n._mceOldSubmit && (n.submit = n._mceOldSubmit, n._mceOldSubmit = null), L.unbind(n, "submit reset", t.formEventDelegate)), t.contentAreaContainer = t.formElement = t.container = t.editorContainer = null, t.bodyElement = t.contentDocument = t.contentWindow = null, t.iframeElement = t.targetElm = null, t.selection && (t.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null), t.destroyed = 1
  12020. }
  12021. },
  12022. uploadImages: function(e) {
  12023. return this.editorUpload.uploadImages(e)
  12024. },
  12025. _scanForImages: function() {
  12026. return this.editorUpload.scanForImages()
  12027. }
  12028. }, O(D.prototype, _), D
  12029. }), r(at, [m], function(e) {
  12030. var t = {},
  12031. n = "en";
  12032. return {
  12033. setCode: function(e) {
  12034. e && (n = e, this.rtl = !!this.data[e] && "rtl" === this.data[e]._dir)
  12035. },
  12036. getCode: function() {
  12037. return n
  12038. },
  12039. rtl: !1,
  12040. add: function(e, n) {
  12041. var r = t[e];
  12042. r || (t[e] = r = {});
  12043. for (var i in n) r[i] = n[i];
  12044. this.setCode(e)
  12045. },
  12046. translate: function(r) {
  12047. function i(t) {
  12048. return e.is(t, "function") ? Object.prototype.toString.call(t) : o(t) ? "" : "" + t
  12049. }
  12050. function o(t) {
  12051. return "" === t || null === t || e.is(t, "undefined")
  12052. }
  12053. function a(t) {
  12054. return t = i(t), e.hasOwn(s, t) ? i(s[t]) : t
  12055. }
  12056. var s = t[n] || {};
  12057. if (o(r)) return "";
  12058. if (e.is(r, "object") && e.hasOwn(r, "raw")) return i(r.raw);
  12059. if (e.is(r, "array")) {
  12060. var l = r.slice(1);
  12061. r = a(r[0]).replace(/\{([0-9]+)\}/g, function(t, n) {
  12062. return e.hasOwn(l, n) ? i(l[n]) : t
  12063. })
  12064. }
  12065. return a(r).replace(/{context:\w+}$/, "")
  12066. },
  12067. data: t
  12068. }
  12069. }), r(st, [w, u, d], function(e, t, n) {
  12070. function r(e) {
  12071. function l() {
  12072. try {
  12073. return document.activeElement
  12074. } catch (e) {
  12075. return document.body
  12076. }
  12077. }
  12078. function c(e, t) {
  12079. if (t && t.startContainer) {
  12080. if (!e.isChildOf(t.startContainer, e.getRoot()) || !e.isChildOf(t.endContainer, e.getRoot())) return;
  12081. return {
  12082. startContainer: t.startContainer,
  12083. startOffset: t.startOffset,
  12084. endContainer: t.endContainer,
  12085. endOffset: t.endOffset
  12086. }
  12087. }
  12088. return t
  12089. }
  12090. function u(e, t) {
  12091. var n;
  12092. return t.startContainer ? (n = e.getDoc().createRange(), n.setStart(t.startContainer, t.startOffset), n.setEnd(t.endContainer, t.endOffset)) : n = t, n
  12093. }
  12094. function d(e) {
  12095. return !!s.getParent(e, r.isEditorUIElement)
  12096. }
  12097. function f(r) {
  12098. var f = r.editor;
  12099. f.on("init", function() {
  12100. (f.inline || n.ie) && ("onbeforedeactivate" in document && n.ie < 9 ? f.dom.bind(f.getBody(), "beforedeactivate", function(e) {
  12101. if (e.target == f.getBody()) try {
  12102. f.lastRng = f.selection.getRng()
  12103. } catch (t) {}
  12104. }) : f.on("nodechange mouseup keyup", function(e) {
  12105. var t = l();
  12106. "nodechange" == e.type && e.selectionChange || (t && t.id == f.id + "_ifr" && (t = f.getBody()), f.dom.isChildOf(t, f.getBody()) && (f.lastRng = f.selection.getRng()))
  12107. }), n.webkit && !i && (i = function() {
  12108. var t = e.activeEditor;
  12109. if (t && t.selection) {
  12110. var n = t.selection.getRng();
  12111. n && !n.collapsed && (f.lastRng = n)
  12112. }
  12113. }, s.bind(document, "selectionchange", i)))
  12114. }), f.on("setcontent", function() {
  12115. f.lastRng = null
  12116. }), f.on("mousedown", function() {
  12117. f.selection.lastFocusBookmark = null
  12118. }), f.on("focusin", function() {
  12119. var t = e.focusedEditor,
  12120. n;
  12121. f.selection.lastFocusBookmark && (n = u(f, f.selection.lastFocusBookmark), f.selection.lastFocusBookmark = null, f.selection.setRng(n)), t != f && (t && t.fire("blur", {
  12122. focusedEditor: f
  12123. }), e.setActive(f), e.focusedEditor = f, f.fire("focus", {
  12124. blurredEditor: t
  12125. }), f.focus(!0)), f.lastRng = null
  12126. }), f.on("focusout", function() {
  12127. t.setEditorTimeout(f, function() {
  12128. var t = e.focusedEditor;
  12129. d(l()) || t != f || (f.fire("blur", {
  12130. focusedEditor: null
  12131. }), e.focusedEditor = null, f.selection && (f.selection.lastFocusBookmark = null))
  12132. })
  12133. }), o || (o = function(t) {
  12134. var n = e.activeEditor,
  12135. r;
  12136. r = t.target, n && r.ownerDocument == document && (n.selection && r != n.getBody() && (n.selection.lastFocusBookmark = c(n.dom, n.lastRng)), r == document.body || d(r) || e.focusedEditor != n || (n.fire("blur", {
  12137. focusedEditor: null
  12138. }), e.focusedEditor = null))
  12139. }, s.bind(document, "focusin", o)), f.inline && !a && (a = function(t) {
  12140. var n = e.activeEditor,
  12141. r = n.dom;
  12142. if (n.inline && r && !r.isChildOf(t.target, n.getBody())) {
  12143. var i = n.selection.getRng();
  12144. i.collapsed || (n.lastRng = i)
  12145. }
  12146. }, s.bind(document, "mouseup", a))
  12147. }
  12148. function h(t) {
  12149. e.focusedEditor == t.editor && (e.focusedEditor = null), e.activeEditor || (s.unbind(document, "selectionchange", i), s.unbind(document, "focusin", o), s.unbind(document, "mouseup", a), i = o = a = null)
  12150. }
  12151. e.on("AddEditor", f), e.on("RemoveEditor", h)
  12152. }
  12153. var i, o, a, s = e.DOM;
  12154. return r.isEditorUIElement = function(e) {
  12155. return e.className.toString().indexOf("mce-") !== -1
  12156. }, r
  12157. }), r(lt, [ot, g, w, ce, d, m, c, he, at, st, N], function(e, t, n, r, i, o, a, s, l, c, u) {
  12158. function d(e) {
  12159. v(x.editors, function(t) {
  12160. "scroll" === e.type ? t.fire("ScrollWindow", e) : t.fire("ResizeWindow", e)
  12161. })
  12162. }
  12163. function f(e, n) {
  12164. n !== w && (n ? t(window).on("resize scroll", d) : t(window).off("resize scroll", d), w = n)
  12165. }
  12166. function h(e) {
  12167. var t = x.editors,
  12168. n;
  12169. delete t[e.id];
  12170. for (var r = 0; r < t.length; r++)
  12171. if (t[r] == e) {
  12172. t.splice(r, 1), n = !0;
  12173. break
  12174. }
  12175. return x.activeEditor == e && (x.activeEditor = t[0]), x.focusedEditor == e && (x.focusedEditor = null), n
  12176. }
  12177. function p(e) {
  12178. return e && e.initialized && !(e.getContainer() || e.getBody()).parentNode && (h(e), e.unbindAllNativeEvents(), e.destroy(!0), e.removed = !0, e = null), e
  12179. }
  12180. var m = n.DOM,
  12181. g = o.explode,
  12182. v = o.each,
  12183. y = o.extend,
  12184. b = 0,
  12185. C, x, w = !1;
  12186. return x = {
  12187. $: t,
  12188. majorVersion: "4",
  12189. minorVersion: "5.1",
  12190. releaseDate: "2016-12-07",
  12191. editors: [],
  12192. i18n: l,
  12193. activeEditor: null,
  12194. setup: function() {
  12195. var e = this,
  12196. t, n, i = "",
  12197. o, a;
  12198. if (n = r.getDocumentBaseUrl(document.location), /^[^:]+:\/\/\/?[^\/]+\//.test(n) && (n = n.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, ""), /[\/\\]$/.test(n) || (n += "/")), o = window.tinymce || window.tinyMCEPreInit) t = o.base || o.baseURL, i = o.suffix;
  12199. else {
  12200. for (var s = document.getElementsByTagName("script"), l = 0; l < s.length; l++) {
  12201. a = s[l].src;
  12202. var u = a.substring(a.lastIndexOf("/"));
  12203. if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)) {
  12204. u.indexOf(".min") != -1 && (i = ".min"), t = a.substring(0, a.lastIndexOf("/"));
  12205. break
  12206. }
  12207. }!t && document.currentScript && (a = document.currentScript.src, a.indexOf(".min") != -1 && (i = ".min"), t = a.substring(0, a.lastIndexOf("/")))
  12208. }
  12209. e.baseURL = new r(n).toAbsolute(t), e.documentBaseURL = n, e.baseURI = new r(e.baseURL), e.suffix = i, e.focusManager = new c(e)
  12210. },
  12211. overrideDefaults: function(e) {
  12212. var t, n;
  12213. t = e.base_url, t && (this.baseURL = new r(this.documentBaseURL).toAbsolute(t.replace(/\/+$/, "")), this.baseURI = new r(this.baseURL)), n = e.suffix, e.suffix && (this.suffix = n), this.defaultSettings = e;
  12214. var i = e.plugin_base_urls;
  12215. for (var o in i) u.PluginManager.urls[o] = i[o]
  12216. },
  12217. init: function(n) {
  12218. function r(e, t) {
  12219. return e.inline && t.tagName.toLowerCase() in C
  12220. }
  12221. function i(e, t) {
  12222. window.console && !window.test && window.console.log(e, t)
  12223. }
  12224. function s(e) {
  12225. var t = e.id;
  12226. return t || (t = e.name, t = t && !m.get(t) ? e.name : m.uniqueId(), e.setAttribute("id", t)), t
  12227. }
  12228. function l(e) {
  12229. var t = n[e];
  12230. if (t) return t.apply(f, Array.prototype.slice.call(arguments, 2))
  12231. }
  12232. function c(e, t) {
  12233. return t.constructor === RegExp ? t.test(e.className) : m.hasClass(e, t)
  12234. }
  12235. function u(e) {
  12236. var t, n = [];
  12237. if (e.types) return v(e.types, function(e) {
  12238. n = n.concat(m.select(e.selector))
  12239. }), n;
  12240. if (e.selector) return m.select(e.selector);
  12241. if (e.target) return [e.target];
  12242. switch (e.mode) {
  12243. case "exact":
  12244. t = e.elements || "", t.length > 0 && v(g(t), function(e) {
  12245. var t;
  12246. (t = m.get(e)) ? n.push(t): v(document.forms, function(t) {
  12247. v(t.elements, function(t) {
  12248. t.name === e && (e = "mce_editor_" + b++, m.setAttrib(t, "id", e), n.push(t))
  12249. })
  12250. })
  12251. });
  12252. break;
  12253. case "textareas":
  12254. case "specific_textareas":
  12255. v(m.select("textarea"), function(t) {
  12256. e.editor_deselector && c(t, e.editor_deselector) || e.editor_selector && !c(t, e.editor_selector) || n.push(t)
  12257. })
  12258. }
  12259. return n
  12260. }
  12261. function d() {
  12262. function a(t, n, r) {
  12263. var i = new e(t, n, f);
  12264. h.push(i), i.on("init", function() {
  12265. ++c === g.length && x(h)
  12266. }), i.targetElm = i.targetElm || r, i.render()
  12267. }
  12268. var c = 0,
  12269. h = [],
  12270. g;
  12271. return m.unbind(window, "ready", d), l("onpageload"), g = t.unique(u(n)), n.types ? void v(n.types, function(e) {
  12272. o.each(g, function(t) {
  12273. return !m.is(t, e.selector) || (a(s(t), y({}, n, e), t), !1)
  12274. })
  12275. }) : (o.each(g, function(e) {
  12276. p(f.get(e.id))
  12277. }), g = o.grep(g, function(e) {
  12278. return !f.get(e.id)
  12279. }), void v(g, function(e) {
  12280. r(n, e) ? i("Could not initialize inline editor on invalid inline target element", e) : a(s(e), n, e)
  12281. }))
  12282. }
  12283. var f = this,
  12284. h, C;
  12285. C = o.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu", " ");
  12286. var x = function(e) {
  12287. h = e
  12288. };
  12289. return f.settings = n, m.bind(window, "ready", d), new a(function(e) {
  12290. h ? e(h) : x = function(t) {
  12291. e(t)
  12292. }
  12293. })
  12294. },
  12295. get: function(e) {
  12296. return arguments.length ? e in this.editors ? this.editors[e] : null : this.editors
  12297. },
  12298. add: function(e) {
  12299. var t = this,
  12300. n = t.editors;
  12301. return n[e.id] = e, n.push(e), f(n, !0), t.activeEditor = e, t.fire("AddEditor", {
  12302. editor: e
  12303. }), C || (C = function() {
  12304. t.fire("BeforeUnload")
  12305. }, m.bind(window, "beforeunload", C)), e
  12306. },
  12307. createEditor: function(t, n) {
  12308. return this.add(new e(t, n, this))
  12309. },
  12310. remove: function(e) {
  12311. var t = this,
  12312. n, r = t.editors,
  12313. i; {
  12314. if (e) return "string" == typeof e ? (e = e.selector || e, void v(m.select(e), function(e) {
  12315. i = r[e.id], i && t.remove(i)
  12316. })) : (i = e, r[i.id] ? (h(i) && t.fire("RemoveEditor", {
  12317. editor: i
  12318. }), r.length || m.unbind(window, "beforeunload", C), i.remove(), f(r, r.length > 0), i) : null);
  12319. for (n = r.length - 1; n >= 0; n--) t.remove(r[n])
  12320. }
  12321. },
  12322. execCommand: function(t, n, r) {
  12323. var i = this,
  12324. o = i.get(r);
  12325. switch (t) {
  12326. case "mceAddEditor":
  12327. return i.get(r) || new e(r, i.settings, i).render(), !0;
  12328. case "mceRemoveEditor":
  12329. return o && o.remove(), !0;
  12330. case "mceToggleEditor":
  12331. return o ? (o.isHidden() ? o.show() : o.hide(), !0) : (i.execCommand("mceAddEditor", 0, r), !0)
  12332. }
  12333. return !!i.activeEditor && i.activeEditor.execCommand(t, n, r)
  12334. },
  12335. triggerSave: function() {
  12336. v(this.editors, function(e) {
  12337. e.save()
  12338. })
  12339. },
  12340. addI18n: function(e, t) {
  12341. l.add(e, t)
  12342. },
  12343. translate: function(e) {
  12344. return l.translate(e)
  12345. },
  12346. setActive: function(e) {
  12347. var t = this.activeEditor;
  12348. this.activeEditor != e && (t && t.fire("deactivate", {
  12349. relatedTarget: e
  12350. }), e.fire("activate", {
  12351. relatedTarget: t
  12352. })), this.activeEditor = e
  12353. }
  12354. }, y(x, s), x.setup(), window.tinymce = window.tinyMCE = x, x
  12355. }), r(ct, [lt, m], function(e, t) {
  12356. var n = t.each,
  12357. r = t.explode;
  12358. e.on("AddEditor", function(e) {
  12359. var t = e.editor;
  12360. t.on("preInit", function() {
  12361. function e(e, t) {
  12362. n(t, function(t, n) {
  12363. t && s.setStyle(e, n, t)
  12364. }), s.rename(e, "span")
  12365. }
  12366. function i(e) {
  12367. s = t.dom, l.convert_fonts_to_spans && n(s.select("font,u,strike", e.node), function(e) {
  12368. o[e.nodeName.toLowerCase()](s, e)
  12369. })
  12370. }
  12371. var o, a, s, l = t.settings;
  12372. l.inline_styles && (a = r(l.font_size_legacy_values), o = {
  12373. font: function(t, n) {
  12374. e(n, {
  12375. backgroundColor: n.style.backgroundColor,
  12376. color: n.color,
  12377. fontFamily: n.face,
  12378. fontSize: a[parseInt(n.size, 10) - 1]
  12379. })
  12380. },
  12381. u: function(n, r) {
  12382. "html4" === t.settings.schema && e(r, {
  12383. textDecoration: "underline"
  12384. })
  12385. },
  12386. strike: function(t, n) {
  12387. e(n, {
  12388. textDecoration: "line-through"
  12389. })
  12390. }
  12391. }, t.on("PreProcess SetContent", i))
  12392. })
  12393. })
  12394. }), r(ut, [he, m], function(e, t) {
  12395. var n = {
  12396. send: function(e) {
  12397. function r() {
  12398. !e.async || 4 == i.readyState || o++ > 1e4 ? (e.success && o < 1e4 && 200 == i.status ? e.success.call(e.success_scope, "" + i.responseText, i, e) : e.error && e.error.call(e.error_scope, o > 1e4 ? "TIMED_OUT" : "GENERAL", i, e), i = null) : setTimeout(r, 10)
  12399. }
  12400. var i, o = 0;
  12401. if (e.scope = e.scope || this, e.success_scope = e.success_scope || e.scope, e.error_scope = e.error_scope || e.scope, e.async = e.async !== !1, e.data = e.data || "", n.fire("beforeInitialize", {
  12402. settings: e
  12403. }), i = new XMLHttpRequest) {
  12404. if (i.overrideMimeType && i.overrideMimeType(e.content_type), i.open(e.type || (e.data ? "POST" : "GET"), e.url, e.async), e.crossDomain && (i.withCredentials = !0), e.content_type && i.setRequestHeader("Content-Type", e.content_type), e.requestheaders && t.each(e.requestheaders, function(e) {
  12405. i.setRequestHeader(e.key, e.value)
  12406. }), i.setRequestHeader("X-Requested-With", "XMLHttpRequest"), i = n.fire("beforeSend", {
  12407. xhr: i,
  12408. settings: e
  12409. }).xhr, i.send(e.data), !e.async) return r();
  12410. setTimeout(r, 10)
  12411. }
  12412. }
  12413. };
  12414. return t.extend(n, e), n
  12415. }), r(dt, [], function() {
  12416. function e(t, n) {
  12417. var r, i, o, a;
  12418. if (n = n || '"', null === t) return "null";
  12419. if (o = typeof t, "string" == o) return i = "\bb\tt\nn\ff\rr\"\"''\\\\", n + t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g, function(e, t) {
  12420. return '"' === n && "'" === e ? e : (r = i.indexOf(t), r + 1 ? "\\" + i.charAt(r + 1) : (e = t.charCodeAt().toString(16), "\\u" + "0000".substring(e.length) + e))
  12421. }) + n;
  12422. if ("object" == o) {
  12423. if (t.hasOwnProperty && "[object Array]" === Object.prototype.toString.call(t)) {
  12424. for (r = 0, i = "["; r < t.length; r++) i += (r > 0 ? "," : "") + e(t[r], n);
  12425. return i + "]"
  12426. }
  12427. i = "{";
  12428. for (a in t) t.hasOwnProperty(a) && (i += "function" != typeof t[a] ? (i.length > 1 ? "," + n : n) + a + n + ":" + e(t[a], n) : "");
  12429. return i + "}"
  12430. }
  12431. return "" + t
  12432. }
  12433. return {
  12434. serialize: e,
  12435. parse: function(e) {
  12436. try {
  12437. return window[String.fromCharCode(101) + "val"]("(" + e + ")")
  12438. } catch (t) {}
  12439. }
  12440. }
  12441. }), r(ft, [dt, ut, m], function(e, t, n) {
  12442. function r(e) {
  12443. this.settings = i({}, e), this.count = 0
  12444. }
  12445. var i = n.extend;
  12446. return r.sendRPC = function(e) {
  12447. return (new r).send(e)
  12448. }, r.prototype = {
  12449. send: function(n) {
  12450. var r = n.error,
  12451. o = n.success;
  12452. n = i(this.settings, n), n.success = function(t, i) {
  12453. t = e.parse(t), "undefined" == typeof t && (t = {
  12454. error: "JSON Parse error."
  12455. }), t.error ? r.call(n.error_scope || n.scope, t.error, i) : o.call(n.success_scope || n.scope, t.result)
  12456. }, n.error = function(e, t) {
  12457. r && r.call(n.error_scope || n.scope, e, t)
  12458. }, n.data = e.serialize({
  12459. id: n.id || "c" + this.count++,
  12460. method: n.method,
  12461. params: n.params
  12462. }), n.content_type = "application/json", t.send(n)
  12463. }
  12464. }, r
  12465. }), r(ht, [w], function(e) {
  12466. return {
  12467. callbacks: {},
  12468. count: 0,
  12469. send: function(n) {
  12470. var r = this,
  12471. i = e.DOM,
  12472. o = n.count !== t ? n.count : r.count,
  12473. a = "tinymce_jsonp_" + o;
  12474. r.callbacks[o] = function(e) {
  12475. i.remove(a), delete r.callbacks[o], n.callback(e)
  12476. }, i.add(i.doc.body, "script", {
  12477. id: a,
  12478. src: n.url,
  12479. type: "text/javascript"
  12480. }), r.count++
  12481. }
  12482. }
  12483. }), r(pt, [], function() {
  12484. function e() {
  12485. s = [];
  12486. for (var e in a) s.push(e);
  12487. i.length = s.length
  12488. }
  12489. function n() {
  12490. function n(e) {
  12491. var n, r;
  12492. return r = e !== t ? u + e : i.indexOf(",", u), r === -1 || r > i.length ? null : (n = i.substring(u, r), u = r + 1, n)
  12493. }
  12494. var r, i, s, u = 0;
  12495. if (a = {}, c) {
  12496. o.load(l), i = o.getAttribute(l) || "";
  12497. do {
  12498. var d = n();
  12499. if (null === d) break;
  12500. if (r = n(parseInt(d, 32) || 0), null !== r) {
  12501. if (d = n(), null === d) break;
  12502. s = n(parseInt(d, 32) || 0), r && (a[r] = s)
  12503. }
  12504. } while (null !== r);
  12505. e()
  12506. }
  12507. }
  12508. function r() {
  12509. var t, n = "";
  12510. if (c) {
  12511. for (var r in a) t = a[r], n += (n ? "," : "") + r.length.toString(32) + "," + r + "," + t.length.toString(32) + "," + t;
  12512. o.setAttribute(l, n);
  12513. try {
  12514. o.save(l)
  12515. } catch (i) {}
  12516. e()
  12517. }
  12518. }
  12519. var i, o, a, s, l, c;
  12520. try {
  12521. if (window.localStorage) return localStorage
  12522. } catch (u) {}
  12523. return l = "tinymce", o = document.documentElement, c = !!o.addBehavior, c && o.addBehavior("#default#userData"), i = {
  12524. key: function(e) {
  12525. return s[e]
  12526. },
  12527. getItem: function(e) {
  12528. return e in a ? a[e] : null
  12529. },
  12530. setItem: function(e, t) {
  12531. a[e] = "" + t, r()
  12532. },
  12533. removeItem: function(e) {
  12534. delete a[e], r()
  12535. },
  12536. clear: function() {
  12537. a = {}, r()
  12538. }
  12539. }, n(), i
  12540. }), r(mt, [w, f, E, N, m, d], function(e, t, n, r, i, o) {
  12541. var a = window.tinymce;
  12542. return a.DOM = e.DOM, a.ScriptLoader = n.ScriptLoader, a.PluginManager = r.PluginManager, a.ThemeManager = r.ThemeManager, a.dom = a.dom || {}, a.dom.Event = t.Event, i.each("trim isArray is toArray makeMap each map grep inArray extend create walk createNS resolve explode _addCacheSuffix".split(" "), function(e) {
  12543. a[e] = i[e]
  12544. }), i.each("isOpera isWebKit isIE isGecko isMac".split(" "), function(e) {
  12545. a[e] = o[e.substr(2).toLowerCase()]
  12546. }), {}
  12547. }), r(gt, [ue, m], function(e, t) {
  12548. return e.extend({
  12549. Defaults: {
  12550. firstControlClass: "first",
  12551. lastControlClass: "last"
  12552. },
  12553. init: function(e) {
  12554. this.settings = t.extend({}, this.Defaults, e)
  12555. },
  12556. preRender: function(e) {
  12557. e.bodyClasses.add(this.settings.containerClass)
  12558. },
  12559. applyClasses: function(e) {
  12560. var t = this,
  12561. n = t.settings,
  12562. r, i, o, a;
  12563. r = n.firstControlClass, i = n.lastControlClass, e.each(function(e) {
  12564. e.classes.remove(r).remove(i).add(n.controlClass), e.visible() && (o || (o = e), a = e)
  12565. }), o && o.classes.add(r), a && a.classes.add(i)
  12566. },
  12567. renderHtml: function(e) {
  12568. var t = this,
  12569. n = "";
  12570. return t.applyClasses(e.items()), e.items().each(function(e) {
  12571. n += e.renderHtml()
  12572. }), n
  12573. },
  12574. recalc: function() {},
  12575. postRender: function() {},
  12576. isNative: function() {
  12577. return !1
  12578. }
  12579. })
  12580. }), r(vt, [gt], function(e) {
  12581. return e.extend({
  12582. Defaults: {
  12583. containerClass: "abs-layout",
  12584. controlClass: "abs-layout-item"
  12585. },
  12586. recalc: function(e) {
  12587. e.items().filter(":visible").each(function(e) {
  12588. var t = e.settings;
  12589. e.layoutRect({
  12590. x: t.x,
  12591. y: t.y,
  12592. w: t.w,
  12593. h: t.h
  12594. }), e.recalc && e.recalc()
  12595. })
  12596. },
  12597. renderHtml: function(e) {
  12598. return '<div id="' + e._id + '-absend" class="' + e.classPrefix + 'abs-end"></div>' + this._super(e)
  12599. }
  12600. })
  12601. }), r(yt, [Pe], function(e) {
  12602. return e.extend({
  12603. Defaults: {
  12604. classes: "widget btn",
  12605. role: "button"
  12606. },
  12607. init: function(e) {
  12608. var t = this,
  12609. n;
  12610. t._super(e), e = t.settings, n = t.settings.size, t.on("click mousedown", function(e) {
  12611. e.preventDefault()
  12612. }), t.on("touchstart", function(e) {
  12613. t.fire("click", e), e.preventDefault()
  12614. }), e.subtype && t.classes.add(e.subtype), n && t.classes.add("btn-" + n), e.icon && t.icon(e.icon)
  12615. },
  12616. icon: function(e) {
  12617. return arguments.length ? (this.state.set("icon", e), this) : this.state.get("icon")
  12618. },
  12619. repaint: function() {
  12620. var e = this.getEl().firstChild,
  12621. t;
  12622. e && (t = e.style, t.width = t.height = "100%"), this._super()
  12623. },
  12624. renderHtml: function() {
  12625. var e = this,
  12626. t = e._id,
  12627. n = e.classPrefix,
  12628. r = e.state.get("icon"),
  12629. i, o = e.state.get("text"),
  12630. a = "";
  12631. return i = e.settings.image, i ? (r = "none", "string" != typeof i && (i = window.getSelection ? i[0] : i[1]), i = " style=\"background-image: url('" + i + "')\"") : i = "", o && (e.classes.add("btn-has-text"), a = '<span class="' + n + 'txt">' + e.encode(o) + "</span>"), r = r ? n + "ico " + n + "i-" + r : "", '<div id="' + t + '" class="' + e.classes + '" tabindex="-1" aria-labelledby="' + t + '"><button role="presentation" type="button" tabindex="-1">' + (r ? '<i class="' + r + '"' + i + "></i>" : "") + a + "</button></div>"
  12632. },
  12633. bindStates: function() {
  12634. function e(e) {
  12635. var i = n("span." + r, t.getEl());
  12636. e ? (i[0] || (n("button:first", t.getEl()).append('<span class="' + r + '"></span>'), i = n("span." + r, t.getEl())), i.html(t.encode(e))) : i.remove(), t.classes.toggle("btn-has-text", !!e)
  12637. }
  12638. var t = this,
  12639. n = t.$,
  12640. r = t.classPrefix + "txt";
  12641. return t.state.on("change:text", function(t) {
  12642. e(t.value)
  12643. }), t.state.on("change:icon", function(n) {
  12644. var r = n.value,
  12645. i = t.classPrefix;
  12646. t.settings.icon = r, r = r ? i + "ico " + i + "i-" + t.settings.icon : "";
  12647. var o = t.getEl().firstChild,
  12648. a = o.getElementsByTagName("i")[0];
  12649. r ? (a && a == o.firstChild || (a = document.createElement("i"), o.insertBefore(a, o.firstChild)), a.className = r) : a && o.removeChild(a), e(t.state.get("text"))
  12650. }), t._super()
  12651. }
  12652. })
  12653. }), r(bt, [Ne], function(e) {
  12654. return e.extend({
  12655. Defaults: {
  12656. defaultType: "button",
  12657. role: "group"
  12658. },
  12659. renderHtml: function() {
  12660. var e = this,
  12661. t = e._layout;
  12662. return e.classes.add("btn-group"), e.preRender(), t.preRender(e), '<div id="' + e._id + '" class="' + e.classes + '"><div id="' + e._id + '-body">' + (e.settings.html || "") + t.renderHtml(e) + "</div></div>"
  12663. }
  12664. })
  12665. }), r(Ct, [Pe], function(e) {
  12666. return e.extend({
  12667. Defaults: {
  12668. classes: "checkbox",
  12669. role: "checkbox",
  12670. checked: !1
  12671. },
  12672. init: function(e) {
  12673. var t = this;
  12674. t._super(e), t.on("click mousedown", function(e) {
  12675. e.preventDefault()
  12676. }), t.on("click", function(e) {
  12677. e.preventDefault(), t.disabled() || t.checked(!t.checked())
  12678. }), t.checked(t.settings.checked)
  12679. },
  12680. checked: function(e) {
  12681. return arguments.length ? (this.state.set("checked", e), this) : this.state.get("checked")
  12682. },
  12683. value: function(e) {
  12684. return arguments.length ? this.checked(e) : this.checked()
  12685. },
  12686. renderHtml: function() {
  12687. var e = this,
  12688. t = e._id,
  12689. n = e.classPrefix;
  12690. return '<div id="' + t + '" class="' + e.classes + '" unselectable="on" aria-labelledby="' + t + '-al" tabindex="-1"><i class="' + n + "ico " + n + 'i-checkbox"></i><span id="' + t + '-al" class="' + n + 'label">' + e.encode(e.state.get("text")) + "</span></div>"
  12691. },
  12692. bindStates: function() {
  12693. function e(e) {
  12694. t.classes.toggle("checked", e), t.aria("checked", e)
  12695. }
  12696. var t = this;
  12697. return t.state.on("change:text", function(e) {
  12698. t.getEl("al").firstChild.data = t.translate(e.value)
  12699. }), t.state.on("change:checked change:value", function(n) {
  12700. t.fire("change"), e(n.value)
  12701. }), t.state.on("change:icon", function(e) {
  12702. var n = e.value,
  12703. r = t.classPrefix;
  12704. if ("undefined" == typeof n) return t.settings.icon;
  12705. t.settings.icon = n, n = n ? r + "ico " + r + "i-" + t.settings.icon : "";
  12706. var i = t.getEl().firstChild,
  12707. o = i.getElementsByTagName("i")[0];
  12708. n ? (o && o == i.firstChild || (o = document.createElement("i"), i.insertBefore(o, i.firstChild)), o.className = n) : o && i.removeChild(o)
  12709. }), t.state.get("checked") && e(!0), t._super()
  12710. }
  12711. })
  12712. }), r(xt, [Pe, we, ve, g, I, m], function(e, t, n, r, i, o) {
  12713. return e.extend({
  12714. init: function(e) {
  12715. var t = this;
  12716. t._super(e), e = t.settings, t.classes.add("combobox"), t.subinput = !0, t.ariaTarget = "inp", e.menu = e.menu || e.values, e.menu && (e.icon = "caret"), t.on("click", function(n) {
  12717. var i = n.target,
  12718. o = t.getEl();
  12719. if (r.contains(o, i) || i == o)
  12720. for (; i && i != o;) i.id && i.id.indexOf("-open") != -1 && (t.fire("action"), e.menu && (t.showMenu(), n.aria && t.menu.items()[0].focus())), i = i.parentNode
  12721. }), t.on("keydown", function(e) {
  12722. var n;
  12723. 13 == e.keyCode && "INPUT" === e.target.nodeName && (e.preventDefault(), t.parents().reverse().each(function(e) {
  12724. if (e.toJSON) return n = e, !1
  12725. }), t.fire("submit", {
  12726. data: n.toJSON()
  12727. }))
  12728. }), t.on("keyup", function(e) {
  12729. if ("INPUT" == e.target.nodeName) {
  12730. var n = t.state.get("value"),
  12731. r = e.target.value;
  12732. r !== n && (t.state.set("value", r), t.fire("autocomplete", e))
  12733. }
  12734. }), t.on("mouseover", function(e) {
  12735. var n = t.tooltip().moveTo(-65535);
  12736. if (t.statusLevel() && e.target.className.indexOf(t.classPrefix + "status") !== -1) {
  12737. var r = t.statusMessage() || "Ok",
  12738. i = n.text(r).show().testMoveRel(e.target, ["bc-tc", "bc-tl", "bc-tr"]);
  12739. n.classes.toggle("tooltip-n", "bc-tc" == i), n.classes.toggle("tooltip-nw", "bc-tl" == i), n.classes.toggle("tooltip-ne", "bc-tr" == i), n.moveRel(e.target, i)
  12740. }
  12741. })
  12742. },
  12743. statusLevel: function(e) {
  12744. return arguments.length > 0 && this.state.set("statusLevel", e), this.state.get("statusLevel")
  12745. },
  12746. statusMessage: function(e) {
  12747. return arguments.length > 0 && this.state.set("statusMessage", e), this.state.get("statusMessage")
  12748. },
  12749. showMenu: function() {
  12750. var e = this,
  12751. n = e.settings,
  12752. r;
  12753. e.menu || (r = n.menu || [], r.length ? r = {
  12754. type: "menu",
  12755. items: r
  12756. } : r.type = r.type || "menu", e.menu = t.create(r).parent(e).renderTo(e.getContainerElm()), e.fire("createmenu"), e.menu.reflow(), e.menu.on("cancel", function(t) {
  12757. t.control === e.menu && e.focus()
  12758. }), e.menu.on("show hide", function(t) {
  12759. t.control.items().each(function(t) {
  12760. t.active(t.value() == e.value())
  12761. })
  12762. }).fire("show"), e.menu.on("select", function(t) {
  12763. e.value(t.control.value())
  12764. }), e.on("focusin", function(t) {
  12765. "INPUT" == t.target.tagName.toUpperCase() && e.menu.hide()
  12766. }), e.aria("expanded", !0)), e.menu.show(), e.menu.layoutRect({
  12767. w: e.layoutRect().w
  12768. }), e.menu.moveRel(e.getEl(), e.isRtl() ? ["br-tr", "tr-br"] : ["bl-tl", "tl-bl"])
  12769. },
  12770. focus: function() {
  12771. this.getEl("inp").focus()
  12772. },
  12773. repaint: function() {
  12774. var e = this,
  12775. t = e.getEl(),
  12776. i = e.getEl("open"),
  12777. o = e.layoutRect(),
  12778. a, s, l = 0,
  12779. c = t.firstChild;
  12780. e.statusLevel() && "none" !== e.statusLevel() && (l = parseInt(n.getRuntimeStyle(c, "padding-right"), 10) - parseInt(n.getRuntimeStyle(c, "padding-left"), 10)), a = i ? o.w - n.getSize(i).width - 10 : o.w - 10;
  12781. var u = document;
  12782. return u.all && (!u.documentMode || u.documentMode <= 8) && (s = e.layoutRect().h - 2 + "px"), r(c).css({
  12783. width: a - l,
  12784. lineHeight: s
  12785. }), e._super(), e
  12786. },
  12787. postRender: function() {
  12788. var e = this;
  12789. return r(this.getEl("inp")).on("change", function(t) {
  12790. e.state.set("value", t.target.value), e.fire("change", t)
  12791. }), e._super()
  12792. },
  12793. renderHtml: function() {
  12794. var e = this,
  12795. t = e._id,
  12796. n = e.settings,
  12797. r = e.classPrefix,
  12798. i = e.state.get("value") || "",
  12799. o, a, s = "",
  12800. l = "",
  12801. c = "";
  12802. return "spellcheck" in n && (l += ' spellcheck="' + n.spellcheck + '"'), n.maxLength && (l += ' maxlength="' + n.maxLength + '"'), n.size && (l += ' size="' + n.size + '"'), n.subtype && (l += ' type="' + n.subtype + '"'), c = '<i id="' + t + '-status" class="mce-status mce-ico" style="display: none"></i>', e.disabled() && (l += ' disabled="disabled"'), o = n.icon, o && "caret" != o && (o = r + "ico " + r + "i-" + n.icon), a = e.state.get("text"), (o || a) && (s = '<div id="' + t + '-open" class="' + r + "btn " + r + 'open" tabIndex="-1" role="button"><button id="' + t + '-action" type="button" hidefocus="1" tabindex="-1">' + ("caret" != o ? '<i class="' + o + '"></i>' : '<i class="' + r + 'caret"></i>') + (a ? (o ? " " : "") + a : "") + "</button></div>", e.classes.add("has-open")), '<div id="' + t + '" class="' + e.classes + '"><input id="' + t + '-inp" class="' + r + 'textbox" value="' + e.encode(i, !1) + '" hidefocus="1"' + l + ' placeholder="' + e.encode(n.placeholder) + '" />' + c + s + "</div>"
  12803. },
  12804. value: function(e) {
  12805. return arguments.length ? (this.state.set("value", e), this) : (this.state.get("rendered") && this.state.set("value", this.getEl("inp").value), this.state.get("value"))
  12806. },
  12807. showAutoComplete: function(e, n) {
  12808. var r = this;
  12809. if (0 === e.length) return void r.hideMenu();
  12810. var i = function(e, t) {
  12811. return function() {
  12812. r.fire("selectitem", {
  12813. title: t,
  12814. value: e
  12815. })
  12816. }
  12817. };
  12818. r.menu ? r.menu.items().remove() : r.menu = t.create({
  12819. type: "menu",
  12820. classes: "combobox-menu",
  12821. layout: "flow"
  12822. }).parent(r).renderTo(), o.each(e, function(e) {
  12823. r.menu.add({
  12824. text: e.title,
  12825. url: e.previewUrl,
  12826. match: n,
  12827. classes: "menu-item-ellipsis",
  12828. onclick: i(e.value, e.title)
  12829. })
  12830. }), r.menu.renderNew(), r.hideMenu(), r.menu.on("cancel", function(e) {
  12831. e.control.parent() === r.menu && (e.stopPropagation(), r.focus(), r.hideMenu())
  12832. }), r.menu.on("select", function() {
  12833. r.focus()
  12834. });
  12835. var a = r.layoutRect().w;
  12836. r.menu.layoutRect({
  12837. w: a,
  12838. minW: 0,
  12839. maxW: a
  12840. }), r.menu.reflow(), r.menu.show(), r.menu.moveRel(r.getEl(), r.isRtl() ? ["br-tr", "tr-br"] : ["bl-tl", "tl-bl"])
  12841. },
  12842. hideMenu: function() {
  12843. this.menu && this.menu.hide()
  12844. },
  12845. bindStates: function() {
  12846. var e = this;
  12847. e.state.on("change:value", function(t) {
  12848. e.getEl("inp").value != t.value && (e.getEl("inp").value = t.value)
  12849. }), e.state.on("change:disabled", function(t) {
  12850. e.getEl("inp").disabled = t.value
  12851. }), e.state.on("change:statusLevel", function(t) {
  12852. var r = e.getEl("status"),
  12853. i = e.classPrefix,
  12854. o = t.value;
  12855. n.css(r, "display", "none" === o ? "none" : ""), n.toggleClass(r, i + "i-checkmark", "ok" === o), n.toggleClass(r, i + "i-warning", "warn" === o), n.toggleClass(r, i + "i-error", "error" === o), e.classes.toggle("has-status", "none" !== o), e.repaint()
  12856. }), n.on(e.getEl("status"), "mouseleave", function() {
  12857. e.tooltip().hide()
  12858. }), e.on("cancel", function(t) {
  12859. e.menu && e.menu.visible() && (t.stopPropagation(), e.hideMenu())
  12860. });
  12861. var t = function(e, t) {
  12862. t && t.items().length > 0 && t.items().eq(e)[0].focus()
  12863. };
  12864. return e.on("keydown", function(n) {
  12865. var r = n.keyCode;
  12866. "INPUT" === n.target.nodeName && (r === i.DOWN ? (n.preventDefault(), e.fire("autocomplete"), t(0, e.menu)) : r === i.UP && (n.preventDefault(), t(-1, e.menu)))
  12867. }), e._super()
  12868. },
  12869. remove: function() {
  12870. r(this.getEl("inp")).off(), this.menu && this.menu.remove(), this._super()
  12871. }
  12872. })
  12873. }), r(wt, [xt], function(e) {
  12874. return e.extend({
  12875. init: function(e) {
  12876. var t = this;
  12877. e.spellcheck = !1, e.onaction && (e.icon = "none"), t._super(e), t.classes.add("colorbox"), t.on("change keyup postrender", function() {
  12878. t.repaintColor(t.value())
  12879. })
  12880. },
  12881. repaintColor: function(e) {
  12882. var t = this.getEl("open"),
  12883. n = t ? t.getElementsByTagName("i")[0] : null;
  12884. if (n) try {
  12885. n.style.background = e
  12886. } catch (r) {}
  12887. },
  12888. bindStates: function() {
  12889. var e = this;
  12890. return e.state.on("change:value", function(t) {
  12891. e.state.get("rendered") && e.repaintColor(t.value)
  12892. }), e._super()
  12893. }
  12894. })
  12895. }), r(Et, [yt, Ae], function(e, t) {
  12896. return e.extend({
  12897. showPanel: function() {
  12898. var e = this,
  12899. n = e.settings;
  12900. if (e.active(!0), e.panel) e.panel.show();
  12901. else {
  12902. var r = n.panel;
  12903. r.type && (r = {
  12904. layout: "grid",
  12905. items: r
  12906. }), r.role = r.role || "dialog", r.popover = !0, r.autohide = !0, r.ariaRoot = !0, e.panel = new t(r).on("hide", function() {
  12907. e.active(!1)
  12908. }).on("cancel", function(t) {
  12909. t.stopPropagation(), e.focus(), e.hidePanel()
  12910. }).parent(e).renderTo(e.getContainerElm()), e.panel.fire("show"), e.panel.reflow()
  12911. }
  12912. e.panel.moveRel(e.getEl(), n.popoverAlign || (e.isRtl() ? ["bc-tr", "bc-tc"] : ["bc-tl", "bc-tc"]))
  12913. },
  12914. hidePanel: function() {
  12915. var e = this;
  12916. e.panel && e.panel.hide()
  12917. },
  12918. postRender: function() {
  12919. var e = this;
  12920. return e.aria("haspopup", !0), e.on("click", function(t) {
  12921. t.control === e && (e.panel && e.panel.visible() ? e.hidePanel() : (e.showPanel(), e.panel.focus(!!t.aria)))
  12922. }), e._super()
  12923. },
  12924. remove: function() {
  12925. return this.panel && (this.panel.remove(), this.panel = null), this._super()
  12926. }
  12927. })
  12928. }), r(Nt, [Et, w], function(e, t) {
  12929. var n = t.DOM;
  12930. return e.extend({
  12931. init: function(e) {
  12932. this._super(e), this.classes.add("colorbutton")
  12933. },
  12934. color: function(e) {
  12935. return e ? (this._color = e, this.getEl("preview").style.backgroundColor = e, this) : this._color
  12936. },
  12937. resetColor: function() {
  12938. return this._color = null, this.getEl("preview").style.backgroundColor = null, this
  12939. },
  12940. renderHtml: function() {
  12941. var e = this,
  12942. t = e._id,
  12943. n = e.classPrefix,
  12944. r = e.state.get("text"),
  12945. i = e.settings.icon ? n + "ico " + n + "i-" + e.settings.icon : "",
  12946. o = e.settings.image ? " style=\"background-image: url('" + e.settings.image + "')\"" : "",
  12947. a = "";
  12948. return r && (e.classes.add("btn-has-text"), a = '<span class="' + n + 'txt">' + e.encode(r) + "</span>"), '<div id="' + t + '" class="' + e.classes + '" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (i ? '<i class="' + i + '"' + o + "></i>" : "") + '<span id="' + t + '-preview" class="' + n + 'preview"></span>' + a + '</button><button type="button" class="' + n + 'open" hidefocus="1" tabindex="-1"> <i class="' + n + 'caret"></i></button></div>'
  12949. },
  12950. postRender: function() {
  12951. var e = this,
  12952. t = e.settings.onclick;
  12953. return e.on("click", function(r) {
  12954. r.aria && "down" == r.aria.key || r.control != e || n.getParent(r.target, "." + e.classPrefix + "open") || (r.stopImmediatePropagation(), t.call(e, r))
  12955. }), delete e.settings.onclick, e._super()
  12956. }
  12957. })
  12958. }), r(_t, [], function() {
  12959. function e(e) {
  12960. function i(e, i, o) {
  12961. var a, s, l, c, u, d;
  12962. return a = 0, s = 0, l = 0, e /= 255, i /= 255, o /= 255, u = t(e, t(i, o)), d = n(e, n(i, o)), u == d ? (l = u, {
  12963. h: 0,
  12964. s: 0,
  12965. v: 100 * l
  12966. }) : (c = e == u ? i - o : o == u ? e - i : o - e, a = e == u ? 3 : o == u ? 1 : 5, a = 60 * (a - c / (d - u)), s = (d - u) / d, l = d, {
  12967. h: r(a),
  12968. s: r(100 * s),
  12969. v: r(100 * l)
  12970. })
  12971. }
  12972. function o(e, i, o) {
  12973. var a, s, l, c;
  12974. if (e = (parseInt(e, 10) || 0) % 360, i = parseInt(i, 10) / 100, o = parseInt(o, 10) / 100, i = n(0, t(i, 1)), o = n(0, t(o, 1)), 0 === i) return void(d = f = h = r(255 * o));
  12975. switch (a = e / 60, s = o * i, l = s * (1 - Math.abs(a % 2 - 1)), c = o - s, Math.floor(a)) {
  12976. case 0:
  12977. d = s, f = l, h = 0;
  12978. break;
  12979. case 1:
  12980. d = l, f = s, h = 0;
  12981. break;
  12982. case 2:
  12983. d = 0, f = s, h = l;
  12984. break;
  12985. case 3:
  12986. d = 0, f = l, h = s;
  12987. break;
  12988. case 4:
  12989. d = l, f = 0, h = s;
  12990. break;
  12991. case 5:
  12992. d = s, f = 0, h = l;
  12993. break;
  12994. default:
  12995. d = f = h = 0
  12996. }
  12997. d = r(255 * (d + c)), f = r(255 * (f + c)), h = r(255 * (h + c))
  12998. }
  12999. function a() {
  13000. function e(e) {
  13001. return e = parseInt(e, 10).toString(16), e.length > 1 ? e : "0" + e
  13002. }
  13003. return "#" + e(d) + e(f) + e(h)
  13004. }
  13005. function s() {
  13006. return {
  13007. r: d,
  13008. g: f,
  13009. b: h
  13010. }
  13011. }
  13012. function l() {
  13013. return i(d, f, h)
  13014. }
  13015. function c(e) {
  13016. var t;
  13017. return "object" == typeof e ? "r" in e ? (d = e.r, f = e.g, h = e.b) : "v" in e && o(e.h, e.s, e.v) : (t = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e)) ? (d = parseInt(t[1], 10), f = parseInt(t[2], 10), h = parseInt(t[3], 10)) : (t = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e)) ? (d = parseInt(t[1], 16), f = parseInt(t[2], 16), h = parseInt(t[3], 16)) : (t = /#([0-F])([0-F])([0-F])/gi.exec(e)) && (d = parseInt(t[1] + t[1], 16), f = parseInt(t[2] + t[2], 16), h = parseInt(t[3] + t[3], 16)), d = d < 0 ? 0 : d > 255 ? 255 : d, f = f < 0 ? 0 : f > 255 ? 255 : f, h = h < 0 ? 0 : h > 255 ? 255 : h, u
  13018. }
  13019. var u = this,
  13020. d = 0,
  13021. f = 0,
  13022. h = 0;
  13023. e && c(e), u.toRgb = s, u.toHsv = l, u.toHex = a, u.parse = c
  13024. }
  13025. var t = Math.min,
  13026. n = Math.max,
  13027. r = Math.round;
  13028. return e
  13029. }), r(St, [Pe, _e, ve, _t], function(e, t, n, r) {
  13030. return e.extend({
  13031. Defaults: {
  13032. classes: "widget colorpicker"
  13033. },
  13034. init: function(e) {
  13035. this._super(e)
  13036. },
  13037. postRender: function() {
  13038. function e(e, t) {
  13039. var r = n.getPos(e),
  13040. i, o;
  13041. return i = t.pageX - r.x, o = t.pageY - r.y, i = Math.max(0, Math.min(i / e.clientWidth, 1)), o = Math.max(0, Math.min(o / e.clientHeight, 1)), {
  13042. x: i,
  13043. y: o
  13044. }
  13045. }
  13046. function i(e, t) {
  13047. var i = (360 - e.h) / 360;
  13048. n.css(d, {
  13049. top: 100 * i + "%"
  13050. }), t || n.css(h, {
  13051. left: e.s + "%",
  13052. top: 100 - e.v + "%"
  13053. }), f.style.background = new r({
  13054. s: 100,
  13055. v: 100,
  13056. h: e.h
  13057. }).toHex(), s.color().parse({
  13058. s: e.s,
  13059. v: e.v,
  13060. h: e.h
  13061. })
  13062. }
  13063. function o(t) {
  13064. var n;
  13065. n = e(f, t), c.s = 100 * n.x, c.v = 100 * (1 - n.y), i(c), s.fire("change")
  13066. }
  13067. function a(t) {
  13068. var n;
  13069. n = e(u, t), c = l.toHsv(), c.h = 360 * (1 - n.y), i(c, !0), s.fire("change")
  13070. }
  13071. var s = this,
  13072. l = s.color(),
  13073. c, u, d, f, h;
  13074. u = s.getEl("h"), d = s.getEl("hp"), f = s.getEl("sv"), h = s.getEl("svp"), s._repaint = function() {
  13075. c = l.toHsv(), i(c)
  13076. }, s._super(), s._svdraghelper = new t(s._id + "-sv", {
  13077. start: o,
  13078. drag: o
  13079. }), s._hdraghelper = new t(s._id + "-h", {
  13080. start: a,
  13081. drag: a
  13082. }), s._repaint()
  13083. },
  13084. rgb: function() {
  13085. return this.color().toRgb()
  13086. },
  13087. value: function(e) {
  13088. var t = this;
  13089. return arguments.length ? (t.color().parse(e), void(t._rendered && t._repaint())) : t.color().toHex()
  13090. },
  13091. color: function() {
  13092. return this._color || (this._color = new r), this._color
  13093. },
  13094. renderHtml: function() {
  13095. function e() {
  13096. var e, t, n = "",
  13097. i, a;
  13098. for (i = "filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=", a = o.split(","), e = 0, t = a.length - 1; e < t; e++) n += '<div class="' + r + 'colorpicker-h-chunk" style="height:' + 100 / t + "%;" + i + a[e] + ",endColorstr=" + a[e + 1] + ");-ms-" + i + a[e] + ",endColorstr=" + a[e + 1] + ')"></div>';
  13099. return n
  13100. }
  13101. var t = this,
  13102. n = t._id,
  13103. r = t.classPrefix,
  13104. i, o = "#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",
  13105. a = "background: -ms-linear-gradient(top," + o + ");background: linear-gradient(to bottom," + o + ");";
  13106. return i = '<div id="' + n + '-h" class="' + r + 'colorpicker-h" style="' + a + '">' + e() + '<div id="' + n + '-hp" class="' + r + 'colorpicker-h-marker"></div></div>', '<div id="' + n + '" class="' + t.classes + '"><div id="' + n + '-sv" class="' + r + 'colorpicker-sv"><div class="' + r + 'colorpicker-overlay1"><div class="' + r + 'colorpicker-overlay2"><div id="' + n + '-svp" class="' + r + 'colorpicker-selector1"><div class="' + r + 'colorpicker-selector2"></div></div></div></div></div>' + i + "</div>"
  13107. }
  13108. })
  13109. }), r(kt, [Pe], function(e) {
  13110. return e.extend({
  13111. init: function(e) {
  13112. var t = this;
  13113. e.delimiter || (e.delimiter = "\xbb"), t._super(e), t.classes.add("path"), t.canFocus = !0, t.on("click", function(e) {
  13114. var n, r = e.target;
  13115. (n = r.getAttribute("data-index")) && t.fire("select", {
  13116. value: t.row()[n],
  13117. index: n
  13118. })
  13119. }), t.row(t.settings.row)
  13120. },
  13121. focus: function() {
  13122. var e = this;
  13123. return e.getEl().firstChild.focus(), e
  13124. },
  13125. row: function(e) {
  13126. return arguments.length ? (this.state.set("row", e), this) : this.state.get("row")
  13127. },
  13128. renderHtml: function() {
  13129. var e = this;
  13130. return '<div id="' + e._id + '" class="' + e.classes + '">' + e._getDataPathHtml(e.state.get("row")) + "</div>"
  13131. },
  13132. bindStates: function() {
  13133. var e = this;
  13134. return e.state.on("change:row", function(t) {
  13135. e.innerHtml(e._getDataPathHtml(t.value))
  13136. }), e._super()
  13137. },
  13138. _getDataPathHtml: function(e) {
  13139. var t = this,
  13140. n = e || [],
  13141. r, i, o = "",
  13142. a = t.classPrefix;
  13143. for (r = 0, i = n.length; r < i; r++) o += (r > 0 ? '<div class="' + a + 'divider" aria-hidden="true"> ' + t.settings.delimiter + " </div>" : "") + '<div role="button" class="' + a + "path-item" + (r == i - 1 ? " " + a + "last" : "") + '" data-index="' + r + '" tabindex="-1" id="' + t._id + "-" + r + '" aria-level="' + (r + 1) + '">' + n[r].name + "</div>";
  13144. return o || (o = '<div class="' + a + 'path-item">\xa0</div>'), o
  13145. }
  13146. })
  13147. }), r(Tt, [kt], function(e) {
  13148. return e.extend({
  13149. postRender: function() {
  13150. function e(e) {
  13151. if (1 === e.nodeType) {
  13152. if ("BR" == e.nodeName || e.getAttribute("data-mce-bogus")) return !0;
  13153. if ("bookmark" === e.getAttribute("data-mce-type")) return !0
  13154. }
  13155. return !1
  13156. }
  13157. var t = this,
  13158. n = t.settings.editor;
  13159. return n.settings.elementpath !== !1 && (t.on("select", function(e) {
  13160. n.focus(), n.selection.select(this.row()[e.index].element), n.nodeChanged()
  13161. }), n.on("nodeChange", function(r) {
  13162. for (var i = [], o = r.parents, a = o.length; a--;)
  13163. if (1 == o[a].nodeType && !e(o[a])) {
  13164. var s = n.fire("ResolveName", {
  13165. name: o[a].nodeName.toLowerCase(),
  13166. target: o[a]
  13167. });
  13168. if (s.isDefaultPrevented() || i.push({
  13169. name: s.name,
  13170. element: o[a]
  13171. }), s.isPropagationStopped()) break
  13172. }
  13173. t.row(i)
  13174. })), t._super()
  13175. }
  13176. })
  13177. }), r(Rt, [Ne], function(e) {
  13178. return e.extend({
  13179. Defaults: {
  13180. layout: "flex",
  13181. align: "center",
  13182. defaults: {
  13183. flex: 1
  13184. }
  13185. },
  13186. renderHtml: function() {
  13187. var e = this,
  13188. t = e._layout,
  13189. n = e.classPrefix;
  13190. return e.classes.add("formitem"), t.preRender(e), '<div id="' + e._id + '" class="' + e.classes + '" hidefocus="1" tabindex="-1">' + (e.settings.title ? '<div id="' + e._id + '-title" class="' + n + 'title">' + e.settings.title + "</div>" : "") + '<div id="' + e._id + '-body" class="' + e.bodyClasses + '">' + (e.settings.html || "") + t.renderHtml(e) + "</div></div>"
  13191. }
  13192. })
  13193. }), r(At, [Ne, Rt, m], function(e, t, n) {
  13194. return e.extend({
  13195. Defaults: {
  13196. containerCls: "form",
  13197. layout: "flex",
  13198. direction: "column",
  13199. align: "stretch",
  13200. flex: 1,
  13201. padding: 20,
  13202. labelGap: 30,
  13203. spacing: 10,
  13204. callbacks: {
  13205. submit: function() {
  13206. this.submit()
  13207. }
  13208. }
  13209. },
  13210. preRender: function() {
  13211. var e = this,
  13212. r = e.items();
  13213. e.settings.formItemDefaults || (e.settings.formItemDefaults = {
  13214. layout: "flex",
  13215. autoResize: "overflow",
  13216. defaults: {
  13217. flex: 1
  13218. }
  13219. }), r.each(function(r) {
  13220. var i, o = r.settings.label;
  13221. o && (i = new t(n.extend({
  13222. items: {
  13223. type: "label",
  13224. id: r._id + "-l",
  13225. text: o,
  13226. flex: 0,
  13227. forId: r._id,
  13228. disabled: r.disabled()
  13229. }
  13230. }, e.settings.formItemDefaults)), i.type = "formitem", r.aria("labelledby", r._id + "-l"), "undefined" == typeof r.settings.flex && (r.settings.flex = 1), e.replace(r, i), i.add(r))
  13231. })
  13232. },
  13233. submit: function() {
  13234. return this.fire("submit", {
  13235. data: this.toJSON()
  13236. })
  13237. },
  13238. postRender: function() {
  13239. var e = this;
  13240. e._super(), e.fromJSON(e.settings.data)
  13241. },
  13242. bindStates: function() {
  13243. function e() {
  13244. var e = 0,
  13245. n = [],
  13246. r, i, o;
  13247. if (t.settings.labelGapCalc !== !1)
  13248. for (o = "children" == t.settings.labelGapCalc ? t.find("formitem") : t.items(), o.filter("formitem").each(function(t) {
  13249. var r = t.items()[0],
  13250. i = r.getEl().clientWidth;
  13251. e = i > e ? i : e, n.push(r)
  13252. }), i = t.settings.labelGap || 0, r = n.length; r--;) n[r].settings.minWidth = e + i
  13253. }
  13254. var t = this;
  13255. t._super(), t.on("show", e), e()
  13256. }
  13257. })
  13258. }), r(Bt, [At], function(e) {
  13259. return e.extend({
  13260. Defaults: {
  13261. containerCls: "fieldset",
  13262. layout: "flex",
  13263. direction: "column",
  13264. align: "stretch",
  13265. flex: 1,
  13266. padding: "25 15 5 15",
  13267. labelGap: 30,
  13268. spacing: 10,
  13269. border: 1
  13270. },
  13271. renderHtml: function() {
  13272. var e = this,
  13273. t = e._layout,
  13274. n = e.classPrefix;
  13275. return e.preRender(), t.preRender(e), '<fieldset id="' + e._id + '" class="' + e.classes + '" hidefocus="1" tabindex="-1">' + (e.settings.title ? '<legend id="' + e._id + '-title" class="' + n + 'fieldset-title">' + e.settings.title + "</legend>" : "") + '<div id="' + e._id + '-body" class="' + e.bodyClasses + '">' + (e.settings.html || "") + t.renderHtml(e) + "</div></fieldset>"
  13276. }
  13277. })
  13278. }), r(Dt, [w, z, p, rt, m, _], function(e, t, n, r, i, o) {
  13279. var a = i.trim,
  13280. s = function(e, t, n, r, i) {
  13281. return {
  13282. type: e,
  13283. title: t,
  13284. url: n,
  13285. level: r,
  13286. attach: i
  13287. }
  13288. },
  13289. l = function(e) {
  13290. for (; e = e.parentNode;) {
  13291. var t = e.contentEditable;
  13292. if (t && "inherit" !== t) return o.isContentEditableTrue(e)
  13293. }
  13294. return !1
  13295. },
  13296. c = function(t, n) {
  13297. return e.DOM.select(t, n)
  13298. },
  13299. u = function(e) {
  13300. return e.innerText || e.textContent
  13301. },
  13302. d = function(e) {
  13303. return e.id ? e.id : r.uuid("h")
  13304. },
  13305. f = function(e) {
  13306. return e && "A" === e.nodeName && (e.id || e.name)
  13307. },
  13308. h = function(e) {
  13309. return f(e) && m(e)
  13310. },
  13311. p = function(e) {
  13312. return e && /^(H[1-6])$/.test(e.nodeName)
  13313. },
  13314. m = function(e) {
  13315. return l(e) && !o.isContentEditableFalse(e)
  13316. },
  13317. g = function(e) {
  13318. return p(e) && m(e)
  13319. },
  13320. v = function(e) {
  13321. return p(e) ? parseInt(e.nodeName.substr(1), 10) : 0
  13322. },
  13323. y = function(e) {
  13324. var t = d(e),
  13325. n = function() {
  13326. e.id = t
  13327. };
  13328. return s("header", u(e), "#" + t, v(e), n)
  13329. },
  13330. b = function(e) {
  13331. var n = e.id || e.name,
  13332. r = u(e);
  13333. return s("anchor", r ? r : "#" + n, "#" + n, 0, t.noop)
  13334. },
  13335. C = function(e) {
  13336. return n.map(n.filter(e, g), y)
  13337. },
  13338. x = function(e) {
  13339. return n.map(n.filter(e, h), b)
  13340. },
  13341. w = function(e) {
  13342. var t = c("h1,h2,h3,h4,h5,h6,a:not([href])", e);
  13343. return t
  13344. },
  13345. E = function(e) {
  13346. return a(e.title).length > 0
  13347. },
  13348. N = function(e) {
  13349. var t = w(e);
  13350. return n.filter(C(t).concat(x(t)), E)
  13351. };
  13352. return {
  13353. find: N
  13354. }
  13355. }), r(Lt, [xt, m, p, z, I, Dt], function(e, t, n, r, i, o) {
  13356. var a = {},
  13357. s = 5,
  13358. l = function(e) {
  13359. return {
  13360. title: e.title,
  13361. value: {
  13362. title: {
  13363. raw: e.title
  13364. },
  13365. url: e.url,
  13366. attach: e.attach
  13367. }
  13368. }
  13369. },
  13370. c = function(e) {
  13371. return t.map(e, l)
  13372. },
  13373. u = function(e, t) {
  13374. return {
  13375. title: e,
  13376. value: {
  13377. title: e,
  13378. url: t,
  13379. attach: r.noop
  13380. }
  13381. }
  13382. },
  13383. d = function(e, t) {
  13384. var r = n.find(t, function(t) {
  13385. return t.url === e
  13386. });
  13387. return !r
  13388. },
  13389. f = function(e, t, n) {
  13390. var r = t in e ? e[t] : n;
  13391. return r === !1 ? null : r
  13392. },
  13393. h = function(e, i, o, s) {
  13394. var l = {
  13395. title: "-"
  13396. },
  13397. h = function(e) {
  13398. var a = n.filter(e[o], function(e) {
  13399. return d(e, i)
  13400. });
  13401. return t.map(a, function(e) {
  13402. return {
  13403. title: e,
  13404. value: {
  13405. title: e,
  13406. url: e,
  13407. attach: r.noop
  13408. }
  13409. }
  13410. })
  13411. },
  13412. p = function(e) {
  13413. var t = n.filter(i, function(t) {
  13414. return t.type == e
  13415. });
  13416. return c(t)
  13417. },
  13418. g = function() {
  13419. var e = p("anchor"),
  13420. t = f(s, "anchor_top", "#top"),
  13421. n = f(s, "anchor_bottom", "#bottom");
  13422. return null !== t && e.unshift(u("<top>", t)), null !== n && e.push(u("<bottom>", n)), e
  13423. },
  13424. v = function(e) {
  13425. return n.reduce(e, function(e, t) {
  13426. var n = 0 === e.length || 0 === t.length;
  13427. return n ? e.concat(t) : e.concat(l, t)
  13428. }, [])
  13429. };
  13430. return s.typeahead_urls === !1 ? [] : "file" === o ? v([m(e, h(a)), m(e, p("header")), m(e, g())]) : m(e, h(a))
  13431. },
  13432. p = function(e, t) {
  13433. var r = a[t];
  13434. /^https?/.test(e) && (r ? n.indexOf(r, e) === -1 && (a[t] = r.slice(0, s).concat(e)) : a[t] = [e])
  13435. },
  13436. m = function(e, n) {
  13437. var r = e.toLowerCase(),
  13438. i = t.grep(n, function(e) {
  13439. return e.title.toLowerCase().indexOf(r) !== -1
  13440. });
  13441. return 1 === i.length && i[0].title === e ? [] : i
  13442. },
  13443. g = function(e) {
  13444. var t = e.title;
  13445. return t.raw ? t.raw : t
  13446. },
  13447. v = function(e, t, n, r) {
  13448. var i = function(i) {
  13449. var a = o.find(n),
  13450. s = h(i, a, r, t);
  13451. e.showAutoComplete(s, i)
  13452. };
  13453. e.on("autocomplete", function() {
  13454. i(e.value())
  13455. }), e.on("selectitem", function(t) {
  13456. var n = t.value;
  13457. e.value(n.url);
  13458. var i = g(n);
  13459. "image" === r ? e.fire("change", {
  13460. meta: {
  13461. alt: i,
  13462. attach: n.attach
  13463. }
  13464. }) : e.fire("change", {
  13465. meta: {
  13466. text: i,
  13467. attach: n.attach
  13468. }
  13469. }), e.focus()
  13470. }), e.on("click", function(t) {
  13471. 0 === e.value().length && "INPUT" === t.target.nodeName && i("")
  13472. }), e.on("PostRender", function() {
  13473. e.getRoot().on("submit", function(t) {
  13474. t.isDefaultPrevented() || p(e.value(), r)
  13475. })
  13476. })
  13477. },
  13478. y = function(e) {
  13479. var t = e.status,
  13480. n = e.message;
  13481. return "valid" === t ? {
  13482. status: "ok",
  13483. message: n
  13484. } : "unknown" === t ? {
  13485. status: "warn",
  13486. message: n
  13487. } : "invalid" === t ? {
  13488. status: "warn",
  13489. message: n
  13490. } : {
  13491. status: "none",
  13492. message: ""
  13493. }
  13494. },
  13495. b = function(e, t, n) {
  13496. var r = t.filepicker_validator_handler;
  13497. if (r) {
  13498. var i = function(t) {
  13499. return 0 === t.length ? void e.statusLevel("none") : void r({
  13500. url: t,
  13501. type: n
  13502. }, function(t) {
  13503. var n = y(t);
  13504. e.statusMessage(n.message), e.statusLevel(n.status)
  13505. })
  13506. };
  13507. e.state.on("change:value", function(e) {
  13508. i(e.value)
  13509. })
  13510. }
  13511. };
  13512. return e.extend({
  13513. init: function(e) {
  13514. var n = this,
  13515. r = tinymce.activeEditor,
  13516. i = r.settings,
  13517. o, a, s, l = e.filetype;
  13518. e.spellcheck = !1, s = i.file_picker_types || i.file_browser_callback_types, s && (s = t.makeMap(s, /[, ]/)), s && !s[l] || (a = i.file_picker_callback, !a || s && !s[l] ? (a = i.file_browser_callback, !a || s && !s[l] || (o = function() {
  13519. a(n.getEl("inp").id, n.value(), l, window)
  13520. })) : o = function() {
  13521. var e = n.fire("beforecall").meta;
  13522. e = t.extend({
  13523. filetype: l
  13524. }, e), a.call(r, function(e, t) {
  13525. n.value(e).fire("change", {
  13526. meta: t
  13527. })
  13528. }, n.value(), e)
  13529. }), o && (e.icon = "browse", e.onaction = o), n._super(e), v(n, i, r.getBody(), l), b(n, i, l)
  13530. }
  13531. })
  13532. }), r(Mt, [vt], function(e) {
  13533. return e.extend({
  13534. recalc: function(e) {
  13535. var t = e.layoutRect(),
  13536. n = e.paddingBox;
  13537. e.items().filter(":visible").each(function(e) {
  13538. e.layoutRect({
  13539. x: n.left,
  13540. y: n.top,
  13541. w: t.innerW - n.right - n.left,
  13542. h: t.innerH - n.top - n.bottom
  13543. }), e.recalc && e.recalc()
  13544. })
  13545. }
  13546. })
  13547. }), r(Pt, [vt], function(e) {
  13548. return e.extend({
  13549. recalc: function(e) {
  13550. var t, n, r, i, o, a, s, l, c, u, d, f, h, p, m, g, v = [],
  13551. y, b, C, x, w, E, N, _, S, k, T, R, A, B, D, L, M, P, O, H, I, F, z = Math.max,
  13552. U = Math.min;
  13553. for (r = e.items().filter(":visible"), i = e.layoutRect(), o = e.paddingBox, a = e.settings, f = e.isRtl() ? a.direction || "row-reversed" : a.direction, s = a.align, l = e.isRtl() ? a.pack || "end" : a.pack, c = a.spacing || 0, "row-reversed" != f && "column-reverse" != f || (r = r.set(r.toArray().reverse()), f = f.split("-")[0]), "column" == f ? (S = "y", N = "h", _ = "minH", k = "maxH", R = "innerH", T = "top", A = "deltaH", B = "contentH", O = "left", M = "w", D = "x", L = "innerW", P = "minW", H = "right", I = "deltaW", F = "contentW") : (S = "x", N = "w", _ = "minW", k = "maxW", R = "innerW", T = "left", A = "deltaW", B = "contentW", O = "top", M = "h", D = "y", L = "innerH", P = "minH", H = "bottom", I = "deltaH", F = "contentH"), d = i[R] - o[T] - o[T], E = u = 0, t = 0, n = r.length; t < n; t++) h = r[t], p = h.layoutRect(), m = h.settings, g = m.flex, d -= t < n - 1 ? c : 0, g > 0 && (u += g, p[k] && v.push(h), p.flex = g), d -= p[_], y = o[O] + p[P] + o[H], y > E && (E = y);
  13554. if (x = {}, d < 0 ? x[_] = i[_] - d + i[A] : x[_] = i[R] - d + i[A], x[P] = E + i[I], x[B] = i[R] - d, x[F] = E, x.minW = U(x.minW, i.maxW), x.minH = U(x.minH, i.maxH), x.minW = z(x.minW, i.startMinWidth), x.minH = z(x.minH, i.startMinHeight), !i.autoResize || x.minW == i.minW && x.minH == i.minH) {
  13555. for (C = d / u, t = 0, n = v.length; t < n; t++) h = v[t], p = h.layoutRect(), b = p[k], y = p[_] + p.flex * C, y > b ? (d -= p[k] - p[_], u -= p.flex, p.flex = 0, p.maxFlexSize = b) : p.maxFlexSize = 0;
  13556. for (C = d / u, w = o[T], x = {}, 0 === u && ("end" == l ? w = d + o[T] : "center" == l ? (w = Math.round(i[R] / 2 - (i[R] - d) / 2) + o[T], w < 0 && (w = o[T])) : "justify" == l && (w = o[T], c = Math.floor(d / (r.length - 1)))), x[D] = o[O], t = 0, n = r.length; t < n; t++) h = r[t], p = h.layoutRect(), y = p.maxFlexSize || p[_], "center" === s ? x[D] = Math.round(i[L] / 2 - p[M] / 2) : "stretch" === s ? (x[M] = z(p[P] || 0, i[L] - o[O] - o[H]), x[D] = o[O]) : "end" === s && (x[D] = i[L] - p[M] - o.top), p.flex > 0 && (y += p.flex * C), x[N] = y, x[S] = w, h.layoutRect(x), h.recalc && h.recalc(), w += y + c
  13557. } else if (x.w = x.minW, x.h = x.minH, e.layoutRect(x), this.recalc(e), null === e._lastRect) {
  13558. var W = e.parent();
  13559. W && (W._lastRect = null, W.recalc())
  13560. }
  13561. }
  13562. })
  13563. }), r(Ot, [gt], function(e) {
  13564. return e.extend({
  13565. Defaults: {
  13566. containerClass: "flow-layout",
  13567. controlClass: "flow-layout-item",
  13568. endClass: "break"
  13569. },
  13570. recalc: function(e) {
  13571. e.items().filter(":visible").each(function(e) {
  13572. e.recalc && e.recalc()
  13573. })
  13574. },
  13575. isNative: function() {
  13576. return !0
  13577. }
  13578. })
  13579. }), r(Ht, [xe, Pe, Ae, m, p, w, lt, d], function(e, t, n, r, i, o, a, s) {
  13580. function l(e) {
  13581. e.settings.ui_container && (s.container = o.DOM.select(e.settings.ui_container)[0])
  13582. }
  13583. function c(t) {
  13584. t.on("ScriptsLoaded", function() {
  13585. t.rtl && (e.rtl = !0)
  13586. })
  13587. }
  13588. function u(e) {
  13589. function t(t, n) {
  13590. return function() {
  13591. var r = this;
  13592. e.on("nodeChange", function(i) {
  13593. var o = e.formatter,
  13594. a = null;
  13595. d(i.parents, function(e) {
  13596. if (d(t, function(t) {
  13597. if (n ? o.matchNode(e, n, {
  13598. value: t.value
  13599. }) && (a = t.value) : o.matchNode(e, t.value) && (a = t.value), a) return !1
  13600. }), a) return !1
  13601. }), r.value(a)
  13602. })
  13603. }
  13604. }
  13605. function i(e) {
  13606. e = e.replace(/;$/, "").split(";");
  13607. for (var t = e.length; t--;) e[t] = e[t].split("=");
  13608. return e
  13609. }
  13610. function o() {
  13611. function t(e) {
  13612. var n = [];
  13613. if (e) return d(e, function(e) {
  13614. var o = {
  13615. text: e.title,
  13616. icon: e.icon
  13617. };
  13618. if (e.items) o.menu = t(e.items);
  13619. else {
  13620. var a = e.format || "custom" + r++;
  13621. e.format || (e.name = a, i.push(e)), o.format = a, o.cmd = e.cmd
  13622. }
  13623. n.push(o)
  13624. }), n
  13625. }
  13626. function n() {
  13627. var n;
  13628. return n = t(e.settings.style_formats_merge ? e.settings.style_formats ? o.concat(e.settings.style_formats) : o : e.settings.style_formats || o)
  13629. }
  13630. var r = 0,
  13631. i = [],
  13632. o = [{
  13633. title: "Headings",
  13634. items: [{
  13635. title: "Heading 1",
  13636. format: "h1"
  13637. }, {
  13638. title: "Heading 2",
  13639. format: "h2"
  13640. }, {
  13641. title: "Heading 3",
  13642. format: "h3"
  13643. }, {
  13644. title: "Heading 4",
  13645. format: "h4"
  13646. }, {
  13647. title: "Heading 5",
  13648. format: "h5"
  13649. }, {
  13650. title: "Heading 6",
  13651. format: "h6"
  13652. }]
  13653. }, {
  13654. title: "Inline",
  13655. items: [{
  13656. title: "Bold",
  13657. icon: "bold",
  13658. format: "bold"
  13659. }, {
  13660. title: "Italic",
  13661. icon: "italic",
  13662. format: "italic"
  13663. }, {
  13664. title: "Underline",
  13665. icon: "underline",
  13666. format: "underline"
  13667. }, {
  13668. title: "Strikethrough",
  13669. icon: "strikethrough",
  13670. format: "strikethrough"
  13671. }, {
  13672. title: "Superscript",
  13673. icon: "superscript",
  13674. format: "superscript"
  13675. }, {
  13676. title: "Subscript",
  13677. icon: "subscript",
  13678. format: "subscript"
  13679. }, {
  13680. title: "Code",
  13681. icon: "code",
  13682. format: "code"
  13683. }]
  13684. }, {
  13685. title: "Blocks",
  13686. items: [{
  13687. title: "Paragraph",
  13688. format: "p"
  13689. }, {
  13690. title: "Blockquote",
  13691. format: "blockquote"
  13692. }, {
  13693. title: "Div",
  13694. format: "div"
  13695. }, {
  13696. title: "Pre",
  13697. format: "pre"
  13698. }]
  13699. }, {
  13700. title: "Alignment",
  13701. items: [{
  13702. title: "Left",
  13703. icon: "alignleft",
  13704. format: "alignleft"
  13705. }, {
  13706. title: "Center",
  13707. icon: "aligncenter",
  13708. format: "aligncenter"
  13709. }, {
  13710. title: "Right",
  13711. icon: "alignright",
  13712. format: "alignright"
  13713. }, {
  13714. title: "Justify",
  13715. icon: "alignjustify",
  13716. format: "alignjustify"
  13717. }]
  13718. }];
  13719. return e.on("init", function() {
  13720. d(i, function(t) {
  13721. e.formatter.register(t.name, t)
  13722. })
  13723. }), {
  13724. type: "menu",
  13725. items: n(),
  13726. onPostRender: function(t) {
  13727. e.fire("renderFormatsMenu", {
  13728. control: t.control
  13729. })
  13730. },
  13731. itemDefaults: {
  13732. preview: !0,
  13733. textStyle: function() {
  13734. if (this.settings.format) return e.formatter.getCssText(this.settings.format)
  13735. },
  13736. onPostRender: function() {
  13737. var t = this;
  13738. t.parent().on("show", function() {
  13739. var n, r;
  13740. n = t.settings.format, n && (t.disabled(!e.formatter.canApply(n)), t.active(e.formatter.match(n))), r = t.settings.cmd, r && t.active(e.queryCommandState(r))
  13741. })
  13742. },
  13743. onclick: function() {
  13744. this.settings.format && c(this.settings.format), this.settings.cmd && e.execCommand(this.settings.cmd)
  13745. }
  13746. }
  13747. }
  13748. }
  13749. function a(t) {
  13750. return function() {
  13751. var n = this;
  13752. e.formatter ? e.formatter.formatChanged(t, function(e) {
  13753. n.active(e)
  13754. }) : e.on("init", function() {
  13755. e.formatter.formatChanged(t, function(e) {
  13756. n.active(e)
  13757. })
  13758. })
  13759. }
  13760. }
  13761. function s(t) {
  13762. return function() {
  13763. function n() {
  13764. return !!e.undoManager && e.undoManager[t]()
  13765. }
  13766. var r = this;
  13767. t = "redo" == t ? "hasRedo" : "hasUndo", r.disabled(!n()), e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode", function() {
  13768. r.disabled(e.readonly || !n())
  13769. })
  13770. }
  13771. }
  13772. function l() {
  13773. var t = this;
  13774. e.on("VisualAid", function(e) {
  13775. t.active(e.hasVisual)
  13776. }), t.active(e.hasVisual)
  13777. }
  13778. function c(t) {
  13779. t.control && (t = t.control.value()), t && e.execCommand("mceToggleFormat", !1, t)
  13780. }
  13781. function u(t) {
  13782. var n = t.length;
  13783. return r.each(t, function(t) {
  13784. t.menu && (t.hidden = 0 === u(t.menu));
  13785. var r = t.format;
  13786. r && (t.hidden = !e.formatter.canApply(r)), t.hidden && n--
  13787. }), n
  13788. }
  13789. function h(t) {
  13790. var n = t.items().length;
  13791. return t.items().each(function(t) {
  13792. t.menu && t.visible(h(t.menu) > 0), !t.menu && t.settings.menu && t.visible(u(t.settings.menu) > 0);
  13793. var r = t.settings.format;
  13794. r && t.visible(e.formatter.canApply(r)), t.visible() || n--
  13795. }), n
  13796. }
  13797. var p;
  13798. p = o(), d({
  13799. bold: "Bold",
  13800. italic: "Italic",
  13801. underline: "Underline",
  13802. strikethrough: "Strikethrough",
  13803. subscript: "Subscript",
  13804. superscript: "Superscript"
  13805. }, function(t, n) {
  13806. e.addButton(n, {
  13807. tooltip: t,
  13808. onPostRender: a(n),
  13809. onclick: function() {
  13810. c(n)
  13811. }
  13812. })
  13813. }), d({
  13814. outdent: ["Decrease indent", "Outdent"],
  13815. indent: ["Increase indent", "Indent"],
  13816. cut: ["Cut", "Cut"],
  13817. copy: ["Copy", "Copy"],
  13818. paste: ["Paste", "Paste"],
  13819. help: ["Help", "mceHelp"],
  13820. selectall: ["Select all", "SelectAll"],
  13821. removeformat: ["Clear formatting", "RemoveFormat"],
  13822. visualaid: ["Visual aids", "mceToggleVisualAid"],
  13823. newdocument: ["New document", "mceNewDocument"]
  13824. }, function(t, n) {
  13825. e.addButton(n, {
  13826. tooltip: t[0],
  13827. cmd: t[1]
  13828. })
  13829. }), d({
  13830. blockquote: ["Blockquote", "mceBlockQuote"],
  13831. subscript: ["Subscript", "Subscript"],
  13832. superscript: ["Superscript", "Superscript"],
  13833. alignleft: ["Align left", "JustifyLeft"],
  13834. aligncenter: ["Align center", "JustifyCenter"],
  13835. alignright: ["Align right", "JustifyRight"],
  13836. alignjustify: ["Justify", "JustifyFull"],
  13837. alignnone: ["No alignment", "JustifyNone"]
  13838. }, function(t, n) {
  13839. e.addButton(n, {
  13840. tooltip: t[0],
  13841. cmd: t[1],
  13842. onPostRender: a(n)
  13843. })
  13844. });
  13845. var m = function(e) {
  13846. var t = e;
  13847. return t.length > 0 && "-" === t[0].text && (t = t.slice(1)), t.length > 0 && "-" === t[t.length - 1].text && (t = t.slice(0, t.length - 1)), t
  13848. },
  13849. g = function(t) {
  13850. var n, i;
  13851. if ("string" == typeof t) i = t.split(" ");
  13852. else if (r.isArray(t)) return f(r.map(t, g));
  13853. return n = r.grep(i, function(t) {
  13854. return "|" === t || t in e.menuItems
  13855. }), r.map(n, function(t) {
  13856. return "|" === t ? {
  13857. text: "-"
  13858. } : e.menuItems[t]
  13859. })
  13860. },
  13861. v = function(t) {
  13862. var n = [{
  13863. text: "-"
  13864. }],
  13865. i = r.grep(e.menuItems, function(e) {
  13866. return e.context === t
  13867. });
  13868. return r.each(i, function(e) {
  13869. "before" == e.separator && n.push({
  13870. text: "|"
  13871. }), e.prependToContext ? n.unshift(e) : n.push(e), "after" == e.separator && n.push({
  13872. text: "|"
  13873. })
  13874. }), n
  13875. },
  13876. y = function(e) {
  13877. return m(e.insert_button_items ? g(e.insert_button_items) : v("insert"))
  13878. };
  13879. e.addButton("undo", {
  13880. tooltip: "Undo",
  13881. onPostRender: s("undo"),
  13882. cmd: "undo"
  13883. }), e.addButton("redo", {
  13884. tooltip: "Redo",
  13885. onPostRender: s("redo"),
  13886. cmd: "redo"
  13887. }), e.addMenuItem("newdocument", {
  13888. text: "New document",
  13889. icon: "newdocument",
  13890. cmd: "mceNewDocument"
  13891. }), e.addMenuItem("undo", {
  13892. text: "Undo",
  13893. icon: "undo",
  13894. shortcut: "Meta+Z",
  13895. onPostRender: s("undo"),
  13896. cmd: "undo"
  13897. }), e.addMenuItem("redo", {
  13898. text: "Redo",
  13899. icon: "redo",
  13900. shortcut: "Meta+Y",
  13901. onPostRender: s("redo"),
  13902. cmd: "redo"
  13903. }), e.addMenuItem("visualaid", {
  13904. text: "Visual aids",
  13905. selectable: !0,
  13906. onPostRender: l,
  13907. cmd: "mceToggleVisualAid"
  13908. }), e.addButton("remove", {
  13909. tooltip: "Remove",
  13910. icon: "remove",
  13911. cmd: "Delete"
  13912. }), e.addButton("insert", {
  13913. type: "menubutton",
  13914. icon: "insert",
  13915. menu: [],
  13916. oncreatemenu: function() {
  13917. this.menu.add(y(e.settings)), this.menu.renderNew()
  13918. }
  13919. }), d({
  13920. cut: ["Cut", "Cut", "Meta+X"],
  13921. copy: ["Copy", "Copy", "Meta+C"],
  13922. paste: ["Paste", "Paste", "Meta+V"],
  13923. selectall: ["Select all", "SelectAll", "Meta+A"],
  13924. bold: ["Bold", "Bold", "Meta+B"],
  13925. italic: ["Italic", "Italic", "Meta+I"],
  13926. underline: ["Underline", "Underline"],
  13927. strikethrough: ["Strikethrough", "Strikethrough"],
  13928. subscript: ["Subscript", "Subscript"],
  13929. superscript: ["Superscript", "Superscript"],
  13930. removeformat: ["Clear formatting", "RemoveFormat"]
  13931. }, function(t, n) {
  13932. e.addMenuItem(n, {
  13933. text: t[0],
  13934. icon: n,
  13935. shortcut: t[2],
  13936. cmd: t[1]
  13937. })
  13938. }), e.on("mousedown", function() {
  13939. n.hideAll()
  13940. }), e.addButton("styleselect", {
  13941. type: "menubutton",
  13942. text: "Formats",
  13943. menu: p,
  13944. onShowMenu: function() {
  13945. e.settings.style_formats_autohide && h(this.menu)
  13946. }
  13947. }), e.addButton("formatselect", function() {
  13948. var n = [],
  13949. r = i(e.settings.block_formats || "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");
  13950. return d(r, function(t) {
  13951. n.push({
  13952. text: t[0],
  13953. value: t[1],
  13954. textStyle: function() {
  13955. return e.formatter.getCssText(t[1])
  13956. }
  13957. })
  13958. }), {
  13959. type: "listbox",
  13960. text: r[0][0],
  13961. values: n,
  13962. fixedWidth: !0,
  13963. onselect: c,
  13964. onPostRender: t(n)
  13965. }
  13966. }), e.addButton("fontselect", function() {
  13967. var n = "Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
  13968. r = [],
  13969. o = i(e.settings.font_formats || n);
  13970. return d(o, function(e) {
  13971. r.push({
  13972. text: {
  13973. raw: e[0]
  13974. },
  13975. value: e[1],
  13976. textStyle: e[1].indexOf("dings") == -1 ? "font-family:" + e[1] : ""
  13977. })
  13978. }), {
  13979. type: "listbox",
  13980. text: "Font Family",
  13981. tooltip: "Font Family",
  13982. values: r,
  13983. fixedWidth: !0,
  13984. onPostRender: t(r, "fontname"),
  13985. onselect: function(t) {
  13986. t.control.settings.value && e.execCommand("FontName", !1, t.control.settings.value)
  13987. }
  13988. }
  13989. }), e.addButton("fontsizeselect", function() {
  13990. var n = [],
  13991. r = "8pt 10pt 12pt 14pt 18pt 24pt 36pt",
  13992. i = e.settings.fontsize_formats || r;
  13993. return d(i.split(" "), function(e) {
  13994. var t = e,
  13995. r = e,
  13996. i = e.split("=");
  13997. i.length > 1 && (t = i[0], r = i[1]), n.push({
  13998. text: t,
  13999. value: r
  14000. })
  14001. }), {
  14002. type: "listbox",
  14003. text: "Font Sizes",
  14004. tooltip: "Font Sizes",
  14005. values: n,
  14006. fixedWidth: !0,
  14007. onPostRender: t(n, "fontsize"),
  14008. onclick: function(t) {
  14009. t.control.settings.value && e.execCommand("FontSize", !1, t.control.settings.value)
  14010. }
  14011. }
  14012. }), e.addMenuItem("formats", {
  14013. text: "Formats",
  14014. menu: p
  14015. })
  14016. }
  14017. var d = r.each,
  14018. f = function(e) {
  14019. return i.reduce(e, function(e, t) {
  14020. return e.concat(t)
  14021. }, [])
  14022. };
  14023. a.on("AddEditor", function(e) {
  14024. var t = e.editor;
  14025. c(t), u(t), l(t)
  14026. }), e.translate = function(e) {
  14027. return a.translate(e)
  14028. }, t.tooltips = !s.iOS
  14029. }), r(It, [vt], function(e) {
  14030. return e.extend({
  14031. recalc: function(e) {
  14032. var t, n, r, i, o, a, s, l, c, u, d, f, h, p, m, g, v, y, b, C, x, w, E, N = [],
  14033. _ = [],
  14034. S, k, T, R, A, B;
  14035. t = e.settings, i = e.items().filter(":visible"), o = e.layoutRect(), r = t.columns || Math.ceil(Math.sqrt(i.length)), n = Math.ceil(i.length / r), y = t.spacingH || t.spacing || 0, b = t.spacingV || t.spacing || 0, C = t.alignH || t.align, x = t.alignV || t.align, g = e.paddingBox, A = "reverseRows" in t ? t.reverseRows : e.isRtl(), C && "string" == typeof C && (C = [C]), x && "string" == typeof x && (x = [x]);
  14036. for (d = 0; d < r; d++) N.push(0);
  14037. for (f = 0; f < n; f++) _.push(0);
  14038. for (f = 0; f < n; f++)
  14039. for (d = 0; d < r && (u = i[f * r + d], u); d++) c = u.layoutRect(), S = c.minW, k = c.minH, N[d] = S > N[d] ? S : N[d], _[f] = k > _[f] ? k : _[f];
  14040. for (T = o.innerW - g.left - g.right, w = 0, d = 0; d < r; d++) w += N[d] + (d > 0 ? y : 0), T -= (d > 0 ? y : 0) + N[d];
  14041. for (R = o.innerH - g.top - g.bottom, E = 0, f = 0; f < n; f++) E += _[f] + (f > 0 ? b : 0), R -= (f > 0 ? b : 0) + _[f];
  14042. if (w += g.left + g.right, E += g.top + g.bottom, l = {}, l.minW = w + (o.w - o.innerW), l.minH = E + (o.h - o.innerH), l.contentW = l.minW - o.deltaW, l.contentH = l.minH - o.deltaH, l.minW = Math.min(l.minW, o.maxW), l.minH = Math.min(l.minH, o.maxH), l.minW = Math.max(l.minW, o.startMinWidth), l.minH = Math.max(l.minH, o.startMinHeight), !o.autoResize || l.minW == o.minW && l.minH == o.minH) {
  14043. o.autoResize && (l = e.layoutRect(l), l.contentW = l.minW - o.deltaW, l.contentH = l.minH - o.deltaH);
  14044. var D;
  14045. D = "start" == t.packV ? 0 : R > 0 ? Math.floor(R / n) : 0;
  14046. var L = 0,
  14047. M = t.flexWidths;
  14048. if (M)
  14049. for (d = 0; d < M.length; d++) L += M[d];
  14050. else L = r;
  14051. var P = T / L;
  14052. for (d = 0; d < r; d++) N[d] += M ? M[d] * P : P;
  14053. for (p = g.top, f = 0; f < n; f++) {
  14054. for (h = g.left, s = _[f] + D, d = 0; d < r && (B = A ? f * r + r - 1 - d : f * r + d, u = i[B], u); d++) m = u.settings, c = u.layoutRect(), a = Math.max(N[d], c.startMinWidth), c.x = h, c.y = p, v = m.alignH || (C ? C[d] || C[0] : null), "center" == v ? c.x = h + a / 2 - c.w / 2 : "right" == v ? c.x = h + a - c.w : "stretch" == v && (c.w = a), v = m.alignV || (x ? x[d] || x[0] : null), "center" == v ? c.y = p + s / 2 - c.h / 2 : "bottom" == v ? c.y = p + s - c.h : "stretch" == v && (c.h = s), u.layoutRect(c), h += a + y, u.recalc && u.recalc();
  14055. p += s + b
  14056. }
  14057. } else if (l.w = l.minW, l.h = l.minH, e.layoutRect(l), this.recalc(e), null === e._lastRect) {
  14058. var O = e.parent();
  14059. O && (O._lastRect = null, O.recalc())
  14060. }
  14061. }
  14062. })
  14063. }), r(Ft, [Pe, u], function(e, t) {
  14064. return e.extend({
  14065. renderHtml: function() {
  14066. var e = this;
  14067. return e.classes.add("iframe"), e.canFocus = !1, '<iframe id="' + e._id + '" class="' + e.classes + '" tabindex="-1" src="' + (e.settings.url || "javascript:''") + '" frameborder="0"></iframe>'
  14068. },
  14069. src: function(e) {
  14070. this.getEl().src = e
  14071. },
  14072. html: function(e, n) {
  14073. var r = this,
  14074. i = this.getEl().contentWindow.document.body;
  14075. return i ? (i.innerHTML = e, n && n()) : t.setTimeout(function() {
  14076. r.html(e)
  14077. }), this
  14078. }
  14079. })
  14080. }), r(zt, [Pe], function(e) {
  14081. return e.extend({
  14082. init: function(e) {
  14083. var t = this;
  14084. t._super(e), t.classes.add("widget").add("infobox"), t.canFocus = !1
  14085. },
  14086. severity: function(e) {
  14087. this.classes.remove("error"), this.classes.remove("warning"), this.classes.remove("success"), this.classes.add(e)
  14088. },
  14089. help: function(e) {
  14090. this.state.set("help", e)
  14091. },
  14092. renderHtml: function() {
  14093. var e = this,
  14094. t = e.classPrefix;
  14095. return '<div id="' + e._id + '" class="' + e.classes + '"><div id="' + e._id + '-body">' + e.encode(e.state.get("text")) + '<button role="button" tabindex="-1"><i class="' + t + "ico " + t + 'i-help"></i></button></div></div>'
  14096. },
  14097. bindStates: function() {
  14098. var e = this;
  14099. return e.state.on("change:text", function(t) {
  14100. e.getEl("body").firstChild.data = e.encode(t.value), e.state.get("rendered") && e.updateLayoutRect()
  14101. }), e.state.on("change:help", function(t) {
  14102. e.classes.toggle("has-help", t.value), e.state.get("rendered") && e.updateLayoutRect()
  14103. }), e._super()
  14104. }
  14105. })
  14106. }), r(Ut, [Pe, ve], function(e, t) {
  14107. return e.extend({
  14108. init: function(e) {
  14109. var t = this;
  14110. t._super(e), t.classes.add("widget").add("label"), t.canFocus = !1, e.multiline && t.classes.add("autoscroll"), e.strong && t.classes.add("strong")
  14111. },
  14112. initLayoutRect: function() {
  14113. var e = this,
  14114. n = e._super();
  14115. if (e.settings.multiline) {
  14116. var r = t.getSize(e.getEl());
  14117. r.width > n.maxW && (n.minW = n.maxW, e.classes.add("multiline")), e.getEl().style.width = n.minW + "px", n.startMinH = n.h = n.minH = Math.min(n.maxH, t.getSize(e.getEl()).height)
  14118. }
  14119. return n
  14120. },
  14121. repaint: function() {
  14122. var e = this;
  14123. return e.settings.multiline || (e.getEl().style.lineHeight = e.layoutRect().h + "px"), e._super()
  14124. },
  14125. severity: function(e) {
  14126. this.classes.remove("error"), this.classes.remove("warning"), this.classes.remove("success"), this.classes.add(e)
  14127. },
  14128. renderHtml: function() {
  14129. var e = this,
  14130. t, n, r = e.settings.forId;
  14131. return !r && (n = e.settings.forName) && (t = e.getRoot().find("#" + n)[0], t && (r = t._id)), r ? '<label id="' + e._id + '" class="' + e.classes + '"' + (r ? ' for="' + r + '"' : "") + ">" + e.encode(e.state.get("text")) + "</label>" : '<span id="' + e._id + '" class="' + e.classes + '">' + e.encode(e.state.get("text")) + "</span>"
  14132. },
  14133. bindStates: function() {
  14134. var e = this;
  14135. return e.state.on("change:text", function(t) {
  14136. e.innerHtml(e.encode(t.value)), e.state.get("rendered") && e.updateLayoutRect()
  14137. }), e._super()
  14138. }
  14139. })
  14140. }), r(Wt, [Ne], function(e) {
  14141. return e.extend({
  14142. Defaults: {
  14143. role: "toolbar",
  14144. layout: "flow"
  14145. },
  14146. init: function(e) {
  14147. var t = this;
  14148. t._super(e), t.classes.add("toolbar")
  14149. },
  14150. postRender: function() {
  14151. var e = this;
  14152. return e.items().each(function(e) {
  14153. e.classes.add("toolbar-item")
  14154. }), e._super()
  14155. }
  14156. })
  14157. }), r(Vt, [Wt], function(e) {
  14158. return e.extend({
  14159. Defaults: {
  14160. role: "menubar",
  14161. containerCls: "menubar",
  14162. ariaRoot: !0,
  14163. defaults: {
  14164. type: "menubutton"
  14165. }
  14166. }
  14167. })
  14168. }), r($t, [yt, we, Vt], function(e, t, n) {
  14169. function r(e, t) {
  14170. for (; e;) {
  14171. if (t === e) return !0;
  14172. e = e.parentNode
  14173. }
  14174. return !1
  14175. }
  14176. var i = e.extend({
  14177. init: function(e) {
  14178. var t = this;
  14179. t._renderOpen = !0, t._super(e), e = t.settings, t.classes.add("menubtn"), e.fixedWidth && t.classes.add("fixed-width"), t.aria("haspopup", !0), t.state.set("menu", e.menu || t.render())
  14180. },
  14181. showMenu: function() {
  14182. var e = this,
  14183. n;
  14184. return e.menu && e.menu.visible() ? e.hideMenu() : (e.menu || (n = e.state.get("menu") || [], n.length ? n = {
  14185. type: "menu",
  14186. items: n
  14187. } : n.type = n.type || "menu", n.renderTo ? e.menu = n.parent(e).show().renderTo() : e.menu = t.create(n).parent(e).renderTo(), e.fire("createmenu"), e.menu.reflow(), e.menu.on("cancel", function(t) {
  14188. t.control.parent() === e.menu && (t.stopPropagation(), e.focus(), e.hideMenu())
  14189. }), e.menu.on("select", function() {
  14190. e.focus()
  14191. }), e.menu.on("show hide", function(t) {
  14192. t.control == e.menu && e.activeMenu("show" == t.type), e.aria("expanded", "show" == t.type)
  14193. }).fire("show")), e.menu.show(), e.menu.layoutRect({
  14194. w: e.layoutRect().w
  14195. }), e.menu.moveRel(e.getEl(), e.isRtl() ? ["br-tr", "tr-br"] : ["bl-tl", "tl-bl"]), void e.fire("showmenu"))
  14196. },
  14197. hideMenu: function() {
  14198. var e = this;
  14199. e.menu && (e.menu.items().each(function(e) {
  14200. e.hideMenu && e.hideMenu()
  14201. }), e.menu.hide())
  14202. },
  14203. activeMenu: function(e) {
  14204. this.classes.toggle("active", e)
  14205. },
  14206. renderHtml: function() {
  14207. var e = this,
  14208. t = e._id,
  14209. r = e.classPrefix,
  14210. i = e.settings.icon,
  14211. o, a = e.state.get("text"),
  14212. s = "";
  14213. return o = e.settings.image, o ? (i = "none", "string" != typeof o && (o = window.getSelection ? o[0] : o[1]), o = " style=\"background-image: url('" + o + "')\"") : o = "", a && (e.classes.add("btn-has-text"), s = '<span class="' + r + 'txt">' + e.encode(a) + "</span>"), i = e.settings.icon ? r + "ico " + r + "i-" + i : "", e.aria("role", e.parent() instanceof n ? "menuitem" : "button"), '<div id="' + t + '" class="' + e.classes + '" tabindex="-1" aria-labelledby="' + t + '"><button id="' + t + '-open" role="presentation" type="button" tabindex="-1">' + (i ? '<i class="' + i + '"' + o + "></i>" : "") + s + ' <i class="' + r + 'caret"></i></button></div>'
  14214. },
  14215. postRender: function() {
  14216. var e = this;
  14217. return e.on("click", function(t) {
  14218. t.control === e && r(t.target, e.getEl()) && (e.showMenu(), t.aria && e.menu.items().filter(":visible")[0].focus())
  14219. }), e.on("mouseenter", function(t) {
  14220. var n = t.control,
  14221. r = e.parent(),
  14222. o;
  14223. n && r && n instanceof i && n.parent() == r && (r.items().filter("MenuButton").each(function(e) {
  14224. e.hideMenu && e != n && (e.menu && e.menu.visible() && (o = !0), e.hideMenu())
  14225. }), o && (n.focus(), n.showMenu()))
  14226. }), e._super()
  14227. },
  14228. bindStates: function() {
  14229. var e = this;
  14230. return e.state.on("change:menu", function() {
  14231. e.menu && e.menu.remove(), e.menu = null
  14232. }), e._super()
  14233. },
  14234. remove: function() {
  14235. this._super(), this.menu && this.menu.remove()
  14236. }
  14237. });
  14238. return i
  14239. }), r(qt, [Pe, we, d, u], function(e, t, n, r) {
  14240. return e.extend({
  14241. Defaults: {
  14242. border: 0,
  14243. role: "menuitem"
  14244. },
  14245. init: function(e) {
  14246. var t = this,
  14247. n;
  14248. t._super(e), e = t.settings, t.classes.add("menu-item"), e.menu && t.classes.add("menu-item-expand"), e.preview && t.classes.add("menu-item-preview"), n = t.state.get("text"), "-" !== n && "|" !== n || (t.classes.add("menu-item-sep"), t.aria("role", "separator"),
  14249. t.state.set("text", "-")), e.selectable && (t.aria("role", "menuitemcheckbox"), t.classes.add("menu-item-checkbox"), e.icon = "selected"), e.preview || e.selectable || t.classes.add("menu-item-normal"), t.on("mousedown", function(e) {
  14250. e.preventDefault()
  14251. }), e.menu && !e.ariaHideMenu && t.aria("haspopup", !0)
  14252. },
  14253. hasMenus: function() {
  14254. return !!this.settings.menu
  14255. },
  14256. showMenu: function() {
  14257. var e = this,
  14258. n = e.settings,
  14259. r, i = e.parent();
  14260. if (i.items().each(function(t) {
  14261. t !== e && t.hideMenu()
  14262. }), n.menu) {
  14263. r = e.menu, r ? r.show() : (r = n.menu, r.length ? r = {
  14264. type: "menu",
  14265. items: r
  14266. } : r.type = r.type || "menu", i.settings.itemDefaults && (r.itemDefaults = i.settings.itemDefaults), r = e.menu = t.create(r).parent(e).renderTo(), r.reflow(), r.on("cancel", function(t) {
  14267. t.stopPropagation(), e.focus(), r.hide()
  14268. }), r.on("show hide", function(e) {
  14269. e.control.items && e.control.items().each(function(e) {
  14270. e.active(e.settings.selected)
  14271. })
  14272. }).fire("show"), r.on("hide", function(t) {
  14273. t.control === r && e.classes.remove("selected")
  14274. }), r.submenu = !0), r._parentMenu = i, r.classes.add("menu-sub");
  14275. var o = r.testMoveRel(e.getEl(), e.isRtl() ? ["tl-tr", "bl-br", "tr-tl", "br-bl"] : ["tr-tl", "br-bl", "tl-tr", "bl-br"]);
  14276. r.moveRel(e.getEl(), o), r.rel = o, o = "menu-sub-" + o, r.classes.remove(r._lastRel).add(o), r._lastRel = o, e.classes.add("selected"), e.aria("expanded", !0)
  14277. }
  14278. },
  14279. hideMenu: function() {
  14280. var e = this;
  14281. return e.menu && (e.menu.items().each(function(e) {
  14282. e.hideMenu && e.hideMenu()
  14283. }), e.menu.hide(), e.aria("expanded", !1)), e
  14284. },
  14285. renderHtml: function() {
  14286. function e(e) {
  14287. var t, r, i = {};
  14288. for (i = n.mac ? {
  14289. alt: "&#x2325;",
  14290. ctrl: "&#x2318;",
  14291. shift: "&#x21E7;",
  14292. meta: "&#x2318;"
  14293. } : {
  14294. meta: "Ctrl"
  14295. }, e = e.split("+"), t = 0; t < e.length; t++) r = i[e[t].toLowerCase()], r && (e[t] = r);
  14296. return e.join("+")
  14297. }
  14298. function t(e) {
  14299. return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
  14300. }
  14301. function r(e) {
  14302. var n = s.match || "";
  14303. return n ? e.replace(new RegExp(t(n), "gi"), function(e) {
  14304. return "!mce~match[" + e + "]mce~match!"
  14305. }) : e
  14306. }
  14307. function i(e) {
  14308. return e.replace(new RegExp(t("!mce~match["), "g"), "<b>").replace(new RegExp(t("]mce~match!"), "g"), "</b>")
  14309. }
  14310. var o = this,
  14311. a = o._id,
  14312. s = o.settings,
  14313. l = o.classPrefix,
  14314. c = o.state.get("text"),
  14315. u = o.settings.icon,
  14316. d = "",
  14317. f = s.shortcut,
  14318. h = o.encode(s.url),
  14319. p = "";
  14320. return u && o.parent().classes.add("menu-has-icons"), s.image && (d = " style=\"background-image: url('" + s.image + "')\""), f && (f = e(f)), u = l + "ico " + l + "i-" + (o.settings.icon || "none"), p = "-" !== c ? '<i class="' + u + '"' + d + "></i>\xa0" : "", c = i(o.encode(r(c))), h = i(o.encode(r(h))), '<div id="' + a + '" class="' + o.classes + '" tabindex="-1">' + p + ("-" !== c ? '<span id="' + a + '-text" class="' + l + 'text">' + c + "</span>" : "") + (f ? '<div id="' + a + '-shortcut" class="' + l + 'menu-shortcut">' + f + "</div>" : "") + (s.menu ? '<div class="' + l + 'caret"></div>' : "") + (h ? '<div class="' + l + 'menu-item-link">' + h + "</div>" : "") + "</div>"
  14321. },
  14322. postRender: function() {
  14323. var e = this,
  14324. t = e.settings,
  14325. n = t.textStyle;
  14326. if ("function" == typeof n && (n = n.call(this)), n) {
  14327. var i = e.getEl("text");
  14328. i && i.setAttribute("style", n)
  14329. }
  14330. return e.on("mouseenter click", function(n) {
  14331. n.control === e && (t.menu || "click" !== n.type ? (e.showMenu(), n.aria && e.menu.focus(!0)) : (e.fire("select"), r.requestAnimationFrame(function() {
  14332. e.parent().hideAll()
  14333. })))
  14334. }), e._super(), e
  14335. },
  14336. hover: function() {
  14337. var e = this;
  14338. return e.parent().items().each(function(e) {
  14339. e.classes.remove("selected")
  14340. }), e.classes.toggle("selected", !0), e
  14341. },
  14342. active: function(e) {
  14343. return "undefined" != typeof e && this.aria("checked", e), this._super(e)
  14344. },
  14345. remove: function() {
  14346. this._super(), this.menu && this.menu.remove()
  14347. }
  14348. })
  14349. }), r(jt, [g, xe, u], function(e, t, n) {
  14350. return function(r, i) {
  14351. var o = this,
  14352. a, s = t.classPrefix,
  14353. l;
  14354. o.show = function(t, c) {
  14355. function u() {
  14356. a && (e(r).append('<div class="' + s + "throbber" + (i ? " " + s + "throbber-inline" : "") + '"></div>'), c && c())
  14357. }
  14358. return o.hide(), a = !0, t ? l = n.setTimeout(u, t) : u(), o
  14359. }, o.hide = function() {
  14360. var e = r.lastChild;
  14361. return n.clearTimeout(l), e && e.className.indexOf("throbber") != -1 && e.parentNode.removeChild(e), a = !1, o
  14362. }
  14363. }
  14364. }), r(Yt, [Ae, qt, jt, m], function(e, t, n, r) {
  14365. return e.extend({
  14366. Defaults: {
  14367. defaultType: "menuitem",
  14368. border: 1,
  14369. layout: "stack",
  14370. role: "application",
  14371. bodyRole: "menu",
  14372. ariaRoot: !0
  14373. },
  14374. init: function(e) {
  14375. var t = this;
  14376. if (e.autohide = !0, e.constrainToViewport = !0, "function" == typeof e.items && (e.itemsFactory = e.items, e.items = []), e.itemDefaults)
  14377. for (var n = e.items, i = n.length; i--;) n[i] = r.extend({}, e.itemDefaults, n[i]);
  14378. t._super(e), t.classes.add("menu")
  14379. },
  14380. repaint: function() {
  14381. return this.classes.toggle("menu-align", !0), this._super(), this.getEl().style.height = "", this.getEl("body").style.height = "", this
  14382. },
  14383. cancel: function() {
  14384. var e = this;
  14385. e.hideAll(), e.fire("select")
  14386. },
  14387. load: function() {
  14388. function e() {
  14389. t.throbber && (t.throbber.hide(), t.throbber = null)
  14390. }
  14391. var t = this,
  14392. r, i;
  14393. i = t.settings.itemsFactory, i && (t.throbber || (t.throbber = new n(t.getEl("body"), !0), 0 === t.items().length ? (t.throbber.show(), t.fire("loading")) : t.throbber.show(100, function() {
  14394. t.items().remove(), t.fire("loading")
  14395. }), t.on("hide close", e)), t.requestTime = r = (new Date).getTime(), t.settings.itemsFactory(function(n) {
  14396. return 0 === n.length ? void t.hide() : void(t.requestTime === r && (t.getEl().style.width = "", t.getEl("body").style.width = "", e(), t.items().remove(), t.getEl("body").innerHTML = "", t.add(n), t.renderNew(), t.fire("loaded")))
  14397. }))
  14398. },
  14399. hideAll: function() {
  14400. var e = this;
  14401. return this.find("menuitem").exec("hideMenu"), e._super()
  14402. },
  14403. preRender: function() {
  14404. var e = this;
  14405. return e.items().each(function(t) {
  14406. var n = t.settings;
  14407. if (n.icon || n.image || n.selectable) return e._hasIcons = !0, !1
  14408. }), e.settings.itemsFactory && e.on("postrender", function() {
  14409. e.settings.itemsFactory && e.load()
  14410. }), e._super()
  14411. }
  14412. })
  14413. }), r(Xt, [$t, Yt], function(e, t) {
  14414. return e.extend({
  14415. init: function(e) {
  14416. function t(r) {
  14417. for (var a = 0; a < r.length; a++) {
  14418. if (i = r[a].selected || e.value === r[a].value) return o = o || r[a].text, n.state.set("value", r[a].value), !0;
  14419. if (r[a].menu && t(r[a].menu)) return !0
  14420. }
  14421. }
  14422. var n = this,
  14423. r, i, o, a;
  14424. n._super(e), e = n.settings, n._values = r = e.values, r && ("undefined" != typeof e.value && t(r), !i && r.length > 0 && (o = r[0].text, n.state.set("value", r[0].value)), n.state.set("menu", r)), n.state.set("text", e.text || o), n.classes.add("listbox"), n.on("select", function(t) {
  14425. var r = t.control;
  14426. a && (t.lastControl = a), e.multiple ? r.active(!r.active()) : n.value(t.control.value()), a = r
  14427. })
  14428. },
  14429. bindStates: function() {
  14430. function e(e, n) {
  14431. e instanceof t && e.items().each(function(e) {
  14432. e.hasMenus() || e.active(e.value() === n)
  14433. })
  14434. }
  14435. function n(e, t) {
  14436. var r;
  14437. if (e)
  14438. for (var i = 0; i < e.length; i++) {
  14439. if (e[i].value === t) return e[i];
  14440. if (e[i].menu && (r = n(e[i].menu, t))) return r
  14441. }
  14442. }
  14443. var r = this;
  14444. return r.on("show", function(t) {
  14445. e(t.control, r.value())
  14446. }), r.state.on("change:value", function(e) {
  14447. var t = n(r.state.get("menu"), e.value);
  14448. t ? r.text(t.text) : r.text(r.settings.text)
  14449. }), r._super()
  14450. }
  14451. })
  14452. }), r(Kt, [Ct], function(e) {
  14453. return e.extend({
  14454. Defaults: {
  14455. classes: "radio",
  14456. role: "radio"
  14457. }
  14458. })
  14459. }), r(Gt, [Pe, _e], function(e, t) {
  14460. return e.extend({
  14461. renderHtml: function() {
  14462. var e = this,
  14463. t = e.classPrefix;
  14464. return e.classes.add("resizehandle"), "both" == e.settings.direction && e.classes.add("resizehandle-both"), e.canFocus = !1, '<div id="' + e._id + '" class="' + e.classes + '"><i class="' + t + "ico " + t + 'i-resize"></i></div>'
  14465. },
  14466. postRender: function() {
  14467. var e = this;
  14468. e._super(), e.resizeDragHelper = new t(this._id, {
  14469. start: function() {
  14470. e.fire("ResizeStart")
  14471. },
  14472. drag: function(t) {
  14473. "both" != e.settings.direction && (t.deltaX = 0), e.fire("Resize", t)
  14474. },
  14475. stop: function() {
  14476. e.fire("ResizeEnd")
  14477. }
  14478. })
  14479. },
  14480. remove: function() {
  14481. return this.resizeDragHelper && this.resizeDragHelper.destroy(), this._super()
  14482. }
  14483. })
  14484. }), r(Jt, [Pe], function(e) {
  14485. function t(e) {
  14486. var t = "";
  14487. if (e)
  14488. for (var n = 0; n < e.length; n++) t += '<option value="' + e[n] + '">' + e[n] + "</option>";
  14489. return t
  14490. }
  14491. return e.extend({
  14492. Defaults: {
  14493. classes: "selectbox",
  14494. role: "selectbox",
  14495. options: []
  14496. },
  14497. init: function(e) {
  14498. var t = this;
  14499. t._super(e), t.settings.size && (t.size = t.settings.size), t.settings.options && (t._options = t.settings.options), t.on("keydown", function(e) {
  14500. var n;
  14501. 13 == e.keyCode && (e.preventDefault(), t.parents().reverse().each(function(e) {
  14502. if (e.toJSON) return n = e, !1
  14503. }), t.fire("submit", {
  14504. data: n.toJSON()
  14505. }))
  14506. })
  14507. },
  14508. options: function(e) {
  14509. return arguments.length ? (this.state.set("options", e), this) : this.state.get("options")
  14510. },
  14511. renderHtml: function() {
  14512. var e = this,
  14513. n, r = "";
  14514. return n = t(e._options), e.size && (r = ' size = "' + e.size + '"'), '<select id="' + e._id + '" class="' + e.classes + '"' + r + ">" + n + "</select>"
  14515. },
  14516. bindStates: function() {
  14517. var e = this;
  14518. return e.state.on("change:options", function(n) {
  14519. e.getEl().innerHTML = t(n.value)
  14520. }), e._super()
  14521. }
  14522. })
  14523. }), r(Qt, [Pe, _e, ve], function(e, t, n) {
  14524. function r(e, t, n) {
  14525. return e < t && (e = t), e > n && (e = n), e
  14526. }
  14527. function i(e, t, n) {
  14528. e.setAttribute("aria-" + t, n)
  14529. }
  14530. function o(e, t) {
  14531. var r, o, a, s, l, c;
  14532. "v" == e.settings.orientation ? (s = "top", a = "height", o = "h") : (s = "left", a = "width", o = "w"), c = e.getEl("handle"), r = (e.layoutRect()[o] || 100) - n.getSize(c)[a], l = r * ((t - e._minValue) / (e._maxValue - e._minValue)) + "px", c.style[s] = l, c.style.height = e.layoutRect().h + "px", i(c, "valuenow", t), i(c, "valuetext", "" + e.settings.previewFilter(t)), i(c, "valuemin", e._minValue), i(c, "valuemax", e._maxValue)
  14533. }
  14534. return e.extend({
  14535. init: function(e) {
  14536. var t = this;
  14537. e.previewFilter || (e.previewFilter = function(e) {
  14538. return Math.round(100 * e) / 100
  14539. }), t._super(e), t.classes.add("slider"), "v" == e.orientation && t.classes.add("vertical"), t._minValue = e.minValue || 0, t._maxValue = e.maxValue || 100, t._initValue = t.state.get("value")
  14540. },
  14541. renderHtml: function() {
  14542. var e = this,
  14543. t = e._id,
  14544. n = e.classPrefix;
  14545. return '<div id="' + t + '" class="' + e.classes + '"><div id="' + t + '-handle" class="' + n + 'slider-handle" role="slider" tabindex="-1"></div></div>'
  14546. },
  14547. reset: function() {
  14548. this.value(this._initValue).repaint()
  14549. },
  14550. postRender: function() {
  14551. function e(e, t, n) {
  14552. return (n + e) / (t - e)
  14553. }
  14554. function i(e, t, n) {
  14555. return n * (t - e) - e
  14556. }
  14557. function o(t, n) {
  14558. function o(o) {
  14559. var a;
  14560. a = s.value(), a = i(t, n, e(t, n, a) + .05 * o), a = r(a, t, n), s.value(a), s.fire("dragstart", {
  14561. value: a
  14562. }), s.fire("drag", {
  14563. value: a
  14564. }), s.fire("dragend", {
  14565. value: a
  14566. })
  14567. }
  14568. s.on("keydown", function(e) {
  14569. switch (e.keyCode) {
  14570. case 37:
  14571. case 38:
  14572. o(-1);
  14573. break;
  14574. case 39:
  14575. case 40:
  14576. o(1)
  14577. }
  14578. })
  14579. }
  14580. function a(e, i, o) {
  14581. var a, l, c, p, m;
  14582. s._dragHelper = new t(s._id, {
  14583. handle: s._id + "-handle",
  14584. start: function(e) {
  14585. a = e[u], l = parseInt(s.getEl("handle").style[d], 10), c = (s.layoutRect()[h] || 100) - n.getSize(o)[f], s.fire("dragstart", {
  14586. value: m
  14587. })
  14588. },
  14589. drag: function(t) {
  14590. var n = t[u] - a;
  14591. p = r(l + n, 0, c), o.style[d] = p + "px", m = e + p / c * (i - e), s.value(m), s.tooltip().text("" + s.settings.previewFilter(m)).show().moveRel(o, "bc tc"), s.fire("drag", {
  14592. value: m
  14593. })
  14594. },
  14595. stop: function() {
  14596. s.tooltip().hide(), s.fire("dragend", {
  14597. value: m
  14598. })
  14599. }
  14600. })
  14601. }
  14602. var s = this,
  14603. l, c, u, d, f, h;
  14604. l = s._minValue, c = s._maxValue, "v" == s.settings.orientation ? (u = "screenY", d = "top", f = "height", h = "h") : (u = "screenX", d = "left", f = "width", h = "w"), s._super(), o(l, c, s.getEl("handle")), a(l, c, s.getEl("handle"))
  14605. },
  14606. repaint: function() {
  14607. this._super(), o(this, this.value())
  14608. },
  14609. bindStates: function() {
  14610. var e = this;
  14611. return e.state.on("change:value", function(t) {
  14612. o(e, t.value)
  14613. }), e._super()
  14614. }
  14615. })
  14616. }), r(Zt, [Pe], function(e) {
  14617. return e.extend({
  14618. renderHtml: function() {
  14619. var e = this;
  14620. return e.classes.add("spacer"), e.canFocus = !1, '<div id="' + e._id + '" class="' + e.classes + '"></div>'
  14621. }
  14622. })
  14623. }), r(en, [$t, ve, g], function(e, t, n) {
  14624. return e.extend({
  14625. Defaults: {
  14626. classes: "widget btn splitbtn",
  14627. role: "button"
  14628. },
  14629. repaint: function() {
  14630. var e = this,
  14631. r = e.getEl(),
  14632. i = e.layoutRect(),
  14633. o, a;
  14634. return e._super(), o = r.firstChild, a = r.lastChild, n(o).css({
  14635. width: i.w - t.getSize(a).width,
  14636. height: i.h - 2
  14637. }), n(a).css({
  14638. height: i.h - 2
  14639. }), e
  14640. },
  14641. activeMenu: function(e) {
  14642. var t = this;
  14643. n(t.getEl().lastChild).toggleClass(t.classPrefix + "active", e)
  14644. },
  14645. renderHtml: function() {
  14646. var e = this,
  14647. t = e._id,
  14648. n = e.classPrefix,
  14649. r, i = e.state.get("icon"),
  14650. o = e.state.get("text"),
  14651. a = "";
  14652. return r = e.settings.image, r ? (i = "none", "string" != typeof r && (r = window.getSelection ? r[0] : r[1]), r = " style=\"background-image: url('" + r + "')\"") : r = "", i = e.settings.icon ? n + "ico " + n + "i-" + i : "", o && (e.classes.add("btn-has-text"), a = '<span class="' + n + 'txt">' + e.encode(o) + "</span>"), '<div id="' + t + '" class="' + e.classes + '" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">' + (i ? '<i class="' + i + '"' + r + "></i>" : "") + a + '</button><button type="button" class="' + n + 'open" hidefocus="1" tabindex="-1">' + (e._menuBtnText ? (i ? "\xa0" : "") + e._menuBtnText : "") + ' <i class="' + n + 'caret"></i></button></div>'
  14653. },
  14654. postRender: function() {
  14655. var e = this,
  14656. t = e.settings.onclick;
  14657. return e.on("click", function(e) {
  14658. var n = e.target;
  14659. if (e.control == this)
  14660. for (; n;) {
  14661. if (e.aria && "down" != e.aria.key || "BUTTON" == n.nodeName && n.className.indexOf("open") == -1) return e.stopImmediatePropagation(), void(t && t.call(this, e));
  14662. n = n.parentNode
  14663. }
  14664. }), delete e.settings.onclick, e._super()
  14665. }
  14666. })
  14667. }), r(tn, [Ot], function(e) {
  14668. return e.extend({
  14669. Defaults: {
  14670. containerClass: "stack-layout",
  14671. controlClass: "stack-layout-item",
  14672. endClass: "break"
  14673. },
  14674. isNative: function() {
  14675. return !0
  14676. }
  14677. })
  14678. }), r(nn, [ke, g, ve], function(e, t, n) {
  14679. return e.extend({
  14680. Defaults: {
  14681. layout: "absolute",
  14682. defaults: {
  14683. type: "panel"
  14684. }
  14685. },
  14686. activateTab: function(e) {
  14687. var n;
  14688. this.activeTabId && (n = this.getEl(this.activeTabId), t(n).removeClass(this.classPrefix + "active"), n.setAttribute("aria-selected", "false")), this.activeTabId = "t" + e, n = this.getEl("t" + e), n.setAttribute("aria-selected", "true"), t(n).addClass(this.classPrefix + "active"), this.items()[e].show().fire("showtab"), this.reflow(), this.items().each(function(t, n) {
  14689. e != n && t.hide()
  14690. })
  14691. },
  14692. renderHtml: function() {
  14693. var e = this,
  14694. t = e._layout,
  14695. n = "",
  14696. r = e.classPrefix;
  14697. return e.preRender(), t.preRender(e), e.items().each(function(t, i) {
  14698. var o = e._id + "-t" + i;
  14699. t.aria("role", "tabpanel"), t.aria("labelledby", o), n += '<div id="' + o + '" class="' + r + 'tab" unselectable="on" role="tab" aria-controls="' + t._id + '" aria-selected="false" tabIndex="-1">' + e.encode(t.settings.title) + "</div>"
  14700. }), '<div id="' + e._id + '" class="' + e.classes + '" hidefocus="1" tabindex="-1"><div id="' + e._id + '-head" class="' + r + 'tabs" role="tablist">' + n + '</div><div id="' + e._id + '-body" class="' + e.bodyClasses + '">' + t.renderHtml(e) + "</div></div>"
  14701. },
  14702. postRender: function() {
  14703. var e = this;
  14704. e._super(), e.settings.activeTab = e.settings.activeTab || 0, e.activateTab(e.settings.activeTab), this.on("click", function(t) {
  14705. var n = t.target.parentNode;
  14706. if (n && n.id == e._id + "-head")
  14707. for (var r = n.childNodes.length; r--;) n.childNodes[r] == t.target && e.activateTab(r)
  14708. })
  14709. },
  14710. initLayoutRect: function() {
  14711. var e = this,
  14712. t, r, i;
  14713. r = n.getSize(e.getEl("head")).width, r = r < 0 ? 0 : r, i = 0, e.items().each(function(e) {
  14714. r = Math.max(r, e.layoutRect().minW), i = Math.max(i, e.layoutRect().minH)
  14715. }), e.items().each(function(e) {
  14716. e.settings.x = 0, e.settings.y = 0, e.settings.w = r, e.settings.h = i, e.layoutRect({
  14717. x: 0,
  14718. y: 0,
  14719. w: r,
  14720. h: i
  14721. })
  14722. });
  14723. var o = n.getSize(e.getEl("head")).height;
  14724. return e.settings.minWidth = r, e.settings.minHeight = i + o, t = e._super(), t.deltaH += o, t.innerH = t.h - t.deltaH, t
  14725. }
  14726. })
  14727. }), r(rn, [Pe, m, ve], function(e, t, n) {
  14728. return e.extend({
  14729. init: function(e) {
  14730. var t = this;
  14731. t._super(e), t.classes.add("textbox"), e.multiline ? t.classes.add("multiline") : (t.on("keydown", function(e) {
  14732. var n;
  14733. 13 == e.keyCode && (e.preventDefault(), t.parents().reverse().each(function(e) {
  14734. if (e.toJSON) return n = e, !1
  14735. }), t.fire("submit", {
  14736. data: n.toJSON()
  14737. }))
  14738. }), t.on("keyup", function(e) {
  14739. t.state.set("value", e.target.value)
  14740. }))
  14741. },
  14742. repaint: function() {
  14743. var e = this,
  14744. t, n, r, i, o = 0,
  14745. a;
  14746. t = e.getEl().style, n = e._layoutRect, a = e._lastRepaintRect || {};
  14747. var s = document;
  14748. return !e.settings.multiline && s.all && (!s.documentMode || s.documentMode <= 8) && (t.lineHeight = n.h - o + "px"), r = e.borderBox, i = r.left + r.right + 8, o = r.top + r.bottom + (e.settings.multiline ? 8 : 0), n.x !== a.x && (t.left = n.x + "px", a.x = n.x), n.y !== a.y && (t.top = n.y + "px", a.y = n.y), n.w !== a.w && (t.width = n.w - i + "px", a.w = n.w), n.h !== a.h && (t.height = n.h - o + "px", a.h = n.h), e._lastRepaintRect = a, e.fire("repaint", {}, !1), e
  14749. },
  14750. renderHtml: function() {
  14751. var e = this,
  14752. r = e.settings,
  14753. i, o;
  14754. return i = {
  14755. id: e._id,
  14756. hidefocus: "1"
  14757. }, t.each(["rows", "spellcheck", "maxLength", "size", "readonly", "min", "max", "step", "list", "pattern", "placeholder", "required", "multiple"], function(e) {
  14758. i[e] = r[e]
  14759. }), e.disabled() && (i.disabled = "disabled"), r.subtype && (i.type = r.subtype), o = n.create(r.multiline ? "textarea" : "input", i), o.value = e.state.get("value"), o.className = e.classes, o.outerHTML
  14760. },
  14761. value: function(e) {
  14762. return arguments.length ? (this.state.set("value", e), this) : (this.state.get("rendered") && this.state.set("value", this.getEl().value), this.state.get("value"))
  14763. },
  14764. postRender: function() {
  14765. var e = this;
  14766. e.getEl().value = e.state.get("value"), e._super(), e.$el.on("change", function(t) {
  14767. e.state.set("value", t.target.value), e.fire("change", t)
  14768. })
  14769. },
  14770. bindStates: function() {
  14771. var e = this;
  14772. return e.state.on("change:value", function(t) {
  14773. e.getEl().value != t.value && (e.getEl().value = t.value)
  14774. }), e.state.on("change:disabled", function(t) {
  14775. e.getEl().disabled = t.value
  14776. }), e._super()
  14777. },
  14778. remove: function() {
  14779. this.$el.off(), this._super()
  14780. }
  14781. })
  14782. }), r(on, [], function() {
  14783. var e = this || window,
  14784. t = function() {
  14785. return e.tinymce
  14786. };
  14787. return "function" == typeof e.define && (e.define.amd || e.define("ephox/tinymce", [], t)), "object" == typeof module && (module.exports = window.tinymce), {}
  14788. }), a([l, c, u, d, f, h, m, g, v, y, C, w, E, N, T, A, B, D, L, M, P, O, I, F, j, Y, J, te, le, ce, ue, de, he, me, ge, Ce, xe, we, Ee, Ne, _e, Se, ke, Te, Re, Ae, Be, De, Le, Me, Pe, Oe, He, Ie, Ue, Ve, ot, at, st, lt, ut, dt, ft, ht, pt, mt, gt, vt, yt, bt, Ct, xt, wt, Et, Nt, _t, St, kt, Tt, Rt, At, Bt, Lt, Mt, Pt, Ot, Ht, It, Ft, zt, Ut, Wt, Vt, $t, qt, jt, Yt, Xt, Kt, Gt, Jt, Qt, Zt, en, tn, nn, rn])
  14789. }(window);