zh_CN.js 754 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841
  1. /**
  2. * Copyright (c) Tiny Technologies, Inc. All rights reserved.
  3. * Licensed under the LGPL or a commercial license.
  4. * For LGPL see License.txt in the project root for license information.
  5. * For commercial licenses see https://www.tiny.cloud/
  6. *
  7. * Version: 5.2.0 (2020-02-13)
  8. */
  9. !function(j) {
  10. "use strict";
  11. function i() {}
  12. var q = function(n, r) {
  13. return function() {
  14. for (var e = [], t = 0; t < arguments.length; t++)
  15. e[t] = arguments[t];
  16. return n(r.apply(null, e))
  17. }
  18. }
  19. , $ = function(e) {
  20. return function() {
  21. return e
  22. }
  23. }
  24. , W = function(e) {
  25. return e
  26. };
  27. function d(r) {
  28. for (var o = [], e = 1; e < arguments.length; e++)
  29. o[e - 1] = arguments[e];
  30. return function() {
  31. for (var e = [], t = 0; t < arguments.length; t++)
  32. e[t] = arguments[t];
  33. var n = o.concat(e);
  34. return r.apply(null, n)
  35. }
  36. }
  37. function c(n) {
  38. return function() {
  39. for (var e = [], t = 0; t < arguments.length; t++)
  40. e[t] = arguments[t];
  41. return !n.apply(null, e)
  42. }
  43. }
  44. function e() {
  45. return u
  46. }
  47. var t, s = $(!1), a = $(!0), u = (t = {
  48. fold: function(e, t) {
  49. return e()
  50. },
  51. is: s,
  52. isSome: s,
  53. isNone: a,
  54. getOr: o,
  55. getOrThunk: r,
  56. getOrDie: function(e) {
  57. throw new Error(e || "error: getOrDie called on none.")
  58. },
  59. getOrNull: $(null),
  60. getOrUndefined: $(undefined),
  61. or: o,
  62. orThunk: r,
  63. map: e,
  64. each: i,
  65. bind: e,
  66. exists: s,
  67. forall: a,
  68. filter: e,
  69. equals: n,
  70. equals_: n,
  71. toArray: function() {
  72. return []
  73. },
  74. toString: $("none()")
  75. },
  76. Object.freeze && Object.freeze(t),
  77. t);
  78. function n(e) {
  79. return e.isNone()
  80. }
  81. function r(e) {
  82. return e()
  83. }
  84. function o(e) {
  85. return e
  86. }
  87. function l(t) {
  88. return function(e) {
  89. return function(e) {
  90. if (null === e)
  91. return "null";
  92. var t = typeof e;
  93. return "object" == t && (Array.prototype.isPrototypeOf(e) || e.constructor && "Array" === e.constructor.name) ? "array" : "object" == t && (String.prototype.isPrototypeOf(e) || e.constructor && "String" === e.constructor.name) ? "string" : t
  94. }(e) === t
  95. }
  96. }
  97. function f(e, t) {
  98. return V.call(e, t)
  99. }
  100. function h(e, t) {
  101. return -1 < f(e, t)
  102. }
  103. function C(e, t) {
  104. for (var n = 0, r = e.length; n < r; n++) {
  105. if (t(e[n], n))
  106. return !0
  107. }
  108. return !1
  109. }
  110. function m(e, t, n) {
  111. return function(e, t) {
  112. for (var n = e.length - 1; 0 <= n; n--) {
  113. t(e[n], n)
  114. }
  115. }(e, function(e) {
  116. n = t(n, e)
  117. }),
  118. n
  119. }
  120. function y(e, t, n) {
  121. return F(e, function(e) {
  122. n = t(n, e)
  123. }),
  124. n
  125. }
  126. function g(e, t) {
  127. for (var n = 0, r = e.length; n < r; n++) {
  128. var o = e[n];
  129. if (t(o, n))
  130. return R.some(o)
  131. }
  132. return R.none()
  133. }
  134. function p(e, t) {
  135. for (var n = 0, r = e.length; n < r; n++) {
  136. if (t(e[n], n))
  137. return R.some(n)
  138. }
  139. return R.none()
  140. }
  141. function v(e, t) {
  142. return function(e) {
  143. for (var t = [], n = 0, r = e.length; n < r; ++n) {
  144. if (!D(e[n]))
  145. throw new Error("Arr.flatten item " + n + " was not an array, input: " + e);
  146. I.apply(t, e[n])
  147. }
  148. return t
  149. }(X(e, t))
  150. }
  151. function b(e, t) {
  152. for (var n = 0, r = e.length; n < r; ++n) {
  153. if (!0 !== t(e[n], n))
  154. return !1
  155. }
  156. return !0
  157. }
  158. function w(e) {
  159. var t = L.call(e, 0);
  160. return t.reverse(),
  161. t
  162. }
  163. function x(e, t) {
  164. return U(e, function(e) {
  165. return !h(t, e)
  166. })
  167. }
  168. function z(e) {
  169. return 0 === e.length ? R.none() : R.some(e[0])
  170. }
  171. function E(e) {
  172. return 0 === e.length ? R.none() : R.some(e[e.length - 1])
  173. }
  174. function N(e, t) {
  175. for (var n = Z(e), r = 0, o = n.length; r < o; r++) {
  176. var i = n[r];
  177. t(e[i], i)
  178. }
  179. }
  180. function S(e, n) {
  181. return Q(e, function(e, t) {
  182. return {
  183. k: t,
  184. v: n(e, t)
  185. }
  186. })
  187. }
  188. function k(n) {
  189. return function(e, t) {
  190. n[t] = e
  191. }
  192. }
  193. function T(e, t) {
  194. var n = {}
  195. , r = {};
  196. return function(e, n, r, o) {
  197. N(e, function(e, t) {
  198. (n(e, t) ? r : o)(e, t)
  199. })
  200. }(e, t, k(n), k(r)),
  201. {
  202. t: n,
  203. f: r
  204. }
  205. }
  206. function A(e, t) {
  207. return ee(e, t) ? R.from(e[t]) : R.none()
  208. }
  209. var M = function(n) {
  210. function e() {
  211. return o
  212. }
  213. function t(e) {
  214. return e(n)
  215. }
  216. var r = $(n)
  217. , o = {
  218. fold: function(e, t) {
  219. return t(n)
  220. },
  221. is: function(e) {
  222. return n === e
  223. },
  224. isSome: a,
  225. isNone: s,
  226. getOr: r,
  227. getOrThunk: r,
  228. getOrDie: r,
  229. getOrNull: r,
  230. getOrUndefined: r,
  231. or: e,
  232. orThunk: e,
  233. map: function(e) {
  234. return M(e(n))
  235. },
  236. each: function(e) {
  237. e(n)
  238. },
  239. bind: t,
  240. exists: t,
  241. forall: t,
  242. filter: function(e) {
  243. return e(n) ? o : u
  244. },
  245. toArray: function() {
  246. return [n]
  247. },
  248. toString: function() {
  249. return "some(" + n + ")"
  250. },
  251. equals: function(e) {
  252. return e.is(n)
  253. },
  254. equals_: function(e, t) {
  255. return e.fold(s, function(e) {
  256. return t(n, e)
  257. })
  258. }
  259. };
  260. return o
  261. }
  262. , R = {
  263. some: M,
  264. none: e,
  265. from: function(e) {
  266. return null === e || e === undefined ? u : M(e)
  267. }
  268. }
  269. , K = l("string")
  270. , _ = l("object")
  271. , D = l("array")
  272. , O = l("null")
  273. , H = l("boolean")
  274. , B = l("function")
  275. , P = l("number")
  276. , L = Array.prototype.slice
  277. , V = Array.prototype.indexOf
  278. , I = Array.prototype.push
  279. , X = function(e, t) {
  280. for (var n = e.length, r = new Array(n), o = 0; o < n; o++) {
  281. var i = e[o];
  282. r[o] = t(i, o)
  283. }
  284. return r
  285. }
  286. , F = function(e, t) {
  287. for (var n = 0, r = e.length; n < r; n++) {
  288. t(e[n], n)
  289. }
  290. }
  291. , Y = function(e, t) {
  292. for (var n = [], r = [], o = 0, i = e.length; o < i; o++) {
  293. var a = e[o];
  294. (t(a, o) ? n : r).push(a)
  295. }
  296. return {
  297. pass: n,
  298. fail: r
  299. }
  300. }
  301. , U = function(e, t) {
  302. for (var n = [], r = 0, o = e.length; r < o; r++) {
  303. var i = e[r];
  304. t(i, r) && n.push(i)
  305. }
  306. return n
  307. }
  308. , G = B(Array.from) ? Array.from : function(e) {
  309. return L.call(e)
  310. }
  311. , Z = Object.keys
  312. , J = Object.hasOwnProperty
  313. , Q = function(e, r) {
  314. var o = {};
  315. return N(e, function(e, t) {
  316. var n = r(e, t);
  317. o[n.k] = n.v
  318. }),
  319. o
  320. }
  321. , ee = function(e, t) {
  322. return J.call(e, t)
  323. }
  324. , te = function() {
  325. return (te = Object.assign || function(e) {
  326. for (var t, n = 1, r = arguments.length; n < r; n++)
  327. for (var o in t = arguments[n])
  328. Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
  329. return e
  330. }
  331. ).apply(this, arguments)
  332. };
  333. function ne(e, t) {
  334. var n = function(e, t) {
  335. for (var n = 0; n < e.length; n++) {
  336. var r = e[n];
  337. if (r.test(t))
  338. return r
  339. }
  340. return undefined
  341. }(e, t);
  342. if (!n)
  343. return {
  344. major: 0,
  345. minor: 0
  346. };
  347. function r(e) {
  348. return Number(t.replace(n, "$" + e))
  349. }
  350. return ct(r(1), r(2))
  351. }
  352. function re(e, t) {
  353. return function() {
  354. return t === e
  355. }
  356. }
  357. function oe(e, t) {
  358. return function() {
  359. return t === e
  360. }
  361. }
  362. function ie(e, t) {
  363. var n = String(t).toLowerCase();
  364. return g(e, function(e) {
  365. return e.search(n)
  366. })
  367. }
  368. function ae(e, t) {
  369. return -1 !== e.indexOf(t)
  370. }
  371. function ue(e, t) {
  372. return function(e, t, n) {
  373. return "" === t || !(e.length < t.length) && e.substr(n, n + t.length) === t
  374. }(e, t, 0)
  375. }
  376. function ce(e) {
  377. return e.replace(/^\s+|\s+$/g, "")
  378. }
  379. function se(e) {
  380. return e.replace(/\s+$/g, "")
  381. }
  382. function le(t) {
  383. return function(e) {
  384. return ae(e, t)
  385. }
  386. }
  387. function fe() {
  388. return St.get()
  389. }
  390. function de() {
  391. for (var t = [], e = 0; e < arguments.length; e++)
  392. t[e] = arguments[e];
  393. return function() {
  394. for (var n = [], e = 0; e < arguments.length; e++)
  395. n[e] = arguments[e];
  396. if (t.length !== n.length)
  397. throw new Error('Wrong number of arguments to struct. Expected "[' + t.length + ']", got ' + n.length + " arguments");
  398. var r = {};
  399. return F(t, function(e, t) {
  400. r[e] = $(n[t])
  401. }),
  402. r
  403. }
  404. }
  405. function he(e, t, n) {
  406. return 0 != (e.compareDocumentPosition(t) & n)
  407. }
  408. function me(e, t) {
  409. var n = e.dom();
  410. if (n.nodeType !== _t)
  411. return !1;
  412. var r = n;
  413. if (r.matches !== undefined)
  414. return r.matches(t);
  415. if (r.msMatchesSelector !== undefined)
  416. return r.msMatchesSelector(t);
  417. if (r.webkitMatchesSelector !== undefined)
  418. return r.webkitMatchesSelector(t);
  419. if (r.mozMatchesSelector !== undefined)
  420. return r.mozMatchesSelector(t);
  421. throw new Error("Browser lacks native selectors")
  422. }
  423. function ge(e) {
  424. return e.nodeType !== _t && e.nodeType !== Dt || 0 === e.childElementCount
  425. }
  426. function pe(e, t) {
  427. return e.dom() === t.dom()
  428. }
  429. function ve(e) {
  430. return it.fromDom(e.dom().ownerDocument)
  431. }
  432. function ye(e) {
  433. return it.fromDom(e.dom().ownerDocument.defaultView)
  434. }
  435. function be(e) {
  436. return R.from(e.dom().parentNode).map(it.fromDom)
  437. }
  438. function Ce(e) {
  439. return R.from(e.dom().previousSibling).map(it.fromDom)
  440. }
  441. function we(e) {
  442. return R.from(e.dom().nextSibling).map(it.fromDom)
  443. }
  444. function xe(e) {
  445. return w(kt(e, Ce))
  446. }
  447. function ze(e) {
  448. return kt(e, we)
  449. }
  450. function Ee(e) {
  451. return X(e.dom().childNodes, it.fromDom)
  452. }
  453. function Ne(e, t) {
  454. var n = e.dom().childNodes;
  455. return R.from(n[t]).map(it.fromDom)
  456. }
  457. function Se(e) {
  458. return Ne(e, 0)
  459. }
  460. function ke(e) {
  461. return Ne(e, e.dom().childNodes.length - 1)
  462. }
  463. function Te(t, n) {
  464. be(t).each(function(e) {
  465. e.dom().insertBefore(n.dom(), t.dom())
  466. })
  467. }
  468. function Ae(e, t) {
  469. we(e).fold(function() {
  470. be(e).each(function(e) {
  471. Ht(e, t)
  472. })
  473. }, function(e) {
  474. Te(e, t)
  475. })
  476. }
  477. function Me(t, n) {
  478. Se(t).fold(function() {
  479. Ht(t, n)
  480. }, function(e) {
  481. t.dom().insertBefore(n.dom(), e.dom())
  482. })
  483. }
  484. function Re(t, e) {
  485. F(e, function(e) {
  486. Ht(t, e)
  487. })
  488. }
  489. function _e(e) {
  490. e.dom().textContent = "",
  491. F(Ee(e), function(e) {
  492. Bt(e)
  493. })
  494. }
  495. function De(e) {
  496. var t = Ee(e);
  497. 0 < t.length && function(t, e) {
  498. F(e, function(e) {
  499. Te(t, e)
  500. })
  501. }(e, t),
  502. Bt(e)
  503. }
  504. function Oe(e) {
  505. return e.dom().nodeName.toLowerCase()
  506. }
  507. function He(t) {
  508. return function(e) {
  509. return function(e) {
  510. return e.dom().nodeType
  511. }(e) === t
  512. }
  513. }
  514. function Be(e) {
  515. var t = Lt(e) ? e.dom().parentNode : e.dom();
  516. return t !== undefined && null !== t && t.ownerDocument.body.contains(t)
  517. }
  518. function Pe(e, t) {
  519. return e !== undefined ? e : t !== undefined ? t : 0
  520. }
  521. function Le(e) {
  522. var t = e !== undefined ? e.dom() : j.document
  523. , n = t.body.scrollLeft || t.documentElement.scrollLeft
  524. , r = t.body.scrollTop || t.documentElement.scrollTop;
  525. return It(n, r)
  526. }
  527. function Ve(e, t, n) {
  528. (n !== undefined ? n.dom() : j.document).defaultView.scrollTo(e, t)
  529. }
  530. function Ie(e, t) {
  531. Ut && B(e.dom().scrollIntoViewIfNeeded) ? e.dom().scrollIntoViewIfNeeded(!1) : e.dom().scrollIntoView(t)
  532. }
  533. function Fe(e, t, n, r) {
  534. return {
  535. x: $(e),
  536. y: $(t),
  537. width: $(n),
  538. height: $(r),
  539. right: $(e + n),
  540. bottom: $(t + r)
  541. }
  542. }
  543. function Ue(t) {
  544. return function(e) {
  545. return !!e && e.nodeType === t
  546. }
  547. }
  548. function je(e) {
  549. var n = e.map(function(e) {
  550. return e.toLowerCase()
  551. });
  552. return function(e) {
  553. if (e && e.nodeName) {
  554. var t = e.nodeName.toLowerCase();
  555. return h(n, t)
  556. }
  557. return !1
  558. }
  559. }
  560. function qe(t) {
  561. return function(e) {
  562. if (qt(e)) {
  563. if (e.contentEditable === t)
  564. return !0;
  565. if (e.getAttribute("data-mce-contenteditable") === t)
  566. return !0
  567. }
  568. return !1
  569. }
  570. }
  571. function $e(e) {
  572. return e.style !== undefined && B(e.style.getPropertyValue)
  573. }
  574. function We(e, t, n) {
  575. if (!(K(n) || H(n) || P(n)))
  576. throw j.console.error("Invalid call to Attr.set. Key ", t, ":: Value ", n, ":: Element ", e),
  577. new Error("Attribute value was not simple");
  578. e.setAttribute(t, n + "")
  579. }
  580. function Ke(e, t) {
  581. var n = e.dom();
  582. N(t, function(e, t) {
  583. We(n, t, e)
  584. })
  585. }
  586. function Xe(e, t) {
  587. var n = e.dom().getAttribute(t);
  588. return null === n ? undefined : n
  589. }
  590. function Ye(e, t) {
  591. e.dom().removeAttribute(t)
  592. }
  593. function Ge(e, t) {
  594. var n = e.dom()
  595. , r = j.window.getComputedStyle(n).getPropertyValue(t)
  596. , o = "" !== r || Be(e) ? r : tn(n, t);
  597. return null === o ? undefined : o
  598. }
  599. function Ze(e, t) {
  600. var n = e.dom()
  601. , r = tn(n, t);
  602. return R.from(r).filter(function(e) {
  603. return 0 < e.length
  604. })
  605. }
  606. function Je(e) {
  607. return g(e, Pt)
  608. }
  609. function Qe(e, t) {
  610. return e.children && h(e.children, t)
  611. }
  612. var et, tt, nt, rt, ot = function(e) {
  613. if (null === e || e === undefined)
  614. throw new Error("Node cannot be null or undefined");
  615. return {
  616. dom: $(e)
  617. }
  618. }, it = {
  619. fromHtml: function(e, t) {
  620. var n = (t || j.document).createElement("div");
  621. if (n.innerHTML = e,
  622. !n.hasChildNodes() || 1 < n.childNodes.length)
  623. throw j.console.error("HTML does not have a single root node", e),
  624. new Error("HTML must have a single root node");
  625. return ot(n.childNodes[0])
  626. },
  627. fromTag: function(e, t) {
  628. var n = (t || j.document).createElement(e);
  629. return ot(n)
  630. },
  631. fromText: function(e, t) {
  632. var n = (t || j.document).createTextNode(e);
  633. return ot(n)
  634. },
  635. fromDom: ot,
  636. fromPoint: function(e, t, n) {
  637. var r = e.dom();
  638. return R.from(r.elementFromPoint(t, n)).map(ot)
  639. }
  640. }, at = function(e) {
  641. function t() {
  642. return n
  643. }
  644. var n = e;
  645. return {
  646. get: t,
  647. set: function(e) {
  648. n = e
  649. },
  650. clone: function() {
  651. return at(t())
  652. }
  653. }
  654. }, ut = function() {
  655. return ct(0, 0)
  656. }, ct = function(e, t) {
  657. return {
  658. major: e,
  659. minor: t
  660. }
  661. }, st = {
  662. nu: ct,
  663. detect: function(e, t) {
  664. var n = String(t).toLowerCase();
  665. return 0 === e.length ? ut() : ne(e, n)
  666. },
  667. unknown: ut
  668. }, lt = "Firefox", ft = function(e) {
  669. var t = e.current;
  670. return {
  671. current: t,
  672. version: e.version,
  673. isEdge: re("Edge", t),
  674. isChrome: re("Chrome", t),
  675. isIE: re("IE", t),
  676. isOpera: re("Opera", t),
  677. isFirefox: re(lt, t),
  678. isSafari: re("Safari", t)
  679. }
  680. }, dt = {
  681. unknown: function() {
  682. return ft({
  683. current: undefined,
  684. version: st.unknown()
  685. })
  686. },
  687. nu: ft,
  688. edge: $("Edge"),
  689. chrome: $("Chrome"),
  690. ie: $("IE"),
  691. opera: $("Opera"),
  692. firefox: $(lt),
  693. safari: $("Safari")
  694. }, ht = "Windows", mt = "Android", gt = "Solaris", pt = "FreeBSD", vt = "ChromeOS", yt = function(e) {
  695. var t = e.current;
  696. return {
  697. current: t,
  698. version: e.version,
  699. isWindows: oe(ht, t),
  700. isiOS: oe("iOS", t),
  701. isAndroid: oe(mt, t),
  702. isOSX: oe("OSX", t),
  703. isLinux: oe("Linux", t),
  704. isSolaris: oe(gt, t),
  705. isFreeBSD: oe(pt, t),
  706. isChromeOS: oe(vt, t)
  707. }
  708. }, bt = {
  709. unknown: function() {
  710. return yt({
  711. current: undefined,
  712. version: st.unknown()
  713. })
  714. },
  715. nu: yt,
  716. windows: $(ht),
  717. ios: $("iOS"),
  718. android: $(mt),
  719. linux: $("Linux"),
  720. osx: $("OSX"),
  721. solaris: $(gt),
  722. freebsd: $(pt),
  723. chromeos: $(vt)
  724. }, Ct = function(e, n) {
  725. return ie(e, n).map(function(e) {
  726. var t = st.detect(e.versionRegexes, n);
  727. return {
  728. current: e.name,
  729. version: t
  730. }
  731. })
  732. }, wt = function(e, n) {
  733. return ie(e, n).map(function(e) {
  734. var t = st.detect(e.versionRegexes, n);
  735. return {
  736. current: e.name,
  737. version: t
  738. }
  739. })
  740. }, xt = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, zt = [{
  741. name: "Edge",
  742. versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
  743. search: function(e) {
  744. return ae(e, "edge/") && ae(e, "chrome") && ae(e, "safari") && ae(e, "applewebkit")
  745. }
  746. }, {
  747. name: "Chrome",
  748. versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/, xt],
  749. search: function(e) {
  750. return ae(e, "chrome") && !ae(e, "chromeframe")
  751. }
  752. }, {
  753. name: "IE",
  754. versionRegexes: [/.*?msie\ ?([0-9]+)\.([0-9]+).*/, /.*?rv:([0-9]+)\.([0-9]+).*/],
  755. search: function(e) {
  756. return ae(e, "msie") || ae(e, "trident")
  757. }
  758. }, {
  759. name: "Opera",
  760. versionRegexes: [xt, /.*?opera\/([0-9]+)\.([0-9]+).*/],
  761. search: le("opera")
  762. }, {
  763. name: "Firefox",
  764. versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
  765. search: le("firefox")
  766. }, {
  767. name: "Safari",
  768. versionRegexes: [xt, /.*?cpu os ([0-9]+)_([0-9]+).*/],
  769. search: function(e) {
  770. return (ae(e, "safari") || ae(e, "mobile/")) && ae(e, "applewebkit")
  771. }
  772. }], Et = [{
  773. name: "Windows",
  774. search: le("win"),
  775. versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
  776. }, {
  777. name: "iOS",
  778. search: function(e) {
  779. return ae(e, "iphone") || ae(e, "ipad")
  780. },
  781. versionRegexes: [/.*?version\/\ ?([0-9]+)\.([0-9]+).*/, /.*cpu os ([0-9]+)_([0-9]+).*/, /.*cpu iphone os ([0-9]+)_([0-9]+).*/]
  782. }, {
  783. name: "Android",
  784. search: le("android"),
  785. versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
  786. }, {
  787. name: "OSX",
  788. search: le("mac os x"),
  789. versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
  790. }, {
  791. name: "Linux",
  792. search: le("linux"),
  793. versionRegexes: []
  794. }, {
  795. name: "Solaris",
  796. search: le("sunos"),
  797. versionRegexes: []
  798. }, {
  799. name: "FreeBSD",
  800. search: le("freebsd"),
  801. versionRegexes: []
  802. }, {
  803. name: "ChromeOS",
  804. search: le("cros"),
  805. versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
  806. }], Nt = {
  807. browsers: $(zt),
  808. oses: $(Et)
  809. }, St = at(function(e, t) {
  810. var n = Nt.browsers()
  811. , r = Nt.oses()
  812. , o = Ct(n, e).fold(dt.unknown, dt.nu)
  813. , i = wt(r, e).fold(bt.unknown, bt.nu);
  814. return {
  815. browser: o,
  816. os: i,
  817. deviceType: function(e, t, n, r) {
  818. var o = e.isiOS() && !0 === /ipad/i.test(n)
  819. , i = e.isiOS() && !o
  820. , a = e.isiOS() || e.isAndroid()
  821. , u = a || r("(pointer:coarse)")
  822. , c = o || !i && a && r("(min-device-width:768px)")
  823. , s = i || a && !c
  824. , l = t.isSafari() && e.isiOS() && !1 === /safari/i.test(n)
  825. , f = !s && !c && !l;
  826. return {
  827. isiPad: $(o),
  828. isiPhone: $(i),
  829. isTablet: $(c),
  830. isPhone: $(s),
  831. isTouch: $(u),
  832. isAndroid: e.isAndroid,
  833. isiOS: e.isiOS,
  834. isWebView: $(l),
  835. isDesktop: $(f)
  836. }
  837. }(i, o, e, t)
  838. }
  839. }(j.navigator.userAgent, function(e) {
  840. return j.window.matchMedia(e).matches
  841. })), kt = function(e, t) {
  842. for (var n = [], r = function(e) {
  843. return n.push(e),
  844. t(e)
  845. }, o = t(e); (o = o.bind(r)).isSome(); )
  846. ;
  847. return n
  848. }, Tt = function(e, t) {
  849. return he(e, t, j.Node.DOCUMENT_POSITION_CONTAINED_BY)
  850. }, At = (j.Node.ATTRIBUTE_NODE,
  851. j.Node.CDATA_SECTION_NODE,
  852. j.Node.COMMENT_NODE,
  853. j.Node.DOCUMENT_NODE), Mt = (j.Node.DOCUMENT_TYPE_NODE,
  854. j.Node.DOCUMENT_FRAGMENT_NODE,
  855. j.Node.ELEMENT_NODE), Rt = j.Node.TEXT_NODE, _t = (j.Node.PROCESSING_INSTRUCTION_NODE,
  856. j.Node.ENTITY_REFERENCE_NODE,
  857. j.Node.ENTITY_NODE,
  858. j.Node.NOTATION_NODE,
  859. Mt), Dt = At, Ot = fe().browser.isIE() ? function(e, t) {
  860. return Tt(e.dom(), t.dom())
  861. }
  862. : function(e, t) {
  863. var n = e.dom()
  864. , r = t.dom();
  865. return n !== r && n.contains(r)
  866. }
  867. , Ht = (de("element", "offset"),
  868. function(e, t) {
  869. e.dom().appendChild(t.dom())
  870. }
  871. ), Bt = function(e) {
  872. var t = e.dom();
  873. null !== t.parentNode && t.parentNode.removeChild(t)
  874. }, Pt = ("undefined" != typeof j.window ? j.window : Function("return this;")(),
  875. He(Mt)), Lt = He(Rt), Vt = function(n, r) {
  876. return {
  877. left: $(n),
  878. top: $(r),
  879. translate: function(e, t) {
  880. return Vt(n + e, r + t)
  881. }
  882. }
  883. }, It = Vt, Ft = function(e) {
  884. var t = e.dom()
  885. , n = t.ownerDocument.body;
  886. return n === t ? It(n.offsetLeft, n.offsetTop) : Be(e) ? function(e) {
  887. var t = e.getBoundingClientRect();
  888. return It(t.left, t.top)
  889. }(t) : It(0, 0)
  890. }, Ut = fe().browser.isSafari(), jt = function(e) {
  891. var r = e === undefined ? j.window : e
  892. , t = r.document
  893. , o = Le(it.fromDom(t));
  894. return function(e) {
  895. var t = e === undefined ? j.window : e;
  896. return R.from(t.visualViewport)
  897. }(r).fold(function() {
  898. var e = r.document.documentElement
  899. , t = e.clientWidth
  900. , n = e.clientHeight;
  901. return Fe(o.left(), o.top(), t, n)
  902. }, function(e) {
  903. return Fe(Math.max(e.pageLeft, o.left()), Math.max(e.pageTop, o.top()), e.width, e.height)
  904. })
  905. }, qt = Ue(1), $t = je(["textarea", "input"]), Wt = Ue(3), Kt = Ue(8), Xt = Ue(9), Yt = Ue(11), Gt = je(["br"]), Zt = qe("true"), Jt = qe("false"), Qt = {
  906. isText: Wt,
  907. isElement: qt,
  908. isComment: Kt,
  909. isDocument: Xt,
  910. isDocumentFragment: Yt,
  911. isBr: Gt,
  912. isContentEditableTrue: Zt,
  913. isContentEditableFalse: Jt,
  914. isRestrictedNode: function(e) {
  915. return !!e && !Object.getPrototypeOf(e)
  916. },
  917. matchNodeNames: je,
  918. hasPropValue: function(t, n) {
  919. return function(e) {
  920. return qt(e) && e[t] === n
  921. }
  922. },
  923. hasAttribute: function(t, e) {
  924. return function(e) {
  925. return qt(e) && e.hasAttribute(t)
  926. }
  927. },
  928. hasAttributeValue: function(t, n) {
  929. return function(e) {
  930. return qt(e) && e.getAttribute(t) === n
  931. }
  932. },
  933. matchStyleValues: function(r, e) {
  934. var o = e.toLowerCase().split(" ");
  935. return function(e) {
  936. var t;
  937. if (qt(e))
  938. for (t = 0; t < o.length; t++) {
  939. var n = e.ownerDocument.defaultView.getComputedStyle(e, null);
  940. if ((n ? n.getPropertyValue(r) : null) === o[t])
  941. return !0
  942. }
  943. return !1
  944. }
  945. },
  946. isBogus: function(e) {
  947. return qt(e) && e.hasAttribute("data-mce-bogus")
  948. },
  949. isBogusAll: function(e) {
  950. return qt(e) && "all" === e.getAttribute("data-mce-bogus")
  951. },
  952. isTable: function(e) {
  953. return qt(e) && "TABLE" === e.tagName
  954. },
  955. isTextareaOrInput: $t
  956. }, en = function(e, t, n) {
  957. We(e.dom(), t, n)
  958. }, tn = function(e, t) {
  959. return $e(e) ? e.style.getPropertyValue(t) : ""
  960. }, nn = fe().browser, rn = {
  961. getPos: function(e, t, n) {
  962. var r, o, i = 0, a = 0, u = e.ownerDocument;
  963. if (n = n || e,
  964. t) {
  965. if (n === e && t.getBoundingClientRect && "static" === Ge(it.fromDom(e), "position"))
  966. return {
  967. x: i = (o = t.getBoundingClientRect()).left + (u.documentElement.scrollLeft || e.scrollLeft) - u.documentElement.clientLeft,
  968. y: a = o.top + (u.documentElement.scrollTop || e.scrollTop) - u.documentElement.clientTop
  969. };
  970. for (r = t; r && r !== n && r.nodeType && !Qe(r, n); )
  971. i += r.offsetLeft || 0,
  972. a += r.offsetTop || 0,
  973. r = r.offsetParent;
  974. for (r = t.parentNode; r && r !== n && r.nodeType && !Qe(r, n); )
  975. i -= r.scrollLeft || 0,
  976. a -= r.scrollTop || 0,
  977. r = r.parentNode;
  978. a += function(e) {
  979. return nn.isFirefox() && "table" === Oe(e) ? Je(Ee(e)).filter(function(e) {
  980. return "caption" === Oe(e)
  981. }).bind(function(o) {
  982. return Je(ze(o)).map(function(e) {
  983. var t = e.dom().offsetTop
  984. , n = o.dom().offsetTop
  985. , r = o.dom().offsetHeight;
  986. return t <= n ? -r : 0
  987. })
  988. }).getOr(0) : 0
  989. }(it.fromDom(t))
  990. }
  991. return {
  992. x: i,
  993. y: a
  994. }
  995. }
  996. }, on = {}, an = {
  997. exports: on
  998. };
  999. et = undefined,
  1000. tt = on,
  1001. nt = an,
  1002. rt = undefined,
  1003. function(e) {
  1004. "object" == typeof tt && void 0 !== nt ? nt.exports = e() : "function" == typeof et && et.amd ? et([], e) : ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).EphoxContactWrapper = e()
  1005. }(function() {
  1006. return function l(i, a, u) {
  1007. function c(t, e) {
  1008. if (!a[t]) {
  1009. if (!i[t]) {
  1010. var n = "function" == typeof rt && rt;
  1011. if (!e && n)
  1012. return n(t, !0);
  1013. if (s)
  1014. return s(t, !0);
  1015. var r = new Error("Cannot find module '" + t + "'");
  1016. throw r.code = "MODULE_NOT_FOUND",
  1017. r
  1018. }
  1019. var o = a[t] = {
  1020. exports: {}
  1021. };
  1022. i[t][0].call(o.exports, function(e) {
  1023. return c(i[t][1][e] || e)
  1024. }, o, o.exports, l, i, a, u)
  1025. }
  1026. return a[t].exports
  1027. }
  1028. for (var s = "function" == typeof rt && rt, e = 0; e < u.length; e++)
  1029. c(u[e]);
  1030. return c
  1031. }({
  1032. 1: [function(e, t, n) {
  1033. var r, o, i = t.exports = {};
  1034. function a() {
  1035. throw new Error("setTimeout has not been defined")
  1036. }
  1037. function u() {
  1038. throw new Error("clearTimeout has not been defined")
  1039. }
  1040. function c(e) {
  1041. if (r === setTimeout)
  1042. return setTimeout(e, 0);
  1043. if ((r === a || !r) && setTimeout)
  1044. return r = setTimeout,
  1045. setTimeout(e, 0);
  1046. try {
  1047. return r(e, 0)
  1048. } catch (t) {
  1049. try {
  1050. return r.call(null, e, 0)
  1051. } catch (t) {
  1052. return r.call(this, e, 0)
  1053. }
  1054. }
  1055. }
  1056. !function() {
  1057. try {
  1058. r = "function" == typeof setTimeout ? setTimeout : a
  1059. } catch (e) {
  1060. r = a
  1061. }
  1062. try {
  1063. o = "function" == typeof clearTimeout ? clearTimeout : u
  1064. } catch (e) {
  1065. o = u
  1066. }
  1067. }();
  1068. var s, l = [], f = !1, d = -1;
  1069. function h() {
  1070. f && s && (f = !1,
  1071. s.length ? l = s.concat(l) : d = -1,
  1072. l.length && m())
  1073. }
  1074. function m() {
  1075. if (!f) {
  1076. var e = c(h);
  1077. f = !0;
  1078. for (var t = l.length; t; ) {
  1079. for (s = l,
  1080. l = []; ++d < t; )
  1081. s && s[d].run();
  1082. d = -1,
  1083. t = l.length
  1084. }
  1085. s = null,
  1086. f = !1,
  1087. function n(e) {
  1088. if (o === clearTimeout)
  1089. return clearTimeout(e);
  1090. if ((o === u || !o) && clearTimeout)
  1091. return o = clearTimeout,
  1092. clearTimeout(e);
  1093. try {
  1094. return o(e)
  1095. } catch (t) {
  1096. try {
  1097. return o.call(null, e)
  1098. } catch (t) {
  1099. return o.call(this, e)
  1100. }
  1101. }
  1102. }(e)
  1103. }
  1104. }
  1105. function g(e, t) {
  1106. this.fun = e,
  1107. this.array = t
  1108. }
  1109. function p() {}
  1110. i.nextTick = function(e) {
  1111. var t = new Array(arguments.length - 1);
  1112. if (1 < arguments.length)
  1113. for (var n = 1; n < arguments.length; n++)
  1114. t[n - 1] = arguments[n];
  1115. l.push(new g(e,t)),
  1116. 1 !== l.length || f || c(m)
  1117. }
  1118. ,
  1119. g.prototype.run = function() {
  1120. this.fun.apply(null, this.array)
  1121. }
  1122. ,
  1123. i.title = "browser",
  1124. i.browser = !0,
  1125. i.env = {},
  1126. i.argv = [],
  1127. i.version = "",
  1128. i.versions = {},
  1129. i.on = p,
  1130. i.addListener = p,
  1131. i.once = p,
  1132. i.off = p,
  1133. i.removeListener = p,
  1134. i.removeAllListeners = p,
  1135. i.emit = p,
  1136. i.prependListener = p,
  1137. i.prependOnceListener = p,
  1138. i.listeners = function(e) {
  1139. return []
  1140. }
  1141. ,
  1142. i.binding = function(e) {
  1143. throw new Error("process.binding is not supported")
  1144. }
  1145. ,
  1146. i.cwd = function() {
  1147. return "/"
  1148. }
  1149. ,
  1150. i.chdir = function(e) {
  1151. throw new Error("process.chdir is not supported")
  1152. }
  1153. ,
  1154. i.umask = function() {
  1155. return 0
  1156. }
  1157. }
  1158. , {}],
  1159. 2: [function(e, f, t) {
  1160. (function(t) {
  1161. function r() {}
  1162. function i(e) {
  1163. if ("object" != typeof this)
  1164. throw new TypeError("Promises must be constructed via new");
  1165. if ("function" != typeof e)
  1166. throw new TypeError("not a function");
  1167. this._state = 0,
  1168. this._handled = !1,
  1169. this._value = undefined,
  1170. this._deferreds = [],
  1171. l(e, this)
  1172. }
  1173. function o(r, o) {
  1174. for (; 3 === r._state; )
  1175. r = r._value;
  1176. 0 !== r._state ? (r._handled = !0,
  1177. i._immediateFn(function() {
  1178. var e = 1 === r._state ? o.onFulfilled : o.onRejected;
  1179. if (null !== e) {
  1180. var t;
  1181. try {
  1182. t = e(r._value)
  1183. } catch (n) {
  1184. return void u(o.promise, n)
  1185. }
  1186. a(o.promise, t)
  1187. } else
  1188. (1 === r._state ? a : u)(o.promise, r._value)
  1189. })) : r._deferreds.push(o)
  1190. }
  1191. function a(e, t) {
  1192. try {
  1193. if (t === e)
  1194. throw new TypeError("A promise cannot be resolved with itself.");
  1195. if (t && ("object" == typeof t || "function" == typeof t)) {
  1196. var n = t.then;
  1197. if (t instanceof i)
  1198. return e._state = 3,
  1199. e._value = t,
  1200. void c(e);
  1201. if ("function" == typeof n)
  1202. return void l(function r(e, t) {
  1203. return function() {
  1204. e.apply(t, arguments)
  1205. }
  1206. }(n, t), e)
  1207. }
  1208. e._state = 1,
  1209. e._value = t,
  1210. c(e)
  1211. } catch (o) {
  1212. u(e, o)
  1213. }
  1214. }
  1215. function u(e, t) {
  1216. e._state = 2,
  1217. e._value = t,
  1218. c(e)
  1219. }
  1220. function c(e) {
  1221. 2 === e._state && 0 === e._deferreds.length && i._immediateFn(function() {
  1222. e._handled || i._unhandledRejectionFn(e._value)
  1223. });
  1224. for (var t = 0, n = e._deferreds.length; t < n; t++)
  1225. o(e, e._deferreds[t]);
  1226. e._deferreds = null
  1227. }
  1228. function s(e, t, n) {
  1229. this.onFulfilled = "function" == typeof e ? e : null,
  1230. this.onRejected = "function" == typeof t ? t : null,
  1231. this.promise = n
  1232. }
  1233. function l(e, t) {
  1234. var n = !1;
  1235. try {
  1236. e(function(e) {
  1237. n || (n = !0,
  1238. a(t, e))
  1239. }, function(e) {
  1240. n || (n = !0,
  1241. u(t, e))
  1242. })
  1243. } catch (r) {
  1244. if (n)
  1245. return;
  1246. n = !0,
  1247. u(t, r)
  1248. }
  1249. }
  1250. var e, n;
  1251. e = this,
  1252. n = setTimeout,
  1253. i.prototype["catch"] = function(e) {
  1254. return this.then(null, e)
  1255. }
  1256. ,
  1257. i.prototype.then = function(e, t) {
  1258. var n = new this.constructor(r);
  1259. return o(this, new s(e,t,n)),
  1260. n
  1261. }
  1262. ,
  1263. i.all = function(e) {
  1264. var c = Array.prototype.slice.call(e);
  1265. return new i(function(o, i) {
  1266. if (0 === c.length)
  1267. return o([]);
  1268. var a = c.length;
  1269. function u(t, e) {
  1270. try {
  1271. if (e && ("object" == typeof e || "function" == typeof e)) {
  1272. var n = e.then;
  1273. if ("function" == typeof n)
  1274. return void n.call(e, function(e) {
  1275. u(t, e)
  1276. }, i)
  1277. }
  1278. c[t] = e,
  1279. 0 == --a && o(c)
  1280. } catch (r) {
  1281. i(r)
  1282. }
  1283. }
  1284. for (var e = 0; e < c.length; e++)
  1285. u(e, c[e])
  1286. }
  1287. )
  1288. }
  1289. ,
  1290. i.resolve = function(t) {
  1291. return t && "object" == typeof t && t.constructor === i ? t : new i(function(e) {
  1292. e(t)
  1293. }
  1294. )
  1295. }
  1296. ,
  1297. i.reject = function(n) {
  1298. return new i(function(e, t) {
  1299. t(n)
  1300. }
  1301. )
  1302. }
  1303. ,
  1304. i.race = function(o) {
  1305. return new i(function(e, t) {
  1306. for (var n = 0, r = o.length; n < r; n++)
  1307. o[n].then(e, t)
  1308. }
  1309. )
  1310. }
  1311. ,
  1312. i._immediateFn = "function" == typeof t ? function(e) {
  1313. t(e)
  1314. }
  1315. : function(e) {
  1316. n(e, 0)
  1317. }
  1318. ,
  1319. i._unhandledRejectionFn = function(e) {
  1320. "undefined" != typeof console && console && console.warn("Possible Unhandled Promise Rejection:", e)
  1321. }
  1322. ,
  1323. i._setImmediateFn = function(e) {
  1324. i._immediateFn = e
  1325. }
  1326. ,
  1327. i._setUnhandledRejectionFn = function(e) {
  1328. i._unhandledRejectionFn = e
  1329. }
  1330. ,
  1331. void 0 !== f && f.exports ? f.exports = i : e.Promise || (e.Promise = i)
  1332. }
  1333. ).call(this, e("timers").setImmediate)
  1334. }
  1335. , {
  1336. timers: 3
  1337. }],
  1338. 3: [function(c, e, s) {
  1339. (function(e, t) {
  1340. var r = c("process/browser.js").nextTick
  1341. , n = Function.prototype.apply
  1342. , o = Array.prototype.slice
  1343. , i = {}
  1344. , a = 0;
  1345. function u(e, t) {
  1346. this._id = e,
  1347. this._clearFn = t
  1348. }
  1349. s.setTimeout = function() {
  1350. return new u(n.call(setTimeout, window, arguments),clearTimeout)
  1351. }
  1352. ,
  1353. s.setInterval = function() {
  1354. return new u(n.call(setInterval, window, arguments),clearInterval)
  1355. }
  1356. ,
  1357. s.clearTimeout = s.clearInterval = function(e) {
  1358. e.close()
  1359. }
  1360. ,
  1361. u.prototype.unref = u.prototype.ref = function() {}
  1362. ,
  1363. u.prototype.close = function() {
  1364. this._clearFn.call(window, this._id)
  1365. }
  1366. ,
  1367. s.enroll = function(e, t) {
  1368. clearTimeout(e._idleTimeoutId),
  1369. e._idleTimeout = t
  1370. }
  1371. ,
  1372. s.unenroll = function(e) {
  1373. clearTimeout(e._idleTimeoutId),
  1374. e._idleTimeout = -1
  1375. }
  1376. ,
  1377. s._unrefActive = s.active = function(e) {
  1378. clearTimeout(e._idleTimeoutId);
  1379. var t = e._idleTimeout;
  1380. 0 <= t && (e._idleTimeoutId = setTimeout(function() {
  1381. e._onTimeout && e._onTimeout()
  1382. }, t))
  1383. }
  1384. ,
  1385. s.setImmediate = "function" == typeof e ? e : function(e) {
  1386. var t = a++
  1387. , n = !(arguments.length < 2) && o.call(arguments, 1);
  1388. return i[t] = !0,
  1389. r(function() {
  1390. i[t] && (n ? e.apply(null, n) : e.call(null),
  1391. s.clearImmediate(t))
  1392. }),
  1393. t
  1394. }
  1395. ,
  1396. s.clearImmediate = "function" == typeof t ? t : function(e) {
  1397. delete i[e]
  1398. }
  1399. }
  1400. ).call(this, c("timers").setImmediate, c("timers").clearImmediate)
  1401. }
  1402. , {
  1403. "process/browser.js": 1,
  1404. timers: 3
  1405. }],
  1406. 4: [function(e, t, n) {
  1407. var r = e("promise-polyfill")
  1408. , o = "undefined" != typeof window ? window : Function("return this;")();
  1409. t.exports = {
  1410. boltExport: o.Promise || r
  1411. }
  1412. }
  1413. , {
  1414. "promise-polyfill": 2
  1415. }]
  1416. }, {}, [4])(4)
  1417. });
  1418. function un(e) {
  1419. j.setTimeout(function() {
  1420. throw e
  1421. }, 0)
  1422. }
  1423. function cn(i, e) {
  1424. return e(function(n) {
  1425. var r = []
  1426. , o = 0;
  1427. 0 === i.length ? n([]) : F(i, function(e, t) {
  1428. e.get(function(t) {
  1429. return function(e) {
  1430. r[t] = e,
  1431. ++o >= i.length && n(r)
  1432. }
  1433. }(t))
  1434. })
  1435. })
  1436. }
  1437. var sn, ln, fn, dn = an.exports.boltExport, hn = function(e) {
  1438. var n = R.none()
  1439. , t = []
  1440. , r = function(e) {
  1441. o() ? a(e) : t.push(e)
  1442. }
  1443. , o = function() {
  1444. return n.isSome()
  1445. }
  1446. , i = function(e) {
  1447. F(e, a)
  1448. }
  1449. , a = function(t) {
  1450. n.each(function(e) {
  1451. j.setTimeout(function() {
  1452. t(e)
  1453. }, 0)
  1454. })
  1455. };
  1456. return e(function(e) {
  1457. n = R.some(e),
  1458. i(t),
  1459. t = []
  1460. }),
  1461. {
  1462. get: r,
  1463. map: function(n) {
  1464. return hn(function(t) {
  1465. r(function(e) {
  1466. t(n(e))
  1467. })
  1468. })
  1469. },
  1470. isReady: o
  1471. }
  1472. }, mn = {
  1473. nu: hn,
  1474. pure: function(t) {
  1475. return hn(function(e) {
  1476. e(t)
  1477. })
  1478. }
  1479. }, gn = function(n) {
  1480. function e(e) {
  1481. n().then(e, un)
  1482. }
  1483. return {
  1484. map: function(e) {
  1485. return gn(function() {
  1486. return n().then(e)
  1487. })
  1488. },
  1489. bind: function(t) {
  1490. return gn(function() {
  1491. return n().then(function(e) {
  1492. return t(e).toPromise()
  1493. })
  1494. })
  1495. },
  1496. anonBind: function(e) {
  1497. return gn(function() {
  1498. return n().then(function() {
  1499. return e.toPromise()
  1500. })
  1501. })
  1502. },
  1503. toLazy: function() {
  1504. return mn.nu(e)
  1505. },
  1506. toCached: function() {
  1507. var e = null;
  1508. return gn(function() {
  1509. return null === e && (e = n()),
  1510. e
  1511. })
  1512. },
  1513. toPromise: n,
  1514. get: e
  1515. }
  1516. }, pn = {
  1517. nu: function(e) {
  1518. return gn(function() {
  1519. return new dn(e)
  1520. })
  1521. },
  1522. pure: function(e) {
  1523. return gn(function() {
  1524. return dn.resolve(e)
  1525. })
  1526. }
  1527. }, vn = function(e) {
  1528. return cn(e, pn.nu)
  1529. }, yn = function(n) {
  1530. return {
  1531. is: function(e) {
  1532. return n === e
  1533. },
  1534. isValue: a,
  1535. isError: s,
  1536. getOr: $(n),
  1537. getOrThunk: $(n),
  1538. getOrDie: $(n),
  1539. or: function(e) {
  1540. return yn(n)
  1541. },
  1542. orThunk: function(e) {
  1543. return yn(n)
  1544. },
  1545. fold: function(e, t) {
  1546. return t(n)
  1547. },
  1548. map: function(e) {
  1549. return yn(e(n))
  1550. },
  1551. mapError: function(e) {
  1552. return yn(n)
  1553. },
  1554. each: function(e) {
  1555. e(n)
  1556. },
  1557. bind: function(e) {
  1558. return e(n)
  1559. },
  1560. exists: function(e) {
  1561. return e(n)
  1562. },
  1563. forall: function(e) {
  1564. return e(n)
  1565. },
  1566. toOption: function() {
  1567. return R.some(n)
  1568. }
  1569. }
  1570. }, bn = function(n) {
  1571. return {
  1572. is: s,
  1573. isValue: s,
  1574. isError: a,
  1575. getOr: W,
  1576. getOrThunk: function(e) {
  1577. return e()
  1578. },
  1579. getOrDie: function() {
  1580. return function(e) {
  1581. return function() {
  1582. throw new Error(e)
  1583. }
  1584. }(String(n))()
  1585. },
  1586. or: function(e) {
  1587. return e
  1588. },
  1589. orThunk: function(e) {
  1590. return e()
  1591. },
  1592. fold: function(e, t) {
  1593. return e(n)
  1594. },
  1595. map: function(e) {
  1596. return bn(n)
  1597. },
  1598. mapError: function(e) {
  1599. return bn(e(n))
  1600. },
  1601. each: i,
  1602. bind: function(e) {
  1603. return bn(n)
  1604. },
  1605. exists: s,
  1606. forall: a,
  1607. toOption: R.none
  1608. }
  1609. }, Cn = {
  1610. value: yn,
  1611. error: bn,
  1612. fromOption: function(e, t) {
  1613. return e.fold(function() {
  1614. return bn(t)
  1615. }, yn)
  1616. }
  1617. }, wn = window.Promise ? window.Promise : (sn = Array.isArray || function(e) {
  1618. return "[object Array]" === Object.prototype.toString.call(e)
  1619. }
  1620. ,
  1621. ln = zn.immediateFn || "function" == typeof j.setImmediate && j.setImmediate || function(e) {
  1622. j.setTimeout(e, 1)
  1623. }
  1624. ,
  1625. zn.prototype["catch"] = function(e) {
  1626. return this.then(null, e)
  1627. }
  1628. ,
  1629. zn.prototype.then = function(n, r) {
  1630. var o = this;
  1631. return new zn(function(e, t) {
  1632. En.call(o, new Tn(n,r,e,t))
  1633. }
  1634. )
  1635. }
  1636. ,
  1637. zn.all = function() {
  1638. var c = Array.prototype.slice.call(1 === arguments.length && sn(arguments[0]) ? arguments[0] : arguments);
  1639. return new zn(function(o, i) {
  1640. if (0 === c.length)
  1641. return o([]);
  1642. var a = c.length;
  1643. function u(t, e) {
  1644. try {
  1645. if (e && ("object" == typeof e || "function" == typeof e)) {
  1646. var n = e.then;
  1647. if ("function" == typeof n)
  1648. return void n.call(e, function(e) {
  1649. u(t, e)
  1650. }, i)
  1651. }
  1652. c[t] = e,
  1653. 0 == --a && o(c)
  1654. } catch (r) {
  1655. i(r)
  1656. }
  1657. }
  1658. for (var e = 0; e < c.length; e++)
  1659. u(e, c[e])
  1660. }
  1661. )
  1662. }
  1663. ,
  1664. zn.resolve = function(t) {
  1665. return t && "object" == typeof t && t.constructor === zn ? t : new zn(function(e) {
  1666. e(t)
  1667. }
  1668. )
  1669. }
  1670. ,
  1671. zn.reject = function(n) {
  1672. return new zn(function(e, t) {
  1673. t(n)
  1674. }
  1675. )
  1676. }
  1677. ,
  1678. zn.race = function(o) {
  1679. return new zn(function(e, t) {
  1680. for (var n = 0, r = o.length; n < r; n++)
  1681. o[n].then(e, t)
  1682. }
  1683. )
  1684. }
  1685. ,
  1686. zn);
  1687. function xn(e, t) {
  1688. return function() {
  1689. e.apply(t, arguments)
  1690. }
  1691. }
  1692. function zn(e) {
  1693. if ("object" != typeof this)
  1694. throw new TypeError("Promises must be constructed via new");
  1695. if ("function" != typeof e)
  1696. throw new TypeError("not a function");
  1697. this._state = null,
  1698. this._value = null,
  1699. this._deferreds = [],
  1700. An(e, xn(Nn, this), xn(Sn, this))
  1701. }
  1702. function En(r) {
  1703. var o = this;
  1704. null !== this._state ? ln(function() {
  1705. var e = o._state ? r.onFulfilled : r.onRejected;
  1706. if (null !== e) {
  1707. var t;
  1708. try {
  1709. t = e(o._value)
  1710. } catch (n) {
  1711. return void r.reject(n)
  1712. }
  1713. r.resolve(t)
  1714. } else
  1715. (o._state ? r.resolve : r.reject)(o._value)
  1716. }) : this._deferreds.push(r)
  1717. }
  1718. function Nn(e) {
  1719. try {
  1720. if (e === this)
  1721. throw new TypeError("A promise cannot be resolved with itself.");
  1722. if (e && ("object" == typeof e || "function" == typeof e)) {
  1723. var t = e.then;
  1724. if ("function" == typeof t)
  1725. return void An(xn(t, e), xn(Nn, this), xn(Sn, this))
  1726. }
  1727. this._state = !0,
  1728. this._value = e,
  1729. kn.call(this)
  1730. } catch (n) {
  1731. Sn.call(this, n)
  1732. }
  1733. }
  1734. function Sn(e) {
  1735. this._state = !1,
  1736. this._value = e,
  1737. kn.call(this)
  1738. }
  1739. function kn() {
  1740. for (var e = 0, t = this._deferreds.length; e < t; e++)
  1741. En.call(this, this._deferreds[e]);
  1742. this._deferreds = null
  1743. }
  1744. function Tn(e, t, n, r) {
  1745. this.onFulfilled = "function" == typeof e ? e : null,
  1746. this.onRejected = "function" == typeof t ? t : null,
  1747. this.resolve = n,
  1748. this.reject = r
  1749. }
  1750. function An(e, t, n) {
  1751. var r = !1;
  1752. try {
  1753. e(function(e) {
  1754. r || (r = !0,
  1755. t(e))
  1756. }, function(e) {
  1757. r || (r = !0,
  1758. n(e))
  1759. })
  1760. } catch (o) {
  1761. if (r)
  1762. return;
  1763. r = !0,
  1764. n(o)
  1765. }
  1766. }
  1767. function Mn(e, t) {
  1768. return "number" != typeof t && (t = 0),
  1769. j.setTimeout(e, t)
  1770. }
  1771. function Rn(e, t) {
  1772. return "number" != typeof t && (t = 1),
  1773. j.setInterval(e, t)
  1774. }
  1775. function _n(n, r) {
  1776. var o, e;
  1777. return (e = function() {
  1778. for (var e = [], t = 0; t < arguments.length; t++)
  1779. e[t] = arguments[t];
  1780. j.clearTimeout(o),
  1781. o = Mn(function() {
  1782. n.apply(this, e)
  1783. }, r)
  1784. }
  1785. ).stop = function() {
  1786. j.clearTimeout(o)
  1787. }
  1788. ,
  1789. e
  1790. }
  1791. function Dn(e, t, n) {
  1792. var r, o;
  1793. if (!e)
  1794. return 0;
  1795. if (n = n || e,
  1796. e.length !== undefined) {
  1797. for (r = 0,
  1798. o = e.length; r < o; r++)
  1799. if (!1 === t.call(n, e[r], r, e))
  1800. return 0
  1801. } else
  1802. for (r in e)
  1803. if (e.hasOwnProperty(r) && !1 === t.call(n, e[r], r, e))
  1804. return 0;
  1805. return 1
  1806. }
  1807. function On(e, t, n) {
  1808. var r, o;
  1809. for (r = 0,
  1810. o = e.length; r < o; r++)
  1811. if (t.call(n, e[r], r, e))
  1812. return r;
  1813. return -1
  1814. }
  1815. function Hn(e) {
  1816. return null === e || e === undefined ? "" : ("" + e).replace(Yn, "")
  1817. }
  1818. function Bn(e, t) {
  1819. return t ? !("array" !== t || !Xn.isArray(e)) || typeof e === t : e !== undefined
  1820. }
  1821. var Pn = {
  1822. requestAnimationFrame: function(e, t) {
  1823. fn ? fn.then(e) : fn = new wn(function(e) {
  1824. !function(e, t) {
  1825. var n, r = j.window.requestAnimationFrame, o = ["ms", "moz", "webkit"];
  1826. for (n = 0; n < o.length && !r; n++)
  1827. r = j.window[o[n] + "RequestAnimationFrame"];
  1828. (r = r || function(e) {
  1829. j.window.setTimeout(e, 0)
  1830. }
  1831. )(e, t)
  1832. }(e, t = t || j.document.body)
  1833. }
  1834. ).then(e)
  1835. },
  1836. setTimeout: Mn,
  1837. setInterval: Rn,
  1838. setEditorTimeout: function(e, t, n) {
  1839. return Mn(function() {
  1840. e.removed || t()
  1841. }, n)
  1842. },
  1843. setEditorInterval: function(e, t, n) {
  1844. var r;
  1845. return r = Rn(function() {
  1846. e.removed ? j.clearInterval(r) : t()
  1847. }, n)
  1848. },
  1849. debounce: _n,
  1850. throttle: _n,
  1851. clearInterval: function(e) {
  1852. return j.clearInterval(e)
  1853. },
  1854. clearTimeout: function(e) {
  1855. return j.clearTimeout(e)
  1856. }
  1857. }
  1858. , Ln = j.navigator.userAgent
  1859. , Vn = fe()
  1860. , In = Vn.browser
  1861. , Fn = Vn.os
  1862. , Un = Vn.deviceType
  1863. , jn = /WebKit/.test(Ln) && !In.isEdge()
  1864. , qn = "FormData"in j.window && "FileReader"in j.window && "URL"in j.window && !!j.URL.createObjectURL
  1865. , $n = -1 !== Ln.indexOf("Windows Phone")
  1866. , Wn = {
  1867. opera: In.isOpera(),
  1868. webkit: jn,
  1869. ie: !(!In.isIE() && !In.isEdge()) && In.version.major,
  1870. gecko: In.isFirefox(),
  1871. mac: Fn.isOSX() || Fn.isiOS(),
  1872. iOS: Un.isiPad() || Un.isiPhone(),
  1873. android: Fn.isAndroid(),
  1874. contentEditable: !0,
  1875. transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
  1876. caretAfter: !0,
  1877. range: j.window.getSelection && "Range"in j.window,
  1878. documentMode: In.isIE() ? j.document.documentMode || 7 : 10,
  1879. fileApi: qn,
  1880. ceFalse: !0,
  1881. cacheSuffix: null,
  1882. container: null,
  1883. experimentalShadowDom: !1,
  1884. canHaveCSP: !In.isIE(),
  1885. desktop: Un.isDesktop(),
  1886. windowsPhone: $n,
  1887. browser: {
  1888. current: In.current,
  1889. version: In.version,
  1890. isChrome: In.isChrome,
  1891. isEdge: In.isEdge,
  1892. isFirefox: In.isFirefox,
  1893. isIE: In.isIE,
  1894. isOpera: In.isOpera,
  1895. isSafari: In.isSafari
  1896. },
  1897. os: {
  1898. current: Fn.current,
  1899. version: Fn.version,
  1900. isAndroid: Fn.isAndroid,
  1901. isChromeOS: Fn.isChromeOS,
  1902. isFreeBSD: Fn.isFreeBSD,
  1903. isiOS: Fn.isiOS,
  1904. isLinux: Fn.isLinux,
  1905. isOSX: Fn.isOSX,
  1906. isSolaris: Fn.isSolaris,
  1907. isWindows: Fn.isWindows
  1908. },
  1909. deviceType: {
  1910. isDesktop: Un.isDesktop,
  1911. isiPad: Un.isiPad,
  1912. isiPhone: Un.isiPhone,
  1913. isPhone: Un.isPhone,
  1914. isTablet: Un.isTablet,
  1915. isTouch: Un.isTouch,
  1916. isWebView: Un.isWebView
  1917. }
  1918. }
  1919. , Kn = Array.isArray
  1920. , Xn = {
  1921. isArray: Kn,
  1922. toArray: function(e) {
  1923. var t, n, r = e;
  1924. if (!Kn(e))
  1925. for (r = [],
  1926. t = 0,
  1927. n = e.length; t < n; t++)
  1928. r[t] = e[t];
  1929. return r
  1930. },
  1931. each: Dn,
  1932. map: function(n, r) {
  1933. var o = [];
  1934. return Dn(n, function(e, t) {
  1935. o.push(r(e, t, n))
  1936. }),
  1937. o
  1938. },
  1939. filter: function(n, r) {
  1940. var o = [];
  1941. return Dn(n, function(e, t) {
  1942. r && !r(e, t, n) || o.push(e)
  1943. }),
  1944. o
  1945. },
  1946. indexOf: function(e, t) {
  1947. var n, r;
  1948. if (e)
  1949. for (n = 0,
  1950. r = e.length; n < r; n++)
  1951. if (e[n] === t)
  1952. return n;
  1953. return -1
  1954. },
  1955. reduce: function(e, t, n, r) {
  1956. var o = 0;
  1957. for (arguments.length < 3 && (n = e[0]); o < e.length; o++)
  1958. n = t.call(r, n, e[o], o);
  1959. return n
  1960. },
  1961. findIndex: On,
  1962. find: function(e, t, n) {
  1963. var r = On(e, t, n);
  1964. return -1 !== r ? e[r] : undefined
  1965. },
  1966. last: function(e) {
  1967. return e[e.length - 1]
  1968. }
  1969. }
  1970. , Yn = /^\s*|\s*$/g
  1971. , Gn = function(e, n, r, o) {
  1972. o = o || this,
  1973. e && (r && (e = e[r]),
  1974. Xn.each(e, function(e, t) {
  1975. if (!1 === n.call(o, e, t, r))
  1976. return !1;
  1977. Gn(e, n, r, o)
  1978. }))
  1979. }
  1980. , Zn = {
  1981. trim: Hn,
  1982. isArray: Xn.isArray,
  1983. is: Bn,
  1984. toArray: Xn.toArray,
  1985. makeMap: function(e, t, n) {
  1986. var r;
  1987. for (t = t || ",",
  1988. "string" == typeof (e = e || []) && (e = e.split(t)),
  1989. n = n || {},
  1990. r = e.length; r--; )
  1991. n[e[r]] = {};
  1992. return n
  1993. },
  1994. each: Xn.each,
  1995. map: Xn.map,
  1996. grep: Xn.filter,
  1997. inArray: Xn.indexOf,
  1998. hasOwn: function(e, t) {
  1999. return Object.prototype.hasOwnProperty.call(e, t)
  2000. },
  2001. extend: function(e, t) {
  2002. for (var n, r, o, i = [], a = 2; a < arguments.length; a++)
  2003. i[a - 2] = arguments[a];
  2004. var u, c = arguments;
  2005. for (n = 1,
  2006. r = c.length; n < r; n++)
  2007. for (o in t = c[n])
  2008. t.hasOwnProperty(o) && (u = t[o]) !== undefined && (e[o] = u);
  2009. return e
  2010. },
  2011. create: function(e, t, n) {
  2012. var r, o, i, a, u, c = this, s = 0;
  2013. if (e = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),
  2014. i = e[3].match(/(^|\.)(\w+)$/i)[2],
  2015. !(o = c.createNS(e[3].replace(/\.\w+$/, ""), n))[i]) {
  2016. if ("static" === e[2])
  2017. return o[i] = t,
  2018. void (this.onCreate && this.onCreate(e[2], e[3], o[i]));
  2019. t[i] || (t[i] = function() {}
  2020. ,
  2021. s = 1),
  2022. o[i] = t[i],
  2023. c.extend(o[i].prototype, t),
  2024. e[5] && (r = c.resolve(e[5]).prototype,
  2025. a = e[5].match(/\.(\w+)$/i)[1],
  2026. u = o[i],
  2027. o[i] = s ? function() {
  2028. return r[a].apply(this, arguments)
  2029. }
  2030. : function() {
  2031. return this.parent = r[a],
  2032. u.apply(this, arguments)
  2033. }
  2034. ,
  2035. o[i].prototype[i] = o[i],
  2036. c.each(r, function(e, t) {
  2037. o[i].prototype[t] = r[t]
  2038. }),
  2039. c.each(t, function(e, t) {
  2040. r[t] ? o[i].prototype[t] = function() {
  2041. return this.parent = r[t],
  2042. e.apply(this, arguments)
  2043. }
  2044. : t !== i && (o[i].prototype[t] = e)
  2045. })),
  2046. c.each(t["static"], function(e, t) {
  2047. o[i][t] = e
  2048. })
  2049. }
  2050. },
  2051. walk: Gn,
  2052. createNS: function(e, t) {
  2053. var n, r;
  2054. for (t = t || j.window,
  2055. e = e.split("."),
  2056. n = 0; n < e.length; n++)
  2057. t[r = e[n]] || (t[r] = {}),
  2058. t = t[r];
  2059. return t
  2060. },
  2061. resolve: function(e, t) {
  2062. var n, r;
  2063. for (t = t || j.window,
  2064. n = 0,
  2065. r = (e = e.split(".")).length; n < r && (t = t[e[n]]); n++)
  2066. ;
  2067. return t
  2068. },
  2069. explode: function(e, t) {
  2070. return !e || Bn(e, "array") ? e : Xn.map(e.split(t || ","), Hn)
  2071. },
  2072. _addCacheSuffix: function(e) {
  2073. var t = Wn.cacheSuffix;
  2074. return t && (e += (-1 === e.indexOf("?") ? "?" : "&") + t),
  2075. e
  2076. }
  2077. };
  2078. function Jn(t) {
  2079. var n;
  2080. return function(e) {
  2081. return (n = n || function(e, t) {
  2082. for (var n = {}, r = 0, o = e.length; r < o; r++) {
  2083. var i = e[r];
  2084. n[String(i)] = t(i, r)
  2085. }
  2086. return n
  2087. }(t, $(!0))).hasOwnProperty(Oe(e))
  2088. }
  2089. }
  2090. function Qn(e) {
  2091. return Pt(e) && !ar(e)
  2092. }
  2093. function er(e) {
  2094. return Pt(e) && "br" === Oe(e)
  2095. }
  2096. function tr(e) {
  2097. return e && "SPAN" === e.tagName && "bookmark" === e.getAttribute("data-mce-type")
  2098. }
  2099. var nr, rr, or, ir = Jn(["h1", "h2", "h3", "h4", "h5", "h6"]), ar = Jn(["article", "aside", "details", "div", "dt", "figcaption", "footer", "form", "fieldset", "header", "hgroup", "html", "main", "nav", "section", "summary", "body", "p", "dl", "multicol", "dd", "figure", "address", "center", "blockquote", "h1", "h2", "h3", "h4", "h5", "h6", "listing", "xmp", "pre", "plaintext", "menu", "dir", "ul", "ol", "li", "hr", "table", "tbody", "thead", "tfoot", "th", "tr", "td", "caption"]), ur = Jn(["h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "pre", "form", "blockquote", "center", "dir", "fieldset", "header", "footer", "article", "section", "hgroup", "aside", "nav", "figure"]), cr = Jn(["ul", "ol", "dl"]), sr = Jn(["li", "dd", "dt"]), lr = Jn(["area", "base", "basefont", "br", "col", "frame", "hr", "img", "input", "isindex", "link", "meta", "param", "embed", "source", "wbr", "track"]), fr = Jn(["thead", "tbody", "tfoot"]), dr = Jn(["td", "th"]), hr = Jn(["pre", "script", "textarea", "style"]), mr = function(e, t) {
  2100. var n, r = t.childNodes;
  2101. if (!Qt.isElement(t) || !tr(t)) {
  2102. for (n = r.length - 1; 0 <= n; n--)
  2103. mr(e, r[n]);
  2104. if (!1 === Qt.isDocument(t)) {
  2105. if (Qt.isText(t) && 0 < t.nodeValue.length) {
  2106. var o = Zn.trim(t.nodeValue).length;
  2107. if (e.isBlock(t.parentNode) || 0 < o)
  2108. return;
  2109. if (0 === o && function(e) {
  2110. var t = e.previousSibling && "SPAN" === e.previousSibling.nodeName
  2111. , n = e.nextSibling && "SPAN" === e.nextSibling.nodeName;
  2112. return t && n
  2113. }(t))
  2114. return
  2115. } else if (Qt.isElement(t) && (1 === (r = t.childNodes).length && tr(r[0]) && t.parentNode.insertBefore(r[0], t),
  2116. r.length || lr(it.fromDom(t))))
  2117. return;
  2118. e.remove(t)
  2119. }
  2120. return t
  2121. }
  2122. }, gr = {
  2123. trimNode: mr
  2124. }, pr = Zn.makeMap, vr = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, yr = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, br = /[<>&\"\']/g, Cr = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi, wr = {
  2125. 128: "\u20ac",
  2126. 130: "\u201a",
  2127. 131: "\u0192",
  2128. 132: "\u201e",
  2129. 133: "\u2026",
  2130. 134: "\u2020",
  2131. 135: "\u2021",
  2132. 136: "\u02c6",
  2133. 137: "\u2030",
  2134. 138: "\u0160",
  2135. 139: "\u2039",
  2136. 140: "\u0152",
  2137. 142: "\u017d",
  2138. 145: "\u2018",
  2139. 146: "\u2019",
  2140. 147: "\u201c",
  2141. 148: "\u201d",
  2142. 149: "\u2022",
  2143. 150: "\u2013",
  2144. 151: "\u2014",
  2145. 152: "\u02dc",
  2146. 153: "\u2122",
  2147. 154: "\u0161",
  2148. 155: "\u203a",
  2149. 156: "\u0153",
  2150. 158: "\u017e",
  2151. 159: "\u0178"
  2152. };
  2153. rr = {
  2154. '"': "&quot;",
  2155. "'": "&#39;",
  2156. "<": "&lt;",
  2157. ">": "&gt;",
  2158. "&": "&amp;",
  2159. "`": "&#96;"
  2160. },
  2161. or = {
  2162. "&lt;": "<",
  2163. "&gt;": ">",
  2164. "&amp;": "&",
  2165. "&quot;": '"',
  2166. "&apos;": "'"
  2167. };
  2168. function xr(e, t) {
  2169. var n, r, o, i = {};
  2170. if (e) {
  2171. for (e = e.split(","),
  2172. t = t || 10,
  2173. n = 0; n < e.length; n += 2)
  2174. r = String.fromCharCode(parseInt(e[n], t)),
  2175. rr[r] || (o = "&" + e[n + 1] + ";",
  2176. i[r] = o,
  2177. i[o] = r);
  2178. return i
  2179. }
  2180. }
  2181. nr = xr("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);
  2182. function zr(e, t) {
  2183. return e.replace(t ? vr : yr, function(e) {
  2184. return rr[e] || e
  2185. })
  2186. }
  2187. function Er(e, t) {
  2188. return e.replace(t ? vr : yr, function(e) {
  2189. return 1 < e.length ? "&#" + (1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320) + 65536) + ";" : rr[e] || "&#" + e.charCodeAt(0) + ";"
  2190. })
  2191. }
  2192. function Nr(e, t, n) {
  2193. return n = n || nr,
  2194. e.replace(t ? vr : yr, function(e) {
  2195. return rr[e] || n[e] || e
  2196. })
  2197. }
  2198. var Sr = {
  2199. encodeRaw: zr,
  2200. encodeAllRaw: function(e) {
  2201. return ("" + e).replace(br, function(e) {
  2202. return rr[e] || e
  2203. })
  2204. },
  2205. encodeNumeric: Er,
  2206. encodeNamed: Nr,
  2207. getEncodeFunc: function(e, t) {
  2208. var n = xr(t) || nr
  2209. , r = pr(e.replace(/\+/g, ","));
  2210. return r.named && r.numeric ? function(e, t) {
  2211. return e.replace(t ? vr : yr, function(e) {
  2212. return rr[e] !== undefined ? rr[e] : n[e] !== undefined ? n[e] : 1 < e.length ? "&#" + (1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320) + 65536) + ";" : "&#" + e.charCodeAt(0) + ";"
  2213. })
  2214. }
  2215. : r.named ? t ? function(e, t) {
  2216. return Nr(e, t, n)
  2217. }
  2218. : Nr : r.numeric ? Er : zr
  2219. },
  2220. decode: function(e) {
  2221. return e.replace(Cr, function(e, t) {
  2222. return t ? 65535 < (t = "x" === t.charAt(0).toLowerCase() ? parseInt(t.substr(1), 16) : parseInt(t, 10)) ? (t -= 65536,
  2223. String.fromCharCode(55296 + (t >> 10), 56320 + (1023 & t))) : wr[t] || String.fromCharCode(t) : or[e] || nr[e] || function(e) {
  2224. var t;
  2225. return (t = it.fromTag("div").dom()).innerHTML = e,
  2226. t.textContent || t.innerText || e
  2227. }(e)
  2228. })
  2229. }
  2230. }
  2231. , kr = {}
  2232. , Tr = {}
  2233. , Ar = Zn.makeMap
  2234. , Mr = Zn.each
  2235. , Rr = Zn.extend
  2236. , _r = Zn.explode
  2237. , Dr = Zn.inArray
  2238. , Or = function(e, t) {
  2239. return (e = Zn.trim(e)) ? e.split(t || " ") : []
  2240. }
  2241. , Hr = function(e) {
  2242. function t(e, t, n) {
  2243. function r(e, t) {
  2244. var n, r, o = {};
  2245. for (n = 0,
  2246. r = e.length; n < r; n++)
  2247. o[e[n]] = t || {};
  2248. return o
  2249. }
  2250. var o, i, a;
  2251. for (t = t || "",
  2252. "string" == typeof (n = n || []) && (n = Or(n)),
  2253. o = (e = Or(e)).length; o--; )
  2254. a = {
  2255. attributes: r(i = Or([u, t].join(" "))),
  2256. attributesOrder: i,
  2257. children: r(n, Tr)
  2258. },
  2259. s[e[o]] = a
  2260. }
  2261. function n(e, t) {
  2262. var n, r, o, i;
  2263. for (n = (e = Or(e)).length,
  2264. t = Or(t); n--; )
  2265. for (r = s[e[n]],
  2266. o = 0,
  2267. i = t.length; o < i; o++)
  2268. r.attributes[t[o]] = {},
  2269. r.attributesOrder.push(t[o])
  2270. }
  2271. var u, r, o, i, a, c, s = {};
  2272. return kr[e] ? kr[e] : (u = "id accesskey class dir lang style tabindex title role",
  2273. r = "address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",
  2274. o = "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",
  2275. "html4" !== e && (u += " contenteditable contextmenu draggable dropzone hidden spellcheck translate",
  2276. r += " article aside details dialog figure main header footer hgroup section nav",
  2277. o += " audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),
  2278. "html5-strict" !== e && (u += " xml:lang",
  2279. o = [o, c = "acronym applet basefont big font strike tt"].join(" "),
  2280. Mr(Or(c), function(e) {
  2281. t(e, "", o)
  2282. }),
  2283. r = [r, a = "center dir isindex noframes"].join(" "),
  2284. i = [r, o].join(" "),
  2285. Mr(Or(a), function(e) {
  2286. t(e, "", i)
  2287. })),
  2288. i = i || [r, o].join(" "),
  2289. t("html", "manifest", "head body"),
  2290. t("head", "", "base command link meta noscript script style title"),
  2291. t("title hr noscript br"),
  2292. t("base", "href target"),
  2293. t("link", "href rel media hreflang type sizes hreflang"),
  2294. t("meta", "name http-equiv content charset"),
  2295. t("style", "media type scoped"),
  2296. t("script", "src async defer type charset"),
  2297. t("body", "onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload", i),
  2298. t("address dt dd div caption", "", i),
  2299. t("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", "", o),
  2300. t("blockquote", "cite", i),
  2301. t("ol", "reversed start type", "li"),
  2302. t("ul", "", "li"),
  2303. t("li", "value", i),
  2304. t("dl", "", "dt dd"),
  2305. t("a", "href target rel media hreflang type", o),
  2306. t("q", "cite", o),
  2307. t("ins del", "cite datetime", i),
  2308. t("img", "src sizes srcset alt usemap ismap width height"),
  2309. t("iframe", "src name width height", i),
  2310. t("embed", "src type width height"),
  2311. t("object", "data type typemustmatch name usemap form width height", [i, "param"].join(" ")),
  2312. t("param", "name value"),
  2313. t("map", "name", [i, "area"].join(" ")),
  2314. t("area", "alt coords shape href target rel media hreflang type"),
  2315. t("table", "border", "caption colgroup thead tfoot tbody tr" + ("html4" === e ? " col" : "")),
  2316. t("colgroup", "span", "col"),
  2317. t("col", "span"),
  2318. t("tbody thead tfoot", "", "tr"),
  2319. t("tr", "", "td th"),
  2320. t("td", "colspan rowspan headers", i),
  2321. t("th", "colspan rowspan headers scope abbr", i),
  2322. t("form", "accept-charset action autocomplete enctype method name novalidate target", i),
  2323. t("fieldset", "disabled form name", [i, "legend"].join(" ")),
  2324. t("label", "form for", o),
  2325. t("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"),
  2326. t("button", "disabled form formaction formenctype formmethod formnovalidate formtarget name type value", "html4" === e ? i : o),
  2327. t("select", "disabled form multiple name required size", "option optgroup"),
  2328. t("optgroup", "disabled label", "option"),
  2329. t("option", "disabled label selected value"),
  2330. t("textarea", "cols dirname disabled form maxlength name readonly required rows wrap"),
  2331. t("menu", "type label", [i, "li"].join(" ")),
  2332. t("noscript", "", i),
  2333. "html4" !== e && (t("wbr"),
  2334. t("ruby", "", [o, "rt rp"].join(" ")),
  2335. t("figcaption", "", i),
  2336. t("mark rt rp summary bdi", "", o),
  2337. t("canvas", "width height", i),
  2338. t("video", "src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered", [i, "track source"].join(" ")),
  2339. t("audio", "src crossorigin preload autoplay mediagroup loop muted controls buffered volume", [i, "track source"].join(" ")),
  2340. t("picture", "", "img source"),
  2341. t("source", "src srcset type media sizes"),
  2342. t("track", "kind src srclang label default"),
  2343. t("datalist", "", [o, "option"].join(" ")),
  2344. t("article section nav aside main header footer", "", i),
  2345. t("hgroup", "", "h1 h2 h3 h4 h5 h6"),
  2346. t("figure", "", [i, "figcaption"].join(" ")),
  2347. t("time", "datetime", o),
  2348. t("dialog", "open", i),
  2349. t("command", "type label icon disabled checked radiogroup command"),
  2350. t("output", "for form name", o),
  2351. t("progress", "value max", o),
  2352. t("meter", "value min max low high optimum", o),
  2353. t("details", "open", [i, "summary"].join(" ")),
  2354. t("keygen", "autofocus challenge disabled form keytype name")),
  2355. "html5-strict" !== e && (n("script", "language xml:space"),
  2356. n("style", "xml:space"),
  2357. n("object", "declare classid code codebase codetype archive standby align border hspace vspace"),
  2358. n("embed", "align name hspace vspace"),
  2359. n("param", "valuetype type"),
  2360. n("a", "charset name rev shape coords"),
  2361. n("br", "clear"),
  2362. n("applet", "codebase archive code object alt name width height align hspace vspace"),
  2363. n("img", "name longdesc align border hspace vspace"),
  2364. n("iframe", "longdesc frameborder marginwidth marginheight scrolling align"),
  2365. n("font basefont", "size color face"),
  2366. n("input", "usemap align"),
  2367. n("select"),
  2368. n("textarea"),
  2369. n("h1 h2 h3 h4 h5 h6 div p legend caption", "align"),
  2370. n("ul", "type compact"),
  2371. n("li", "type"),
  2372. n("ol dl menu dir", "compact"),
  2373. n("pre", "width xml:space"),
  2374. n("hr", "align noshade size width"),
  2375. n("isindex", "prompt"),
  2376. n("table", "summary width frame rules cellspacing cellpadding align bgcolor"),
  2377. n("col", "width align char charoff valign"),
  2378. n("colgroup", "width align char charoff valign"),
  2379. n("thead", "align char charoff valign"),
  2380. n("tr", "align char charoff valign bgcolor"),
  2381. n("th", "axis align char charoff valign nowrap bgcolor width height"),
  2382. n("form", "accept"),
  2383. n("td", "abbr axis scope align char charoff valign nowrap bgcolor width height"),
  2384. n("tfoot", "align char charoff valign"),
  2385. n("tbody", "align char charoff valign"),
  2386. n("area", "nohref"),
  2387. n("body", "background bgcolor text link vlink alink")),
  2388. "html4" !== e && (n("input button select textarea", "autofocus"),
  2389. n("input textarea", "placeholder"),
  2390. n("a", "download"),
  2391. n("link script img", "crossorigin"),
  2392. n("img", "loading"),
  2393. n("iframe", "sandbox seamless allowfullscreen loading")),
  2394. Mr(Or("a form meter progress dfn"), function(e) {
  2395. s[e] && delete s[e].children[e]
  2396. }),
  2397. delete s.caption.children.table,
  2398. delete s.script,
  2399. kr[e] = s)
  2400. }
  2401. , Br = function(e, n) {
  2402. var r;
  2403. return e && (r = {},
  2404. "string" == typeof e && (e = {
  2405. "*": e
  2406. }),
  2407. Mr(e, function(e, t) {
  2408. r[t] = r[t.toUpperCase()] = "map" === n ? Ar(e, /[, ]/) : _r(e, /[, ]/)
  2409. })),
  2410. r
  2411. };
  2412. function Pr(i) {
  2413. function e(e, t, n) {
  2414. var r = i[e];
  2415. return r ? r = Ar(r, /[, ]/, Ar(r.toUpperCase(), /[, ]/)) : (r = kr[e]) || (r = Ar(t, " ", Ar(t.toUpperCase(), " ")),
  2416. r = Rr(r, n),
  2417. kr[e] = r),
  2418. r
  2419. }
  2420. var t, n, r, o, a, u, c, s, l, f, d, h, m, z = {}, g = {}, E = [], p = {}, v = {};
  2421. r = Hr((i = i || {}).schema),
  2422. !1 === i.verify_html && (i.valid_elements = "*[*]"),
  2423. t = Br(i.valid_styles),
  2424. n = Br(i.invalid_styles, "map"),
  2425. s = Br(i.valid_classes, "map"),
  2426. o = e("whitespace_elements", "pre script noscript style textarea video audio iframe object code"),
  2427. a = e("self_closing_elements", "colgroup dd dt li option p td tfoot th thead tr"),
  2428. u = e("short_ended_elements", "area base basefont br col frame hr img input isindex link meta param embed source wbr track"),
  2429. c = e("boolean_attributes", "checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),
  2430. f = e("non_empty_elements", "td th iframe video audio object script pre code", u),
  2431. d = e("move_caret_before_on_enter_elements", "table", f),
  2432. h = e("text_block_elements", "h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),
  2433. l = e("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 details summary", h),
  2434. m = e("text_inline_elements", "span strong b em i font strike u var cite dfn code mark q sup sub samp"),
  2435. Mr((i.special || "script noscript noframes noembed title style textarea xmp").split(" "), function(e) {
  2436. v[e] = new RegExp("</" + e + "[^>]*>","gi")
  2437. });
  2438. function N(e) {
  2439. return new RegExp("^" + e.replace(/([?+*])/g, ".$1") + "$")
  2440. }
  2441. function y(e) {
  2442. var t, n, r, o, i, a, u, c, s, l, f, d, h, m, g, p, v, y, b, C = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/, w = /^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/, x = /[*?+]/;
  2443. if (e)
  2444. for (e = Or(e, ","),
  2445. z["@"] && (p = z["@"].attributes,
  2446. v = z["@"].attributesOrder),
  2447. t = 0,
  2448. n = e.length; t < n; t++)
  2449. if (i = C.exec(e[t])) {
  2450. if (m = i[1],
  2451. s = i[2],
  2452. g = i[3],
  2453. c = i[5],
  2454. a = {
  2455. attributes: d = {},
  2456. attributesOrder: h = []
  2457. },
  2458. "#" === m && (a.paddEmpty = !0),
  2459. "-" === m && (a.removeEmpty = !0),
  2460. "!" === i[4] && (a.removeEmptyAttrs = !0),
  2461. p) {
  2462. for (y in p)
  2463. d[y] = p[y];
  2464. h.push.apply(h, v)
  2465. }
  2466. if (c)
  2467. for (r = 0,
  2468. o = (c = Or(c, "|")).length; r < o; r++)
  2469. if (i = w.exec(c[r])) {
  2470. if (u = {},
  2471. f = i[1],
  2472. l = i[2].replace(/[\\:]:/g, ":"),
  2473. m = i[3],
  2474. b = i[4],
  2475. "!" === f && (a.attributesRequired = a.attributesRequired || [],
  2476. a.attributesRequired.push(l),
  2477. u.required = !0),
  2478. "-" === f) {
  2479. delete d[l],
  2480. h.splice(Dr(h, l), 1);
  2481. continue
  2482. }
  2483. m && ("=" === m && (a.attributesDefault = a.attributesDefault || [],
  2484. a.attributesDefault.push({
  2485. name: l,
  2486. value: b
  2487. }),
  2488. u.defaultValue = b),
  2489. ":" === m && (a.attributesForced = a.attributesForced || [],
  2490. a.attributesForced.push({
  2491. name: l,
  2492. value: b
  2493. }),
  2494. u.forcedValue = b),
  2495. "<" === m && (u.validValues = Ar(b, "?"))),
  2496. x.test(l) ? (a.attributePatterns = a.attributePatterns || [],
  2497. u.pattern = N(l),
  2498. a.attributePatterns.push(u)) : (d[l] || h.push(l),
  2499. d[l] = u)
  2500. }
  2501. p || "@" !== s || (p = d,
  2502. v = h),
  2503. g && (a.outputName = s,
  2504. z[g] = a),
  2505. x.test(s) ? (a.pattern = N(s),
  2506. E.push(a)) : z[s] = a
  2507. }
  2508. }
  2509. function b(e) {
  2510. z = {},
  2511. E = [],
  2512. y(e),
  2513. Mr(r, function(e, t) {
  2514. g[t] = e.children
  2515. })
  2516. }
  2517. function C(e) {
  2518. var a = /^(~)?(.+)$/;
  2519. e && (kr.text_block_elements = kr.block_elements = null,
  2520. Mr(Or(e, ","), function(e) {
  2521. var t = a.exec(e)
  2522. , n = "~" === t[1]
  2523. , r = n ? "span" : "div"
  2524. , o = t[2];
  2525. if (g[o] = g[r],
  2526. p[o] = r,
  2527. n || (l[o.toUpperCase()] = {},
  2528. l[o] = {}),
  2529. !z[o]) {
  2530. var i = z[r];
  2531. delete (i = Rr({}, i)).removeEmptyAttrs,
  2532. delete i.removeEmpty,
  2533. z[o] = i
  2534. }
  2535. Mr(g, function(e, t) {
  2536. e[r] && (g[t] = e = Rr({}, g[t]),
  2537. e[o] = e[r])
  2538. })
  2539. }))
  2540. }
  2541. function w(e) {
  2542. var o = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
  2543. kr[i.schema] = null,
  2544. e && Mr(Or(e, ","), function(e) {
  2545. var t, n, r = o.exec(e);
  2546. r && (n = r[1],
  2547. t = n ? g[r[2]] : g[r[2]] = {
  2548. "#comment": {}
  2549. },
  2550. t = g[r[2]],
  2551. Mr(Or(r[3], "|"), function(e) {
  2552. "-" === n ? delete t[e] : t[e] = {}
  2553. }))
  2554. })
  2555. }
  2556. function x(e) {
  2557. var t, n = z[e];
  2558. if (n)
  2559. return n;
  2560. for (t = E.length; t--; )
  2561. if ((n = E[t]).pattern.test(e))
  2562. return n
  2563. }
  2564. i.valid_elements ? b(i.valid_elements) : (Mr(r, function(e, t) {
  2565. z[t] = {
  2566. attributes: e.attributes,
  2567. attributesOrder: e.attributesOrder
  2568. },
  2569. g[t] = e.children
  2570. }),
  2571. "html5" !== i.schema && Mr(Or("strong/b em/i"), function(e) {
  2572. e = Or(e, "/"),
  2573. z[e[1]].outputName = e[0]
  2574. }),
  2575. Mr(Or("ol ul sub sup blockquote span font a table tbody tr strong em b i"), function(e) {
  2576. z[e] && (z[e].removeEmpty = !0)
  2577. }),
  2578. Mr(Or("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"), function(e) {
  2579. z[e].paddEmpty = !0
  2580. }),
  2581. Mr(Or("span"), function(e) {
  2582. z[e].removeEmptyAttrs = !0
  2583. })),
  2584. C(i.custom_elements),
  2585. w(i.valid_children),
  2586. y(i.extended_valid_elements),
  2587. w("+ol[ul|ol],+ul[ul|ol]"),
  2588. Mr({
  2589. dd: "dl",
  2590. dt: "dl",
  2591. li: "ul ol",
  2592. td: "tr",
  2593. th: "tr",
  2594. tr: "tbody thead tfoot",
  2595. tbody: "table",
  2596. thead: "table",
  2597. tfoot: "table",
  2598. legend: "fieldset",
  2599. area: "map",
  2600. param: "video audio object"
  2601. }, function(e, t) {
  2602. z[t] && (z[t].parentsRequired = Or(e))
  2603. }),
  2604. i.invalid_elements && Mr(_r(i.invalid_elements), function(e) {
  2605. z[e] && delete z[e]
  2606. }),
  2607. x("span") || y("span[!data-mce-type|*]");
  2608. return {
  2609. children: g,
  2610. elements: z,
  2611. getValidStyles: function() {
  2612. return t
  2613. },
  2614. getValidClasses: function() {
  2615. return s
  2616. },
  2617. getBlockElements: function() {
  2618. return l
  2619. },
  2620. getInvalidStyles: function() {
  2621. return n
  2622. },
  2623. getShortEndedElements: function() {
  2624. return u
  2625. },
  2626. getTextBlockElements: function() {
  2627. return h
  2628. },
  2629. getTextInlineElements: function() {
  2630. return m
  2631. },
  2632. getBoolAttrs: function() {
  2633. return c
  2634. },
  2635. getElementRule: x,
  2636. getSelfClosingElements: function() {
  2637. return a
  2638. },
  2639. getNonEmptyElements: function() {
  2640. return f
  2641. },
  2642. getMoveCaretBeforeOnEnterElements: function() {
  2643. return d
  2644. },
  2645. getWhiteSpaceElements: function() {
  2646. return o
  2647. },
  2648. getSpecialElements: function() {
  2649. return v
  2650. },
  2651. isValidChild: function(e, t) {
  2652. var n = g[e.toLowerCase()];
  2653. return !(!n || !n[t.toLowerCase()])
  2654. },
  2655. isValid: function(e, t) {
  2656. var n, r, o = x(e);
  2657. if (o) {
  2658. if (!t)
  2659. return !0;
  2660. if (o.attributes[t])
  2661. return !0;
  2662. if (n = o.attributePatterns)
  2663. for (r = n.length; r--; )
  2664. if (n[r].pattern.test(e))
  2665. return !0
  2666. }
  2667. return !1
  2668. },
  2669. getCustomElements: function() {
  2670. return p
  2671. },
  2672. addValidElements: y,
  2673. setValidElements: b,
  2674. addCustomElements: C,
  2675. addValidChildren: w
  2676. }
  2677. }
  2678. function Lr(e, t, n, r) {
  2679. function o(e) {
  2680. return 1 < (e = parseInt(e, 10).toString(16)).length ? e : "0" + e
  2681. }
  2682. return "#" + o(t) + o(n) + o(r)
  2683. }
  2684. function Vr(e, t, n, r) {
  2685. e.addEventListener ? e.addEventListener(t, n, r || !1) : e.attachEvent && e.attachEvent("on" + t, n)
  2686. }
  2687. function Ir(e, t, n, r) {
  2688. e.removeEventListener ? e.removeEventListener(t, n, r || !1) : e.detachEvent && e.detachEvent("on" + t, n)
  2689. }
  2690. function Fr(e, t) {
  2691. var n, r = t || {};
  2692. for (n in e)
  2693. Kr[n] || (r[n] = e[n]);
  2694. if (r.target || (r.target = r.srcElement || j.document),
  2695. Wn.experimentalShadowDom && (r.target = function(e, t) {
  2696. if (e.composedPath) {
  2697. var n = e.composedPath();
  2698. if (n && 0 < n.length)
  2699. return n[0]
  2700. }
  2701. return t
  2702. }(e, r.target)),
  2703. e && Wr.test(e.type) && e.pageX === undefined && e.clientX !== undefined) {
  2704. var o = r.target.ownerDocument || j.document
  2705. , i = o.documentElement
  2706. , a = o.body;
  2707. r.pageX = e.clientX + (i && i.scrollLeft || a && a.scrollLeft || 0) - (i && i.clientLeft || a && a.clientLeft || 0),
  2708. r.pageY = e.clientY + (i && i.scrollTop || a && a.scrollTop || 0) - (i && i.clientTop || a && a.clientTop || 0)
  2709. }
  2710. return r.preventDefault = function() {
  2711. r.isDefaultPrevented = Yr,
  2712. e && (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
  2713. }
  2714. ,
  2715. r.stopPropagation = function() {
  2716. r.isPropagationStopped = Yr,
  2717. e && (e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0)
  2718. }
  2719. ,
  2720. !(r.stopImmediatePropagation = function() {
  2721. r.isImmediatePropagationStopped = Yr,
  2722. r.stopPropagation()
  2723. }
  2724. ) === function(e) {
  2725. return e.isDefaultPrevented === Yr || e.isDefaultPrevented === Xr
  2726. }(r) && (r.isDefaultPrevented = Xr,
  2727. r.isPropagationStopped = Xr,
  2728. r.isImmediatePropagationStopped = Xr),
  2729. "undefined" == typeof r.metaKey && (r.metaKey = !1),
  2730. r
  2731. }
  2732. function Ur(e, t, n) {
  2733. var r = e.document
  2734. , o = {
  2735. type: "ready"
  2736. };
  2737. if (n.domLoaded)
  2738. t(o);
  2739. else {
  2740. var i = function() {
  2741. Ir(e, "DOMContentLoaded", i),
  2742. Ir(e, "load", i),
  2743. n.domLoaded || (n.domLoaded = !0,
  2744. t(o))
  2745. };
  2746. "complete" === r.readyState || "interactive" === r.readyState && r.body ? i() : Vr(e, "DOMContentLoaded", i),
  2747. Vr(e, "load", i)
  2748. }
  2749. }
  2750. var jr = "\ufeff"
  2751. , qr = "\xa0"
  2752. , $r = function(b, e) {
  2753. var C, t, s, l, w = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, x = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi, z = /\s*([^:]+):\s*([^;]+);?/g, E = /\s+$/, N = {}, S = jr;
  2754. for (b = b || {},
  2755. e && (s = e.getValidStyles(),
  2756. l = e.getInvalidStyles()),
  2757. t = ("\\\" \\' \\; \\: ; : " + S).split(" "),
  2758. C = 0; C < t.length; C++)
  2759. N[t[C]] = S + C,
  2760. N[S + C] = t[C];
  2761. return {
  2762. toHex: function(e) {
  2763. return e.replace(w, Lr)
  2764. },
  2765. parse: function(e) {
  2766. function t(e, t, n) {
  2767. var r, o, i, a;
  2768. if ((r = p[e + "-top" + t]) && (o = p[e + "-right" + t]) && (i = p[e + "-bottom" + t]) && (a = p[e + "-left" + t])) {
  2769. var u = [r, o, i, a];
  2770. for (C = u.length - 1; C-- && u[C] === u[C + 1]; )
  2771. ;
  2772. -1 < C && n || (p[e + t] = -1 === C ? u[0] : u.join(" "),
  2773. delete p[e + "-top" + t],
  2774. delete p[e + "-right" + t],
  2775. delete p[e + "-bottom" + t],
  2776. delete p[e + "-left" + t])
  2777. }
  2778. }
  2779. function n(e) {
  2780. var t, n = p[e];
  2781. if (n) {
  2782. for (t = (n = n.split(" ")).length; t--; )
  2783. if (n[t] !== n[0])
  2784. return !1;
  2785. return p[e] = n[0],
  2786. !0
  2787. }
  2788. }
  2789. function r(e) {
  2790. return f = !0,
  2791. N[e]
  2792. }
  2793. function u(e, t) {
  2794. return f && (e = e.replace(/\uFEFF[0-9]/g, function(e) {
  2795. return N[e]
  2796. })),
  2797. t || (e = e.replace(/\\([\'\";:])/g, "$1")),
  2798. e
  2799. }
  2800. function o(e) {
  2801. return String.fromCharCode(parseInt(e.slice(1), 16))
  2802. }
  2803. function i(e) {
  2804. return e.replace(/\\[0-9a-f]+/gi, o)
  2805. }
  2806. function a(e, t, n, r, o, i) {
  2807. if (o = o || i)
  2808. return "'" + (o = u(o)).replace(/\'/g, "\\'") + "'";
  2809. if (t = u(t || n || r),
  2810. !b.allow_script_urls) {
  2811. var a = t.replace(/[\s\r\n]+/g, "");
  2812. if (/(java|vb)script:/i.test(a))
  2813. return "";
  2814. if (!b.allow_svg_data_urls && /^data:image\/svg/i.test(a))
  2815. return ""
  2816. }
  2817. return v && (t = v.call(y, t, "style")),
  2818. "url('" + t.replace(/\'/g, "\\'") + "')"
  2819. }
  2820. var c, s, l, f, d, h, m, g, p = {}, v = b.url_converter, y = b.url_converter_scope || this;
  2821. if (e) {
  2822. for (e = (e = e.replace(/[\u0000-\u001F]/g, "")).replace(/\\[\"\';:\uFEFF]/g, r).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(e) {
  2823. return e.replace(/[;:]/g, r)
  2824. }); c = z.exec(e); )
  2825. if (z.lastIndex = c.index + c[0].length,
  2826. s = c[1].replace(E, "").toLowerCase(),
  2827. l = c[2].replace(E, ""),
  2828. s && l) {
  2829. if (s = i(s),
  2830. l = i(l),
  2831. -1 !== s.indexOf(S) || -1 !== s.indexOf('"'))
  2832. continue;
  2833. if (!b.allow_script_urls && ("behavior" === s || /expression\s*\(|\/\*|\*\//.test(l)))
  2834. continue;
  2835. "font-weight" === s && "700" === l ? l = "bold" : "color" !== s && "background-color" !== s || (l = l.toLowerCase()),
  2836. l = (l = l.replace(w, Lr)).replace(x, a),
  2837. p[s] = f ? u(l, !0) : l
  2838. }
  2839. t("border", "", !0),
  2840. t("border", "-width"),
  2841. t("border", "-color"),
  2842. t("border", "-style"),
  2843. t("padding", ""),
  2844. t("margin", ""),
  2845. d = "border",
  2846. m = "border-style",
  2847. g = "border-color",
  2848. n(h = "border-width") && n(m) && n(g) && (p[d] = p[h] + " " + p[m] + " " + p[g],
  2849. delete p[h],
  2850. delete p[m],
  2851. delete p[g]),
  2852. "medium none" === p.border && delete p.border,
  2853. "none" === p["border-image"] && delete p["border-image"]
  2854. }
  2855. return p
  2856. },
  2857. serialize: function(i, e) {
  2858. function t(e) {
  2859. var t, n, r, o;
  2860. if (t = s[e])
  2861. for (n = 0,
  2862. r = t.length; n < r; n++)
  2863. e = t[n],
  2864. (o = i[e]) && (c += (0 < c.length ? " " : "") + e + ": " + o + ";")
  2865. }
  2866. var n, r, o, a, u, c = "";
  2867. if (e && s)
  2868. t("*"),
  2869. t(e);
  2870. else
  2871. for (n in i)
  2872. !(r = i[n]) || l && (o = n,
  2873. a = e,
  2874. u = void 0,
  2875. (u = l["*"]) && u[o] || (u = l[a]) && u[o]) || (c += (0 < c.length ? " " : "") + n + ": " + r + ";");
  2876. return c
  2877. }
  2878. }
  2879. }
  2880. , Wr = /^(?:mouse|contextmenu)|click/
  2881. , Kr = {
  2882. keyLocation: 1,
  2883. layerX: 1,
  2884. layerY: 1,
  2885. returnValue: 1,
  2886. webkitMovementX: 1,
  2887. webkitMovementY: 1,
  2888. keyIdentifier: 1,
  2889. mozPressure: 1
  2890. }
  2891. , Xr = function() {
  2892. return !1
  2893. }
  2894. , Yr = function() {
  2895. return !0
  2896. }
  2897. , Gr = (Zr.prototype.bind = function(e, t, n, r) {
  2898. function o(e) {
  2899. d.executeHandlers(Fr(e || h.event), i)
  2900. }
  2901. var i, a, u, c, s, l, f, d = this, h = j.window;
  2902. if (e && 3 !== e.nodeType && 8 !== e.nodeType) {
  2903. e[d.expando] ? i = e[d.expando] : (i = d.count++,
  2904. e[d.expando] = i,
  2905. d.events[i] = {}),
  2906. r = r || e;
  2907. var m = t.split(" ");
  2908. for (u = m.length; u--; )
  2909. l = o,
  2910. s = f = !1,
  2911. "DOMContentLoaded" === (c = m[u]) && (c = "ready"),
  2912. d.domLoaded && "ready" === c && "complete" === e.readyState ? n.call(r, Fr({
  2913. type: c
  2914. })) : (d.hasMouseEnterLeave || (s = d.mouseEnterLeave[c]) && (l = function(e) {
  2915. var t, n;
  2916. if (t = e.currentTarget,
  2917. (n = e.relatedTarget) && t.contains)
  2918. n = t.contains(n);
  2919. else
  2920. for (; n && n !== t; )
  2921. n = n.parentNode;
  2922. n || ((e = Fr(e || h.event)).type = "mouseout" === e.type ? "mouseleave" : "mouseenter",
  2923. e.target = t,
  2924. d.executeHandlers(e, i))
  2925. }
  2926. ),
  2927. d.hasFocusIn || "focusin" !== c && "focusout" !== c || (f = !0,
  2928. s = "focusin" === c ? "focus" : "blur",
  2929. l = function(e) {
  2930. (e = Fr(e || h.event)).type = "focus" === e.type ? "focusin" : "focusout",
  2931. d.executeHandlers(e, i)
  2932. }
  2933. ),
  2934. (a = d.events[i][c]) ? "ready" === c && d.domLoaded ? n(Fr({
  2935. type: c
  2936. })) : a.push({
  2937. func: n,
  2938. scope: r
  2939. }) : (d.events[i][c] = a = [{
  2940. func: n,
  2941. scope: r
  2942. }],
  2943. a.fakeName = s,
  2944. a.capture = f,
  2945. a.nativeHandler = l,
  2946. "ready" === c ? Ur(e, l, d) : Vr(e, s || c, l, f)));
  2947. return e = a = 0,
  2948. n
  2949. }
  2950. }
  2951. ,
  2952. Zr.prototype.unbind = function(e, t, n) {
  2953. var r, o, i, a, u, c;
  2954. if (!e || 3 === e.nodeType || 8 === e.nodeType)
  2955. return this;
  2956. if (r = e[this.expando]) {
  2957. if (c = this.events[r],
  2958. t) {
  2959. var s = t.split(" ");
  2960. for (i = s.length; i--; )
  2961. if (o = c[u = s[i]]) {
  2962. if (n)
  2963. for (a = o.length; a--; )
  2964. if (o[a].func === n) {
  2965. var l = o.nativeHandler
  2966. , f = o.fakeName
  2967. , d = o.capture;
  2968. (o = o.slice(0, a).concat(o.slice(a + 1))).nativeHandler = l,
  2969. o.fakeName = f,
  2970. o.capture = d,
  2971. c[u] = o
  2972. }
  2973. n && 0 !== o.length || (delete c[u],
  2974. Ir(e, o.fakeName || u, o.nativeHandler, o.capture))
  2975. }
  2976. } else {
  2977. for (u in c)
  2978. o = c[u],
  2979. Ir(e, o.fakeName || u, o.nativeHandler, o.capture);
  2980. c = {}
  2981. }
  2982. for (u in c)
  2983. return this;
  2984. delete this.events[r];
  2985. try {
  2986. delete e[this.expando]
  2987. } catch (h) {
  2988. e[this.expando] = null
  2989. }
  2990. }
  2991. return this
  2992. }
  2993. ,
  2994. Zr.prototype.fire = function(e, t, n) {
  2995. var r;
  2996. if (!e || 3 === e.nodeType || 8 === e.nodeType)
  2997. return this;
  2998. var o = Fr(null, n);
  2999. for (o.type = t,
  3000. o.target = e; (r = e[this.expando]) && this.executeHandlers(o, r),
  3001. (e = e.parentNode || e.ownerDocument || e.defaultView || e.parentWindow) && !o.isPropagationStopped(); )
  3002. ;
  3003. return this
  3004. }
  3005. ,
  3006. Zr.prototype.clean = function(e) {
  3007. var t, n;
  3008. if (!e || 3 === e.nodeType || 8 === e.nodeType)
  3009. return this;
  3010. if (e[this.expando] && this.unbind(e),
  3011. e.getElementsByTagName || (e = e.document),
  3012. e && e.getElementsByTagName)
  3013. for (this.unbind(e),
  3014. t = (n = e.getElementsByTagName("*")).length; t--; )
  3015. (e = n[t])[this.expando] && this.unbind(e);
  3016. return this
  3017. }
  3018. ,
  3019. Zr.prototype.destroy = function() {
  3020. this.events = {}
  3021. }
  3022. ,
  3023. Zr.prototype.cancel = function(e) {
  3024. return e && (e.preventDefault(),
  3025. e.stopImmediatePropagation()),
  3026. !1
  3027. }
  3028. ,
  3029. Zr.prototype.executeHandlers = function(e, t) {
  3030. var n, r, o, i, a = this.events[t];
  3031. if (n = a && a[e.type])
  3032. for (r = 0,
  3033. o = n.length; r < o; r++)
  3034. if ((i = n[r]) && !1 === i.func.call(i.scope, e) && e.preventDefault(),
  3035. e.isImmediatePropagationStopped())
  3036. return
  3037. }
  3038. ,
  3039. Zr.Event = new Zr,
  3040. Zr);
  3041. function Zr() {
  3042. this.domLoaded = !1,
  3043. this.events = {},
  3044. this.count = 1,
  3045. this.expando = "mce-data-" + (+new Date).toString(32),
  3046. this.hasMouseEnterLeave = "onmouseenter"in j.document.documentElement,
  3047. this.hasFocusIn = "onfocusin"in j.document.documentElement,
  3048. this.count = 1
  3049. }
  3050. function Jr(e, t, n) {
  3051. var r = "0x" + t - 65536;
  3052. return r != r || n ? t : r < 0 ? String.fromCharCode(65536 + r) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  3053. }
  3054. var Qr, eo, to, no, ro, oo, io, ao, uo, co, so, lo, fo, ho, mo, go, po, vo, yo = "sizzle" + -new Date, bo = j.window.document, Co = 0, wo = 0, xo = Qo(), zo = Qo(), Eo = Qo(), No = function(e, t) {
  3055. return e === t && (so = !0),
  3056. 0
  3057. }, So = typeof undefined, ko = {}.hasOwnProperty, To = [], Ao = To.pop, Mo = To.push, Ro = To.push, _o = To.slice, Do = To.indexOf || function(e) {
  3058. for (var t = 0, n = this.length; t < n; t++)
  3059. if (this[t] === e)
  3060. return t;
  3061. return -1
  3062. }
  3063. , Oo = "[\\x20\\t\\r\\n\\f]", Ho = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", Bo = "\\[" + Oo + "*(" + Ho + ")(?:" + Oo + "*([*^$|!~]?=)" + Oo + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + Ho + "))|)" + Oo + "*\\]", Po = ":(" + Ho + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + Bo + ")*)|.*)\\)|)", Lo = new RegExp("^" + Oo + "+|((?:^|[^\\\\])(?:\\\\.)*)" + Oo + "+$","g"), Vo = new RegExp("^" + Oo + "*," + Oo + "*"), Io = new RegExp("^" + Oo + "*([>+~]|" + Oo + ")" + Oo + "*"), Fo = new RegExp("=" + Oo + "*([^\\]'\"]*?)" + Oo + "*\\]","g"), Uo = new RegExp(Po), jo = new RegExp("^" + Ho + "$"), qo = {
  3064. ID: new RegExp("^#(" + Ho + ")"),
  3065. CLASS: new RegExp("^\\.(" + Ho + ")"),
  3066. TAG: new RegExp("^(" + Ho + "|[*])"),
  3067. ATTR: new RegExp("^" + Bo),
  3068. PSEUDO: new RegExp("^" + Po),
  3069. CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + Oo + "*(even|odd|(([+-]|)(\\d*)n|)" + Oo + "*(?:([+-]|)" + Oo + "*(\\d+)|))" + Oo + "*\\)|)","i"),
  3070. bool: new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),
  3071. needsContext: new RegExp("^" + Oo + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + Oo + "*((?:-\\d)?\\d*)" + Oo + "*\\)|)(?=[^-]|$)","i")
  3072. }, $o = /^(?:input|select|textarea|button)$/i, Wo = /^h\d$/i, Ko = /^[^{]+\{\s*\[native \w/, Xo = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, Yo = /[+~]/, Go = /'|\\/g, Zo = new RegExp("\\\\([\\da-f]{1,6}" + Oo + "?|(" + Oo + ")|.)","ig");
  3073. try {
  3074. Ro.apply(To = _o.call(bo.childNodes), bo.childNodes),
  3075. To[bo.childNodes.length].nodeType
  3076. } catch (HN) {
  3077. Ro = {
  3078. apply: To.length ? function(e, t) {
  3079. Mo.apply(e, _o.call(t))
  3080. }
  3081. : function(e, t) {
  3082. for (var n = e.length, r = 0; e[n++] = t[r++]; )
  3083. ;
  3084. e.length = n - 1
  3085. }
  3086. }
  3087. }
  3088. var Jo = function(e, t, n, r) {
  3089. var o, i, a, u, c, s, l, f, d, h;
  3090. if ((t ? t.ownerDocument || t : bo) !== fo && lo(t),
  3091. n = n || [],
  3092. !e || "string" != typeof e)
  3093. return n;
  3094. if (1 !== (u = (t = t || fo).nodeType) && 9 !== u)
  3095. return [];
  3096. if (mo && !r) {
  3097. if (o = Xo.exec(e))
  3098. if (a = o[1]) {
  3099. if (9 === u) {
  3100. if (!(i = t.getElementById(a)) || !i.parentNode)
  3101. return n;
  3102. if (i.id === a)
  3103. return n.push(i),
  3104. n
  3105. } else if (t.ownerDocument && (i = t.ownerDocument.getElementById(a)) && vo(t, i) && i.id === a)
  3106. return n.push(i),
  3107. n
  3108. } else {
  3109. if (o[2])
  3110. return Ro.apply(n, t.getElementsByTagName(e)),
  3111. n;
  3112. if ((a = o[3]) && eo.getElementsByClassName)
  3113. return Ro.apply(n, t.getElementsByClassName(a)),
  3114. n
  3115. }
  3116. if (eo.qsa && (!go || !go.test(e))) {
  3117. if (f = l = yo,
  3118. d = t,
  3119. h = 9 === u && e,
  3120. 1 === u && "object" !== t.nodeName.toLowerCase()) {
  3121. for (s = oo(e),
  3122. (l = t.getAttribute("id")) ? f = l.replace(Go, "\\$&") : t.setAttribute("id", f),
  3123. f = "[id='" + f + "'] ",
  3124. c = s.length; c--; )
  3125. s[c] = f + ui(s[c]);
  3126. d = Yo.test(e) && ii(t.parentNode) || t,
  3127. h = s.join(",")
  3128. }
  3129. if (h)
  3130. try {
  3131. return Ro.apply(n, d.querySelectorAll(h)),
  3132. n
  3133. } catch (m) {} finally {
  3134. l || t.removeAttribute("id")
  3135. }
  3136. }
  3137. }
  3138. return ao(e.replace(Lo, "$1"), t, n, r)
  3139. };
  3140. function Qo() {
  3141. var n = [];
  3142. return function r(e, t) {
  3143. return n.push(e + " ") > to.cacheLength && delete r[n.shift()],
  3144. r[e + " "] = t
  3145. }
  3146. }
  3147. function ei(e) {
  3148. return e[yo] = !0,
  3149. e
  3150. }
  3151. function ti(e, t) {
  3152. var n = t && e
  3153. , r = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || 1 << 31) - (~e.sourceIndex || 1 << 31);
  3154. if (r)
  3155. return r;
  3156. if (n)
  3157. for (; n = n.nextSibling; )
  3158. if (n === t)
  3159. return -1;
  3160. return e ? 1 : -1
  3161. }
  3162. function ni(t) {
  3163. return function(e) {
  3164. return "input" === e.nodeName.toLowerCase() && e.type === t
  3165. }
  3166. }
  3167. function ri(n) {
  3168. return function(e) {
  3169. var t = e.nodeName.toLowerCase();
  3170. return ("input" === t || "button" === t) && e.type === n
  3171. }
  3172. }
  3173. function oi(a) {
  3174. return ei(function(i) {
  3175. return i = +i,
  3176. ei(function(e, t) {
  3177. for (var n, r = a([], e.length, i), o = r.length; o--; )
  3178. e[n = r[o]] && (e[n] = !(t[n] = e[n]))
  3179. })
  3180. })
  3181. }
  3182. function ii(e) {
  3183. return e && typeof e.getElementsByTagName != So && e
  3184. }
  3185. for (Qr in eo = Jo.support = {},
  3186. ro = Jo.isXML = function(e) {
  3187. var t = e && (e.ownerDocument || e).documentElement;
  3188. return !!t && "HTML" !== t.nodeName
  3189. }
  3190. ,
  3191. lo = Jo.setDocument = function(e) {
  3192. var t, c = e ? e.ownerDocument || e : bo, n = c.defaultView;
  3193. return c !== fo && 9 === c.nodeType && c.documentElement ? (ho = (fo = c).documentElement,
  3194. mo = !ro(c),
  3195. n && n !== function r(e) {
  3196. try {
  3197. return e.top
  3198. } catch (t) {}
  3199. return null
  3200. }(n) && (n.addEventListener ? n.addEventListener("unload", function() {
  3201. lo()
  3202. }, !1) : n.attachEvent && n.attachEvent("onunload", function() {
  3203. lo()
  3204. })),
  3205. eo.attributes = !0,
  3206. eo.getElementsByTagName = !0,
  3207. eo.getElementsByClassName = Ko.test(c.getElementsByClassName),
  3208. eo.getById = !0,
  3209. to.find.ID = function(e, t) {
  3210. if (typeof t.getElementById != So && mo) {
  3211. var n = t.getElementById(e);
  3212. return n && n.parentNode ? [n] : []
  3213. }
  3214. }
  3215. ,
  3216. to.filter.ID = function(e) {
  3217. var t = e.replace(Zo, Jr);
  3218. return function(e) {
  3219. return e.getAttribute("id") === t
  3220. }
  3221. }
  3222. ,
  3223. to.find.TAG = eo.getElementsByTagName ? function(e, t) {
  3224. if (typeof t.getElementsByTagName != So)
  3225. return t.getElementsByTagName(e)
  3226. }
  3227. : function(e, t) {
  3228. var n, r = [], o = 0, i = t.getElementsByTagName(e);
  3229. if ("*" !== e)
  3230. return i;
  3231. for (; n = i[o++]; )
  3232. 1 === n.nodeType && r.push(n);
  3233. return r
  3234. }
  3235. ,
  3236. to.find.CLASS = eo.getElementsByClassName && function(e, t) {
  3237. if (mo)
  3238. return t.getElementsByClassName(e)
  3239. }
  3240. ,
  3241. po = [],
  3242. go = [],
  3243. eo.disconnectedMatch = !0,
  3244. go = go.length && new RegExp(go.join("|")),
  3245. po = po.length && new RegExp(po.join("|")),
  3246. t = Ko.test(ho.compareDocumentPosition),
  3247. vo = t || Ko.test(ho.contains) ? function(e, t) {
  3248. var n = 9 === e.nodeType ? e.documentElement : e
  3249. , r = t && t.parentNode;
  3250. return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r)))
  3251. }
  3252. : function(e, t) {
  3253. if (t)
  3254. for (; t = t.parentNode; )
  3255. if (t === e)
  3256. return !0;
  3257. return !1
  3258. }
  3259. ,
  3260. No = t ? function(e, t) {
  3261. if (e === t)
  3262. return so = !0,
  3263. 0;
  3264. var n = !e.compareDocumentPosition - !t.compareDocumentPosition;
  3265. return n || (1 & (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !eo.sortDetached && t.compareDocumentPosition(e) === n ? e === c || e.ownerDocument === bo && vo(bo, e) ? -1 : t === c || t.ownerDocument === bo && vo(bo, t) ? 1 : co ? Do.call(co, e) - Do.call(co, t) : 0 : 4 & n ? -1 : 1)
  3266. }
  3267. : function(e, t) {
  3268. if (e === t)
  3269. return so = !0,
  3270. 0;
  3271. var n, r = 0, o = e.parentNode, i = t.parentNode, a = [e], u = [t];
  3272. if (!o || !i)
  3273. return e === c ? -1 : t === c ? 1 : o ? -1 : i ? 1 : co ? Do.call(co, e) - Do.call(co, t) : 0;
  3274. if (o === i)
  3275. return ti(e, t);
  3276. for (n = e; n = n.parentNode; )
  3277. a.unshift(n);
  3278. for (n = t; n = n.parentNode; )
  3279. u.unshift(n);
  3280. for (; a[r] === u[r]; )
  3281. r++;
  3282. return r ? ti(a[r], u[r]) : a[r] === bo ? -1 : u[r] === bo ? 1 : 0
  3283. }
  3284. ,
  3285. c) : fo
  3286. }
  3287. ,
  3288. Jo.matches = function(e, t) {
  3289. return Jo(e, null, null, t)
  3290. }
  3291. ,
  3292. Jo.matchesSelector = function(e, t) {
  3293. if ((e.ownerDocument || e) !== fo && lo(e),
  3294. t = t.replace(Fo, "='$1']"),
  3295. eo.matchesSelector && mo && (!po || !po.test(t)) && (!go || !go.test(t)))
  3296. try {
  3297. var n = (void 0).call(e, t);
  3298. if (n || eo.disconnectedMatch || e.document && 11 !== e.document.nodeType)
  3299. return n
  3300. } catch (HN) {}
  3301. return 0 < Jo(t, fo, null, [e]).length
  3302. }
  3303. ,
  3304. Jo.contains = function(e, t) {
  3305. return (e.ownerDocument || e) !== fo && lo(e),
  3306. vo(e, t)
  3307. }
  3308. ,
  3309. Jo.attr = function(e, t) {
  3310. (e.ownerDocument || e) !== fo && lo(e);
  3311. var n = to.attrHandle[t.toLowerCase()]
  3312. , r = n && ko.call(to.attrHandle, t.toLowerCase()) ? n(e, t, !mo) : undefined;
  3313. return r !== undefined ? r : eo.attributes || !mo ? e.getAttribute(t) : (r = e.getAttributeNode(t)) && r.specified ? r.value : null
  3314. }
  3315. ,
  3316. Jo.error = function(e) {
  3317. throw new Error("Syntax error, unrecognized expression: " + e)
  3318. }
  3319. ,
  3320. Jo.uniqueSort = function(e) {
  3321. var t, n = [], r = 0, o = 0;
  3322. if (so = !eo.detectDuplicates,
  3323. co = !eo.sortStable && e.slice(0),
  3324. e.sort(No),
  3325. so) {
  3326. for (; t = e[o++]; )
  3327. t === e[o] && (r = n.push(o));
  3328. for (; r--; )
  3329. e.splice(n[r], 1)
  3330. }
  3331. return co = null,
  3332. e
  3333. }
  3334. ,
  3335. no = Jo.getText = function(e) {
  3336. var t, n = "", r = 0, o = e.nodeType;
  3337. if (o) {
  3338. if (1 === o || 9 === o || 11 === o) {
  3339. if ("string" == typeof e.textContent)
  3340. return e.textContent;
  3341. for (e = e.firstChild; e; e = e.nextSibling)
  3342. n += no(e)
  3343. } else if (3 === o || 4 === o)
  3344. return e.nodeValue
  3345. } else
  3346. for (; t = e[r++]; )
  3347. n += no(t);
  3348. return n
  3349. }
  3350. ,
  3351. (to = Jo.selectors = {
  3352. cacheLength: 50,
  3353. createPseudo: ei,
  3354. match: qo,
  3355. attrHandle: {},
  3356. find: {},
  3357. relative: {
  3358. ">": {
  3359. dir: "parentNode",
  3360. first: !0
  3361. },
  3362. " ": {
  3363. dir: "parentNode"
  3364. },
  3365. "+": {
  3366. dir: "previousSibling",
  3367. first: !0
  3368. },
  3369. "~": {
  3370. dir: "previousSibling"
  3371. }
  3372. },
  3373. preFilter: {
  3374. ATTR: function(e) {
  3375. return e[1] = e[1].replace(Zo, Jr),
  3376. e[3] = (e[3] || e[4] || e[5] || "").replace(Zo, Jr),
  3377. "~=" === e[2] && (e[3] = " " + e[3] + " "),
  3378. e.slice(0, 4)
  3379. },
  3380. CHILD: function(e) {
  3381. return e[1] = e[1].toLowerCase(),
  3382. "nth" === e[1].slice(0, 3) ? (e[3] || Jo.error(e[0]),
  3383. e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])),
  3384. e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && Jo.error(e[0]),
  3385. e
  3386. },
  3387. PSEUDO: function(e) {
  3388. var t, n = !e[6] && e[2];
  3389. return qo.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && Uo.test(n) && (t = oo(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t),
  3390. e[2] = n.slice(0, t)),
  3391. e.slice(0, 3))
  3392. }
  3393. },
  3394. filter: {
  3395. TAG: function(e) {
  3396. var t = e.replace(Zo, Jr).toLowerCase();
  3397. return "*" === e ? function() {
  3398. return !0
  3399. }
  3400. : function(e) {
  3401. return e.nodeName && e.nodeName.toLowerCase() === t
  3402. }
  3403. },
  3404. CLASS: function(e) {
  3405. var t = xo[e + " "];
  3406. return t || (t = new RegExp("(^|" + Oo + ")" + e + "(" + Oo + "|$)")) && xo(e, function(e) {
  3407. return t.test("string" == typeof e.className && e.className || typeof e.getAttribute != So && e.getAttribute("class") || "")
  3408. })
  3409. },
  3410. ATTR: function(n, r, o) {
  3411. return function(e) {
  3412. var t = Jo.attr(e, n);
  3413. return null == t ? "!=" === r : !r || (t += "",
  3414. "=" === r ? t === o : "!=" === r ? t !== o : "^=" === r ? o && 0 === t.indexOf(o) : "*=" === r ? o && -1 < t.indexOf(o) : "$=" === r ? o && t.slice(-o.length) === o : "~=" === r ? -1 < (" " + t + " ").indexOf(o) : "|=" === r && (t === o || t.slice(0, o.length + 1) === o + "-"))
  3415. }
  3416. },
  3417. CHILD: function(h, e, t, m, g) {
  3418. var p = "nth" !== h.slice(0, 3)
  3419. , v = "last" !== h.slice(-4)
  3420. , y = "of-type" === e;
  3421. return 1 === m && 0 === g ? function(e) {
  3422. return !!e.parentNode
  3423. }
  3424. : function(e, t, n) {
  3425. var r, o, i, a, u, c, s = p != v ? "nextSibling" : "previousSibling", l = e.parentNode, f = y && e.nodeName.toLowerCase(), d = !n && !y;
  3426. if (l) {
  3427. if (p) {
  3428. for (; s; ) {
  3429. for (i = e; i = i[s]; )
  3430. if (y ? i.nodeName.toLowerCase() === f : 1 === i.nodeType)
  3431. return !1;
  3432. c = s = "only" === h && !c && "nextSibling"
  3433. }
  3434. return !0
  3435. }
  3436. if (c = [v ? l.firstChild : l.lastChild],
  3437. v && d) {
  3438. for (u = (r = (o = l[yo] || (l[yo] = {}))[h] || [])[0] === Co && r[1],
  3439. a = r[0] === Co && r[2],
  3440. i = u && l.childNodes[u]; i = ++u && i && i[s] || (a = u = 0) || c.pop(); )
  3441. if (1 === i.nodeType && ++a && i === e) {
  3442. o[h] = [Co, u, a];
  3443. break
  3444. }
  3445. } else if (d && (r = (e[yo] || (e[yo] = {}))[h]) && r[0] === Co)
  3446. a = r[1];
  3447. else
  3448. for (; (i = ++u && i && i[s] || (a = u = 0) || c.pop()) && ((y ? i.nodeName.toLowerCase() !== f : 1 !== i.nodeType) || !++a || (d && ((i[yo] || (i[yo] = {}))[h] = [Co, a]),
  3449. i !== e)); )
  3450. ;
  3451. return (a -= g) === m || a % m == 0 && 0 <= a / m
  3452. }
  3453. }
  3454. },
  3455. PSEUDO: function(e, i) {
  3456. var t, a = to.pseudos[e] || to.setFilters[e.toLowerCase()] || Jo.error("unsupported pseudo: " + e);
  3457. return a[yo] ? a(i) : 1 < a.length ? (t = [e, e, "", i],
  3458. to.setFilters.hasOwnProperty(e.toLowerCase()) ? ei(function(e, t) {
  3459. for (var n, r = a(e, i), o = r.length; o--; )
  3460. e[n = Do.call(e, r[o])] = !(t[n] = r[o])
  3461. }) : function(e) {
  3462. return a(e, 0, t)
  3463. }
  3464. ) : a
  3465. }
  3466. },
  3467. pseudos: {
  3468. not: ei(function(e) {
  3469. var r = []
  3470. , o = []
  3471. , u = io(e.replace(Lo, "$1"));
  3472. return u[yo] ? ei(function(e, t, n, r) {
  3473. for (var o, i = u(e, null, r, []), a = e.length; a--; )
  3474. (o = i[a]) && (e[a] = !(t[a] = o))
  3475. }) : function(e, t, n) {
  3476. return r[0] = e,
  3477. u(r, null, n, o),
  3478. !o.pop()
  3479. }
  3480. }),
  3481. has: ei(function(t) {
  3482. return function(e) {
  3483. return 0 < Jo(t, e).length
  3484. }
  3485. }),
  3486. contains: ei(function(t) {
  3487. return t = t.replace(Zo, Jr),
  3488. function(e) {
  3489. return -1 < (e.textContent || e.innerText || no(e)).indexOf(t)
  3490. }
  3491. }),
  3492. lang: ei(function(n) {
  3493. return jo.test(n || "") || Jo.error("unsupported lang: " + n),
  3494. n = n.replace(Zo, Jr).toLowerCase(),
  3495. function(e) {
  3496. var t;
  3497. do {
  3498. if (t = mo ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang"))
  3499. return (t = t.toLowerCase()) === n || 0 === t.indexOf(n + "-")
  3500. } while ((e = e.parentNode) && 1 === e.nodeType);
  3501. return !1
  3502. }
  3503. }),
  3504. target: function(e) {
  3505. var t = j.window.location && j.window.location.hash;
  3506. return t && t.slice(1) === e.id
  3507. },
  3508. root: function(e) {
  3509. return e === ho
  3510. },
  3511. focus: function(e) {
  3512. return e === fo.activeElement && (!fo.hasFocus || fo.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)
  3513. },
  3514. enabled: function(e) {
  3515. return !1 === e.disabled
  3516. },
  3517. disabled: function(e) {
  3518. return !0 === e.disabled
  3519. },
  3520. checked: function(e) {
  3521. var t = e.nodeName.toLowerCase();
  3522. return "input" === t && !!e.checked || "option" === t && !!e.selected
  3523. },
  3524. selected: function(e) {
  3525. return e.parentNode && e.parentNode.selectedIndex,
  3526. !0 === e.selected
  3527. },
  3528. empty: function(e) {
  3529. for (e = e.firstChild; e; e = e.nextSibling)
  3530. if (e.nodeType < 6)
  3531. return !1;
  3532. return !0
  3533. },
  3534. parent: function(e) {
  3535. return !to.pseudos.empty(e)
  3536. },
  3537. header: function(e) {
  3538. return Wo.test(e.nodeName)
  3539. },
  3540. input: function(e) {
  3541. return $o.test(e.nodeName)
  3542. },
  3543. button: function(e) {
  3544. var t = e.nodeName.toLowerCase();
  3545. return "input" === t && "button" === e.type || "button" === t
  3546. },
  3547. text: function(e) {
  3548. var t;
  3549. return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase())
  3550. },
  3551. first: oi(function() {
  3552. return [0]
  3553. }),
  3554. last: oi(function(e, t) {
  3555. return [t - 1]
  3556. }),
  3557. eq: oi(function(e, t, n) {
  3558. return [n < 0 ? n + t : n]
  3559. }),
  3560. even: oi(function(e, t) {
  3561. for (var n = 0; n < t; n += 2)
  3562. e.push(n);
  3563. return e
  3564. }),
  3565. odd: oi(function(e, t) {
  3566. for (var n = 1; n < t; n += 2)
  3567. e.push(n);
  3568. return e
  3569. }),
  3570. lt: oi(function(e, t, n) {
  3571. for (var r = n < 0 ? n + t : n; 0 <= --r; )
  3572. e.push(r);
  3573. return e
  3574. }),
  3575. gt: oi(function(e, t, n) {
  3576. for (var r = n < 0 ? n + t : n; ++r < t; )
  3577. e.push(r);
  3578. return e
  3579. })
  3580. }
  3581. }).pseudos.nth = to.pseudos.eq,
  3582. {
  3583. radio: !0,
  3584. checkbox: !0,
  3585. file: !0,
  3586. password: !0,
  3587. image: !0
  3588. })
  3589. to.pseudos[Qr] = ni(Qr);
  3590. for (Qr in {
  3591. submit: !0,
  3592. reset: !0
  3593. })
  3594. to.pseudos[Qr] = ri(Qr);
  3595. function ai() {}
  3596. function ui(e) {
  3597. for (var t = 0, n = e.length, r = ""; t < n; t++)
  3598. r += e[t].value;
  3599. return r
  3600. }
  3601. function ci(a, e, t) {
  3602. var u = e.dir
  3603. , c = t && "parentNode" === u
  3604. , s = wo++;
  3605. return e.first ? function(e, t, n) {
  3606. for (; e = e[u]; )
  3607. if (1 === e.nodeType || c)
  3608. return a(e, t, n)
  3609. }
  3610. : function(e, t, n) {
  3611. var r, o, i = [Co, s];
  3612. if (n) {
  3613. for (; e = e[u]; )
  3614. if ((1 === e.nodeType || c) && a(e, t, n))
  3615. return !0
  3616. } else
  3617. for (; e = e[u]; )
  3618. if (1 === e.nodeType || c) {
  3619. if ((r = (o = e[yo] || (e[yo] = {}))[u]) && r[0] === Co && r[1] === s)
  3620. return i[2] = r[2];
  3621. if ((o[u] = i)[2] = a(e, t, n))
  3622. return !0
  3623. }
  3624. }
  3625. }
  3626. function si(o) {
  3627. return 1 < o.length ? function(e, t, n) {
  3628. for (var r = o.length; r--; )
  3629. if (!o[r](e, t, n))
  3630. return !1;
  3631. return !0
  3632. }
  3633. : o[0]
  3634. }
  3635. function li(e, t, n, r, o) {
  3636. for (var i, a = [], u = 0, c = e.length, s = null != t; u < c; u++)
  3637. (i = e[u]) && (n && !n(i, r, o) || (a.push(i),
  3638. s && t.push(u)));
  3639. return a
  3640. }
  3641. function fi(m, g, p, v, y, e) {
  3642. return v && !v[yo] && (v = fi(v)),
  3643. y && !y[yo] && (y = fi(y, e)),
  3644. ei(function(e, t, n, r) {
  3645. var o, i, a, u = [], c = [], s = t.length, l = e || function h(e, t, n) {
  3646. for (var r = 0, o = t.length; r < o; r++)
  3647. Jo(e, t[r], n);
  3648. return n
  3649. }(g || "*", n.nodeType ? [n] : n, []), f = !m || !e && g ? l : li(l, u, m, n, r), d = p ? y || (e ? m : s || v) ? [] : t : f;
  3650. if (p && p(f, d, n, r),
  3651. v)
  3652. for (o = li(d, c),
  3653. v(o, [], n, r),
  3654. i = o.length; i--; )
  3655. (a = o[i]) && (d[c[i]] = !(f[c[i]] = a));
  3656. if (e) {
  3657. if (y || m) {
  3658. if (y) {
  3659. for (o = [],
  3660. i = d.length; i--; )
  3661. (a = d[i]) && o.push(f[i] = a);
  3662. y(null, d = [], o, r)
  3663. }
  3664. for (i = d.length; i--; )
  3665. (a = d[i]) && -1 < (o = y ? Do.call(e, a) : u[i]) && (e[o] = !(t[o] = a))
  3666. }
  3667. } else
  3668. d = li(d === t ? d.splice(s, d.length) : d),
  3669. y ? y(null, t, d, r) : Ro.apply(t, d)
  3670. })
  3671. }
  3672. function di(e) {
  3673. for (var r, t, n, o = e.length, i = to.relative[e[0].type], a = i || to.relative[" "], u = i ? 1 : 0, c = ci(function(e) {
  3674. return e === r
  3675. }, a, !0), s = ci(function(e) {
  3676. return -1 < Do.call(r, e)
  3677. }, a, !0), l = [function(e, t, n) {
  3678. return !i && (n || t !== uo) || ((r = t).nodeType ? c(e, t, n) : s(e, t, n))
  3679. }
  3680. ]; u < o; u++)
  3681. if (t = to.relative[e[u].type])
  3682. l = [ci(si(l), t)];
  3683. else {
  3684. if ((t = to.filter[e[u].type].apply(null, e[u].matches))[yo]) {
  3685. for (n = ++u; n < o && !to.relative[e[n].type]; n++)
  3686. ;
  3687. return fi(1 < u && si(l), 1 < u && ui(e.slice(0, u - 1).concat({
  3688. value: " " === e[u - 2].type ? "*" : ""
  3689. })).replace(Lo, "$1"), t, u < n && di(e.slice(u, n)), n < o && di(e = e.slice(n)), n < o && ui(e))
  3690. }
  3691. l.push(t)
  3692. }
  3693. return si(l)
  3694. }
  3695. ai.prototype = to.filters = to.pseudos,
  3696. to.setFilters = new ai,
  3697. oo = Jo.tokenize = function(e, t) {
  3698. var n, r, o, i, a, u, c, s = zo[e + " "];
  3699. if (s)
  3700. return t ? 0 : s.slice(0);
  3701. for (a = e,
  3702. u = [],
  3703. c = to.preFilter; a; ) {
  3704. for (i in n && !(r = Vo.exec(a)) || (r && (a = a.slice(r[0].length) || a),
  3705. u.push(o = [])),
  3706. n = !1,
  3707. (r = Io.exec(a)) && (n = r.shift(),
  3708. o.push({
  3709. value: n,
  3710. type: r[0].replace(Lo, " ")
  3711. }),
  3712. a = a.slice(n.length)),
  3713. to.filter)
  3714. to.filter.hasOwnProperty(i) && (!(r = qo[i].exec(a)) || c[i] && !(r = c[i](r)) || (n = r.shift(),
  3715. o.push({
  3716. value: n,
  3717. type: i,
  3718. matches: r
  3719. }),
  3720. a = a.slice(n.length)));
  3721. if (!n)
  3722. break
  3723. }
  3724. return t ? a.length : a ? Jo.error(e) : zo(e, u).slice(0)
  3725. }
  3726. ,
  3727. io = Jo.compile = function(e, t) {
  3728. var n, r = [], o = [], i = Eo[e + " "];
  3729. if (!i) {
  3730. for (n = (t = t || oo(e)).length; n--; )
  3731. (i = di(t[n]))[yo] ? r.push(i) : o.push(i);
  3732. (i = Eo(e, function a(p, v) {
  3733. function e(e, t, n, r, o) {
  3734. var i, a, u, c = 0, s = "0", l = e && [], f = [], d = uo, h = e || b && to.find.TAG("*", o), m = Co += null == d ? 1 : Math.random() || .1, g = h.length;
  3735. for (o && (uo = t !== fo && t); s !== g && null != (i = h[s]); s++) {
  3736. if (b && i) {
  3737. for (a = 0; u = p[a++]; )
  3738. if (u(i, t, n)) {
  3739. r.push(i);
  3740. break
  3741. }
  3742. o && (Co = m)
  3743. }
  3744. y && ((i = !u && i) && c--,
  3745. e && l.push(i))
  3746. }
  3747. if (c += s,
  3748. y && s !== c) {
  3749. for (a = 0; u = v[a++]; )
  3750. u(l, f, t, n);
  3751. if (e) {
  3752. if (0 < c)
  3753. for (; s--; )
  3754. l[s] || f[s] || (f[s] = Ao.call(r));
  3755. f = li(f)
  3756. }
  3757. Ro.apply(r, f),
  3758. o && !e && 0 < f.length && 1 < c + v.length && Jo.uniqueSort(r)
  3759. }
  3760. return o && (Co = m,
  3761. uo = d),
  3762. l
  3763. }
  3764. var y = 0 < v.length
  3765. , b = 0 < p.length;
  3766. return y ? ei(e) : e
  3767. }(o, r))).selector = e
  3768. }
  3769. return i
  3770. }
  3771. ,
  3772. ao = Jo.select = function(e, t, n, r) {
  3773. var o, i, a, u, c, s = "function" == typeof e && e, l = !r && oo(e = s.selector || e);
  3774. if (n = n || [],
  3775. 1 === l.length) {
  3776. if (2 < (i = l[0] = l[0].slice(0)).length && "ID" === (a = i[0]).type && eo.getById && 9 === t.nodeType && mo && to.relative[i[1].type]) {
  3777. if (!(t = (to.find.ID(a.matches[0].replace(Zo, Jr), t) || [])[0]))
  3778. return n;
  3779. s && (t = t.parentNode),
  3780. e = e.slice(i.shift().value.length)
  3781. }
  3782. for (o = qo.needsContext.test(e) ? 0 : i.length; o-- && (a = i[o],
  3783. !to.relative[u = a.type]); )
  3784. if ((c = to.find[u]) && (r = c(a.matches[0].replace(Zo, Jr), Yo.test(i[0].type) && ii(t.parentNode) || t))) {
  3785. if (i.splice(o, 1),
  3786. !(e = r.length && ui(i)))
  3787. return Ro.apply(n, r),
  3788. n;
  3789. break
  3790. }
  3791. }
  3792. return (s || io(e, l))(r, t, !mo, n, Yo.test(e) && ii(t.parentNode) || t),
  3793. n
  3794. }
  3795. ,
  3796. eo.sortStable = yo.split("").sort(No).join("") === yo,
  3797. eo.detectDuplicates = !!so,
  3798. lo(),
  3799. eo.sortDetached = !0;
  3800. function hi(e) {
  3801. return void 0 !== e
  3802. }
  3803. function mi(e) {
  3804. return "string" == typeof e
  3805. }
  3806. function gi(e, t) {
  3807. var n, r, o;
  3808. for (o = (t = t || xi).createElement("div"),
  3809. n = t.createDocumentFragment(),
  3810. o.innerHTML = e; r = o.firstChild; )
  3811. n.appendChild(r);
  3812. return n
  3813. }
  3814. function pi(e, t) {
  3815. return e && t && -1 !== (" " + e.className + " ").indexOf(" " + t + " ")
  3816. }
  3817. function vi(e, t, n) {
  3818. var r, o;
  3819. return t = Ii(t)[0],
  3820. e.each(function() {
  3821. n && r === this.parentNode || (r = this.parentNode,
  3822. o = t.cloneNode(!1),
  3823. this.parentNode.insertBefore(o, this)),
  3824. o.appendChild(this)
  3825. }),
  3826. e
  3827. }
  3828. function yi(e, t) {
  3829. return new Ii.fn.init(e,t)
  3830. }
  3831. function bi(e) {
  3832. return null === e || e === undefined ? "" : ("" + e).replace(Hi, "")
  3833. }
  3834. function Ci(e, t) {
  3835. var n, r, o, i;
  3836. if (e)
  3837. if ((n = e.length) === undefined) {
  3838. for (r in e)
  3839. if (e.hasOwnProperty(r) && (i = e[r],
  3840. !1 === t.call(i, r, i)))
  3841. break
  3842. } else
  3843. for (o = 0; o < n && (i = e[o],
  3844. !1 !== t.call(i, o, i)); o++)
  3845. ;
  3846. return e
  3847. }
  3848. function wi(e, n) {
  3849. var r = [];
  3850. return Ci(e, function(e, t) {
  3851. n(t, e) && r.push(t)
  3852. }),
  3853. r
  3854. }
  3855. var xi = j.document
  3856. , zi = Array.prototype.push
  3857. , Ei = Array.prototype.slice
  3858. , Ni = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/
  3859. , Si = Gr.Event
  3860. , ki = Zn.makeMap("children,contents,next,prev")
  3861. , Ti = function(e, t, n, r) {
  3862. var o;
  3863. if (mi(t))
  3864. t = gi(t, Bi(e[0]));
  3865. else if (t.length && !t.nodeType) {
  3866. if (t = Ii.makeArray(t),
  3867. r)
  3868. for (o = t.length - 1; 0 <= o; o--)
  3869. Ti(e, t[o], n, r);
  3870. else
  3871. for (o = 0; o < t.length; o++)
  3872. Ti(e, t[o], n, r);
  3873. return e
  3874. }
  3875. if (t.nodeType)
  3876. for (o = e.length; o--; )
  3877. n.call(e[o], t);
  3878. return e
  3879. }
  3880. , Ai = Zn.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom", " ")
  3881. , Mi = Zn.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected", " ")
  3882. , Ri = {
  3883. "for": "htmlFor",
  3884. "class": "className",
  3885. readonly: "readOnly"
  3886. }
  3887. , _i = {
  3888. "float": "cssFloat"
  3889. }
  3890. , Di = {}
  3891. , Oi = {}
  3892. , Hi = /^\s*|\s*$/g
  3893. , Bi = function(e) {
  3894. return e ? 9 === e.nodeType ? e : e.ownerDocument : xi
  3895. };
  3896. yi.fn = yi.prototype = {
  3897. constructor: yi,
  3898. selector: "",
  3899. context: null,
  3900. length: 0,
  3901. init: function(e, t) {
  3902. var n, r, o = this;
  3903. if (!e)
  3904. return o;
  3905. if (e.nodeType)
  3906. return o.context = o[0] = e,
  3907. o.length = 1,
  3908. o;
  3909. if (t && t.nodeType)
  3910. o.context = t;
  3911. else {
  3912. if (t)
  3913. return Ii(e).attr(t);
  3914. o.context = t = j.document
  3915. }
  3916. if (mi(e)) {
  3917. if (!(n = "<" === (o.selector = e).charAt(0) && ">" === e.charAt(e.length - 1) && 3 <= e.length ? [null, e, null] : Ni.exec(e)))
  3918. return Ii(t).find(e);
  3919. if (n[1])
  3920. for (r = gi(e, Bi(t)).firstChild; r; )
  3921. zi.call(o, r),
  3922. r = r.nextSibling;
  3923. else {
  3924. if (!(r = Bi(t).getElementById(n[2])))
  3925. return o;
  3926. if (r.id !== n[2])
  3927. return o.find(e);
  3928. o.length = 1,
  3929. o[0] = r
  3930. }
  3931. } else
  3932. this.add(e, !1);
  3933. return o
  3934. },
  3935. toArray: function() {
  3936. return Zn.toArray(this)
  3937. },
  3938. add: function(e, t) {
  3939. var n, r;
  3940. if (mi(e))
  3941. return this.add(Ii(e));
  3942. if (!1 !== t)
  3943. for (n = Ii.unique(this.toArray().concat(Ii.makeArray(e))),
  3944. this.length = n.length,
  3945. r = 0; r < n.length; r++)
  3946. this[r] = n[r];
  3947. else
  3948. zi.apply(this, Ii.makeArray(e));
  3949. return this
  3950. },
  3951. attr: function(t, n) {
  3952. var e, r = this;
  3953. if ("object" == typeof t)
  3954. Ci(t, function(e, t) {
  3955. r.attr(e, t)
  3956. });
  3957. else {
  3958. if (!hi(n)) {
  3959. if (r[0] && 1 === r[0].nodeType) {
  3960. if ((e = Di[t]) && e.get)
  3961. return e.get(r[0], t);
  3962. if (Mi[t])
  3963. return r.prop(t) ? t : undefined;
  3964. null === (n = r[0].getAttribute(t, 2)) && (n = undefined)
  3965. }
  3966. return n
  3967. }
  3968. this.each(function() {
  3969. var e;
  3970. if (1 === this.nodeType) {
  3971. if ((e = Di[t]) && e.set)
  3972. return void e.set(this, n);
  3973. null === n ? this.removeAttribute(t, 2) : this.setAttribute(t, n, 2)
  3974. }
  3975. })
  3976. }
  3977. return r
  3978. },
  3979. removeAttr: function(e) {
  3980. return this.attr(e, null)
  3981. },
  3982. prop: function(e, t) {
  3983. var n = this;
  3984. if ("object" == typeof (e = Ri[e] || e))
  3985. Ci(e, function(e, t) {
  3986. n.prop(e, t)
  3987. });
  3988. else {
  3989. if (!hi(t))
  3990. return n[0] && n[0].nodeType && e in n[0] ? n[0][e] : t;
  3991. this.each(function() {
  3992. 1 === this.nodeType && (this[e] = t)
  3993. })
  3994. }
  3995. return n
  3996. },
  3997. css: function(n, r) {
  3998. function e(e) {
  3999. return e.replace(/-(\D)/g, function(e, t) {
  4000. return t.toUpperCase()
  4001. })
  4002. }
  4003. function o(e) {
  4004. return e.replace(/[A-Z]/g, function(e) {
  4005. return "-" + e
  4006. })
  4007. }
  4008. var t, i, a = this;
  4009. if ("object" == typeof n)
  4010. Ci(n, function(e, t) {
  4011. a.css(e, t)
  4012. });
  4013. else if (hi(r))
  4014. n = e(n),
  4015. "number" != typeof r || Ai[n] || (r = r.toString() + "px"),
  4016. a.each(function() {
  4017. var e = this.style;
  4018. if ((i = Oi[n]) && i.set)
  4019. i.set(this, r);
  4020. else {
  4021. try {
  4022. this.style[_i[n] || n] = r
  4023. } catch (t) {}
  4024. null !== r && "" !== r || (e.removeProperty ? e.removeProperty(o(n)) : e.removeAttribute(n))
  4025. }
  4026. });
  4027. else {
  4028. if (t = a[0],
  4029. (i = Oi[n]) && i.get)
  4030. return i.get(t);
  4031. if (!t.ownerDocument.defaultView)
  4032. return t.currentStyle ? t.currentStyle[e(n)] : "";
  4033. try {
  4034. return t.ownerDocument.defaultView.getComputedStyle(t, null).getPropertyValue(o(n))
  4035. } catch (u) {
  4036. return undefined
  4037. }
  4038. }
  4039. return a
  4040. },
  4041. remove: function() {
  4042. for (var e, t = this.length; t--; )
  4043. e = this[t],
  4044. Si.clean(e),
  4045. e.parentNode && e.parentNode.removeChild(e);
  4046. return this
  4047. },
  4048. empty: function() {
  4049. for (var e, t = this.length; t--; )
  4050. for (e = this[t]; e.firstChild; )
  4051. e.removeChild(e.firstChild);
  4052. return this
  4053. },
  4054. html: function(e) {
  4055. var t, n = this;
  4056. if (hi(e)) {
  4057. t = n.length;
  4058. try {
  4059. for (; t--; )
  4060. n[t].innerHTML = e
  4061. } catch (r) {
  4062. Ii(n[t]).empty().append(e)
  4063. }
  4064. return n
  4065. }
  4066. return n[0] ? n[0].innerHTML : ""
  4067. },
  4068. text: function(e) {
  4069. var t;
  4070. if (hi(e)) {
  4071. for (t = this.length; t--; )
  4072. "innerText"in this[t] ? this[t].innerText = e : this[0].textContent = e;
  4073. return this
  4074. }
  4075. return this[0] ? this[0].innerText || this[0].textContent : ""
  4076. },
  4077. append: function() {
  4078. return Ti(this, arguments, function(e) {
  4079. (1 === this.nodeType || this.host && 1 === this.host.nodeType) && this.appendChild(e)
  4080. })
  4081. },
  4082. prepend: function() {
  4083. return Ti(this, arguments, function(e) {
  4084. (1 === this.nodeType || this.host && 1 === this.host.nodeType) && this.insertBefore(e, this.firstChild)
  4085. }, !0)
  4086. },
  4087. before: function() {
  4088. return this[0] && this[0].parentNode ? Ti(this, arguments, function(e) {
  4089. this.parentNode.insertBefore(e, this)
  4090. }) : this
  4091. },
  4092. after: function() {
  4093. return this[0] && this[0].parentNode ? Ti(this, arguments, function(e) {
  4094. this.parentNode.insertBefore(e, this.nextSibling)
  4095. }, !0) : this
  4096. },
  4097. appendTo: function(e) {
  4098. return Ii(e).append(this),
  4099. this
  4100. },
  4101. prependTo: function(e) {
  4102. return Ii(e).prepend(this),
  4103. this
  4104. },
  4105. replaceWith: function(e) {
  4106. return this.before(e).remove()
  4107. },
  4108. wrap: function(e) {
  4109. return vi(this, e)
  4110. },
  4111. wrapAll: function(e) {
  4112. return vi(this, e, !0)
  4113. },
  4114. wrapInner: function(e) {
  4115. return this.each(function() {
  4116. Ii(this).contents().wrapAll(e)
  4117. }),
  4118. this
  4119. },
  4120. unwrap: function() {
  4121. return this.parent().each(function() {
  4122. Ii(this).replaceWith(this.childNodes)
  4123. })
  4124. },
  4125. clone: function() {
  4126. var e = [];
  4127. return this.each(function() {
  4128. e.push(this.cloneNode(!0))
  4129. }),
  4130. Ii(e)
  4131. },
  4132. addClass: function(e) {
  4133. return this.toggleClass(e, !0)
  4134. },
  4135. removeClass: function(e) {
  4136. return this.toggleClass(e, !1)
  4137. },
  4138. toggleClass: function(o, i) {
  4139. var e = this;
  4140. return "string" != typeof o || (-1 !== o.indexOf(" ") ? Ci(o.split(" "), function() {
  4141. e.toggleClass(this, i)
  4142. }) : e.each(function(e, t) {
  4143. var n, r;
  4144. (r = pi(t, o)) !== i && (n = t.className,
  4145. r ? t.className = bi((" " + n + " ").replace(" " + o + " ", " ")) : t.className += n ? " " + o : o)
  4146. })),
  4147. e
  4148. },
  4149. hasClass: function(e) {
  4150. return pi(this[0], e)
  4151. },
  4152. each: function(e) {
  4153. return Ci(this, e)
  4154. },
  4155. on: function(e, t) {
  4156. return this.each(function() {
  4157. Si.bind(this, e, t)
  4158. })
  4159. },
  4160. off: function(e, t) {
  4161. return this.each(function() {
  4162. Si.unbind(this, e, t)
  4163. })
  4164. },
  4165. trigger: function(e) {
  4166. return this.each(function() {
  4167. "object" == typeof e ? Si.fire(this, e.type, e) : Si.fire(this, e)
  4168. })
  4169. },
  4170. show: function() {
  4171. return this.css("display", "")
  4172. },
  4173. hide: function() {
  4174. return this.css("display", "none")
  4175. },
  4176. slice: function() {
  4177. return new Ii(Ei.apply(this, arguments))
  4178. },
  4179. eq: function(e) {
  4180. return -1 === e ? this.slice(e) : this.slice(e, +e + 1)
  4181. },
  4182. first: function() {
  4183. return this.eq(0)
  4184. },
  4185. last: function() {
  4186. return this.eq(-1)
  4187. },
  4188. find: function(e) {
  4189. var t, n, r = [];
  4190. for (t = 0,
  4191. n = this.length; t < n; t++)
  4192. Ii.find(e, this[t], r);
  4193. return Ii(r)
  4194. },
  4195. filter: function(n) {
  4196. return Ii("function" == typeof n ? wi(this.toArray(), function(e, t) {
  4197. return n(t, e)
  4198. }) : Ii.filter(n, this.toArray()))
  4199. },
  4200. closest: function(n) {
  4201. var r = [];
  4202. return n instanceof Ii && (n = n[0]),
  4203. this.each(function(e, t) {
  4204. for (; t; ) {
  4205. if ("string" == typeof n && Ii(t).is(n)) {
  4206. r.push(t);
  4207. break
  4208. }
  4209. if (t === n) {
  4210. r.push(t);
  4211. break
  4212. }
  4213. t = t.parentNode
  4214. }
  4215. }),
  4216. Ii(r)
  4217. },
  4218. offset: function(e) {
  4219. var t, n, r, o, i = 0, a = 0;
  4220. return e ? this.css(e) : ((t = this[0]) && (r = (n = t.ownerDocument).documentElement,
  4221. t.getBoundingClientRect && (i = (o = t.getBoundingClientRect()).left + (r.scrollLeft || n.body.scrollLeft) - r.clientLeft,
  4222. a = o.top + (r.scrollTop || n.body.scrollTop) - r.clientTop)),
  4223. {
  4224. left: i,
  4225. top: a
  4226. })
  4227. },
  4228. push: zi,
  4229. sort: Array.prototype.sort,
  4230. splice: Array.prototype.splice
  4231. },
  4232. Zn.extend(yi, {
  4233. extend: Zn.extend,
  4234. makeArray: function(e) {
  4235. return function(e) {
  4236. return e && e === e.window
  4237. }(e) || e.nodeType ? [e] : Zn.toArray(e)
  4238. },
  4239. inArray: function(e, t) {
  4240. var n;
  4241. if (t.indexOf)
  4242. return t.indexOf(e);
  4243. for (n = t.length; n--; )
  4244. if (t[n] === e)
  4245. return n;
  4246. return -1
  4247. },
  4248. isArray: Zn.isArray,
  4249. each: Ci,
  4250. trim: bi,
  4251. grep: wi,
  4252. find: Jo,
  4253. expr: Jo.selectors,
  4254. unique: Jo.uniqueSort,
  4255. text: Jo.getText,
  4256. contains: Jo.contains,
  4257. filter: function(e, t, n) {
  4258. var r = t.length;
  4259. for (n && (e = ":not(" + e + ")"); r--; )
  4260. 1 !== t[r].nodeType && t.splice(r, 1);
  4261. return t = 1 === t.length ? Ii.find.matchesSelector(t[0], e) ? [t[0]] : [] : Ii.find.matches(e, t)
  4262. }
  4263. });
  4264. function Pi(e, t, n) {
  4265. var r = []
  4266. , o = e[t];
  4267. for ("string" != typeof n && n instanceof Ii && (n = n[0]); o && 9 !== o.nodeType; ) {
  4268. if (n !== undefined) {
  4269. if (o === n)
  4270. break;
  4271. if ("string" == typeof n && Ii(o).is(n))
  4272. break
  4273. }
  4274. 1 === o.nodeType && r.push(o),
  4275. o = o[t]
  4276. }
  4277. return r
  4278. }
  4279. function Li(e, t, n, r) {
  4280. var o = [];
  4281. for (r instanceof Ii && (r = r[0]); e; e = e[t])
  4282. if (!n || e.nodeType === n) {
  4283. if (r !== undefined) {
  4284. if (e === r)
  4285. break;
  4286. if ("string" == typeof r && Ii(e).is(r))
  4287. break
  4288. }
  4289. o.push(e)
  4290. }
  4291. return o
  4292. }
  4293. function Vi(e, t, n) {
  4294. for (e = e[t]; e; e = e[t])
  4295. if (e.nodeType === n)
  4296. return e;
  4297. return null
  4298. }
  4299. Ci({
  4300. parent: function(e) {
  4301. var t = e.parentNode;
  4302. return t && 11 !== t.nodeType ? t : null
  4303. },
  4304. parents: function(e) {
  4305. return Pi(e, "parentNode")
  4306. },
  4307. next: function(e) {
  4308. return Vi(e, "nextSibling", 1)
  4309. },
  4310. prev: function(e) {
  4311. return Vi(e, "previousSibling", 1)
  4312. },
  4313. children: function(e) {
  4314. return Li(e.firstChild, "nextSibling", 1)
  4315. },
  4316. contents: function(e) {
  4317. return Zn.toArray(("iframe" === e.nodeName ? e.contentDocument || e.contentWindow.document : e).childNodes)
  4318. }
  4319. }, function(r, o) {
  4320. yi.fn[r] = function(t) {
  4321. var n = [];
  4322. this.each(function() {
  4323. var e = o.call(n, this, t, n);
  4324. e && (Ii.isArray(e) ? n.push.apply(n, e) : n.push(e))
  4325. }),
  4326. 1 < this.length && (ki[r] || (n = Ii.unique(n)),
  4327. 0 === r.indexOf("parents") && (n = n.reverse()));
  4328. var e = Ii(n);
  4329. return t ? e.filter(t) : e
  4330. }
  4331. }),
  4332. Ci({
  4333. parentsUntil: function(e, t) {
  4334. return Pi(e, "parentNode", t)
  4335. },
  4336. nextUntil: function(e, t) {
  4337. return Li(e, "nextSibling", 1, t).slice(1)
  4338. },
  4339. prevUntil: function(e, t) {
  4340. return Li(e, "previousSibling", 1, t).slice(1)
  4341. }
  4342. }, function(o, i) {
  4343. yi.fn[o] = function(t, e) {
  4344. var n = [];
  4345. this.each(function() {
  4346. var e = i.call(n, this, t, n);
  4347. e && (Ii.isArray(e) ? n.push.apply(n, e) : n.push(e))
  4348. }),
  4349. 1 < this.length && (n = Ii.unique(n),
  4350. 0 !== o.indexOf("parents") && "prevUntil" !== o || (n = n.reverse()));
  4351. var r = Ii(n);
  4352. return e ? r.filter(e) : r
  4353. }
  4354. }),
  4355. yi.fn.is = function(e) {
  4356. return !!e && 0 < this.filter(e).length
  4357. }
  4358. ,
  4359. yi.fn.init.prototype = yi.fn,
  4360. yi.overrideDefaults = function(n) {
  4361. var r, o = function(e, t) {
  4362. return r = r || n(),
  4363. 0 === arguments.length && (e = r.element),
  4364. t = t || r.context,
  4365. new o.fn.init(e,t)
  4366. };
  4367. return Ii.extend(o, this),
  4368. o
  4369. }
  4370. ,
  4371. yi.attrHooks = Di,
  4372. yi.cssHooks = Oi;
  4373. var Ii = yi
  4374. , Fi = (Ui.prototype.current = function() {
  4375. return this.node
  4376. }
  4377. ,
  4378. Ui.prototype.next = function(e) {
  4379. return this.node = this.findSibling(this.node, "firstChild", "nextSibling", e),
  4380. this.node
  4381. }
  4382. ,
  4383. Ui.prototype.prev = function(e) {
  4384. return this.node = this.findSibling(this.node, "lastChild", "previousSibling", e),
  4385. this.node
  4386. }
  4387. ,
  4388. Ui.prototype.prev2 = function(e) {
  4389. return this.node = this.findPreviousNode(this.node, "lastChild", "previousSibling", e),
  4390. this.node
  4391. }
  4392. ,
  4393. Ui.prototype.findSibling = function(e, t, n, r) {
  4394. var o, i;
  4395. if (e) {
  4396. if (!r && e[t])
  4397. return e[t];
  4398. if (e !== this.rootNode) {
  4399. if (o = e[n])
  4400. return o;
  4401. for (i = e.parentNode; i && i !== this.rootNode; i = i.parentNode)
  4402. if (o = i[n])
  4403. return o
  4404. }
  4405. }
  4406. }
  4407. ,
  4408. Ui.prototype.findPreviousNode = function(e, t, n, r) {
  4409. var o, i, a;
  4410. if (e) {
  4411. if (o = e[n],
  4412. this.rootNode && o === this.rootNode)
  4413. return;
  4414. if (o) {
  4415. if (!r)
  4416. for (a = o[t]; a; a = a[t])
  4417. if (!a[t])
  4418. return a;
  4419. return o
  4420. }
  4421. if ((i = e.parentNode) && i !== this.rootNode)
  4422. return i
  4423. }
  4424. }
  4425. ,
  4426. Ui);
  4427. function Ui(e, t) {
  4428. this.node = e,
  4429. this.rootNode = t,
  4430. this.current = this.current.bind(this),
  4431. this.next = this.next.bind(this),
  4432. this.prev = this.prev.bind(this),
  4433. this.prev2 = this.prev2.bind(this)
  4434. }
  4435. var ji, qi = Zn.each, $i = Zn.grep, Wi = Wn.ie, Ki = /^([a-z0-9],?)+$/i, Xi = /^[ \t\r\n]*$/, Yi = function(n, r, o) {
  4436. var i = r.keep_values
  4437. , e = {
  4438. set: function(e, t, n) {
  4439. r.url_converter && (t = r.url_converter.call(r.url_converter_scope || o(), t, n, e[0])),
  4440. e.attr("data-mce-" + n, t).attr(n, t)
  4441. },
  4442. get: function(e, t) {
  4443. return e.attr("data-mce-" + t) || e.attr(t)
  4444. }
  4445. }
  4446. , t = {
  4447. style: {
  4448. set: function(e, t) {
  4449. null === t || "object" != typeof t ? (i && e.attr("data-mce-style", t),
  4450. null !== t && "string" == typeof t ? (e.removeAttr("style"),
  4451. e.css(n.parse(t))) : e.attr("style", t)) : e.css(t)
  4452. },
  4453. get: function(e) {
  4454. var t = e.attr("data-mce-style") || e.attr("style");
  4455. return t = n.serialize(n.parse(t), e[0].nodeName)
  4456. }
  4457. }
  4458. };
  4459. return i && (t.href = t.src = e),
  4460. t
  4461. }, Gi = function(e, t) {
  4462. var n = t.attr("style")
  4463. , r = e.serialize(e.parse(n), t[0].nodeName);
  4464. r = r || null,
  4465. t.attr("data-mce-style", r)
  4466. }, Zi = function(e, t) {
  4467. var n, r, o = 0;
  4468. if (e)
  4469. for (n = e.nodeType,
  4470. e = e.previousSibling; e; e = e.previousSibling)
  4471. r = e.nodeType,
  4472. (!t || 3 !== r || r !== n && e.nodeValue.length) && (o++,
  4473. n = r);
  4474. return o
  4475. };
  4476. function Ji(a, u) {
  4477. var c, s = this;
  4478. void 0 === u && (u = {});
  4479. function l(e) {
  4480. if (e && a && "string" == typeof e) {
  4481. var t = a.getElementById(e);
  4482. return t && t.id !== e ? a.getElementsByName(e)[1] : t
  4483. }
  4484. return e
  4485. }
  4486. function f(e) {
  4487. return "string" == typeof e && (e = l(e)),
  4488. B(e)
  4489. }
  4490. function r(e, t, n) {
  4491. var r, o, i = f(e);
  4492. return i.length && (o = (r = c[t]) && r.get ? r.get(i, t) : i.attr(t)),
  4493. void 0 === o && (o = n || ""),
  4494. o
  4495. }
  4496. function d(e) {
  4497. var t = l(e);
  4498. return t ? t.attributes : []
  4499. }
  4500. function o(e, t, n) {
  4501. var r, o;
  4502. "" === n && (n = null);
  4503. var i = f(e);
  4504. r = i.attr(t),
  4505. i.length && ((o = c[t]) && o.set ? o.set(i, n, t) : i.attr(t, n),
  4506. r !== n && u.onSetAttrib && u.onSetAttrib({
  4507. attrElm: i,
  4508. attrName: t,
  4509. attrValue: n
  4510. }))
  4511. }
  4512. function h() {
  4513. return u.root_element || a.body
  4514. }
  4515. function i(e, t) {
  4516. return rn.getPos(a.body, l(e), t)
  4517. }
  4518. function m(e, t, n) {
  4519. var r = f(e);
  4520. return n ? r.css(t) : ("float" === (t = t.replace(/-(\D)/g, function(e, t) {
  4521. return t.toUpperCase()
  4522. })) && (t = Wn.browser.isIE() ? "styleFloat" : "cssFloat"),
  4523. r[0] && r[0].style ? r[0].style[t] : undefined)
  4524. }
  4525. function g(e) {
  4526. var t, n;
  4527. return e = l(e),
  4528. t = m(e, "width"),
  4529. n = m(e, "height"),
  4530. -1 === t.indexOf("px") && (t = 0),
  4531. -1 === n.indexOf("px") && (n = 0),
  4532. {
  4533. w: parseInt(t, 10) || e.offsetWidth || e.clientWidth,
  4534. h: parseInt(n, 10) || e.offsetHeight || e.clientHeight
  4535. }
  4536. }
  4537. function p(e, t) {
  4538. var n;
  4539. if (!e)
  4540. return !1;
  4541. if (!Array.isArray(e)) {
  4542. if ("*" === t)
  4543. return 1 === e.nodeType;
  4544. if (Ki.test(t)) {
  4545. var r = t.toLowerCase().split(/,/)
  4546. , o = e.nodeName.toLowerCase();
  4547. for (n = r.length - 1; 0 <= n; n--)
  4548. if (r[n] === o)
  4549. return !0;
  4550. return !1
  4551. }
  4552. if (e.nodeType && 1 !== e.nodeType)
  4553. return !1
  4554. }
  4555. var i = Array.isArray(e) ? e : [e];
  4556. return 0 < Jo(t, i[0].ownerDocument || i[0], null, i).length
  4557. }
  4558. function v(e, t, n, r) {
  4559. var o, i = [], a = l(e);
  4560. for (r = r === undefined,
  4561. n = n || ("BODY" !== h().nodeName ? h().parentNode : null),
  4562. Zn.is(t, "string") && (t = "*" === (o = t) ? function(e) {
  4563. return 1 === e.nodeType
  4564. }
  4565. : function(e) {
  4566. return p(e, o)
  4567. }
  4568. ); a && a !== n && a.nodeType && 9 !== a.nodeType; ) {
  4569. if (!t || "function" == typeof t && t(a)) {
  4570. if (!r)
  4571. return [a];
  4572. i.push(a)
  4573. }
  4574. a = a.parentNode
  4575. }
  4576. return r ? i : null
  4577. }
  4578. function n(e, t, n) {
  4579. var r = t;
  4580. if (e)
  4581. for ("string" == typeof t && (r = function(e) {
  4582. return p(e, t)
  4583. }
  4584. ),
  4585. e = e[n]; e; e = e[n])
  4586. if ("function" == typeof r && r(e))
  4587. return e;
  4588. return null
  4589. }
  4590. function y(e, n, r) {
  4591. var o, t = "string" == typeof e ? l(e) : e;
  4592. if (!t)
  4593. return !1;
  4594. if (Zn.isArray(t) && (t.length || 0 === t.length))
  4595. return o = [],
  4596. qi(t, function(e, t) {
  4597. e && ("string" == typeof e && (e = l(e)),
  4598. o.push(n.call(r, e, t)))
  4599. }),
  4600. o;
  4601. var i = r || s;
  4602. return n.call(i, t)
  4603. }
  4604. function b(e, t) {
  4605. f(e).each(function(e, n) {
  4606. qi(t, function(e, t) {
  4607. o(n, t, e)
  4608. })
  4609. })
  4610. }
  4611. function C(e, r) {
  4612. var t = f(e);
  4613. Wi ? t.each(function(e, t) {
  4614. if (!1 !== t.canHaveHTML) {
  4615. for (; t.firstChild; )
  4616. t.removeChild(t.firstChild);
  4617. try {
  4618. t.innerHTML = "<br>" + r,
  4619. t.removeChild(t.firstChild)
  4620. } catch (n) {
  4621. Ii("<div></div>").html("<br>" + r).contents().slice(1).appendTo(t)
  4622. }
  4623. return r
  4624. }
  4625. }) : t.html(r)
  4626. }
  4627. function w(e, n, r, o, i) {
  4628. return y(e, function(e) {
  4629. var t = "string" == typeof n ? a.createElement(n) : n;
  4630. return b(t, r),
  4631. o && ("string" != typeof o && o.nodeType ? t.appendChild(o) : "string" == typeof o && C(t, o)),
  4632. i ? t : e.appendChild(t)
  4633. })
  4634. }
  4635. function x(e, t, n) {
  4636. return w(a.createElement(e), e, t, n, !0)
  4637. }
  4638. function z(e, t) {
  4639. var n = f(e);
  4640. return t ? n.each(function() {
  4641. for (var e; e = this.firstChild; )
  4642. 3 === e.nodeType && 0 === e.data.length ? this.removeChild(e) : this.parentNode.insertBefore(e, this)
  4643. }).remove() : n.remove(),
  4644. 1 < n.length ? n.toArray() : n[0]
  4645. }
  4646. function E(e, t, n) {
  4647. f(e).toggleClass(t, n).each(function() {
  4648. "" === this.className && Ii(this).attr("class", null)
  4649. })
  4650. }
  4651. function N(t, e, n) {
  4652. return y(e, function(e) {
  4653. return Zn.is(e, "array") && (t = t.cloneNode(!0)),
  4654. n && qi($i(e.childNodes), function(e) {
  4655. t.appendChild(e)
  4656. }),
  4657. e.parentNode.replaceChild(t, e)
  4658. })
  4659. }
  4660. function S() {
  4661. return a.createRange()
  4662. }
  4663. function k(e) {
  4664. if (e && Qt.isElement(e)) {
  4665. var t = e.getAttribute("data-mce-contenteditable");
  4666. return t && "inherit" !== t ? t : "inherit" !== e.contentEditable ? e.contentEditable : null
  4667. }
  4668. return null
  4669. }
  4670. var T = {}
  4671. , A = j.window
  4672. , M = {}
  4673. , t = 0
  4674. , e = function U(m, g) {
  4675. void 0 === g && (g = {});
  4676. var p, v = 0, y = {};
  4677. function b(e) {
  4678. m.getElementsByTagName("head")[0].appendChild(e)
  4679. }
  4680. function n(e, t, n) {
  4681. function r(e) {
  4682. l.status = e,
  4683. l.passed = [],
  4684. l.failed = [],
  4685. u && (u.onload = null,
  4686. u.onerror = null,
  4687. u = null)
  4688. }
  4689. function o() {
  4690. for (var e = l.passed, t = e.length; t--; )
  4691. e[t]();
  4692. r(2)
  4693. }
  4694. function i() {
  4695. for (var e = l.failed, t = e.length; t--; )
  4696. e[t]();
  4697. r(3)
  4698. }
  4699. function a(e, t) {
  4700. e() || ((new Date).getTime() - s < p ? Pn.setTimeout(t) : i())
  4701. }
  4702. var u, c, s, l, f = function() {
  4703. a(function() {
  4704. for (var e, t, n = m.styleSheets, r = n.length; r--; )
  4705. if ((t = (e = n[r]).ownerNode ? e.ownerNode : e.owningElement) && t.id === u.id)
  4706. return o(),
  4707. !0
  4708. }, f)
  4709. }, d = function() {
  4710. a(function() {
  4711. try {
  4712. var e = c.sheet.cssRules;
  4713. return o(),
  4714. !!e
  4715. } catch (t) {}
  4716. }, d)
  4717. };
  4718. if (e = Zn._addCacheSuffix(e),
  4719. y[e] ? l = y[e] : (l = {
  4720. passed: [],
  4721. failed: []
  4722. },
  4723. y[e] = l),
  4724. t && l.passed.push(t),
  4725. n && l.failed.push(n),
  4726. 1 !== l.status)
  4727. if (2 !== l.status)
  4728. if (3 !== l.status) {
  4729. if (l.status = 1,
  4730. (u = m.createElement("link")).rel = "stylesheet",
  4731. u.type = "text/css",
  4732. u.id = "u" + v++,
  4733. u.async = !1,
  4734. u.defer = !1,
  4735. s = (new Date).getTime(),
  4736. g.contentCssCors && (u.crossOrigin = "anonymous"),
  4737. g.referrerPolicy && en(it.fromDom(u), "referrerpolicy", g.referrerPolicy),
  4738. "onload"in u && !((h = j.navigator.userAgent.match(/WebKit\/(\d*)/)) && parseInt(h[1], 10) < 536))
  4739. u.onload = f,
  4740. u.onerror = i;
  4741. else {
  4742. if (0 < j.navigator.userAgent.indexOf("Firefox"))
  4743. return (c = m.createElement("style")).textContent = '@import "' + e + '"',
  4744. d(),
  4745. void b(c);
  4746. f()
  4747. }
  4748. var h;
  4749. b(u),
  4750. u.href = e
  4751. } else
  4752. i();
  4753. else
  4754. o()
  4755. }
  4756. function t(t) {
  4757. return pn.nu(function(e) {
  4758. n(t, q(e, $(Cn.value(t))), q(e, $(Cn.error(t))))
  4759. })
  4760. }
  4761. function o(e) {
  4762. return e.fold(W, W)
  4763. }
  4764. return p = g.maxLoadTime || 5e3,
  4765. {
  4766. load: n,
  4767. loadAll: function(e, n, r) {
  4768. vn(X(e, t)).get(function(e) {
  4769. var t = Y(e, function(e) {
  4770. return e.isValue()
  4771. });
  4772. 0 < t.fail.length ? r(t.fail.map(o)) : n(t.pass.map(o))
  4773. })
  4774. },
  4775. _setReferrerPolicy: function(e) {
  4776. g.referrerPolicy = e
  4777. }
  4778. }
  4779. }(a, {
  4780. contentCssCors: u.contentCssCors,
  4781. referrerPolicy: u.referrerPolicy
  4782. })
  4783. , R = []
  4784. , _ = u.schema ? u.schema : Pr({})
  4785. , D = $r({
  4786. url_converter: u.url_converter,
  4787. url_converter_scope: u.url_converter_scope
  4788. }, u.schema)
  4789. , O = u.ownEvents ? new Gr : Gr.Event
  4790. , H = _.getBlockElements()
  4791. , B = Ii.overrideDefaults(function() {
  4792. return {
  4793. context: a,
  4794. element: F.getRoot()
  4795. }
  4796. })
  4797. , P = Sr.decode
  4798. , L = Sr.encodeAllRaw
  4799. , V = function(e, t, n, r) {
  4800. if (Zn.isArray(e)) {
  4801. for (var o = e.length, i = []; o--; )
  4802. i[o] = V(e[o], t, n, r);
  4803. return i
  4804. }
  4805. return !u.collect || e !== a && e !== A || R.push([e, t, n, r]),
  4806. O.bind(e, t, n, r || F)
  4807. }
  4808. , I = function(e, t, n) {
  4809. var r;
  4810. if (Zn.isArray(e)) {
  4811. r = e.length;
  4812. for (var o = []; r--; )
  4813. o[r] = I(e[r], t, n);
  4814. return o
  4815. }
  4816. if (R && (e === a || e === A))
  4817. for (r = R.length; r--; ) {
  4818. var i = R[r];
  4819. e !== i[0] || t && t !== i[1] || n && n !== i[2] || O.unbind(i[0], i[1], i[2])
  4820. }
  4821. return O.unbind(e, t, n)
  4822. }
  4823. , F = {
  4824. doc: a,
  4825. settings: u,
  4826. win: A,
  4827. files: M,
  4828. stdMode: !0,
  4829. boxModel: !0,
  4830. styleSheetLoader: e,
  4831. boundEvents: R,
  4832. styles: D,
  4833. schema: _,
  4834. events: O,
  4835. isBlock: function(e) {
  4836. if ("string" == typeof e)
  4837. return !!H[e];
  4838. if (e) {
  4839. var t = e.nodeType;
  4840. if (t)
  4841. return !(1 !== t || !H[e.nodeName])
  4842. }
  4843. return !1
  4844. },
  4845. $: B,
  4846. $$: f,
  4847. root: null,
  4848. clone: function(t, e) {
  4849. if (!Wi || 1 !== t.nodeType || e)
  4850. return t.cloneNode(e);
  4851. if (e)
  4852. return null;
  4853. var n = a.createElement(t.nodeName);
  4854. return qi(d(t), function(e) {
  4855. o(n, e.nodeName, r(t, e.nodeName))
  4856. }),
  4857. n
  4858. },
  4859. getRoot: h,
  4860. getViewPort: function(e) {
  4861. var t = jt(e);
  4862. return {
  4863. x: t.x(),
  4864. y: t.y(),
  4865. w: t.width(),
  4866. h: t.height()
  4867. }
  4868. },
  4869. getRect: function(e) {
  4870. var t, n;
  4871. return e = l(e),
  4872. t = i(e),
  4873. n = g(e),
  4874. {
  4875. x: t.x,
  4876. y: t.y,
  4877. w: n.w,
  4878. h: n.h
  4879. }
  4880. },
  4881. getSize: g,
  4882. getParent: function(e, t, n) {
  4883. var r = v(e, t, n, !1);
  4884. return r && 0 < r.length ? r[0] : null
  4885. },
  4886. getParents: v,
  4887. get: l,
  4888. getNext: function(e, t) {
  4889. return n(e, t, "nextSibling")
  4890. },
  4891. getPrev: function(e, t) {
  4892. return n(e, t, "previousSibling")
  4893. },
  4894. select: function(e, t) {
  4895. return Jo(e, l(t) || u.root_element || a, [])
  4896. },
  4897. is: p,
  4898. add: w,
  4899. create: x,
  4900. createHTML: function(e, t, n) {
  4901. var r, o = "";
  4902. for (r in o += "<" + e,
  4903. t)
  4904. t.hasOwnProperty(r) && null !== t[r] && "undefined" != typeof t[r] && (o += " " + r + '="' + L(t[r]) + '"');
  4905. return void 0 !== n ? o + ">" + n + "</" + e + ">" : o + " />"
  4906. },
  4907. createFragment: function(e) {
  4908. var t, n = a.createElement("div"), r = a.createDocumentFragment();
  4909. for (e && (n.innerHTML = e); t = n.firstChild; )
  4910. r.appendChild(t);
  4911. return r
  4912. },
  4913. remove: z,
  4914. setStyle: function(e, t, n) {
  4915. var r = K(t) ? f(e).css(t, n) : f(e).css(t);
  4916. u.update_styles && Gi(D, r)
  4917. },
  4918. getStyle: m,
  4919. setStyles: function(e, t) {
  4920. var n = f(e).css(t);
  4921. u.update_styles && Gi(D, n)
  4922. },
  4923. removeAllAttribs: function(e) {
  4924. return y(e, function(e) {
  4925. var t, n = e.attributes;
  4926. for (t = n.length - 1; 0 <= t; t--)
  4927. e.removeAttributeNode(n.item(t))
  4928. })
  4929. },
  4930. setAttrib: o,
  4931. setAttribs: b,
  4932. getAttrib: r,
  4933. getPos: i,
  4934. parseStyle: function(e) {
  4935. return D.parse(e)
  4936. },
  4937. serializeStyle: function(e, t) {
  4938. return D.serialize(e, t)
  4939. },
  4940. addStyle: function(e) {
  4941. var t, n;
  4942. if (F !== Ji.DOM && a === j.document) {
  4943. if (T[e])
  4944. return;
  4945. T[e] = !0
  4946. }
  4947. (n = a.getElementById("mceDefaultStyles")) || ((n = a.createElement("style")).id = "mceDefaultStyles",
  4948. n.type = "text/css",
  4949. (t = a.getElementsByTagName("head")[0]).firstChild ? t.insertBefore(n, t.firstChild) : t.appendChild(n)),
  4950. n.styleSheet ? n.styleSheet.cssText += e : n.appendChild(a.createTextNode(e))
  4951. },
  4952. loadCSS: function(e) {
  4953. var n;
  4954. F === Ji.DOM || a !== j.document ? (e = e || "",
  4955. n = a.getElementsByTagName("head")[0],
  4956. qi(e.split(","), function(e) {
  4957. var t;
  4958. e = Zn._addCacheSuffix(e),
  4959. M[e] || (M[e] = !0,
  4960. t = x("link", te(te({
  4961. rel: "stylesheet",
  4962. type: "text/css",
  4963. href: e
  4964. }, u.contentCssCors ? {
  4965. crossOrigin: "anonymous"
  4966. } : {}), u.referrerPolicy ? {
  4967. referrerPolicy: u.referrerPolicy
  4968. } : {})),
  4969. n.appendChild(t))
  4970. })) : Ji.DOM.loadCSS(e)
  4971. },
  4972. addClass: function(e, t) {
  4973. f(e).addClass(t)
  4974. },
  4975. removeClass: function(e, t) {
  4976. E(e, t, !1)
  4977. },
  4978. hasClass: function(e, t) {
  4979. return f(e).hasClass(t)
  4980. },
  4981. toggleClass: E,
  4982. show: function(e) {
  4983. f(e).show()
  4984. },
  4985. hide: function(e) {
  4986. f(e).hide()
  4987. },
  4988. isHidden: function(e) {
  4989. return "none" === f(e).css("display")
  4990. },
  4991. uniqueId: function(e) {
  4992. return (e || "mce_") + t++
  4993. },
  4994. setHTML: C,
  4995. getOuterHTML: function(e) {
  4996. var t = "string" == typeof e ? l(e) : e;
  4997. return Qt.isElement(t) ? t.outerHTML : Ii("<div></div>").append(Ii(t).clone()).html()
  4998. },
  4999. setOuterHTML: function(e, t) {
  5000. f(e).each(function() {
  5001. try {
  5002. if ("outerHTML"in this)
  5003. return void (this.outerHTML = t)
  5004. } catch (e) {}
  5005. z(Ii(this).html(t), !0)
  5006. })
  5007. },
  5008. decode: P,
  5009. encode: L,
  5010. insertAfter: function(e, t) {
  5011. var r = l(t);
  5012. return y(e, function(e) {
  5013. var t, n;
  5014. return t = r.parentNode,
  5015. (n = r.nextSibling) ? t.insertBefore(e, n) : t.appendChild(e),
  5016. e
  5017. })
  5018. },
  5019. replace: N,
  5020. rename: function(t, e) {
  5021. var n;
  5022. return t.nodeName !== e.toUpperCase() && (n = x(e),
  5023. qi(d(t), function(e) {
  5024. o(n, e.nodeName, r(t, e.nodeName))
  5025. }),
  5026. N(n, t, !0)),
  5027. n || t
  5028. },
  5029. findCommonAncestor: function(e, t) {
  5030. for (var n, r = e; r; ) {
  5031. for (n = t; n && r !== n; )
  5032. n = n.parentNode;
  5033. if (r === n)
  5034. break;
  5035. r = r.parentNode
  5036. }
  5037. return !r && e.ownerDocument ? e.ownerDocument.documentElement : r
  5038. },
  5039. toHex: function(e) {
  5040. return D.toHex(Zn.trim(e))
  5041. },
  5042. run: y,
  5043. getAttribs: d,
  5044. isEmpty: function(e, t) {
  5045. var n, r, o, i, a = 0;
  5046. if (e = e.firstChild) {
  5047. var u = new Fi(e,e.parentNode)
  5048. , c = _ ? _.getWhiteSpaceElements() : {};
  5049. t = t || (_ ? _.getNonEmptyElements() : null);
  5050. do {
  5051. if (o = e.nodeType,
  5052. Qt.isElement(e)) {
  5053. var s = e.getAttribute("data-mce-bogus");
  5054. if (s) {
  5055. e = u.next("all" === s);
  5056. continue
  5057. }
  5058. if (i = e.nodeName.toLowerCase(),
  5059. t && t[i]) {
  5060. if ("br" !== i)
  5061. return !1;
  5062. a++,
  5063. e = u.next();
  5064. continue
  5065. }
  5066. for (n = (r = d(e)).length; n--; )
  5067. if ("name" === (i = r[n].nodeName) || "data-mce-bookmark" === i)
  5068. return !1
  5069. }
  5070. if (8 === o)
  5071. return !1;
  5072. if (3 === o && !Xi.test(e.nodeValue))
  5073. return !1;
  5074. if (3 === o && e.parentNode && c[e.parentNode.nodeName] && Xi.test(e.nodeValue))
  5075. return !1;
  5076. e = u.next()
  5077. } while (e)
  5078. }
  5079. return a <= 1
  5080. },
  5081. createRng: S,
  5082. nodeIndex: Zi,
  5083. split: function(e, t, n) {
  5084. var r, o, i, a = S();
  5085. if (e && t)
  5086. return a.setStart(e.parentNode, Zi(e)),
  5087. a.setEnd(t.parentNode, Zi(t)),
  5088. r = a.extractContents(),
  5089. (a = S()).setStart(t.parentNode, Zi(t) + 1),
  5090. a.setEnd(e.parentNode, Zi(e) + 1),
  5091. o = a.extractContents(),
  5092. (i = e.parentNode).insertBefore(gr.trimNode(F, r), e),
  5093. n ? i.insertBefore(n, e) : i.insertBefore(t, e),
  5094. i.insertBefore(gr.trimNode(F, o), e),
  5095. z(e),
  5096. n || t
  5097. },
  5098. bind: V,
  5099. unbind: I,
  5100. fire: function(e, t, n) {
  5101. return O.fire(e, t, n)
  5102. },
  5103. getContentEditable: k,
  5104. getContentEditableParent: function(e) {
  5105. for (var t = h(), n = null; e && e !== t && null === (n = k(e)); e = e.parentNode)
  5106. ;
  5107. return n
  5108. },
  5109. destroy: function() {
  5110. if (R)
  5111. for (var e = R.length; e--; ) {
  5112. var t = R[e];
  5113. O.unbind(t[0], t[1], t[2])
  5114. }
  5115. Jo.setDocument && Jo.setDocument()
  5116. },
  5117. isChildOf: function(e, t) {
  5118. for (; e; ) {
  5119. if (t === e)
  5120. return !0;
  5121. e = e.parentNode
  5122. }
  5123. return !1
  5124. },
  5125. dumpRng: function(e) {
  5126. return "startContainer: " + e.startContainer.nodeName + ", startOffset: " + e.startOffset + ", endContainer: " + e.endContainer.nodeName + ", endOffset: " + e.endOffset
  5127. }
  5128. };
  5129. return c = Yi(D, u, function() {
  5130. return F
  5131. }),
  5132. F
  5133. }
  5134. (ji = Ji = Ji || {}).DOM = ji(j.document),
  5135. ji.nodeIndex = Zi;
  5136. var Qi = Ji
  5137. , ea = Qi.DOM
  5138. , ta = Zn.each
  5139. , na = Zn.grep
  5140. , ra = (oa.prototype._setReferrerPolicy = function(e) {
  5141. this.settings.referrerPolicy = e
  5142. }
  5143. ,
  5144. oa.prototype.loadScript = function(e, t, n) {
  5145. var r, o, i = ea;
  5146. o = i.uniqueId(),
  5147. (r = j.document.createElement("script")).id = o,
  5148. r.type = "text/javascript",
  5149. r.src = Zn._addCacheSuffix(e),
  5150. this.settings.referrerPolicy && i.setAttrib(r, "referrerpolicy", this.settings.referrerPolicy),
  5151. r.onload = function() {
  5152. i.remove(o),
  5153. r && (r.onreadystatechange = r.onload = r = null),
  5154. t()
  5155. }
  5156. ,
  5157. r.onerror = function() {
  5158. B(n) ? n() : "undefined" != typeof j.console && j.console.log && j.console.log("Failed to load script: " + e)
  5159. }
  5160. ,
  5161. (j.document.getElementsByTagName("head")[0] || j.document.body).appendChild(r)
  5162. }
  5163. ,
  5164. oa.prototype.isDone = function(e) {
  5165. return 2 === this.states[e]
  5166. }
  5167. ,
  5168. oa.prototype.markDone = function(e) {
  5169. this.states[e] = 2
  5170. }
  5171. ,
  5172. oa.prototype.add = function(e, t, n, r) {
  5173. this.states[e] === undefined && (this.queue.push(e),
  5174. this.states[e] = 0),
  5175. t && (this.scriptLoadedCallbacks[e] || (this.scriptLoadedCallbacks[e] = []),
  5176. this.scriptLoadedCallbacks[e].push({
  5177. success: t,
  5178. failure: r,
  5179. scope: n || this
  5180. }))
  5181. }
  5182. ,
  5183. oa.prototype.load = function(e, t, n, r) {
  5184. return this.add(e, t, n, r)
  5185. }
  5186. ,
  5187. oa.prototype.remove = function(e) {
  5188. delete this.states[e],
  5189. delete this.scriptLoadedCallbacks[e]
  5190. }
  5191. ,
  5192. oa.prototype.loadQueue = function(e, t, n) {
  5193. this.loadScripts(this.queue, e, t, n)
  5194. }
  5195. ,
  5196. oa.prototype.loadScripts = function(n, e, t, r) {
  5197. function o(t, e) {
  5198. ta(a.scriptLoadedCallbacks[e], function(e) {
  5199. B(e[t]) && e[t].call(e.scope)
  5200. }),
  5201. a.scriptLoadedCallbacks[e] = undefined
  5202. }
  5203. var i, a = this, u = [];
  5204. a.queueLoadedCallbacks.push({
  5205. success: e,
  5206. failure: r,
  5207. scope: t || this
  5208. }),
  5209. (i = function() {
  5210. var e = na(n);
  5211. if (n.length = 0,
  5212. ta(e, function(e) {
  5213. 2 !== a.states[e] ? 3 !== a.states[e] ? 1 !== a.states[e] && (a.states[e] = 1,
  5214. a.loading++,
  5215. a.loadScript(e, function() {
  5216. a.states[e] = 2,
  5217. a.loading--,
  5218. o("success", e),
  5219. i()
  5220. }, function() {
  5221. a.states[e] = 3,
  5222. a.loading--,
  5223. u.push(e),
  5224. o("failure", e),
  5225. i()
  5226. })) : o("failure", e) : o("success", e)
  5227. }),
  5228. !a.loading) {
  5229. var t = a.queueLoadedCallbacks.slice(0);
  5230. a.queueLoadedCallbacks.length = 0,
  5231. ta(t, function(e) {
  5232. 0 === u.length ? B(e.success) && e.success.call(e.scope) : B(e.failure) && e.failure.call(e.scope, u)
  5233. })
  5234. }
  5235. }
  5236. )()
  5237. }
  5238. ,
  5239. oa.ScriptLoader = new oa,
  5240. oa);
  5241. function oa(e) {
  5242. void 0 === e && (e = {}),
  5243. this.states = {},
  5244. this.queue = [],
  5245. this.scriptLoadedCallbacks = {},
  5246. this.queueLoadedCallbacks = [],
  5247. this.loading = 0,
  5248. this.settings = e
  5249. }
  5250. function ia() {
  5251. return A(ua, ca.get())
  5252. }
  5253. var aa, ua = {}, ca = at("en"), sa = {
  5254. getData: function() {
  5255. return S(ua, function(e) {
  5256. return te({}, e)
  5257. })
  5258. },
  5259. setCode: function(e) {
  5260. e && ca.set(e)
  5261. },
  5262. getCode: function() {
  5263. return ca.get()
  5264. },
  5265. add: function(e, t) {
  5266. var n = ua[e];
  5267. n || (ua[e] = n = {}),
  5268. N(t, function(e, t) {
  5269. n[t.toLowerCase()] = e
  5270. })
  5271. },
  5272. translate: function(e) {
  5273. function n(e) {
  5274. return B(e) ? Object.prototype.toString.call(e) : a(e) ? "" : "" + e
  5275. }
  5276. function t(e) {
  5277. var t = n(e);
  5278. return A(i, t.toLowerCase()).map(n).getOr(t)
  5279. }
  5280. function r(e) {
  5281. return e.replace(/{context:\w+}$/, "")
  5282. }
  5283. function o(e) {
  5284. return e
  5285. }
  5286. var i = ia().getOr({})
  5287. , a = function(e) {
  5288. return "" === e || null === e || e === undefined
  5289. };
  5290. if (a(e))
  5291. return o("");
  5292. if (function(e) {
  5293. return _(e) && ee(e, "raw")
  5294. }(e))
  5295. return o(n(e.raw));
  5296. if (function(e) {
  5297. return D(e) && 1 < e.length
  5298. }(e)) {
  5299. var u = e.slice(1);
  5300. return o(r(t(e[0]).replace(/\{([0-9]+)\}/g, function(e, t) {
  5301. return ee(u, t) ? n(u[t]) : e
  5302. })))
  5303. }
  5304. return o(r(t(e)))
  5305. },
  5306. isRtl: function() {
  5307. return ia().bind(function(e) {
  5308. return A(e, "_dir")
  5309. }).exists(function(e) {
  5310. return "rtl" === e
  5311. })
  5312. },
  5313. hasCode: function(e) {
  5314. return ee(ua, e)
  5315. }
  5316. };
  5317. function la() {
  5318. function u(t, n) {
  5319. var e = U(i, function(e) {
  5320. return e.name === t && e.state === n
  5321. });
  5322. F(e, function(e) {
  5323. return e.callback()
  5324. })
  5325. }
  5326. function c(e) {
  5327. var t;
  5328. return f[e] && (t = f[e].dependencies),
  5329. t || []
  5330. }
  5331. function s(e, t) {
  5332. return "object" == typeof t ? t : "string" == typeof e ? {
  5333. prefix: "",
  5334. resource: t,
  5335. suffix: ""
  5336. } : {
  5337. prefix: e.prefix,
  5338. resource: t,
  5339. suffix: e.suffix
  5340. }
  5341. }
  5342. var r = this
  5343. , o = []
  5344. , l = {}
  5345. , f = {}
  5346. , i = []
  5347. , d = function(e, t, n, r, o) {
  5348. if (!l[e]) {
  5349. var i = "string" == typeof t ? t : t.prefix + t.resource + t.suffix;
  5350. 0 !== i.indexOf("/") && -1 === i.indexOf("://") && (i = la.baseURL + "/" + i),
  5351. l[e] = i.substring(0, i.lastIndexOf("/"));
  5352. var a = function() {
  5353. u(e, "loaded"),
  5354. function(e, n, t, r) {
  5355. var o = c(e);
  5356. F(o, function(e) {
  5357. var t = s(n, e);
  5358. d(t.resource, t, undefined, undefined)
  5359. }),
  5360. t && (r ? t.call(r) : t.call(ra))
  5361. }(e, t, n, r)
  5362. };
  5363. f[e] ? a() : ra.ScriptLoader.add(i, a, r, o)
  5364. }
  5365. }
  5366. , e = function(e, t, n) {
  5367. void 0 === n && (n = "added"),
  5368. ee(f, e) && "added" === n ? t() : ee(l, e) && "loaded" === n ? t() : i.push({
  5369. name: e,
  5370. state: n,
  5371. callback: t
  5372. })
  5373. };
  5374. return {
  5375. items: o,
  5376. urls: l,
  5377. lookup: f,
  5378. _listeners: i,
  5379. get: function(e) {
  5380. return f[e] ? f[e].instance : undefined
  5381. },
  5382. dependencies: c,
  5383. requireLangPack: function(t, n) {
  5384. !1 !== la.languageLoad && e(t, function() {
  5385. var e = sa.getCode();
  5386. !e || n && -1 === ("," + (n || "") + ",").indexOf("," + e + ",") || ra.ScriptLoader.add(l[t] + "/langs/" + e + ".js")
  5387. }, "loaded")
  5388. },
  5389. add: function(e, t, n) {
  5390. var r = t;
  5391. return o.push(r),
  5392. f[e] = {
  5393. instance: r,
  5394. dependencies: n
  5395. },
  5396. u(e, "added"),
  5397. r
  5398. },
  5399. remove: function(e) {
  5400. delete l[e],
  5401. delete f[e]
  5402. },
  5403. createUrl: s,
  5404. addComponents: function(e, t) {
  5405. var n = r.urls[e];
  5406. F(t, function(e) {
  5407. ra.ScriptLoader.add(n + "/" + e)
  5408. })
  5409. },
  5410. load: d,
  5411. waitFor: e
  5412. }
  5413. }
  5414. (aa = la = la || {}).PluginManager = aa(),
  5415. aa.ThemeManager = aa();
  5416. function fa(n, r) {
  5417. var o = null;
  5418. return {
  5419. cancel: function() {
  5420. null !== o && (j.clearTimeout(o),
  5421. o = null)
  5422. },
  5423. throttle: function() {
  5424. for (var e = [], t = 0; t < arguments.length; t++)
  5425. e[t] = arguments[t];
  5426. null === o && (o = j.setTimeout(function() {
  5427. n.apply(null, e),
  5428. o = null
  5429. }, r))
  5430. }
  5431. }
  5432. }
  5433. function da(n, r) {
  5434. var o = null;
  5435. return {
  5436. cancel: function() {
  5437. null !== o && (j.clearTimeout(o),
  5438. o = null)
  5439. },
  5440. throttle: function() {
  5441. for (var e = [], t = 0; t < arguments.length; t++)
  5442. e[t] = arguments[t];
  5443. null !== o && j.clearTimeout(o),
  5444. o = j.setTimeout(function() {
  5445. n.apply(null, e),
  5446. o = null
  5447. }, r)
  5448. }
  5449. }
  5450. }
  5451. function ha(e, t) {
  5452. var n = Xe(e, t);
  5453. return n === undefined || "" === n ? [] : n.split(" ")
  5454. }
  5455. function ma(e) {
  5456. return e.dom().classList !== undefined
  5457. }
  5458. function ga(e, t) {
  5459. return function(e, t, n) {
  5460. var r = ha(e, t).concat([n]);
  5461. return en(e, t, r.join(" ")),
  5462. !0
  5463. }(e, "class", t)
  5464. }
  5465. function pa(e, t) {
  5466. return function(e, t, n) {
  5467. var r = U(ha(e, t), function(e) {
  5468. return e !== n
  5469. });
  5470. return 0 < r.length ? en(e, t, r.join(" ")) : Ye(e, t),
  5471. !1
  5472. }(e, "class", t)
  5473. }
  5474. function va(e, t) {
  5475. ma(e) ? e.dom().classList.add(t) : ga(e, t)
  5476. }
  5477. function ya(e) {
  5478. 0 === (ma(e) ? e.dom().classList : function(e) {
  5479. return ha(e, "class")
  5480. }(e)).length && Ye(e, "class")
  5481. }
  5482. function ba(e, t) {
  5483. return ma(e) && e.dom().classList.contains(t)
  5484. }
  5485. function Ca(e, t) {
  5486. return function(e, t) {
  5487. var n = t === undefined ? j.document : t.dom();
  5488. return ge(n) ? [] : X(n.querySelectorAll(e), it.fromDom)
  5489. }(t, e)
  5490. }
  5491. var wa = la
  5492. , xa = function(e, t) {
  5493. var n = [];
  5494. return F(Ee(e), function(e) {
  5495. t(e) && (n = n.concat([e])),
  5496. n = n.concat(xa(e, t))
  5497. }),
  5498. n
  5499. };
  5500. function za(e, t, n, r, o) {
  5501. return e(n, r) ? R.some(n) : B(o) && o(n) ? R.none() : t(n, r, o)
  5502. }
  5503. function Ea(e, t, n) {
  5504. for (var r = e.dom(), o = B(n) ? n : $(!1); r.parentNode; ) {
  5505. r = r.parentNode;
  5506. var i = it.fromDom(r);
  5507. if (t(i))
  5508. return R.some(i);
  5509. if (o(i))
  5510. break
  5511. }
  5512. return R.none()
  5513. }
  5514. function Na(e, t, n) {
  5515. return za(function(e, t) {
  5516. return t(e)
  5517. }, Ea, e, t, n)
  5518. }
  5519. function Sa(e, t, n) {
  5520. return Ea(e, function(e) {
  5521. return me(e, t)
  5522. }, n)
  5523. }
  5524. function ka(e, t) {
  5525. return function(e, t) {
  5526. var n = t === undefined ? j.document : t.dom();
  5527. return ge(n) ? R.none() : R.from(n.querySelector(e)).map(it.fromDom)
  5528. }(t, e)
  5529. }
  5530. function Ta(e, t, n) {
  5531. return za(me, Sa, e, t, n)
  5532. }
  5533. function Aa(r, e) {
  5534. function t(e, t) {
  5535. return function(e, t) {
  5536. var n = e.dom();
  5537. return !(!n || !n.hasAttribute) && n.hasAttribute(t)
  5538. }(e, t) ? R.some(Xe(e, t)) : R.none()
  5539. }
  5540. var n = r.selection.getRng()
  5541. , o = it.fromDom(n.startContainer)
  5542. , i = it.fromDom(r.getBody())
  5543. , a = e.fold(function() {
  5544. return "." + cu()
  5545. }, function(e) {
  5546. return "[" + su() + '="' + e + '"]'
  5547. })
  5548. , u = Ne(o, n.startOffset).getOr(o);
  5549. return Ta(u, a, function(e) {
  5550. return pe(e, i)
  5551. }).bind(function(e) {
  5552. return t(e, "" + lu()).bind(function(n) {
  5553. return t(e, "" + su()).map(function(e) {
  5554. var t = fu(r, n);
  5555. return {
  5556. uid: n,
  5557. name: e,
  5558. elements: t
  5559. }
  5560. })
  5561. })
  5562. })
  5563. }
  5564. function Ma(n, e) {
  5565. function a(e, t) {
  5566. r(e, function(e) {
  5567. return t(e),
  5568. e
  5569. })
  5570. }
  5571. var o = at({})
  5572. , r = function(e, t) {
  5573. var n = o.get()
  5574. , r = t(n.hasOwnProperty(e) ? n[e] : {
  5575. listeners: [],
  5576. previous: at(R.none())
  5577. });
  5578. n[e] = r,
  5579. o.set(n)
  5580. }
  5581. , t = da(function() {
  5582. var e = o.get()
  5583. , t = function(e, t) {
  5584. var n = L.call(e, 0);
  5585. return n.sort(t),
  5586. n
  5587. }(Z(e));
  5588. F(t, function(e) {
  5589. r(e, function(o) {
  5590. var i = o.previous.get();
  5591. return Aa(n, R.some(e)).fold(function() {
  5592. i.isSome() && (function(t) {
  5593. a(t, function(e) {
  5594. F(e.listeners, function(e) {
  5595. return e(!1, t)
  5596. })
  5597. })
  5598. }(e),
  5599. o.previous.set(R.none()))
  5600. }, function(e) {
  5601. var t = e.uid
  5602. , n = e.name
  5603. , r = e.elements;
  5604. i.is(t) || (function(t, n, r) {
  5605. a(t, function(e) {
  5606. F(e.listeners, function(e) {
  5607. return e(!0, t, {
  5608. uid: n,
  5609. nodes: X(r, function(e) {
  5610. return e.dom()
  5611. })
  5612. })
  5613. })
  5614. })
  5615. }(n, t, r),
  5616. o.previous.set(R.some(t)))
  5617. }),
  5618. {
  5619. previous: o.previous,
  5620. listeners: o.listeners
  5621. }
  5622. })
  5623. })
  5624. }, 30);
  5625. return n.on("remove", function() {
  5626. t.cancel()
  5627. }),
  5628. n.on("NodeChange", function() {
  5629. t.throttle()
  5630. }),
  5631. {
  5632. addListener: function(e, t) {
  5633. r(e, function(e) {
  5634. return {
  5635. previous: e.previous,
  5636. listeners: e.listeners.concat([t])
  5637. }
  5638. })
  5639. }
  5640. }
  5641. }
  5642. function Ra(e, n) {
  5643. e.on("init", function() {
  5644. e.serializer.addNodeFilter("span", function(e) {
  5645. F(e, function(t) {
  5646. (function(e) {
  5647. return R.from(e.attr(su())).bind(n.lookup)
  5648. }
  5649. )(t).each(function(e) {
  5650. !1 === e.persistent && t.unwrap()
  5651. })
  5652. })
  5653. })
  5654. })
  5655. }
  5656. function _a(e, t) {
  5657. var n = ve(e).dom()
  5658. , r = it.fromDom(n.createDocumentFragment())
  5659. , o = function(e, t) {
  5660. var n = (t || j.document).createElement("div");
  5661. return n.innerHTML = e,
  5662. Ee(it.fromDom(n))
  5663. }(t, n);
  5664. Re(r, o),
  5665. _e(e),
  5666. Ht(e, r)
  5667. }
  5668. function Da(e, t) {
  5669. return it.fromDom(e.dom().cloneNode(t))
  5670. }
  5671. function Oa(e) {
  5672. return Da(e, !1)
  5673. }
  5674. function Ha(e) {
  5675. return Da(e, !0)
  5676. }
  5677. function Ba(e) {
  5678. return pu(e) && (e = e.parentNode),
  5679. gu(e) && e.hasAttribute("data-mce-caret")
  5680. }
  5681. function Pa(e) {
  5682. return pu(e) && mu.isZwsp(e.data)
  5683. }
  5684. function La(e) {
  5685. return Ba(e) || Pa(e)
  5686. }
  5687. function Va(e) {
  5688. return e.firstChild !== e.lastChild || !Qt.isBr(e.firstChild)
  5689. }
  5690. function Ia(e) {
  5691. var t = e.container();
  5692. return !(!e || !Qt.isText(t)) && (t.data.charAt(e.offset()) === mu.ZWSP || e.isAtStart() && Pa(t.previousSibling))
  5693. }
  5694. function Fa(e) {
  5695. var t = e.container();
  5696. return !(!e || !Qt.isText(t)) && (t.data.charAt(e.offset() - 1) === mu.ZWSP || e.isAtEnd() && Pa(t.nextSibling))
  5697. }
  5698. function Ua(e, t, n) {
  5699. var r, o;
  5700. return (r = t.ownerDocument.createElement(e)).setAttribute("data-mce-caret", n ? "before" : "after"),
  5701. r.setAttribute("data-mce-bogus", "all"),
  5702. r.appendChild(function() {
  5703. var e = j.document.createElement("br");
  5704. return e.setAttribute("data-mce-bogus", "1"),
  5705. e
  5706. }()),
  5707. o = t.parentNode,
  5708. n ? o.insertBefore(r, t) : t.nextSibling ? o.insertBefore(r, t.nextSibling) : o.appendChild(r),
  5709. r
  5710. }
  5711. function ja(e) {
  5712. return e && e.hasAttribute("data-mce-caret") ? (function(e) {
  5713. var t = e.getElementsByTagName("br")
  5714. , n = t[t.length - 1];
  5715. Qt.isBogus(n) && n.parentNode.removeChild(n)
  5716. }(e),
  5717. e.removeAttribute("data-mce-caret"),
  5718. e.removeAttribute("data-mce-bogus"),
  5719. e.removeAttribute("style"),
  5720. e.removeAttribute("_moz_abspos"),
  5721. e) : null
  5722. }
  5723. function qa(e) {
  5724. return !Su(e) && (xu(e) ? !zu(e.parentNode) : Eu(e) || wu(e) || Nu(e) || ku(e))
  5725. }
  5726. function $a(e, t) {
  5727. return qa(e) && function(e, t) {
  5728. for (e = e.parentNode; e && e !== t; e = e.parentNode) {
  5729. if (ku(e))
  5730. return !1;
  5731. if (bu(e))
  5732. return !0
  5733. }
  5734. return !0
  5735. }(e, t)
  5736. }
  5737. function Wa(e) {
  5738. return e ? {
  5739. left: Tu(e.left),
  5740. top: Tu(e.top),
  5741. bottom: Tu(e.bottom),
  5742. right: Tu(e.right),
  5743. width: Tu(e.width),
  5744. height: Tu(e.height)
  5745. } : {
  5746. left: 0,
  5747. top: 0,
  5748. bottom: 0,
  5749. right: 0,
  5750. width: 0,
  5751. height: 0
  5752. }
  5753. }
  5754. function Ka(e, t) {
  5755. return e = Wa(e),
  5756. t || (e.left = e.left + e.width),
  5757. e.right = e.left,
  5758. e.width = 0,
  5759. e
  5760. }
  5761. function Xa(e, t, n) {
  5762. return 0 <= e && e <= Math.min(t.height, n.height) / 2
  5763. }
  5764. function Ya(e, t) {
  5765. return e.bottom - e.height / 2 < t.top || !(e.top > t.bottom) && Xa(t.top - e.bottom, e, t)
  5766. }
  5767. function Ga(e, t) {
  5768. return e.top > t.bottom || !(e.bottom < t.top) && Xa(t.bottom - e.top, e, t)
  5769. }
  5770. function Za(e, t, n) {
  5771. return t >= e.left && t <= e.right && n >= e.top && n <= e.bottom
  5772. }
  5773. function Ja(e) {
  5774. var t = e.startContainer
  5775. , n = e.startOffset;
  5776. return t.hasChildNodes() && e.endOffset === n + 1 ? t.childNodes[n] : null
  5777. }
  5778. function Qa(e, t) {
  5779. return 1 === e.nodeType && e.hasChildNodes() && (t >= e.childNodes.length && (t = e.childNodes.length - 1),
  5780. e = e.childNodes[t]),
  5781. e
  5782. }
  5783. function eu(e) {
  5784. return "string" == typeof e && 768 <= e.charCodeAt(0) && Au.test(e)
  5785. }
  5786. function tu(e, t, n) {
  5787. return e.isSome() && t.isSome() ? R.some(n(e.getOrDie(), t.getOrDie())) : R.none()
  5788. }
  5789. function nu(e) {
  5790. return e && /[\r\n\t ]/.test(e)
  5791. }
  5792. function ru(e) {
  5793. return !!e.setStart && !!e.setEnd
  5794. }
  5795. function ou(e) {
  5796. var t, n = e.startContainer, r = e.startOffset;
  5797. return !!(nu(e.toString()) && Lu(n.parentNode) && Qt.isText(n) && (t = n.data,
  5798. nu(t[r - 1]) || nu(t[r + 1])))
  5799. }
  5800. function iu(e) {
  5801. return 0 === e.left && 0 === e.right && 0 === e.top && 0 === e.bottom
  5802. }
  5803. function au(e, t) {
  5804. var n = Ka(e, t);
  5805. return n.width = 1,
  5806. n.right = n.left + 1,
  5807. n
  5808. }
  5809. var uu, cu = $("mce-annotation"), su = $("data-mce-annotation"), lu = $("data-mce-annotation-uid"), fu = function(e, t) {
  5810. var n = it.fromDom(e.getBody());
  5811. return Ca(n, "[" + lu() + '="' + t + '"]')
  5812. }, du = 0, hu = jr, mu = {
  5813. isZwsp: function(e) {
  5814. return e === hu
  5815. },
  5816. ZWSP: hu,
  5817. trim: function(e) {
  5818. return e.replace(new RegExp(hu,"g"), "")
  5819. }
  5820. }, gu = Qt.isElement, pu = Qt.isText, vu = function(e) {
  5821. return pu(e) && e.data[0] === mu.ZWSP
  5822. }, yu = function(e) {
  5823. return pu(e) && e.data[e.data.length - 1] === mu.ZWSP
  5824. }, bu = Qt.isContentEditableTrue, Cu = Qt.isContentEditableFalse, wu = Qt.isBr, xu = Qt.isText, zu = Qt.matchNodeNames(["script", "style", "textarea"]), Eu = Qt.matchNodeNames(["img", "input", "textarea", "hr", "iframe", "video", "audio", "object"]), Nu = Qt.matchNodeNames(["table"]), Su = La, ku = function(e) {
  5825. return !1 === function(e) {
  5826. return Qt.isElement(e) && "true" === e.getAttribute("unselectable")
  5827. }(e) && Cu(e)
  5828. }, Tu = Math.round, Au = 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]"), Mu = [].slice, Ru = function() {
  5829. for (var e = [], t = 0; t < arguments.length; t++)
  5830. e[t] = arguments[t];
  5831. var n = Mu.call(arguments);
  5832. return function(e) {
  5833. for (var t = 0; t < n.length; t++)
  5834. if (!n[t](e))
  5835. return !1;
  5836. return !0
  5837. }
  5838. }, _u = function() {
  5839. for (var e = [], t = 0; t < arguments.length; t++)
  5840. e[t] = arguments[t];
  5841. var n = Mu.call(arguments);
  5842. return function(e) {
  5843. for (var t = 0; t < n.length; t++)
  5844. if (n[t](e))
  5845. return !0;
  5846. return !1
  5847. }
  5848. }, Du = Qt.isElement, Ou = qa, Hu = Qt.matchStyleValues("display", "block table"), Bu = Qt.matchStyleValues("float", "left right"), Pu = Ru(Du, Ou, c(Bu)), Lu = c(Qt.matchStyleValues("white-space", "pre pre-line pre-wrap")), Vu = Qt.isText, Iu = Qt.isBr, Fu = Qi.nodeIndex, Uu = Qa, ju = function(e) {
  5849. return "createRange"in e ? e.createRange() : Qi.DOM.createRng()
  5850. }, qu = function(e) {
  5851. var t, n;
  5852. return t = 0 < (n = e.getClientRects()).length ? Wa(n[0]) : Wa(e.getBoundingClientRect()),
  5853. !ru(e) && Iu(e) && iu(t) ? function(e) {
  5854. var t, n = e.ownerDocument, r = ju(n), o = n.createTextNode(qr), i = e.parentNode;
  5855. return i.insertBefore(o, e),
  5856. r.setStart(o, 0),
  5857. r.setEnd(o, 1),
  5858. t = Wa(r.getBoundingClientRect()),
  5859. i.removeChild(o),
  5860. t
  5861. }(e) : iu(t) && ru(e) ? function(e) {
  5862. var t = e.startContainer
  5863. , n = e.endContainer
  5864. , r = e.startOffset
  5865. , o = e.endOffset;
  5866. if (t === n && Qt.isText(n) && 0 === r && 1 === o) {
  5867. var i = e.cloneRange();
  5868. return i.setEndAfter(n),
  5869. qu(i)
  5870. }
  5871. return null
  5872. }(e) : t
  5873. }, $u = function(e) {
  5874. function r(e) {
  5875. 0 !== e.height && (0 < i.length && function(e, t) {
  5876. return e.left === t.left && e.top === t.top && e.bottom === t.bottom && e.right === t.right
  5877. }(e, i[i.length - 1]) || i.push(e))
  5878. }
  5879. function t(e, t) {
  5880. var n = ju(e.ownerDocument);
  5881. if (t < e.data.length) {
  5882. if (eu(e.data[t]))
  5883. return i;
  5884. if (eu(e.data[t - 1]) && (n.setStart(e, t),
  5885. n.setEnd(e, t + 1),
  5886. !ou(n)))
  5887. return r(au(qu(n), !1)),
  5888. i
  5889. }
  5890. 0 < t && (n.setStart(e, t - 1),
  5891. n.setEnd(e, t),
  5892. ou(n) || r(au(qu(n), !1))),
  5893. t < e.data.length && (n.setStart(e, t),
  5894. n.setEnd(e, t + 1),
  5895. ou(n) || r(au(qu(n), !0)))
  5896. }
  5897. var n, o, i = [];
  5898. if (Vu(e.container()))
  5899. return t(e.container(), e.offset()),
  5900. i;
  5901. if (Du(e.container()))
  5902. if (e.isAtEnd())
  5903. o = Uu(e.container(), e.offset()),
  5904. Vu(o) && t(o, o.data.length),
  5905. Pu(o) && !Iu(o) && r(au(qu(o), !1));
  5906. else {
  5907. if (o = Uu(e.container(), e.offset()),
  5908. Vu(o) && t(o, 0),
  5909. Pu(o) && e.isAtEnd())
  5910. return r(au(qu(o), !1)),
  5911. i;
  5912. n = Uu(e.container(), e.offset() - 1),
  5913. Pu(n) && !Iu(n) && (!Hu(n) && !Hu(o) && Pu(o) || r(au(qu(n), !1))),
  5914. Pu(o) && r(au(qu(o), !0))
  5915. }
  5916. return i
  5917. };
  5918. function Wu(t, n, e) {
  5919. function r() {
  5920. return e = e || $u(Wu(t, n))
  5921. }
  5922. return {
  5923. container: $(t),
  5924. offset: $(n),
  5925. toRange: function() {
  5926. var e;
  5927. return (e = ju(t.ownerDocument)).setStart(t, n),
  5928. e.setEnd(t, n),
  5929. e
  5930. },
  5931. getClientRects: r,
  5932. isVisible: function() {
  5933. return 0 < r().length
  5934. },
  5935. isAtStart: function() {
  5936. return Vu(t),
  5937. 0 === n
  5938. },
  5939. isAtEnd: function() {
  5940. return Vu(t) ? n >= t.data.length : n >= t.childNodes.length
  5941. },
  5942. isEqual: function(e) {
  5943. return e && t === e.container() && n === e.offset()
  5944. },
  5945. getNode: function(e) {
  5946. return Uu(t, e ? n - 1 : n)
  5947. }
  5948. }
  5949. }
  5950. (uu = Wu = Wu || {}).fromRangeStart = function(e) {
  5951. return uu(e.startContainer, e.startOffset)
  5952. }
  5953. ,
  5954. uu.fromRangeEnd = function(e) {
  5955. return uu(e.endContainer, e.endOffset)
  5956. }
  5957. ,
  5958. uu.after = function(e) {
  5959. return uu(e.parentNode, Fu(e) + 1)
  5960. }
  5961. ,
  5962. uu.before = function(e) {
  5963. return uu(e.parentNode, Fu(e))
  5964. }
  5965. ,
  5966. uu.isAbove = function(e, t) {
  5967. return tu(z(t.getClientRects()), E(e.getClientRects()), Ya).getOr(!1)
  5968. }
  5969. ,
  5970. uu.isBelow = function(e, t) {
  5971. return tu(E(t.getClientRects()), z(e.getClientRects()), Ga).getOr(!1)
  5972. }
  5973. ,
  5974. uu.isAtStart = function(e) {
  5975. return !!e && e.isAtStart()
  5976. }
  5977. ,
  5978. uu.isAtEnd = function(e) {
  5979. return !!e && e.isAtEnd()
  5980. }
  5981. ,
  5982. uu.isTextPosition = function(e) {
  5983. return !!e && Qt.isText(e.container())
  5984. }
  5985. ,
  5986. uu.isElementPosition = function(e) {
  5987. return !1 === uu.isTextPosition(e)
  5988. }
  5989. ;
  5990. function Ku(t) {
  5991. return function(e) {
  5992. return t === e
  5993. }
  5994. }
  5995. function Xu(e) {
  5996. return (Ic(e) ? "text()" : e.nodeName.toLowerCase()) + "[" + function(e) {
  5997. var r, t, n;
  5998. return r = qc(jc(e)),
  5999. t = Xn.findIndex(r, Ku(e), e),
  6000. r = r.slice(0, t + 1),
  6001. n = Xn.reduce(r, function(e, t, n) {
  6002. return Ic(t) && Ic(r[n - 1]) && e++,
  6003. e
  6004. }, 0),
  6005. r = Xn.filter(r, Qt.matchNodeNames([e.nodeName])),
  6006. (t = Xn.findIndex(r, Ku(e), e)) - n
  6007. }(e) + "]"
  6008. }
  6009. function Yu(e, t) {
  6010. var n, r, o, i, a, u = [];
  6011. return n = t.container(),
  6012. r = t.offset(),
  6013. Ic(n) ? o = function(e, t) {
  6014. for (; (e = e.previousSibling) && Ic(e); )
  6015. t += e.data.length;
  6016. return t
  6017. }(n, r) : (r >= (i = n.childNodes).length ? (o = "after",
  6018. r = i.length - 1) : o = "before",
  6019. n = i[r]),
  6020. u.push(Xu(n)),
  6021. a = function(e, t, n) {
  6022. var r = [];
  6023. for (t = t.parentNode; t !== e && (!n || !n(t)); t = t.parentNode)
  6024. r.push(t);
  6025. return r
  6026. }(e, n),
  6027. a = Xn.filter(a, c(Qt.isBogus)),
  6028. (u = u.concat(Xn.map(a, function(e) {
  6029. return Xu(e)
  6030. }))).reverse().join("/") + "," + o
  6031. }
  6032. function Gu(e, t) {
  6033. var n, r, o;
  6034. return t ? (t = (n = t.split(","))[0].split("/"),
  6035. o = 1 < n.length ? n[1] : "before",
  6036. (r = Xn.reduce(t, function(e, t) {
  6037. return (t = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(t)) ? ("text()" === t[1] && (t[1] = "#text"),
  6038. function(e, t, n) {
  6039. var r = qc(e);
  6040. return r = Xn.filter(r, function(e, t) {
  6041. return !Ic(e) || !Ic(r[t - 1])
  6042. }),
  6043. (r = Xn.filter(r, Qt.matchNodeNames([t])))[n]
  6044. }(e, t[1], parseInt(t[2], 10))) : null
  6045. }, e)) ? Ic(r) ? function(e, t) {
  6046. for (var n, r = e, o = 0; Ic(r); ) {
  6047. if (n = r.data.length,
  6048. o <= t && t <= o + n) {
  6049. e = r,
  6050. t -= o;
  6051. break
  6052. }
  6053. if (!Ic(r.nextSibling)) {
  6054. e = r,
  6055. t = n;
  6056. break
  6057. }
  6058. o += n,
  6059. r = r.nextSibling
  6060. }
  6061. return Ic(e) && t > e.data.length && (t = e.data.length),
  6062. Vc(e, t)
  6063. }(r, parseInt(o, 10)) : (o = "after" === o ? Uc(r) + 1 : Uc(r),
  6064. Vc(r.parentNode, o)) : null) : null
  6065. }
  6066. function Zu(e, t) {
  6067. Qt.isText(t) && 0 === t.data.length && e.remove(t)
  6068. }
  6069. function Ju(e, t, n) {
  6070. Qt.isDocumentFragment(n) ? function(t, e, n) {
  6071. var r = R.from(n.firstChild)
  6072. , o = R.from(n.lastChild);
  6073. e.insertNode(n),
  6074. r.each(function(e) {
  6075. return Zu(t, e.previousSibling)
  6076. }),
  6077. o.each(function(e) {
  6078. return Zu(t, e.nextSibling)
  6079. })
  6080. }(e, t, n) : function(e, t, n) {
  6081. t.insertNode(n),
  6082. Zu(e, n.previousSibling),
  6083. Zu(e, n.nextSibling)
  6084. }(e, t, n)
  6085. }
  6086. function Qu(e, t, n, r, o) {
  6087. var i, a = r[o ? "startContainer" : "endContainer"], u = r[o ? "startOffset" : "endOffset"], c = [], s = 0, l = e.getRoot();
  6088. for (Qt.isText(a) ? c.push(n ? function(e, t, n) {
  6089. var r, o;
  6090. for (o = e(t.data.slice(0, n)).length,
  6091. r = t.previousSibling; r && Qt.isText(r); r = r.previousSibling)
  6092. o += e(r.data).length;
  6093. return o
  6094. }(t, a, u) : u) : (u >= (i = a.childNodes).length && i.length && (s = 1,
  6095. u = Math.max(0, i.length - 1)),
  6096. c.push(e.nodeIndex(i[u], n) + s)); a && a !== l; a = a.parentNode)
  6097. c.push(e.nodeIndex(a, n));
  6098. return c
  6099. }
  6100. function ec(e, t, n) {
  6101. var r = 0;
  6102. return Zn.each(e.select(t), function(e) {
  6103. if ("all" !== e.getAttribute("data-mce-bogus"))
  6104. return e !== n && void r++
  6105. }),
  6106. r
  6107. }
  6108. function tc(e, t) {
  6109. var n, r, o, i = t ? "start" : "end";
  6110. n = e[i + "Container"],
  6111. r = e[i + "Offset"],
  6112. Qt.isElement(n) && "TR" === n.nodeName && (n = (o = n.childNodes)[Math.min(t ? r : r - 1, o.length - 1)]) && (r = t ? 0 : n.childNodes.length,
  6113. e["set" + (t ? "Start" : "End")](n, r))
  6114. }
  6115. function nc(e) {
  6116. return tc(e, !0),
  6117. tc(e, !1),
  6118. e
  6119. }
  6120. function rc(e, t) {
  6121. var n;
  6122. if (Qt.isElement(e) && (e = Qa(e, t),
  6123. $c(e)))
  6124. return e;
  6125. if (La(e)) {
  6126. if (Qt.isText(e) && Ba(e) && (e = e.parentNode),
  6127. n = e.previousSibling,
  6128. $c(n))
  6129. return n;
  6130. if (n = e.nextSibling,
  6131. $c(n))
  6132. return n
  6133. }
  6134. }
  6135. function oc(e, t, n) {
  6136. var r = n.getNode()
  6137. , o = r ? r.nodeName : null
  6138. , i = n.getRng();
  6139. if ($c(r) || "IMG" === o)
  6140. return {
  6141. name: o,
  6142. index: ec(n.dom, o, r)
  6143. };
  6144. var a = function(e) {
  6145. return rc(e.startContainer, e.startOffset) || rc(e.endContainer, e.endOffset)
  6146. }(i);
  6147. return a ? {
  6148. name: o = a.tagName,
  6149. index: ec(n.dom, o, a)
  6150. } : function(e, t, n, r) {
  6151. var o = t.dom
  6152. , i = {};
  6153. return i.start = Qu(o, e, n, r, !0),
  6154. t.isCollapsed() || (i.end = Qu(o, e, n, r, !1)),
  6155. i
  6156. }(e, n, t, i)
  6157. }
  6158. function ic(e, t, n) {
  6159. var r = {
  6160. "data-mce-type": "bookmark",
  6161. id: t,
  6162. style: "overflow:hidden;line-height:0px"
  6163. };
  6164. return n ? e.create("span", r, "&#xFEFF;") : e.create("span", r)
  6165. }
  6166. function ac(e, t) {
  6167. var n = e.dom
  6168. , r = e.getRng()
  6169. , o = n.uniqueId()
  6170. , i = e.isCollapsed()
  6171. , a = e.getNode()
  6172. , u = a.nodeName;
  6173. if ("IMG" === u)
  6174. return {
  6175. name: u,
  6176. index: ec(n, u, a)
  6177. };
  6178. var c = nc(r.cloneRange());
  6179. if (!i) {
  6180. c.collapse(!1);
  6181. var s = ic(n, o + "_end", t);
  6182. Ju(n, c, s)
  6183. }
  6184. (r = nc(r)).collapse(!0);
  6185. var l = ic(n, o + "_start", t);
  6186. return Ju(n, r, l),
  6187. e.moveToBookmark({
  6188. id: o,
  6189. keep: 1
  6190. }),
  6191. {
  6192. id: o
  6193. }
  6194. }
  6195. function uc(e, t, n) {
  6196. function r(e) {
  6197. for (var t; (t = o[e]()) && !Qt.isText(t) && !n(t); )
  6198. ;
  6199. return R.from(t).filter(Qt.isText)
  6200. }
  6201. void 0 === n && (n = s);
  6202. var o = new Fi(e,t);
  6203. return {
  6204. current: function() {
  6205. return R.from(o.current()).filter(Qt.isText)
  6206. },
  6207. next: function() {
  6208. return r("next")
  6209. },
  6210. prev: function() {
  6211. return r("prev")
  6212. },
  6213. prev2: function() {
  6214. return r("prev2")
  6215. }
  6216. }
  6217. }
  6218. function cc(t, e) {
  6219. var i = e || function(e) {
  6220. return t.isBlock(e) || Qt.isBr(e) || Qt.isContentEditableFalse(e)
  6221. }
  6222. , a = function(e, t, n, r) {
  6223. if (Qt.isText(e)) {
  6224. var o = r(e, t, e.data);
  6225. if (-1 !== o)
  6226. return R.some({
  6227. container: e,
  6228. offset: o
  6229. })
  6230. }
  6231. return n().bind(function(e) {
  6232. return a(e.container, e.offset, n, r)
  6233. })
  6234. };
  6235. return {
  6236. backwards: function(e, t, n, r) {
  6237. var o = uc(e, r, i);
  6238. return a(e, t, function() {
  6239. return o.prev().map(function(e) {
  6240. return {
  6241. container: e,
  6242. offset: e.length
  6243. }
  6244. })
  6245. }, n).getOrNull()
  6246. },
  6247. forwards: function(e, t, n, r) {
  6248. var o = uc(e, r, i);
  6249. return a(e, t, function() {
  6250. return o.next().map(function(e) {
  6251. return {
  6252. container: e,
  6253. offset: 0
  6254. }
  6255. })
  6256. }, n).getOrNull()
  6257. }
  6258. }
  6259. }
  6260. function sc(e) {
  6261. return Qt.isElement(e) && e.id === Kc
  6262. }
  6263. function lc(e, t) {
  6264. for (; t && t !== e; ) {
  6265. if (t.id === Kc)
  6266. return t;
  6267. t = t.parentNode
  6268. }
  6269. return null
  6270. }
  6271. function fc(e) {
  6272. var t = e.parentNode;
  6273. t && t.removeChild(e)
  6274. }
  6275. function dc(e, t) {
  6276. 0 === t.length ? fc(e) : e.nodeValue = t
  6277. }
  6278. function hc(e) {
  6279. var t = mu.trim(e);
  6280. return {
  6281. count: e.length - t.length,
  6282. text: t
  6283. }
  6284. }
  6285. function mc(e, t) {
  6286. return Gc(e),
  6287. t
  6288. }
  6289. function gc(e, t) {
  6290. var n = t.container()
  6291. , r = function(e, t) {
  6292. var n = f(e, t);
  6293. return -1 === n ? R.none() : R.some(n)
  6294. }(G(n.childNodes), e).map(function(e) {
  6295. return e < t.offset() ? Vc(n, t.offset() - 1) : t
  6296. }).getOr(t);
  6297. return Gc(e),
  6298. r
  6299. }
  6300. function pc(e, t) {
  6301. return Yc(e) && t.container() === e ? function(e, t) {
  6302. var n = hc(e.data.substr(0, t.offset()))
  6303. , r = hc(e.data.substr(t.offset()))
  6304. , o = n.text + r.text;
  6305. return 0 < o.length ? (dc(e, o),
  6306. Vc(e, t.offset() - n.count)) : t
  6307. }(e, t) : mc(e, t)
  6308. }
  6309. function vc(e, t, n) {
  6310. var r = e.getParam(t, n);
  6311. if (-1 === r.indexOf("="))
  6312. return r;
  6313. var o = e.getParam(t, "", "hash");
  6314. return o.hasOwnProperty(e.id) ? o[e.id] : n
  6315. }
  6316. function yc(e, t, n) {
  6317. var r, o, i, a, u, c = Ka(t.getBoundingClientRect(), n);
  6318. return i = "BODY" === e.tagName ? (r = e.ownerDocument.documentElement,
  6319. o = e.scrollLeft || r.scrollLeft,
  6320. e.scrollTop || r.scrollTop) : (u = e.getBoundingClientRect(),
  6321. o = e.scrollLeft - u.left,
  6322. e.scrollTop - u.top),
  6323. c.left += o,
  6324. c.right += o,
  6325. c.top += i,
  6326. c.bottom += i,
  6327. c.width = 1,
  6328. 0 < (a = t.offsetWidth - t.clientWidth) && (n && (a *= -1),
  6329. c.left += a,
  6330. c.right += a),
  6331. c
  6332. }
  6333. function bc(e, i, a, t) {
  6334. var n, u, c = at(R.none()), r = as(e), s = 0 < r.length ? r : "p", l = function() {
  6335. !function(e) {
  6336. var t, n, r, o, i;
  6337. for (t = Ii("*[contentEditable=false]", e),
  6338. o = 0; o < t.length; o++)
  6339. r = (n = t[o]).previousSibling,
  6340. yu(r) && (1 === (i = r.data).length ? r.parentNode.removeChild(r) : r.deleteData(i.length - 1, 1)),
  6341. r = n.nextSibling,
  6342. vu(r) && (1 === (i = r.data).length ? r.parentNode.removeChild(r) : r.deleteData(0, 1))
  6343. }(i),
  6344. u && (Zc.remove(u),
  6345. u = null),
  6346. c.get().each(function(e) {
  6347. Ii(e.caret).remove(),
  6348. c.set(R.none())
  6349. }),
  6350. Pn.clearInterval(n)
  6351. }, f = function() {
  6352. n = Pn.setInterval(function() {
  6353. t() ? Ii("div.mce-visual-caret", i).toggleClass("mce-visual-caret-hidden") : Ii("div.mce-visual-caret", i).addClass("mce-visual-caret-hidden")
  6354. }, 500)
  6355. };
  6356. return {
  6357. show: function(t, e) {
  6358. var n, r;
  6359. if (l(),
  6360. function(e) {
  6361. return Qt.isElement(e) && /^(TD|TH)$/i.test(e.tagName)
  6362. }(e))
  6363. return null;
  6364. if (!a(e))
  6365. return u = function(e, t) {
  6366. var n, r, o;
  6367. if (r = e.ownerDocument.createTextNode(mu.ZWSP),
  6368. o = e.parentNode,
  6369. t) {
  6370. if (n = e.previousSibling,
  6371. pu(n)) {
  6372. if (La(n))
  6373. return n;
  6374. if (yu(n))
  6375. return n.splitText(n.data.length - 1)
  6376. }
  6377. o.insertBefore(r, e)
  6378. } else {
  6379. if (n = e.nextSibling,
  6380. pu(n)) {
  6381. if (La(n))
  6382. return n;
  6383. if (vu(n))
  6384. return n.splitText(1),
  6385. n
  6386. }
  6387. e.nextSibling ? o.insertBefore(r, e.nextSibling) : o.appendChild(r)
  6388. }
  6389. return r
  6390. }(e, t),
  6391. r = e.ownerDocument.createRange(),
  6392. Ps(u.nextSibling) ? (r.setStart(u, 0),
  6393. r.setEnd(u, 0)) : (r.setStart(u, 1),
  6394. r.setEnd(u, 1)),
  6395. r;
  6396. u = Ua(s, e, t),
  6397. n = yc(i, e, t),
  6398. Ii(u).css("top", n.top);
  6399. var o = Ii('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(i)[0];
  6400. return c.set(R.some({
  6401. caret: o,
  6402. element: e,
  6403. before: t
  6404. })),
  6405. c.get().each(function(e) {
  6406. t && Ii(e.caret).addClass("mce-visual-caret-before")
  6407. }),
  6408. f(),
  6409. (r = e.ownerDocument.createRange()).setStart(u, 0),
  6410. r.setEnd(u, 0),
  6411. r
  6412. },
  6413. hide: l,
  6414. getCss: function() {
  6415. 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;}"
  6416. },
  6417. reposition: function() {
  6418. c.get().each(function(e) {
  6419. var t = yc(i, e.element, e.before);
  6420. Ii(e.caret).css(te({}, t))
  6421. })
  6422. },
  6423. destroy: function() {
  6424. return Pn.clearInterval(n)
  6425. }
  6426. }
  6427. }
  6428. function Cc() {
  6429. return Bs.isIE() || Bs.isEdge() || Bs.isFirefox()
  6430. }
  6431. function wc(e) {
  6432. return Ps(e) || Qt.isTable(e) && Cc()
  6433. }
  6434. function xc(e) {
  6435. return 0 < e
  6436. }
  6437. function zc(e) {
  6438. return e < 0
  6439. }
  6440. function Ec(e, t) {
  6441. for (var n; n = e(t); )
  6442. if (!Fs(n))
  6443. return n;
  6444. return null
  6445. }
  6446. function Nc(e, t, n, r, o) {
  6447. var i = new Fi(e,r);
  6448. if (zc(t)) {
  6449. if ((Ls(e) || Fs(e)) && n(e = Ec(i.prev, !0)))
  6450. return e;
  6451. for (; e = Ec(i.prev, o); )
  6452. if (n(e))
  6453. return e
  6454. }
  6455. if (xc(t)) {
  6456. if ((Ls(e) || Fs(e)) && n(e = Ec(i.next, !0)))
  6457. return e;
  6458. for (; e = Ec(i.next, o); )
  6459. if (n(e))
  6460. return e
  6461. }
  6462. return null
  6463. }
  6464. function Sc(e, t) {
  6465. for (; e && e !== t; ) {
  6466. if (Vs(e))
  6467. return e;
  6468. e = e.parentNode
  6469. }
  6470. return null
  6471. }
  6472. function kc(e, t, n) {
  6473. return Sc(e.container(), n) === Sc(t.container(), n)
  6474. }
  6475. function Tc(e, t) {
  6476. var n, r;
  6477. return t ? (n = t.container(),
  6478. r = t.offset(),
  6479. Us(n) ? n.childNodes[r + e] : null) : null
  6480. }
  6481. function Ac(e, t) {
  6482. var n = t.ownerDocument.createRange();
  6483. return e ? (n.setStartBefore(t),
  6484. n.setEndBefore(t)) : (n.setStartAfter(t),
  6485. n.setEndAfter(t)),
  6486. n
  6487. }
  6488. function Mc(e, t, n) {
  6489. var r, o, i, a;
  6490. for (o = e ? "previousSibling" : "nextSibling"; n && n !== t; ) {
  6491. if (r = n[o],
  6492. Is(r) && (r = r[o]),
  6493. Ls(r)) {
  6494. if (a = n,
  6495. Sc(r, i = t) === Sc(a, i))
  6496. return r;
  6497. break
  6498. }
  6499. if (js(r))
  6500. break;
  6501. n = n.parentNode
  6502. }
  6503. return null
  6504. }
  6505. function Rc(e, t, n) {
  6506. var r, o, i, a, u = d(Mc, !0, t), c = d(Mc, !1, t);
  6507. if (o = n.startContainer,
  6508. i = n.startOffset,
  6509. Ba(o)) {
  6510. if (Us(o) || (o = o.parentNode),
  6511. "before" === (a = o.getAttribute("data-mce-caret")) && (r = o.nextSibling,
  6512. wc(r)))
  6513. return qs(r);
  6514. if ("after" === a && (r = o.previousSibling,
  6515. wc(r)))
  6516. return $s(r)
  6517. }
  6518. if (!n.collapsed)
  6519. return n;
  6520. if (Qt.isText(o)) {
  6521. if (Is(o)) {
  6522. if (1 === e) {
  6523. if (r = c(o))
  6524. return qs(r);
  6525. if (r = u(o))
  6526. return $s(r)
  6527. }
  6528. if (-1 === e) {
  6529. if (r = u(o))
  6530. return $s(r);
  6531. if (r = c(o))
  6532. return qs(r)
  6533. }
  6534. return n
  6535. }
  6536. if (yu(o) && i >= o.data.length - 1)
  6537. return 1 === e && (r = c(o)) ? qs(r) : n;
  6538. if (vu(o) && i <= 1)
  6539. return -1 === e && (r = u(o)) ? $s(r) : n;
  6540. if (i === o.data.length)
  6541. return (r = c(o)) ? qs(r) : n;
  6542. if (0 === i)
  6543. return (r = u(o)) ? $s(r) : n
  6544. }
  6545. return n
  6546. }
  6547. function _c(e, t) {
  6548. return R.from(Tc(e ? 0 : -1, t)).filter(Ls)
  6549. }
  6550. function Dc(e, t, n) {
  6551. var r = Rc(e, t, n);
  6552. return -1 === e ? Wu.fromRangeStart(r) : Wu.fromRangeEnd(r)
  6553. }
  6554. function Oc(e) {
  6555. return R.from(e.getNode()).map(it.fromDom)
  6556. }
  6557. function Hc(e, t) {
  6558. for (; t = e(t); )
  6559. if (t.isVisible())
  6560. return t;
  6561. return t
  6562. }
  6563. function Bc(e, t) {
  6564. var n = kc(e, t);
  6565. return !(n || !Qt.isBr(e.getNode())) || n
  6566. }
  6567. var Pc, Lc, Vc = Wu, Ic = Qt.isText, Fc = Qt.isBogus, Uc = Qi.nodeIndex, jc = function(e) {
  6568. var t = e.parentNode;
  6569. return Fc(t) ? jc(t) : t
  6570. }, qc = function(e) {
  6571. return e ? Xn.reduce(e.childNodes, function(e, t) {
  6572. return Fc(t) && "BR" !== t.nodeName ? e = e.concat(qc(t)) : e.push(t),
  6573. e
  6574. }, []) : []
  6575. }, $c = Qt.isContentEditableFalse, Wc = {
  6576. getBookmark: function(e, t, n) {
  6577. return 2 === t ? oc(mu.trim, n, e) : 3 === t ? function(e) {
  6578. var t = e.getRng();
  6579. return {
  6580. start: Yu(e.dom.getRoot(), Vc.fromRangeStart(t)),
  6581. end: Yu(e.dom.getRoot(), Vc.fromRangeEnd(t))
  6582. }
  6583. }(e) : t ? function(e) {
  6584. return {
  6585. rng: e.getRng()
  6586. }
  6587. }(e) : ac(e, !1)
  6588. },
  6589. getUndoBookmark: d(oc, W, !0),
  6590. getPersistentBookmark: ac
  6591. }, Kc = "_mce_caret", Xc = Qt.isElement, Yc = Qt.isText, Gc = function(e) {
  6592. if (Xc(e) && La(e) && (Va(e) ? e.removeAttribute("data-mce-caret") : fc(e)),
  6593. Yc(e)) {
  6594. var t = mu.trim(function(e) {
  6595. try {
  6596. return e.nodeValue
  6597. } catch (t) {
  6598. return ""
  6599. }
  6600. }(e));
  6601. dc(e, t)
  6602. }
  6603. }, Zc = {
  6604. removeAndReposition: function(e, t) {
  6605. return Vc.isTextPosition(t) ? pc(e, t) : function(e, t) {
  6606. return t.container() === e.parentNode ? gc(e, t) : mc(e, t)
  6607. }(e, t)
  6608. },
  6609. remove: Gc
  6610. }, Jc = Qi.DOM, Qc = function(e) {
  6611. return e.getParam("iframe_attrs", {})
  6612. }, es = function(e) {
  6613. return e.getParam("doctype", "<!DOCTYPE html>")
  6614. }, ts = function(e) {
  6615. return e.getParam("document_base_url", "")
  6616. }, ns = function(e) {
  6617. return vc(e, "body_id", "tinymce")
  6618. }, rs = function(e) {
  6619. return vc(e, "body_class", "")
  6620. }, os = function(e) {
  6621. return e.getParam("content_security_policy", "")
  6622. }, is = function(e) {
  6623. return e.getParam("br_in_pre", !0)
  6624. }, as = function(e) {
  6625. if (e.getParam("force_p_newlines", !1))
  6626. return "p";
  6627. var t = e.getParam("forced_root_block", "p");
  6628. return !1 === t ? "" : !0 === t ? "p" : t
  6629. }, us = function(e) {
  6630. return e.getParam("forced_root_block_attrs", {})
  6631. }, cs = function(e) {
  6632. return e.getParam("br_newline_selector", ".mce-toc h2,figcaption,caption")
  6633. }, ss = function(e) {
  6634. return e.getParam("no_newline_selector", "")
  6635. }, ls = function(e) {
  6636. return e.getParam("keep_styles", !0)
  6637. }, fs = function(e) {
  6638. return e.getParam("end_container_on_empty_block", !1)
  6639. }, ds = function(e) {
  6640. return Zn.explode(e.getParam("font_size_style_values", "xx-small,x-small,small,medium,large,x-large,xx-large"))
  6641. }, hs = function(e) {
  6642. return Zn.explode(e.getParam("font_size_classes", ""))
  6643. }, ms = function(e) {
  6644. return e.getParam("icons", "", "string")
  6645. }, gs = function(e) {
  6646. return e.getParam("icons_url", "", "string")
  6647. }, ps = function(e) {
  6648. return e.getParam("images_dataimg_filter", $(!0), "function")
  6649. }, vs = function(e) {
  6650. return e.getParam("automatic_uploads", !0, "boolean")
  6651. }, ys = function(e) {
  6652. return e.getParam("images_reuse_filename", !1, "boolean")
  6653. }, bs = function(e) {
  6654. return e.getParam("images_replace_blob_uris", !0, "boolean")
  6655. }, Cs = function(e) {
  6656. return e.getParam("images_upload_url", "", "string")
  6657. }, ws = function(e) {
  6658. return e.getParam("images_upload_base_path", "", "string")
  6659. }, xs = function(e) {
  6660. return e.getParam("images_upload_credentials", !1, "boolean")
  6661. }, zs = function(e) {
  6662. return e.getParam("images_upload_handler", null, "function")
  6663. }, Es = function(e) {
  6664. return e.getParam("content_css_cors", !1, "boolean")
  6665. }, Ns = function(e) {
  6666. return e.getParam("referrer_policy", "", "string")
  6667. }, Ss = function(e) {
  6668. return e.getParam("language", "en", "string")
  6669. }, ks = function(e) {
  6670. return e.getParam("language_url", "", "string")
  6671. }, Ts = function(e) {
  6672. return e.getParam("indent_use_margin", !1)
  6673. }, As = function(e) {
  6674. return e.getParam("indentation", "40px", "string")
  6675. }, Ms = function(e) {
  6676. var t = e.settings.content_css;
  6677. return K(t) ? X(t.split(","), ce) : D(t) ? t : !1 === t || e.inline ? [] : ["default"]
  6678. }, Rs = function(e) {
  6679. return e.getParam("directionality", sa.isRtl() ? "rtl" : undefined)
  6680. }, _s = function(e) {
  6681. return e.getParam("inline_boundaries_selector", "a[href],code,.mce-annotation", "string")
  6682. }, Ds = function(e) {
  6683. return e.getParam("object_resizing")
  6684. }, Os = function(e) {
  6685. return e.getParam("resize_img_proportional", !0, "boolean")
  6686. }, Hs = function(e) {
  6687. return e.getParam("placeholder", Jc.getAttrib(e.getElement(), "placeholder"), "string")
  6688. }, Bs = fe().browser, Ps = Qt.isContentEditableFalse, Ls = Qt.isContentEditableFalse, Vs = Qt.matchStyleValues("display", "block table table-cell table-caption list-item"), Is = La, Fs = Ba, Us = Qt.isElement, js = qa, qs = d(Ac, !0), $s = d(Ac, !1);
  6689. (Lc = Pc = Pc || {})[Lc.Backwards = -1] = "Backwards",
  6690. Lc[Lc.Forwards = 1] = "Forwards";
  6691. function Ws(e, t) {
  6692. return e.hasChildNodes() && t < e.childNodes.length ? e.childNodes[t] : null
  6693. }
  6694. function Ks(e, t) {
  6695. if (xc(e)) {
  6696. if (Ol(t.previousSibling) && !Rl(t.previousSibling))
  6697. return Vc.before(t);
  6698. if (Rl(t))
  6699. return Vc(t, 0)
  6700. }
  6701. if (zc(e)) {
  6702. if (Ol(t.nextSibling) && !Rl(t.nextSibling))
  6703. return Vc.after(t);
  6704. if (Rl(t))
  6705. return Vc(t, t.data.length)
  6706. }
  6707. return zc(e) ? Dl(t) ? Vc.before(t) : Vc.after(t) : Vc.before(t)
  6708. }
  6709. function Xs(t) {
  6710. return {
  6711. next: function(e) {
  6712. return Pl(Pc.Forwards, e, t)
  6713. },
  6714. prev: function(e) {
  6715. return Pl(Pc.Backwards, e, t)
  6716. }
  6717. }
  6718. }
  6719. function Ys(e) {
  6720. return Vc.isTextPosition(e) ? 0 === e.offset() : qa(e.getNode())
  6721. }
  6722. function Gs(e) {
  6723. if (Vc.isTextPosition(e)) {
  6724. var t = e.container();
  6725. return e.offset() === t.data.length
  6726. }
  6727. return qa(e.getNode(!0))
  6728. }
  6729. function Zs(e, t) {
  6730. return !Vc.isTextPosition(e) && !Vc.isTextPosition(t) && e.getNode() === t.getNode(!0)
  6731. }
  6732. function Js(e, t, n) {
  6733. return e ? !Zs(t, n) && !function(e) {
  6734. return !Vc.isTextPosition(e) && Qt.isBr(e.getNode())
  6735. }(t) && Gs(t) && Ys(n) : !Zs(n, t) && Ys(t) && Gs(n)
  6736. }
  6737. function Qs(t, n, r) {
  6738. return Ll(t, n, r).bind(function(e) {
  6739. return kc(r, e, n) && Js(t, r, e) ? Ll(t, n, e) : R.some(e)
  6740. })
  6741. }
  6742. function el(e, t) {
  6743. var n = e ? t.firstChild : t.lastChild;
  6744. return Qt.isText(n) ? R.some(Vc(n, e ? 0 : n.data.length)) : n ? qa(n) ? R.some(e ? Vc.before(n) : function(e) {
  6745. return Qt.isBr(e) ? Vc.before(e) : Vc.after(e)
  6746. }(n)) : function(e, t, n) {
  6747. var r = e ? Vc.before(n) : Vc.after(n);
  6748. return Ll(e, t, r)
  6749. }(e, t, n) : R.none()
  6750. }
  6751. function tl(e, t) {
  6752. return Qt.isElement(t) && e.isBlock(t) && !t.innerHTML && !Wn.ie && (t.innerHTML = '<br data-mce-bogus="1" />'),
  6753. t
  6754. }
  6755. function nl(e, t) {
  6756. return Ul.lastPositionIn(e).fold(function() {
  6757. return !1
  6758. }, function(e) {
  6759. return t.setStart(e.container(), e.offset()),
  6760. t.setEnd(e.container(), e.offset()),
  6761. !0
  6762. })
  6763. }
  6764. function rl(e, t, n) {
  6765. return !(!function(e) {
  6766. return !1 === e.hasChildNodes()
  6767. }(t) || !lc(e, t)) && (function(e, t) {
  6768. var n = e.ownerDocument.createTextNode(mu.ZWSP);
  6769. e.appendChild(n),
  6770. t.setStart(n, 0),
  6771. t.setEnd(n, 0)
  6772. }(t, n),
  6773. !0)
  6774. }
  6775. function ol(e, t, n, r) {
  6776. var o, i, a, u, c = n[t ? "start" : "end"], s = e.getRoot();
  6777. if (c) {
  6778. for (a = c[0],
  6779. i = s,
  6780. o = c.length - 1; 1 <= o; o--) {
  6781. if (u = i.childNodes,
  6782. rl(s, i, r))
  6783. return !0;
  6784. if (c[o] > u.length - 1)
  6785. return !!rl(s, i, r) || nl(i, r);
  6786. i = u[c[o]]
  6787. }
  6788. 3 === i.nodeType && (a = Math.min(c[0], i.nodeValue.length)),
  6789. 1 === i.nodeType && (a = Math.min(c[0], i.childNodes.length)),
  6790. t ? r.setStart(i, a) : r.setEnd(i, a)
  6791. }
  6792. return !0
  6793. }
  6794. function il(e) {
  6795. return Qt.isText(e) && 0 < e.data.length
  6796. }
  6797. function al(e, t, n) {
  6798. var r, o, i, a, u, c, s = e.get(n.id + "_" + t), l = n.keep;
  6799. if (s) {
  6800. if (r = s.parentNode,
  6801. c = (u = (o = "start" === t ? l ? s.hasChildNodes() ? (r = s.firstChild,
  6802. 1) : il(s.nextSibling) ? (r = s.nextSibling,
  6803. 0) : il(s.previousSibling) ? (r = s.previousSibling,
  6804. s.previousSibling.data.length) : (r = s.parentNode,
  6805. e.nodeIndex(s) + 1) : e.nodeIndex(s) : l ? s.hasChildNodes() ? (r = s.firstChild,
  6806. 1) : il(s.previousSibling) ? (r = s.previousSibling,
  6807. s.previousSibling.data.length) : (r = s.parentNode,
  6808. e.nodeIndex(s)) : e.nodeIndex(s),
  6809. r),
  6810. o),
  6811. !l) {
  6812. for (a = s.previousSibling,
  6813. i = s.nextSibling,
  6814. Zn.each(Zn.grep(s.childNodes), function(e) {
  6815. Qt.isText(e) && (e.nodeValue = e.nodeValue.replace(/\uFEFF/g, ""))
  6816. }); s = e.get(n.id + "_" + t); )
  6817. e.remove(s, !0);
  6818. a && i && a.nodeType === i.nodeType && Qt.isText(a) && !Wn.opera && (o = a.nodeValue.length,
  6819. a.appendData(i.nodeValue),
  6820. e.remove(i),
  6821. c = (u = a,
  6822. o))
  6823. }
  6824. return R.some(Vc(u, c))
  6825. }
  6826. return R.none()
  6827. }
  6828. function ul(e) {
  6829. return "" !== e && -1 !== " \f\n\r\t\x0B".indexOf(e)
  6830. }
  6831. function cl(e) {
  6832. return !ul(e) && !Kl(e)
  6833. }
  6834. function sl(e) {
  6835. return !!e.nodeType
  6836. }
  6837. function ll(e, t, n) {
  6838. var r, o, i, a = n.startOffset, u = n.startContainer;
  6839. if ((n.startContainer !== n.endContainer || !function(e) {
  6840. return e && /^(IMG)$/.test(e.nodeName)
  6841. }(n.startContainer.childNodes[n.startOffset])) && 1 === u.nodeType)
  6842. for (a < (i = u.childNodes).length ? (u = i[a],
  6843. r = new Fi(u,e.getParent(u, e.isBlock))) : (u = i[i.length - 1],
  6844. (r = new Fi(u,e.getParent(u, e.isBlock))).next(!0)),
  6845. o = r.current(); o; o = r.next())
  6846. if (3 === o.nodeType && !Xl(o))
  6847. return n.setStart(o, 0),
  6848. void t.setRng(n)
  6849. }
  6850. function fl(e, t, n) {
  6851. if (e) {
  6852. var r = t ? "nextSibling" : "previousSibling";
  6853. for (e = n ? e : e[r]; e; e = e[r])
  6854. if (1 === e.nodeType || !Xl(e))
  6855. return e
  6856. }
  6857. }
  6858. function dl(e, t) {
  6859. return sl(t) && (t = t.nodeName),
  6860. !!e.schema.getTextBlockElements()[t.toLowerCase()]
  6861. }
  6862. function hl(e, t, n) {
  6863. return e.schema.isValidChild(t, n)
  6864. }
  6865. function ml(e, n) {
  6866. return "string" != typeof e ? e = e(n) : n && (e = e.replace(/%(\w+)/g, function(e, t) {
  6867. return n[t] || e
  6868. })),
  6869. e
  6870. }
  6871. function gl(e, t) {
  6872. return e = "" + ((e = e || "").nodeName || e),
  6873. t = "" + ((t = t || "").nodeName || t),
  6874. e.toLowerCase() === t.toLowerCase()
  6875. }
  6876. function pl(e, t, n) {
  6877. return "color" !== n && "backgroundColor" !== n || (t = e.toHex(t)),
  6878. "fontWeight" === n && 700 === t && (t = "bold"),
  6879. "fontFamily" === n && (t = t.replace(/[\'\"]/g, "").replace(/,\s+/g, ",")),
  6880. "" + t
  6881. }
  6882. function vl(e, t, n) {
  6883. return pl(e, e.getStyle(t, n), n)
  6884. }
  6885. function yl(t, e) {
  6886. var n;
  6887. return t.getParent(e, function(e) {
  6888. return (n = t.getStyle(e, "text-decoration")) && "none" !== n
  6889. }),
  6890. n
  6891. }
  6892. function bl(e, t, n) {
  6893. return e.getParents(t, n, e.getRoot())
  6894. }
  6895. function Cl(e, t) {
  6896. for (var n = t; n; ) {
  6897. if (Qt.isElement(n) && e.getContentEditable(n))
  6898. return "false" === e.getContentEditable(n) ? n : t;
  6899. n = n.parentNode
  6900. }
  6901. return t
  6902. }
  6903. function wl(e, t, n, r) {
  6904. for (var o = t.data, i = n; e ? 0 <= i : i < o.length; e ? i-- : i++)
  6905. if (r(o.charAt(i)))
  6906. return e ? i + 1 : i;
  6907. return -1
  6908. }
  6909. function xl(e, t, n) {
  6910. return wl(e, t, n, function(e) {
  6911. return Kl(e) || ul(e)
  6912. })
  6913. }
  6914. function zl(e, t, n) {
  6915. return wl(e, t, n, cl)
  6916. }
  6917. function El(i, e, t, n, a, r) {
  6918. function o(e, t, n) {
  6919. var r = cc(i)
  6920. , o = a ? r.backwards : r.forwards;
  6921. return R.from(o(e, t, function(e, t) {
  6922. return Yl(e.parentNode) ? -1 : n(a, u = e, t)
  6923. }, c))
  6924. }
  6925. var u, c = i.getParent(t, i.isBlock) || e;
  6926. return o(t, n, xl).bind(function(e) {
  6927. return r ? o(e.container, e.offset + (a ? -1 : 0), zl) : R.some(e)
  6928. }).orThunk(function() {
  6929. return u ? R.some({
  6930. container: u,
  6931. offset: a ? 0 : u.length
  6932. }) : R.none()
  6933. })
  6934. }
  6935. function Nl(e, t, n, r, o) {
  6936. Qt.isText(r) && 0 === r.nodeValue.length && r[o] && (r = r[o]);
  6937. for (var i = Gl(e, r), a = 0; a < i.length; a++)
  6938. for (var u = 0; u < t.length; u++) {
  6939. var c = t[u];
  6940. if (!("collapsed"in c && c.collapsed !== n.collapsed) && e.is(i[a], c.selector))
  6941. return i[a]
  6942. }
  6943. return r
  6944. }
  6945. function Sl(t, e, n, r) {
  6946. var o, i = t.dom, a = i.getRoot();
  6947. if (e[0].wrapper || (o = i.getParent(n, e[0].block, a)),
  6948. !o) {
  6949. var u = i.getParent(n, "LI,TD,TH");
  6950. o = i.getParent(Qt.isText(n) ? n.parentNode : n, function(e) {
  6951. return e !== a && Jl(t, e)
  6952. }, u)
  6953. }
  6954. if (o && e[0].wrapper && (o = Gl(i, o, "ul,ol").reverse()[0] || o),
  6955. !o)
  6956. for (o = n; o[r] && !i.isBlock(o[r]) && (o = o[r],
  6957. !gl(o, "br")); )
  6958. ;
  6959. return o || n
  6960. }
  6961. function kl(e, t, n, r, o, i, a) {
  6962. var u, c, s, l, f, d;
  6963. if (u = c = a ? n : o,
  6964. l = a ? "previousSibling" : "nextSibling",
  6965. f = e.getRoot(),
  6966. Qt.isText(u) && !Zl(u) && (a ? 0 < r : i < u.nodeValue.length))
  6967. return u;
  6968. for (; ; ) {
  6969. if (!t[0].block_expand && e.isBlock(c))
  6970. return c;
  6971. for (s = c[l]; s; s = s[l])
  6972. if (!Yl(s) && !Zl(s) && ("BR" !== (d = s).nodeName || !d.getAttribute("data-mce-bogus") || d.nextSibling))
  6973. return c;
  6974. if (c === f || c.parentNode === f) {
  6975. u = c;
  6976. break
  6977. }
  6978. c = c.parentNode
  6979. }
  6980. return u
  6981. }
  6982. function Tl(e, t, n, r) {
  6983. void 0 === r && (r = !1);
  6984. var o = t.startContainer
  6985. , i = t.startOffset
  6986. , a = t.endContainer
  6987. , u = t.endOffset
  6988. , c = e.dom;
  6989. return Qt.isElement(o) && o.hasChildNodes() && (o = Qa(o, i),
  6990. Qt.isText(o) && (i = 0)),
  6991. Qt.isElement(a) && a.hasChildNodes() && (a = Qa(a, t.collapsed ? u : u - 1),
  6992. Qt.isText(a) && (u = a.nodeValue.length)),
  6993. o = Cl(c, o),
  6994. a = Cl(c, a),
  6995. (Yl(o.parentNode) || Yl(o)) && (o = Yl(o) ? o : o.parentNode,
  6996. o = t.collapsed ? o.previousSibling || o : o.nextSibling || o,
  6997. Qt.isText(o) && (i = t.collapsed ? o.length : 0)),
  6998. (Yl(a.parentNode) || Yl(a)) && (a = Yl(a) ? a : a.parentNode,
  6999. a = t.collapsed ? a.nextSibling || a : a.previousSibling || a,
  7000. Qt.isText(a) && (u = t.collapsed ? 0 : a.length)),
  7001. t.collapsed && (El(c, e.getBody(), o, i, !0, r).each(function(e) {
  7002. var t = e.container
  7003. , n = e.offset;
  7004. o = t,
  7005. i = n
  7006. }),
  7007. El(c, e.getBody(), a, u, !1, r).each(function(e) {
  7008. var t = e.container
  7009. , n = e.offset;
  7010. a = t,
  7011. u = n
  7012. })),
  7013. (n[0].inline || n[0].block_expand) && (n[0].inline && Qt.isText(o) && 0 !== i || (o = kl(c, n, o, i, a, u, !0)),
  7014. n[0].inline && Qt.isText(a) && u !== a.nodeValue.length || (a = kl(c, n, o, i, a, u, !1))),
  7015. n[0].selector && !1 !== n[0].expand && !n[0].inline && (o = Nl(c, n, t, o, "previousSibling"),
  7016. a = Nl(c, n, t, a, "nextSibling")),
  7017. (n[0].block || n[0].selector) && (o = Sl(e, n, o, "previousSibling"),
  7018. a = Sl(e, n, a, "nextSibling"),
  7019. n[0].block && (c.isBlock(o) || (o = kl(c, n, o, i, a, u, !0)),
  7020. c.isBlock(a) || (a = kl(c, n, o, i, a, u, !1)))),
  7021. Qt.isElement(o) && (i = c.nodeIndex(o),
  7022. o = o.parentNode),
  7023. Qt.isElement(a) && (u = c.nodeIndex(a) + 1,
  7024. a = a.parentNode),
  7025. {
  7026. startContainer: o,
  7027. startOffset: i,
  7028. endContainer: a,
  7029. endOffset: u
  7030. }
  7031. }
  7032. var Al, Ml = Qt.isContentEditableFalse, Rl = Qt.isText, _l = Qt.isElement, Dl = Qt.isBr, Ol = qa, Hl = function(e) {
  7033. return Eu(e) || function(e) {
  7034. return !!ku(e) && !0 !== y(G(e.getElementsByTagName("*")), function(e, t) {
  7035. return e || bu(t)
  7036. }, !1)
  7037. }(e)
  7038. }, Bl = $a, Pl = function(e, t, n) {
  7039. var r, o, i, a, u;
  7040. if (!_l(n) || !t)
  7041. return null;
  7042. if (t.isEqual(Vc.after(n)) && n.lastChild) {
  7043. if (u = Vc.after(n.lastChild),
  7044. zc(e) && Ol(n.lastChild) && _l(n.lastChild))
  7045. return Dl(n.lastChild) ? Vc.before(n.lastChild) : u
  7046. } else
  7047. u = t;
  7048. var c = u.container()
  7049. , s = u.offset();
  7050. if (Rl(c)) {
  7051. if (zc(e) && 0 < s)
  7052. return Vc(c, --s);
  7053. if (xc(e) && s < c.length)
  7054. return Vc(c, ++s);
  7055. r = c
  7056. } else {
  7057. if (zc(e) && 0 < s && (o = Ws(c, s - 1),
  7058. Ol(o)))
  7059. return !Hl(o) && (i = Nc(o, e, Bl, o)) ? Rl(i) ? Vc(i, i.data.length) : Vc.after(i) : Rl(o) ? Vc(o, o.data.length) : Vc.before(o);
  7060. if (xc(e) && s < c.childNodes.length && (o = Ws(c, s),
  7061. Ol(o)))
  7062. return Dl(o) ? function(e, t) {
  7063. var n = t.nextSibling;
  7064. return n && Ol(n) ? Rl(n) ? Vc(n, 0) : Vc.before(n) : Pl(Pc.Forwards, Vc.after(t), e)
  7065. }(n, o) : !Hl(o) && (i = Nc(o, e, Bl, o)) ? Rl(i) ? Vc(i, 0) : Vc.before(i) : Rl(o) ? Vc(o, 0) : Vc.after(o);
  7066. r = o || u.getNode()
  7067. }
  7068. return (xc(e) && u.isAtEnd() || zc(e) && u.isAtStart()) && (r = Nc(r, e, $(!0), n, !0),
  7069. Bl(r, n)) ? Ks(e, r) : (o = Nc(r, e, Bl, n),
  7070. !(a = Xn.last(U(function(e, t) {
  7071. for (var n = []; e && e !== t; )
  7072. n.push(e),
  7073. e = e.parentNode;
  7074. return n
  7075. }(c, n), Ml))) || o && a.contains(o) ? o ? Ks(e, o) : null : u = xc(e) ? Vc.after(a) : Vc.before(a))
  7076. }, Ll = function(e, t, n) {
  7077. var r = Xs(t);
  7078. return R.from(e ? r.next(n) : r.prev(n))
  7079. }, Vl = function(t, n, e, r) {
  7080. return Qs(t, n, e).bind(function(e) {
  7081. return r(e) ? Vl(t, n, e, r) : R.some(e)
  7082. })
  7083. }, Il = d(Ll, !0), Fl = d(Ll, !1), Ul = {
  7084. fromPosition: Ll,
  7085. nextPosition: Il,
  7086. prevPosition: Fl,
  7087. navigate: Qs,
  7088. navigateIgnore: Vl,
  7089. positionIn: el,
  7090. firstPositionIn: d(el, !0),
  7091. lastPositionIn: d(el, !1)
  7092. }, jl = function(e, t) {
  7093. var n = e.dom;
  7094. if (t) {
  7095. if (function(e) {
  7096. return Zn.isArray(e.start)
  7097. }(t))
  7098. return function(e, t) {
  7099. var n = e.createRng();
  7100. return ol(e, !0, t, n) && ol(e, !1, t, n) ? R.some(n) : R.none()
  7101. }(n, t);
  7102. if (function(e) {
  7103. return "string" == typeof e.start
  7104. }(t))
  7105. return R.some(function(e, t) {
  7106. var n, r;
  7107. return n = e.createRng(),
  7108. r = Gu(e.getRoot(), t.start),
  7109. n.setStart(r.container(), r.offset()),
  7110. r = Gu(e.getRoot(), t.end),
  7111. n.setEnd(r.container(), r.offset()),
  7112. n
  7113. }(n, t));
  7114. if (function(e) {
  7115. return e.hasOwnProperty("id")
  7116. }(t))
  7117. return function(r, e) {
  7118. var t = al(r, "start", e)
  7119. , n = al(r, "end", e);
  7120. return tu(t, n.or(t), function(e, t) {
  7121. var n = r.createRng();
  7122. return n.setStart(tl(r, e.container()), e.offset()),
  7123. n.setEnd(tl(r, t.container()), t.offset()),
  7124. n
  7125. })
  7126. }(n, t);
  7127. if (function(e) {
  7128. return e.hasOwnProperty("name")
  7129. }(t))
  7130. return function(n, e) {
  7131. return R.from(n.select(e.name)[e.index]).map(function(e) {
  7132. var t = n.createRng();
  7133. return t.selectNode(e),
  7134. t
  7135. })
  7136. }(n, t);
  7137. if (function(e) {
  7138. return e.hasOwnProperty("rng")
  7139. }(t))
  7140. return R.some(t.rng)
  7141. }
  7142. return R.none()
  7143. }, ql = function(e, t, n) {
  7144. return Wc.getBookmark(e, t, n)
  7145. }, $l = function(t, e) {
  7146. jl(t, e).each(function(e) {
  7147. t.setRng(e)
  7148. })
  7149. }, Wl = function(e) {
  7150. return Qt.isElement(e) && "SPAN" === e.tagName && "bookmark" === e.getAttribute("data-mce-type")
  7151. }, Kl = (Al = qr,
  7152. function(e) {
  7153. return Al === e
  7154. }
  7155. ), Xl = function(e) {
  7156. return e && Qt.isText(e) && /^([\t \r\n]+|)$/.test(e.nodeValue)
  7157. }, Yl = Wl, Gl = bl, Zl = Xl, Jl = dl, Ql = Zn.each, ef = function(e, t, u) {
  7158. var n = t.startContainer
  7159. , r = t.startOffset
  7160. , o = t.endContainer
  7161. , i = t.endOffset
  7162. , a = e.select("td[data-mce-selected],th[data-mce-selected]");
  7163. if (0 < a.length)
  7164. Ql(a, function(e) {
  7165. u([e])
  7166. });
  7167. else {
  7168. var c = function(e) {
  7169. var t;
  7170. return 3 === (t = e[0]).nodeType && t === n && r >= t.nodeValue.length && e.splice(0, 1),
  7171. t = e[e.length - 1],
  7172. 0 === i && 0 < e.length && t === o && 3 === t.nodeType && e.splice(e.length - 1, 1),
  7173. e
  7174. }
  7175. , s = function(e, t, n) {
  7176. for (var r = []; e && e !== n; e = e[t])
  7177. r.push(e);
  7178. return r
  7179. }
  7180. , l = function(e, t) {
  7181. do {
  7182. if (e.parentNode === t)
  7183. return e;
  7184. e = e.parentNode
  7185. } while (e)
  7186. }
  7187. , f = function(e, t, n) {
  7188. for (var r = n ? "nextSibling" : "previousSibling", o = e, i = o.parentNode; o && o !== t; o = i) {
  7189. i = o.parentNode;
  7190. var a = s(o === e ? o : o[r], r);
  7191. a.length && (n || a.reverse(),
  7192. u(c(a)))
  7193. }
  7194. };
  7195. if (1 === n.nodeType && n.hasChildNodes() && (n = n.childNodes[r]),
  7196. 1 === o.nodeType && o.hasChildNodes() && (o = function(e, t) {
  7197. var n = e.childNodes;
  7198. return --t > n.length - 1 ? t = n.length - 1 : t < 0 && (t = 0),
  7199. n[t] || e
  7200. }(o, i)),
  7201. n === o)
  7202. return u(c([n]));
  7203. for (var d = e.findCommonAncestor(n, o), h = n; h; h = h.parentNode) {
  7204. if (h === o)
  7205. return f(n, d, !0);
  7206. if (h === d)
  7207. break
  7208. }
  7209. for (h = o; h; h = h.parentNode) {
  7210. if (h === n)
  7211. return f(o, d);
  7212. if (h === d)
  7213. break
  7214. }
  7215. var m = l(n, d) || n
  7216. , g = l(o, d) || o;
  7217. f(n, m, !0);
  7218. var p = s(m === n ? m : m.nextSibling, "nextSibling", g === o ? g.nextSibling : g);
  7219. p.length && u(c(p)),
  7220. f(o, g)
  7221. }
  7222. };
  7223. function tf(e) {
  7224. return lf.get(e)
  7225. }
  7226. function nf(t, n, r, o) {
  7227. return be(n).fold(function() {
  7228. return "skipping"
  7229. }, function(e) {
  7230. return "br" === o || function(e) {
  7231. return Lt(e) && tf(e) === jr
  7232. }(n) ? "valid" : function(e) {
  7233. return Pt(e) && ba(e, cu())
  7234. }(n) ? "existing" : sc(n) ? "caret" : hl(t, r, o) && hl(t, Oe(e), r) ? "valid" : "invalid-child"
  7235. })
  7236. }
  7237. function rf(e, t, n, r) {
  7238. var o = t.uid
  7239. , i = void 0 === o ? function(e) {
  7240. var t = (new Date).getTime();
  7241. return e + "_" + Math.floor(1e9 * Math.random()) + ++du + String(t)
  7242. }("mce-annotation") : o
  7243. , a = function h(e, t) {
  7244. var n = {};
  7245. for (var r in e)
  7246. Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  7247. if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
  7248. var o = 0;
  7249. for (r = Object.getOwnPropertySymbols(e); o < r.length; o++)
  7250. t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]])
  7251. }
  7252. return n
  7253. }(t, ["uid"])
  7254. , u = it.fromTag("span", e);
  7255. va(u, cu()),
  7256. en(u, "" + lu(), i),
  7257. en(u, "" + su(), n);
  7258. var c = r(i, a)
  7259. , s = c.attributes
  7260. , l = void 0 === s ? {} : s
  7261. , f = c.classes
  7262. , d = void 0 === f ? [] : f;
  7263. return Ke(u, l),
  7264. function(t, e) {
  7265. F(e, function(e) {
  7266. va(t, e)
  7267. })
  7268. }(u, d),
  7269. u
  7270. }
  7271. function of(n, e, t, r, o) {
  7272. function i() {
  7273. s.set(R.none())
  7274. }
  7275. function a(e) {
  7276. F(e, l)
  7277. }
  7278. var u = []
  7279. , c = rf(n.getDoc(), o, t, r)
  7280. , s = at(R.none())
  7281. , l = function(e) {
  7282. switch (nf(n, e, "span", Oe(e))) {
  7283. case "invalid-child":
  7284. i();
  7285. var t = Ee(e);
  7286. a(t),
  7287. i();
  7288. break;
  7289. case "valid":
  7290. !function(e, t) {
  7291. Te(e, t),
  7292. Ht(t, e)
  7293. }(e, s.get().getOrThunk(function() {
  7294. var e = Oa(c);
  7295. return u.push(e),
  7296. s.set(R.some(e)),
  7297. e
  7298. }))
  7299. }
  7300. };
  7301. return ef(n.dom, e, function(e) {
  7302. i(),
  7303. function(e) {
  7304. var t = X(e, it.fromDom);
  7305. a(t)
  7306. }(e)
  7307. }),
  7308. u
  7309. }
  7310. function af(o, i, a, u) {
  7311. o.undoManager.transact(function() {
  7312. var e = o.selection.getRng();
  7313. if (e.collapsed && function(e, t) {
  7314. var n = Tl(e, t, [{
  7315. inline: !0
  7316. }]);
  7317. t.setStart(n.startContainer, n.startOffset),
  7318. t.setEnd(n.endContainer, n.endOffset),
  7319. e.selection.setRng(t)
  7320. }(o, e),
  7321. o.selection.getRng().collapsed) {
  7322. var t = rf(o.getDoc(), u, i, a.decorate);
  7323. _a(t, qr),
  7324. o.selection.getRng().insertNode(t.dom()),
  7325. o.selection.select(t.dom())
  7326. } else {
  7327. var n = Wc.getPersistentBookmark(o.selection, !1)
  7328. , r = o.selection.getRng();
  7329. of(o, r, i, a.decorate, u),
  7330. o.selection.moveToBookmark(n)
  7331. }
  7332. })
  7333. }
  7334. function uf(r) {
  7335. var o = function() {
  7336. var n = {};
  7337. return {
  7338. register: function(e, t) {
  7339. n[e] = {
  7340. name: e,
  7341. settings: t
  7342. }
  7343. },
  7344. lookup: function(e) {
  7345. return n.hasOwnProperty(e) ? R.from(n[e]).map(function(e) {
  7346. return e.settings
  7347. }) : R.none()
  7348. }
  7349. }
  7350. }();
  7351. Ra(r, o);
  7352. var n = Ma(r);
  7353. return {
  7354. register: function(e, t) {
  7355. o.register(e, t)
  7356. },
  7357. annotate: function(t, n) {
  7358. o.lookup(t).each(function(e) {
  7359. af(r, t, e, n)
  7360. })
  7361. },
  7362. annotationChanged: function(e, t) {
  7363. n.addListener(e, t)
  7364. },
  7365. remove: function(e) {
  7366. Aa(r, R.some(e)).each(function(e) {
  7367. var t = e.elements;
  7368. F(t, De)
  7369. })
  7370. },
  7371. getAll: function(e) {
  7372. var t = function(e, t) {
  7373. var n = it.fromDom(e.getBody())
  7374. , r = Ca(n, "[" + su() + '="' + t + '"]')
  7375. , o = {};
  7376. return F(r, function(e) {
  7377. var t = Xe(e, lu())
  7378. , n = o.hasOwnProperty(t) ? o[t] : [];
  7379. o[t] = n.concat([e])
  7380. }),
  7381. o
  7382. }(r, e);
  7383. return S(t, function(e) {
  7384. return X(e, function(e) {
  7385. return e.dom()
  7386. })
  7387. })
  7388. }
  7389. }
  7390. }
  7391. function cf(e, t, n) {
  7392. var r = n ? "lastChild" : "firstChild"
  7393. , o = n ? "prev" : "next";
  7394. if (e[r])
  7395. return e[r];
  7396. if (e !== t) {
  7397. var i = e[o];
  7398. if (i)
  7399. return i;
  7400. for (var a = e.parent; a && a !== t; a = a.parent)
  7401. if (i = a[o])
  7402. return i
  7403. }
  7404. }
  7405. function sf(e) {
  7406. if (!ff.test(e.value))
  7407. return !1;
  7408. var t = e.parent;
  7409. return !t || "span" === t.name && !t.attr("style") || !/^[ ]+$/.test(e.value)
  7410. }
  7411. var lf = function BN(n, r) {
  7412. var t = function(e) {
  7413. return n(e) ? R.from(e.dom().nodeValue) : R.none()
  7414. };
  7415. return {
  7416. get: function(e) {
  7417. if (!n(e))
  7418. throw new Error("Can only get " + r + " value of a " + r + " node");
  7419. return t(e).getOr("")
  7420. },
  7421. getOption: t,
  7422. set: function(e, t) {
  7423. if (!n(e))
  7424. throw new Error("Can only set raw " + r + " value of a " + r + " node");
  7425. e.dom().nodeValue = t
  7426. }
  7427. }
  7428. }(Lt, "text")
  7429. , ff = /^[ \t\r\n]*$/
  7430. , df = {
  7431. "#text": 3,
  7432. "#comment": 8,
  7433. "#cdata": 4,
  7434. "#pi": 7,
  7435. "#doctype": 10,
  7436. "#document-fragment": 11
  7437. }
  7438. , hf = (mf.create = function(e, t) {
  7439. var n = new mf(e,df[e] || 1);
  7440. if (t)
  7441. for (var r in t)
  7442. n.attr(r, t[r]);
  7443. return n
  7444. }
  7445. ,
  7446. mf.prototype.replace = function(e) {
  7447. return e.parent && e.remove(),
  7448. this.insert(e, this),
  7449. this.remove(),
  7450. this
  7451. }
  7452. ,
  7453. mf.prototype.attr = function(e, t) {
  7454. var n;
  7455. if ("string" != typeof e) {
  7456. for (var r in e)
  7457. this.attr(r, e[r]);
  7458. return this
  7459. }
  7460. if (n = this.attributes) {
  7461. if (t === undefined)
  7462. return n.map[e];
  7463. if (null === t) {
  7464. if (e in n.map) {
  7465. delete n.map[e];
  7466. for (var o = n.length; o--; )
  7467. if (n[o].name === e)
  7468. return n.splice(o, 1),
  7469. this
  7470. }
  7471. return this
  7472. }
  7473. if (e in n.map) {
  7474. for (o = n.length; o--; )
  7475. if (n[o].name === e) {
  7476. n[o].value = t;
  7477. break
  7478. }
  7479. } else
  7480. n.push({
  7481. name: e,
  7482. value: t
  7483. });
  7484. return n.map[e] = t,
  7485. this
  7486. }
  7487. }
  7488. ,
  7489. mf.prototype.clone = function() {
  7490. var e, t = new mf(this.name,this.type);
  7491. if (e = this.attributes) {
  7492. var n = [];
  7493. n.map = {};
  7494. for (var r = 0, o = e.length; r < o; r++) {
  7495. var i = e[r];
  7496. "id" !== i.name && (n[n.length] = {
  7497. name: i.name,
  7498. value: i.value
  7499. },
  7500. n.map[i.name] = i.value)
  7501. }
  7502. t.attributes = n
  7503. }
  7504. return t.value = this.value,
  7505. t.shortEnded = this.shortEnded,
  7506. t
  7507. }
  7508. ,
  7509. mf.prototype.wrap = function(e) {
  7510. return this.parent.insert(e, this),
  7511. e.append(this),
  7512. this
  7513. }
  7514. ,
  7515. mf.prototype.unwrap = function() {
  7516. for (var e = this.firstChild; e; ) {
  7517. var t = e.next;
  7518. this.insert(e, this, !0),
  7519. e = t
  7520. }
  7521. this.remove()
  7522. }
  7523. ,
  7524. mf.prototype.remove = function() {
  7525. var e = this.parent
  7526. , t = this.next
  7527. , n = this.prev;
  7528. return e && (e.firstChild === this ? (e.firstChild = t) && (t.prev = null) : n.next = t,
  7529. e.lastChild === this ? (e.lastChild = n) && (n.next = null) : t.prev = n,
  7530. this.parent = this.next = this.prev = null),
  7531. this
  7532. }
  7533. ,
  7534. mf.prototype.append = function(e) {
  7535. e.parent && e.remove();
  7536. var t = this.lastChild;
  7537. return t ? ((t.next = e).prev = t,
  7538. this.lastChild = e) : this.lastChild = this.firstChild = e,
  7539. e.parent = this,
  7540. e
  7541. }
  7542. ,
  7543. mf.prototype.insert = function(e, t, n) {
  7544. e.parent && e.remove();
  7545. var r = t.parent || this;
  7546. return n ? (t === r.firstChild ? r.firstChild = e : t.prev.next = e,
  7547. e.prev = t.prev,
  7548. (e.next = t).prev = e) : (t === r.lastChild ? r.lastChild = e : t.next.prev = e,
  7549. e.next = t.next,
  7550. (e.prev = t).next = e),
  7551. e.parent = r,
  7552. e
  7553. }
  7554. ,
  7555. mf.prototype.getAll = function(e) {
  7556. for (var t = [], n = this.firstChild; n; n = cf(n, this))
  7557. n.name === e && t.push(n);
  7558. return t
  7559. }
  7560. ,
  7561. mf.prototype.empty = function() {
  7562. if (this.firstChild) {
  7563. for (var e = [], t = this.firstChild; t; t = cf(t, this))
  7564. e.push(t);
  7565. for (var n = e.length; n--; )
  7566. (t = e[n]).parent = t.firstChild = t.lastChild = t.next = t.prev = null
  7567. }
  7568. return this.firstChild = this.lastChild = null,
  7569. this
  7570. }
  7571. ,
  7572. mf.prototype.isEmpty = function(e, t, n) {
  7573. void 0 === t && (t = {});
  7574. var r = this.firstChild;
  7575. if (r)
  7576. do {
  7577. if (1 === r.type) {
  7578. if (r.attr("data-mce-bogus"))
  7579. continue;
  7580. if (e[r.name])
  7581. return !1;
  7582. for (var o = r.attributes.length; o--; ) {
  7583. var i = r.attributes[o].name;
  7584. if ("name" === i || 0 === i.indexOf("data-mce-bookmark"))
  7585. return !1
  7586. }
  7587. }
  7588. if (8 === r.type)
  7589. return !1;
  7590. if (3 === r.type && !sf(r))
  7591. return !1;
  7592. if (3 === r.type && r.parent && t[r.parent.name] && ff.test(r.value))
  7593. return !1;
  7594. if (n && n(r))
  7595. return !1
  7596. } while (r = cf(r, this));
  7597. return !0
  7598. }
  7599. ,
  7600. mf.prototype.walk = function(e) {
  7601. return cf(this, null, e)
  7602. }
  7603. ,
  7604. mf);
  7605. function mf(e, t) {
  7606. this.name = e,
  7607. 1 === (this.type = t) && (this.attributes = [],
  7608. this.attributes.map = {})
  7609. }
  7610. function gf(e, t, n) {
  7611. var r, o, i, a, u = 1;
  7612. for (a = e.getShortEndedElements(),
  7613. (i = /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex = r = n; o = i.exec(t); ) {
  7614. if (r = i.lastIndex,
  7615. "/" === o[1])
  7616. u--;
  7617. else if (!o[1]) {
  7618. if (o[2]in a)
  7619. continue;
  7620. u++
  7621. }
  7622. if (0 === u)
  7623. break
  7624. }
  7625. return r
  7626. }
  7627. function pf(e, t) {
  7628. var n = e.exec(t);
  7629. if (n) {
  7630. var r = n[1]
  7631. , o = n[2];
  7632. return "string" == typeof r && "data-mce-bogus" === r.toLowerCase() ? o : null
  7633. }
  7634. return null
  7635. }
  7636. function vf(q, $) {
  7637. void 0 === $ && ($ = Pr());
  7638. function e() {}
  7639. !1 !== (q = q || {}).fix_self_closing && (q.fix_self_closing = !0);
  7640. var W = q.comment ? q.comment : e
  7641. , K = q.cdata ? q.cdata : e
  7642. , X = q.text ? q.text : e
  7643. , Y = q.start ? q.start : e
  7644. , G = q.end ? q.end : e
  7645. , Z = q.pi ? q.pi : e
  7646. , J = q.doctype ? q.doctype : e;
  7647. return {
  7648. parse: function(i, e) {
  7649. void 0 === e && (e = "html");
  7650. function t(e) {
  7651. var t, n;
  7652. for (t = B.length; t-- && B[t].name !== e; )
  7653. ;
  7654. if (0 <= t) {
  7655. for (n = B.length - 1; t <= n; n--)
  7656. (e = B[n]).valid && G(e.name);
  7657. B.length = t
  7658. }
  7659. }
  7660. function a(e) {
  7661. "" !== e && (">" === e.charAt(0) && (e = " " + e),
  7662. q.allow_conditional_comments || "[if" !== e.substr(0, 3).toLowerCase() || (e = " " + e),
  7663. W(e))
  7664. }
  7665. function n(e, t) {
  7666. var n = e || ""
  7667. , r = !ue(n, "--")
  7668. , o = function(e, t, n) {
  7669. void 0 === n && (n = 0);
  7670. var r = e.toLowerCase();
  7671. if (-1 !== r.indexOf("[if ", n) && function(e, t) {
  7672. return /^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(e.substr(t))
  7673. }(r, n)) {
  7674. var o = r.indexOf("[endif]", n);
  7675. return r.indexOf(">", o)
  7676. }
  7677. if (t) {
  7678. var i = r.indexOf(">", n);
  7679. return -1 !== i ? i : r.length
  7680. }
  7681. var a = /--!?>/;
  7682. a.lastIndex = n;
  7683. var u = a.exec(e);
  7684. return u ? u.index + u[0].length : r.length
  7685. }(i, r, t);
  7686. return e = i.substr(t, o - t),
  7687. a(r ? n + e : e),
  7688. o + 1
  7689. }
  7690. function r(e, t, n, r, o) {
  7691. var i, a;
  7692. if (n = (t = t.toLowerCase())in p ? t : L(n || r || o || ""),
  7693. y && !h && !1 === function(e) {
  7694. return 0 === e.indexOf("data-") || 0 === e.indexOf("aria-")
  7695. }(t)) {
  7696. if (!(i = z[t]) && E) {
  7697. for (a = E.length; a-- && !(i = E[a]).pattern.test(t); )
  7698. ;
  7699. -1 === a && (i = null)
  7700. }
  7701. if (!i)
  7702. return;
  7703. if (i.validValues && !(n in i.validValues))
  7704. return
  7705. }
  7706. if (V[t] && !q.allow_script_urls) {
  7707. var u = n.replace(/[\s\u0000-\u001F]+/g, "");
  7708. try {
  7709. u = decodeURIComponent(u)
  7710. } catch (c) {
  7711. u = unescape(u)
  7712. }
  7713. if (I.test(u))
  7714. return;
  7715. if (function(e, t) {
  7716. return !e.allow_html_data_urls && (/^data:image\//i.test(t) ? !1 === e.allow_svg_data_urls && /^data:image\/svg\+xml/i.test(t) : /^data:/i.test(t))
  7717. }(q, u))
  7718. return
  7719. }
  7720. h && (t in V || 0 === t.indexOf("on")) || (s.map[t] = n,
  7721. s.push({
  7722. name: t,
  7723. value: n
  7724. }))
  7725. }
  7726. var o, u, c, s, l, f, d, h, m, g, p, v, y, b, C, w, x, z, E, N, S, k, T, A, M, R, _, D, O, H = 0, B = [], P = 0, L = Sr.decode, V = Zn.makeMap("src,href,data,background,formaction,poster,xlink:href"), I = /((java|vb)script|mhtml):/i, F = "html" === e ? 0 : 1;
  7727. for (M = new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),
  7728. R = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,
  7729. g = $.getShortEndedElements(),
  7730. A = q.self_closing_elements || $.getSelfClosingElements(),
  7731. p = $.getBoolAttrs(),
  7732. y = q.validate,
  7733. m = q.remove_internals,
  7734. O = q.fix_self_closing,
  7735. _ = $.getSpecialElements(),
  7736. T = i + ">"; o = M.exec(T); ) {
  7737. var U = o[0];
  7738. if (H < o.index && X(L(i.substr(H, o.index - H))),
  7739. u = o[7])
  7740. ":" === (u = u.toLowerCase()).charAt(0) && (u = u.substr(1)),
  7741. t(u);
  7742. else if (u = o[8]) {
  7743. if (o.index + U.length > i.length) {
  7744. X(L(i.substr(o.index))),
  7745. H = o.index + U.length;
  7746. continue
  7747. }
  7748. ":" === (u = u.toLowerCase()).charAt(0) && (u = u.substr(1)),
  7749. v = u in g,
  7750. O && A[u] && 0 < B.length && B[B.length - 1].name === u && t(u);
  7751. var j = pf(R, o[9]);
  7752. if (null !== j) {
  7753. if ("all" === j) {
  7754. H = gf($, i, M.lastIndex),
  7755. M.lastIndex = H;
  7756. continue
  7757. }
  7758. C = !1
  7759. }
  7760. if (!y || (b = $.getElementRule(u))) {
  7761. if (C = !0,
  7762. y && (z = b.attributes,
  7763. E = b.attributePatterns),
  7764. (x = o[9]) ? ((h = -1 !== x.indexOf("data-mce-type")) && m && (C = !1),
  7765. (s = []).map = {},
  7766. x.replace(R, r)) : (s = []).map = {},
  7767. y && !h) {
  7768. if (N = b.attributesRequired,
  7769. S = b.attributesDefault,
  7770. k = b.attributesForced,
  7771. b.removeEmptyAttrs && !s.length && (C = !1),
  7772. k)
  7773. for (l = k.length; l--; )
  7774. d = (w = k[l]).name,
  7775. "{$uid}" === (D = w.value) && (D = "mce_" + P++),
  7776. s.map[d] = D,
  7777. s.push({
  7778. name: d,
  7779. value: D
  7780. });
  7781. if (S)
  7782. for (l = S.length; l--; )
  7783. (d = (w = S[l]).name)in s.map || ("{$uid}" === (D = w.value) && (D = "mce_" + P++),
  7784. s.map[d] = D,
  7785. s.push({
  7786. name: d,
  7787. value: D
  7788. }));
  7789. if (N) {
  7790. for (l = N.length; l-- && !(N[l]in s.map); )
  7791. ;
  7792. -1 === l && (C = !1)
  7793. }
  7794. if (w = s.map["data-mce-bogus"]) {
  7795. if ("all" === w) {
  7796. H = gf($, i, M.lastIndex),
  7797. M.lastIndex = H;
  7798. continue
  7799. }
  7800. C = !1
  7801. }
  7802. }
  7803. C && Y(u, s, v)
  7804. } else
  7805. C = !1;
  7806. if (c = _[u]) {
  7807. c.lastIndex = H = o.index + U.length,
  7808. H = (o = c.exec(i)) ? (C && (f = i.substr(H, o.index - H)),
  7809. o.index + o[0].length) : (f = i.substr(H),
  7810. i.length),
  7811. C && (0 < f.length && X(f, !0),
  7812. G(u)),
  7813. M.lastIndex = H;
  7814. continue
  7815. }
  7816. v || (x && x.indexOf("/") === x.length - 1 ? C && G(u) : B.push({
  7817. name: u,
  7818. valid: C
  7819. }))
  7820. } else if (u = o[1])
  7821. a(u);
  7822. else if (u = o[2]) {
  7823. if (!(1 == F || q.preserve_cdata || 0 < B.length && $.isValidChild(B[B.length - 1].name, "#cdata"))) {
  7824. H = n("", o.index + 2),
  7825. M.lastIndex = H;
  7826. continue
  7827. }
  7828. K(u)
  7829. } else if (u = o[3])
  7830. J(u);
  7831. else {
  7832. if ((u = o[4]) || "<!" === U) {
  7833. H = n(u, o.index + U.length),
  7834. M.lastIndex = H;
  7835. continue
  7836. }
  7837. if (u = o[5]) {
  7838. if (1 != F) {
  7839. H = n("?", o.index + 2),
  7840. M.lastIndex = H;
  7841. continue
  7842. }
  7843. Z(u, o[6])
  7844. }
  7845. }
  7846. H = o.index + U.length
  7847. }
  7848. for (H < i.length && X(L(i.substr(H))),
  7849. l = B.length - 1; 0 <= l; l--)
  7850. (u = B[l]).valid && G(u.name)
  7851. }
  7852. }
  7853. }
  7854. (vf = vf || {}).findEndTag = gf;
  7855. function yf(e, t) {
  7856. var n, r, o, i, a, u = t, c = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g, s = e.schema;
  7857. for (u = function(e, t) {
  7858. var n = new RegExp(["\\s?(" + e.join("|") + ')="[^"]+"'].join("|"),"gi");
  7859. return t.replace(n, "")
  7860. }(e.getTempAttrs(), u),
  7861. a = s.getShortEndedElements(); i = c.exec(u); )
  7862. r = c.lastIndex,
  7863. o = i[0].length,
  7864. n = a[i[1]] ? r : fd.findEndTag(s, u, r),
  7865. u = u.substring(0, r - o) + u.substring(n),
  7866. c.lastIndex = r - o;
  7867. return mu.trim(u)
  7868. }
  7869. function bf(e, t, n) {
  7870. var r;
  7871. if (t.format = t.format ? t.format : "html",
  7872. t.get = !0,
  7873. t.getInner = !0,
  7874. t.no_events || e.fire("BeforeGetContent", t),
  7875. "raw" === t.format)
  7876. r = Zn.trim(dd.trimExternal(e.serializer, n.innerHTML));
  7877. else if ("text" === t.format)
  7878. r = mu.trim(n.innerText || n.textContent);
  7879. else {
  7880. if ("tree" === t.format)
  7881. return e.serializer.serialize(n, t);
  7882. r = function(e, t) {
  7883. var n = as(e)
  7884. , r = new RegExp("^(<" + n + "[^>]*>(&nbsp;|&#160;|\\s|\xa0|<br \\/>|)<\\/" + n + ">[\r\n]*|<br \\/>[\r\n]*)$");
  7885. return t.replace(r, "")
  7886. }(e, e.serializer.serialize(n, t))
  7887. }
  7888. return "text" === t.format || hr(it.fromDom(n)) ? t.content = r : t.content = Zn.trim(r),
  7889. t.no_events || e.fire("GetContent", t),
  7890. t.content
  7891. }
  7892. function Cf(e) {
  7893. var u, c, s, l, f, d = [];
  7894. return u = (e = e || {}).indent,
  7895. c = hd(e.indent_before || ""),
  7896. s = hd(e.indent_after || ""),
  7897. l = Sr.getEncodeFunc(e.entity_encoding || "raw", e.entities),
  7898. f = "html" === e.element_format,
  7899. {
  7900. start: function(e, t, n) {
  7901. var r, o, i, a;
  7902. if (u && c[e] && 0 < d.length && 0 < (a = d[d.length - 1]).length && "\n" !== a && d.push("\n"),
  7903. d.push("<", e),
  7904. t)
  7905. for (r = 0,
  7906. o = t.length; r < o; r++)
  7907. i = t[r],
  7908. d.push(" ", i.name, '="', l(i.value, !0), '"');
  7909. d[d.length] = !n || f ? ">" : " />",
  7910. n && u && s[e] && 0 < d.length && 0 < (a = d[d.length - 1]).length && "\n" !== a && d.push("\n")
  7911. },
  7912. end: function(e) {
  7913. var t;
  7914. d.push("</", e, ">"),
  7915. u && s[e] && 0 < d.length && 0 < (t = d[d.length - 1]).length && "\n" !== t && d.push("\n")
  7916. },
  7917. text: function(e, t) {
  7918. 0 < e.length && (d[d.length] = t ? e : l(e))
  7919. },
  7920. cdata: function(e) {
  7921. d.push("<![CDATA[", e, "]]>")
  7922. },
  7923. comment: function(e) {
  7924. d.push("\x3c!--", e, "--\x3e")
  7925. },
  7926. pi: function(e, t) {
  7927. t ? d.push("<?", e, " ", l(t), "?>") : d.push("<?", e, "?>"),
  7928. u && d.push("\n")
  7929. },
  7930. doctype: function(e) {
  7931. d.push("<!DOCTYPE", e, ">", u ? "\n" : "")
  7932. },
  7933. reset: function() {
  7934. d.length = 0
  7935. },
  7936. getContent: function() {
  7937. return d.join("").replace(/\n$/, "")
  7938. }
  7939. }
  7940. }
  7941. function wf(t, m) {
  7942. void 0 === m && (m = Pr());
  7943. var g = Cf(t);
  7944. return (t = t || {}).validate = !("validate"in t) || t.validate,
  7945. {
  7946. serialize: function(e) {
  7947. var f, d;
  7948. d = t.validate,
  7949. f = {
  7950. 3: function(e) {
  7951. g.text(e.value, e.raw)
  7952. },
  7953. 8: function(e) {
  7954. g.comment(e.value)
  7955. },
  7956. 7: function(e) {
  7957. g.pi(e.name, e.value)
  7958. },
  7959. 10: function(e) {
  7960. g.doctype(e.value)
  7961. },
  7962. 4: function(e) {
  7963. g.cdata(e.value)
  7964. },
  7965. 11: function(e) {
  7966. if (e = e.firstChild)
  7967. for (; h(e),
  7968. e = e.next; )
  7969. ;
  7970. }
  7971. },
  7972. g.reset();
  7973. var h = function(e) {
  7974. var t, n, r, o, i, a, u, c, s, l = f[e.type];
  7975. if (l)
  7976. l(e);
  7977. else {
  7978. if (t = e.name,
  7979. n = e.shortEnded,
  7980. r = e.attributes,
  7981. d && r && 1 < r.length && ((a = []).map = {},
  7982. s = m.getElementRule(e.name))) {
  7983. for (u = 0,
  7984. c = s.attributesOrder.length; u < c; u++)
  7985. (o = s.attributesOrder[u])in r.map && (i = r.map[o],
  7986. a.map[o] = i,
  7987. a.push({
  7988. name: o,
  7989. value: i
  7990. }));
  7991. for (u = 0,
  7992. c = r.length; u < c; u++)
  7993. (o = r[u].name)in a.map || (i = r.map[o],
  7994. a.map[o] = i,
  7995. a.push({
  7996. name: o,
  7997. value: i
  7998. }));
  7999. r = a
  8000. }
  8001. if (g.start(e.name, r, n),
  8002. !n) {
  8003. if (e = e.firstChild)
  8004. for (; h(e),
  8005. e = e.next; )
  8006. ;
  8007. g.end(t)
  8008. }
  8009. }
  8010. };
  8011. return 1 !== e.type || t.inner ? f[11](e) : h(e),
  8012. g.getContent()
  8013. }
  8014. }
  8015. }
  8016. function xf(e, t, n) {
  8017. var r = function(e, n, t) {
  8018. var r = {}
  8019. , o = {}
  8020. , i = [];
  8021. for (var a in t.firstChild && md(t.firstChild, function(t) {
  8022. F(e, function(e) {
  8023. e.name === t.name && (r[e.name] ? r[e.name].nodes.push(t) : r[e.name] = {
  8024. filter: e,
  8025. nodes: [t]
  8026. })
  8027. }),
  8028. F(n, function(e) {
  8029. "string" == typeof t.attr(e.name) && (o[e.name] ? o[e.name].nodes.push(t) : o[e.name] = {
  8030. filter: e,
  8031. nodes: [t]
  8032. })
  8033. })
  8034. }),
  8035. r)
  8036. r.hasOwnProperty(a) && i.push(r[a]);
  8037. for (var u in o)
  8038. o.hasOwnProperty(u) && i.push(o[u]);
  8039. return i
  8040. }(e, t, n);
  8041. F(r, function(t) {
  8042. F(t.filter.callbacks, function(e) {
  8043. e(t.nodes, t.filter.name, {})
  8044. })
  8045. })
  8046. }
  8047. function zf(e) {
  8048. var t = ve(e).dom();
  8049. return e.dom() === t.activeElement
  8050. }
  8051. function Ef(e) {
  8052. var t = e !== undefined ? e.dom() : j.document;
  8053. return R.from(t.activeElement).map(it.fromDom)
  8054. }
  8055. function Nf(e, t) {
  8056. var n = Lt(t) ? tf(t).length : Ee(t).length + 1;
  8057. return n < e ? n : e < 0 ? 0 : e
  8058. }
  8059. function Sf(e) {
  8060. return Cd.range(e.start(), Nf(e.soffset(), e.start()), e.finish(), Nf(e.foffset(), e.finish()))
  8061. }
  8062. function kf(e, t) {
  8063. return !Qt.isRestrictedNode(t.dom()) && (Ot(e, t) || pe(e, t))
  8064. }
  8065. function Tf(t) {
  8066. return function(e) {
  8067. return kf(t, e.start()) && kf(t, e.finish())
  8068. }
  8069. }
  8070. function Af(e) {
  8071. return !0 === e.inline || wd.isIE()
  8072. }
  8073. function Mf(e) {
  8074. return Cd.range(it.fromDom(e.startContainer), e.startOffset, it.fromDom(e.endContainer), e.endOffset)
  8075. }
  8076. function Rf(e) {
  8077. var t = e.getSelection();
  8078. return (t && 0 !== t.rangeCount ? R.from(t.getRangeAt(0)) : R.none()).map(Mf)
  8079. }
  8080. function _f(e) {
  8081. var t = ye(e);
  8082. return Rf(t.dom()).filter(Tf(e))
  8083. }
  8084. function Df(e, t) {
  8085. return R.from(t).filter(Tf(e)).map(Sf)
  8086. }
  8087. function Of(e) {
  8088. var t = j.document.createRange();
  8089. try {
  8090. return t.setStart(e.start().dom(), e.soffset()),
  8091. t.setEnd(e.finish().dom(), e.foffset()),
  8092. R.some(t)
  8093. } catch (n) {
  8094. return R.none()
  8095. }
  8096. }
  8097. function Hf(t) {
  8098. return (t.bookmark ? t.bookmark : R.none()).bind(function(e) {
  8099. return Df(it.fromDom(t.getBody()), e)
  8100. }).bind(Of)
  8101. }
  8102. function Bf(t, e) {
  8103. fe().browser.isIE() ? function(e) {
  8104. e.on("focusout", function() {
  8105. xd(e)
  8106. })
  8107. }(t) : function(e, t) {
  8108. e.on("mouseup touchend", function(e) {
  8109. t.throttle()
  8110. })
  8111. }(t, e),
  8112. t.on("keyup NodeChange", function(e) {
  8113. !function(e) {
  8114. return "nodechange" === e.type && e.selectionChange
  8115. }(e) && xd(t)
  8116. })
  8117. }
  8118. function Pf(e) {
  8119. return Nd.isEditorUIElement(e)
  8120. }
  8121. function Lf(t, e) {
  8122. var n = t ? t.settings.custom_ui_selector : "";
  8123. return null !== kd.getParent(e, function(e) {
  8124. return Pf(e) || !!n && t.dom.is(e, n)
  8125. })
  8126. }
  8127. function Vf(r, e) {
  8128. var t = e.editor;
  8129. Sd(t),
  8130. t.on("focusin", function() {
  8131. var e = r.focusedEditor;
  8132. e !== this && (e && e.fire("blur", {
  8133. focusedEditor: this
  8134. }),
  8135. r.setActive(this),
  8136. (r.focusedEditor = this).fire("focus", {
  8137. blurredEditor: e
  8138. }),
  8139. this.focus(!0))
  8140. }),
  8141. t.on("focusout", function() {
  8142. var t = this;
  8143. Pn.setEditorTimeout(t, function() {
  8144. var e = r.focusedEditor;
  8145. Lf(t, function() {
  8146. try {
  8147. return j.document.activeElement
  8148. } catch (e) {
  8149. return j.document.body
  8150. }
  8151. }()) || e !== t || (t.fire("blur", {
  8152. focusedEditor: null
  8153. }),
  8154. r.focusedEditor = null)
  8155. })
  8156. }),
  8157. cd || (cd = function(e) {
  8158. var t, n = r.activeEditor;
  8159. t = e.target,
  8160. n && t.ownerDocument === j.document && (t === j.document.body || Lf(n, t) || r.focusedEditor !== n || (n.fire("blur", {
  8161. focusedEditor: null
  8162. }),
  8163. r.focusedEditor = null))
  8164. }
  8165. ,
  8166. kd.bind(j.document, "focusin", cd))
  8167. }
  8168. function If(e, t) {
  8169. e.focusedEditor === t.editor && (e.focusedEditor = null),
  8170. e.activeEditor || (kd.unbind(j.document, "focusin", cd),
  8171. cd = null)
  8172. }
  8173. function Ff(t, e) {
  8174. return function(e) {
  8175. return e.collapsed ? R.from(Qa(e.startContainer, e.startOffset)).map(it.fromDom) : R.none()
  8176. }(e).bind(function(e) {
  8177. return fr(e) ? R.some(e) : !1 === Ot(t, e) ? R.some(t) : R.none()
  8178. })
  8179. }
  8180. function Uf(t, e) {
  8181. Ff(it.fromDom(t.getBody()), e).bind(function(e) {
  8182. return Ul.firstPositionIn(e.dom())
  8183. }).fold(function() {
  8184. t.selection.normalize()
  8185. }, function(e) {
  8186. return t.selection.setRng(e.toRange())
  8187. })
  8188. }
  8189. function jf(e) {
  8190. if (e.setActive)
  8191. try {
  8192. e.setActive()
  8193. } catch (t) {
  8194. e.focus()
  8195. }
  8196. else
  8197. e.focus()
  8198. }
  8199. function qf(e) {
  8200. return zf(e) || function(t) {
  8201. return Ef(ve(t)).filter(function(e) {
  8202. return t.dom().contains(e.dom())
  8203. })
  8204. }(e).isSome()
  8205. }
  8206. function $f(e) {
  8207. return e.inline ? function(e) {
  8208. var t = e.getBody();
  8209. return t && qf(it.fromDom(t))
  8210. }(e) : function(e) {
  8211. return e.iframeElement && zf(it.fromDom(e.iframeElement))
  8212. }(e)
  8213. }
  8214. function Wf(e) {
  8215. return e instanceof hf
  8216. }
  8217. function Kf(e, t) {
  8218. e.dom.setHTML(e.getBody(), t),
  8219. function(r) {
  8220. Dd(r) && Ul.firstPositionIn(r.getBody()).each(function(e) {
  8221. var t = e.getNode()
  8222. , n = Qt.isTable(t) ? Ul.firstPositionIn(t).getOr(e) : e;
  8223. r.selection.setRng(n.toRange())
  8224. })
  8225. }(e)
  8226. }
  8227. function Xf(t, n, r) {
  8228. return void 0 === r && (r = {}),
  8229. r.format = r.format ? r.format : "html",
  8230. r.set = !0,
  8231. r.content = Wf(n) ? "" : n,
  8232. Wf(n) || r.no_events || (t.fire("BeforeSetContent", r),
  8233. n = r.content),
  8234. R.from(t.getBody()).fold($(n), function(e) {
  8235. return Wf(n) ? function(e, t, n, r) {
  8236. xf(e.parser.getNodeFilters(), e.parser.getAttributeFilters(), n);
  8237. var o = wf({
  8238. validate: e.validate
  8239. }, e.schema).serialize(n);
  8240. return r.content = hr(it.fromDom(t)) ? o : Zn.trim(o),
  8241. Kf(e, r.content),
  8242. r.no_events || e.fire("SetContent", r),
  8243. n
  8244. }(t, e, n, r) : function(e, t, n, r) {
  8245. var o, i;
  8246. return 0 === n.length || /^\s+$/.test(n) ? (i = '<br data-mce-bogus="1">',
  8247. "TABLE" === t.nodeName ? n = "<tr><td>" + i + "</td></tr>" : /^(UL|OL)$/.test(t.nodeName) && (n = "<li>" + i + "</li>"),
  8248. n = (o = as(e)) && e.schema.isValidChild(t.nodeName.toLowerCase(), o.toLowerCase()) ? (n = i,
  8249. e.dom.createHTML(o, e.settings.forced_root_block_attrs, n)) : n || '<br data-mce-bogus="1">',
  8250. Kf(e, n),
  8251. e.fire("SetContent", r)) : ("raw" !== r.format && (n = wf({
  8252. validate: e.validate
  8253. }, e.schema).serialize(e.parser.parse(n, {
  8254. isRootContent: !0,
  8255. insert: !0
  8256. }))),
  8257. r.content = hr(it.fromDom(t)) ? n : Zn.trim(n),
  8258. Kf(e, r.content),
  8259. r.no_events || e.fire("SetContent", r)),
  8260. r.content
  8261. }(t, e, n, r)
  8262. })
  8263. }
  8264. function Yf(e) {
  8265. return R.from(e).each(function(e) {
  8266. return e.destroy()
  8267. })
  8268. }
  8269. function Gf(e) {
  8270. if (!e.removed) {
  8271. var t = e._selectionOverrides
  8272. , n = e.editorUpload
  8273. , r = e.getBody()
  8274. , o = e.getElement();
  8275. r && e.save({
  8276. is_removing: !0
  8277. }),
  8278. e.removed = !0,
  8279. e.unbindAllNativeEvents(),
  8280. e.hasHiddenInput && o && Hd.remove(o.nextSibling),
  8281. function(e) {
  8282. e.fire("remove")
  8283. }(e),
  8284. e.editorManager.remove(e),
  8285. !e.inline && r && function(e) {
  8286. Hd.setStyle(e.id, "display", e.orgDisplay)
  8287. }(e),
  8288. function(e) {
  8289. e.fire("detach")
  8290. }(e),
  8291. Hd.remove(e.getContainer()),
  8292. Yf(t),
  8293. Yf(n),
  8294. e.destroy()
  8295. }
  8296. }
  8297. function Zf(e, t) {
  8298. var n = e.selection
  8299. , r = e.dom;
  8300. e.destroyed || (t || e.removed ? (t || (e.editorManager.off("beforeunload", e._beforeUnload),
  8301. e.theme && e.theme.destroy && e.theme.destroy(),
  8302. Yf(n),
  8303. Yf(r)),
  8304. function(e) {
  8305. var t = e.formElement;
  8306. t && (t._mceOldSubmit && (t.submit = t._mceOldSubmit,
  8307. t._mceOldSubmit = null),
  8308. Hd.unbind(t, "submit reset", e.formEventDelegate))
  8309. }(e),
  8310. function(e) {
  8311. e.contentAreaContainer = e.formElement = e.container = e.editorContainer = null,
  8312. e.bodyElement = e.contentDocument = e.contentWindow = null,
  8313. e.iframeElement = e.targetElm = null,
  8314. e.selection && (e.selection = e.selection.win = e.selection.dom = e.selection.dom.doc = null)
  8315. }(e),
  8316. e.destroyed = !0) : e.remove())
  8317. }
  8318. function Jf(e) {
  8319. var t = D(e) ? e.join(" ") : e
  8320. , n = X(K(t) ? t.split(" ") : [], ce);
  8321. return U(n, function(e) {
  8322. return 0 < e.length
  8323. })
  8324. }
  8325. function Qf(e, t) {
  8326. return e.sections().hasOwnProperty(t)
  8327. }
  8328. function ed(e, t) {
  8329. return A(e, "toolbar_mode").orThunk(function() {
  8330. return A(e, "toolbar_drawer").map(function(e) {
  8331. return !1 === e ? "wrap" : e
  8332. })
  8333. }).getOr(t)
  8334. }
  8335. function td(e, t, n, r) {
  8336. var o = Jf(n.forced_plugins)
  8337. , i = Jf(r.plugins)
  8338. , a = function(e, t) {
  8339. return Qf(e, t) ? e.sections()[t] : {}
  8340. }(t, "mobile")
  8341. , u = a.plugins ? Jf(a.plugins) : i
  8342. , c = function(e, t) {
  8343. return [].concat(Jf(e)).concat(Jf(t))
  8344. }(o, e && function(e, t, n) {
  8345. var r = e.sections();
  8346. return Qf(e, t) && r[t].theme === n
  8347. }(t, "mobile", "mobile") ? function(e) {
  8348. return U(e, d(h, jd))
  8349. }(u) : e && Qf(t, "mobile") ? u : i);
  8350. return Zn.extend(r, {
  8351. plugins: c.join(" ")
  8352. })
  8353. }
  8354. function nd(e, t, n, r, o) {
  8355. var i = e ? {
  8356. mobile: function(e, t) {
  8357. var n = {
  8358. resize: !1,
  8359. toolbar_mode: ed(e, "scrolling"),
  8360. toolbar_sticky: !1
  8361. };
  8362. return te(te(te({}, qd), n), t ? {
  8363. menubar: !1
  8364. } : {})
  8365. }(o, t)
  8366. } : {}
  8367. , a = function(n, e) {
  8368. var t = T(e, function(e, t) {
  8369. return h(n, t)
  8370. });
  8371. return Ld(t.t, t.f)
  8372. }(["mobile"], Pd(i, o))
  8373. , u = Zn.extend(n, r, a.settings(), function(e, t) {
  8374. return e && Qf(t, "mobile")
  8375. }(e, a) ? function(e, t, n) {
  8376. void 0 === n && (n = {});
  8377. var r = e.sections()
  8378. , o = r.hasOwnProperty(t) ? r[t] : {};
  8379. return Zn.extend({}, n, o)
  8380. }(a, "mobile") : {}, {
  8381. validate: !0,
  8382. external_plugins: function(e, t) {
  8383. var n = t.external_plugins ? t.external_plugins : {};
  8384. return e && e.external_plugins ? Zn.extend({}, e.external_plugins, n) : n
  8385. }(r, a.settings())
  8386. });
  8387. return td(e, a, r, u)
  8388. }
  8389. function rd(e, t, n, r, o) {
  8390. var i = function(e, t, n, r, o) {
  8391. var i = {
  8392. id: t,
  8393. theme: "silver",
  8394. toolbar_mode: ed(e, "floating"),
  8395. plugins: "",
  8396. document_base_url: n,
  8397. add_form_submit_trigger: !0,
  8398. submit_patch: !0,
  8399. add_unload_trigger: !0,
  8400. convert_urls: !0,
  8401. relative_urls: !0,
  8402. remove_script_host: !0,
  8403. object_resizing: !0,
  8404. doctype: "<!DOCTYPE html>",
  8405. visual: !0,
  8406. font_size_legacy_values: "xx-small,small,medium,large,x-large,xx-large,300%",
  8407. forced_root_block: "p",
  8408. hidden_input: !0,
  8409. inline_styles: !0,
  8410. convert_fonts_to_spans: !0,
  8411. indent: !0,
  8412. 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,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",
  8413. 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,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",
  8414. entity_encoding: "named",
  8415. url_converter: o.convertURL,
  8416. url_converter_scope: o
  8417. };
  8418. return te(te({}, i), r ? qd : {})
  8419. }(o, t, n, Id, e);
  8420. return nd(Fd || Ud, Fd, i, r, o)
  8421. }
  8422. function od(e, t, n) {
  8423. return R.from(t.settings[n]).filter(e)
  8424. }
  8425. function id(e, t, n, r) {
  8426. var o = t in e.settings ? e.settings[t] : n;
  8427. return "hash" === r ? function(e) {
  8428. var n = {};
  8429. return "string" == typeof e ? F(0 < e.indexOf("=") ? e.split(/[;,](?![^=;,]*(?:[;,]|$))/) : e.split(","), function(e) {
  8430. var t = e.split("=");
  8431. 1 < t.length ? n[Zn.trim(t[0])] = Zn.trim(t[1]) : n[Zn.trim(t[0])] = Zn.trim(t[0])
  8432. }) : n = e,
  8433. n
  8434. }(o) : "string" === r ? od(K, e, t).getOr(n) : "number" === r ? od(P, e, t).getOr(n) : "boolean" === r ? od(H, e, t).getOr(n) : "object" === r ? od(_, e, t).getOr(n) : "array" === r ? od(D, e, t).getOr(n) : "string[]" === r ? od(function(t) {
  8435. return function(e) {
  8436. return D(e) && b(e, t)
  8437. }
  8438. }(K), e, t).getOr(n) : "function" === r ? od(B, e, t).getOr(n) : o
  8439. }
  8440. function ad(e, t) {
  8441. return t.dom()[e]
  8442. }
  8443. function ud(e, t) {
  8444. return parseInt(Ge(t, e), 10)
  8445. }
  8446. var cd, sd, ld, fd = vf, dd = {
  8447. trimExternal: yf,
  8448. trimInternal: yf
  8449. }, hd = Zn.makeMap, md = function(e, t) {
  8450. t(e),
  8451. e.firstChild && md(e.firstChild, t),
  8452. e.next && md(e.next, t)
  8453. }, gd = function(a) {
  8454. if (!D(a))
  8455. throw new Error("cases must be an array");
  8456. if (0 === a.length)
  8457. throw new Error("there must be at least one case");
  8458. var u = []
  8459. , n = {};
  8460. return F(a, function(e, r) {
  8461. var t = Z(e);
  8462. if (1 !== t.length)
  8463. throw new Error("one and only one name per case");
  8464. var o = t[0]
  8465. , i = e[o];
  8466. if (n[o] !== undefined)
  8467. throw new Error("duplicate key detected:" + o);
  8468. if ("cata" === o)
  8469. throw new Error("cannot have a case named cata (sorry)");
  8470. if (!D(i))
  8471. throw new Error("case arguments must be an array");
  8472. u.push(o),
  8473. n[o] = function() {
  8474. var e = arguments.length;
  8475. if (e !== i.length)
  8476. throw new Error("Wrong number of arguments to case " + o + ". Expected " + i.length + " (" + i + "), got " + e);
  8477. for (var n = new Array(e), t = 0; t < n.length; t++)
  8478. n[t] = arguments[t];
  8479. return {
  8480. fold: function() {
  8481. if (arguments.length !== a.length)
  8482. throw new Error("Wrong number of arguments to fold. Expected " + a.length + ", got " + arguments.length);
  8483. return arguments[r].apply(null, n)
  8484. },
  8485. match: function(e) {
  8486. var t = Z(e);
  8487. if (u.length !== t.length)
  8488. throw new Error("Wrong number of arguments to match. Expected: " + u.join(",") + "\nActual: " + t.join(","));
  8489. if (!b(u, function(e) {
  8490. return h(t, e)
  8491. }))
  8492. throw new Error("Not all branches were specified when using match. Specified: " + t.join(", ") + "\nRequired: " + u.join(", "));
  8493. return e[o].apply(null, n)
  8494. },
  8495. log: function(e) {
  8496. j.console.log(e, {
  8497. constructors: u,
  8498. constructor: o,
  8499. params: n
  8500. })
  8501. }
  8502. }
  8503. }
  8504. }),
  8505. n
  8506. }, pd = {
  8507. create: de("start", "soffset", "finish", "foffset")
  8508. }, vd = gd([{
  8509. before: ["element"]
  8510. }, {
  8511. on: ["element", "offset"]
  8512. }, {
  8513. after: ["element"]
  8514. }]), yd = (vd.before,
  8515. vd.on,
  8516. vd.after,
  8517. function(e) {
  8518. return e.fold(W, W, W)
  8519. }
  8520. ), bd = gd([{
  8521. domRange: ["rng"]
  8522. }, {
  8523. relative: ["startSitu", "finishSitu"]
  8524. }, {
  8525. exact: ["start", "soffset", "finish", "foffset"]
  8526. }]), Cd = {
  8527. domRange: bd.domRange,
  8528. relative: bd.relative,
  8529. exact: bd.exact,
  8530. exactFromRange: function(e) {
  8531. return bd.exact(e.start(), e.soffset(), e.finish(), e.foffset())
  8532. },
  8533. getWin: function(e) {
  8534. var t = function(e) {
  8535. return e.match({
  8536. domRange: function(e) {
  8537. return it.fromDom(e.startContainer)
  8538. },
  8539. relative: function(e, t) {
  8540. return yd(e)
  8541. },
  8542. exact: function(e, t, n, r) {
  8543. return e
  8544. }
  8545. })
  8546. }(e);
  8547. return ye(t)
  8548. },
  8549. range: pd.create
  8550. }, wd = fe().browser, xd = function(e) {
  8551. var t = Af(e) ? _f(it.fromDom(e.getBody())) : R.none();
  8552. e.bookmark = t.isSome() ? t : e.bookmark
  8553. }, zd = function(t) {
  8554. Hf(t).each(function(e) {
  8555. t.selection.setRng(e)
  8556. })
  8557. }, Ed = Hf, Nd = {
  8558. isEditorUIElement: function(e) {
  8559. var t = e.className.toString();
  8560. return -1 !== t.indexOf("tox-") || -1 !== t.indexOf("mce-")
  8561. }
  8562. }, Sd = function(e) {
  8563. var t = fa(function() {
  8564. xd(e)
  8565. }, 0);
  8566. e.on("init", function() {
  8567. e.inline && function(e, t) {
  8568. function n() {
  8569. t.throttle()
  8570. }
  8571. Qi.DOM.bind(j.document, "mouseup", n),
  8572. e.on("remove", function() {
  8573. Qi.DOM.unbind(j.document, "mouseup", n)
  8574. })
  8575. }(e, t),
  8576. Bf(e, t)
  8577. }),
  8578. e.on("remove", function() {
  8579. t.cancel()
  8580. })
  8581. }, kd = Qi.DOM, Td = function(e) {
  8582. e.on("AddEditor", d(Vf, e)),
  8583. e.on("RemoveEditor", d(If, e))
  8584. }, Ad = function(e) {
  8585. var t = e.classList;
  8586. return t !== undefined && (t.contains("tox-edit-area") || t.contains("tox-edit-area__iframe") || t.contains("mce-content-body"))
  8587. }, Md = Lf, Rd = function(e) {
  8588. return e.editorManager.setActive(e)
  8589. }, _d = function(e, t) {
  8590. e.removed || (t ? Rd(e) : function(t) {
  8591. var e = t.selection
  8592. , n = t.getBody()
  8593. , r = e.getRng();
  8594. t.quirks.refreshContentEditable(),
  8595. t.bookmark !== undefined && !1 === $f(t) && Ed(t).each(function(e) {
  8596. t.selection.setRng(e),
  8597. r = e
  8598. });
  8599. var o = function(t, e) {
  8600. return t.dom.getParent(e, function(e) {
  8601. return "true" === t.dom.getContentEditable(e)
  8602. })
  8603. }(t, e.getNode());
  8604. if (t.$.contains(n, o))
  8605. return jf(o),
  8606. Uf(t, r),
  8607. Rd(t);
  8608. t.inline || (Wn.opera || jf(n),
  8609. t.getWin().focus()),
  8610. (Wn.gecko || t.inline) && (jf(n),
  8611. Uf(t, r)),
  8612. Rd(t)
  8613. }(e))
  8614. }, Dd = $f, Od = function(e) {
  8615. return $f(e) || function(t) {
  8616. return Ef().filter(function(e) {
  8617. return !Ad(e.dom()) && Md(t, e.dom())
  8618. }).isSome()
  8619. }(e)
  8620. }, Hd = Qi.DOM, Bd = Object.prototype.hasOwnProperty, Pd = (sd = function(e, t) {
  8621. return _(e) && _(t) ? Pd(e, t) : t
  8622. }
  8623. ,
  8624. function() {
  8625. for (var e = new Array(arguments.length), t = 0; t < e.length; t++)
  8626. e[t] = arguments[t];
  8627. if (0 === e.length)
  8628. throw new Error("Can't merge zero objects");
  8629. for (var n = {}, r = 0; r < e.length; r++) {
  8630. var o = e[r];
  8631. for (var i in o)
  8632. Bd.call(o, i) && (n[i] = sd(n[i], o[i]))
  8633. }
  8634. return n
  8635. }
  8636. ), Ld = de("sections", "settings"), Vd = fe().deviceType, Id = Vd.isTouch(), Fd = Vd.isPhone(), Ud = Vd.isTablet(), jd = ["lists", "autolink", "autosave"], qd = {
  8637. table_grid: !1,
  8638. object_resizing: !1,
  8639. resize: !1
  8640. }, $d = (ld = {},
  8641. {
  8642. add: function(e, t) {
  8643. ld[e] = t
  8644. },
  8645. get: function(e) {
  8646. return ld[e] ? ld[e] : {
  8647. icons: {}
  8648. }
  8649. },
  8650. has: function(e) {
  8651. return ee(ld, e)
  8652. }
  8653. }), Wd = d(ad, "clientWidth"), Kd = d(ad, "clientHeight"), Xd = d(ud, "margin-top"), Yd = d(ud, "margin-left"), Gd = function(e, t, n) {
  8654. var r = it.fromDom(e.getBody())
  8655. , o = e.inline ? r : function(e) {
  8656. return it.fromDom(e.dom().ownerDocument.documentElement)
  8657. }(r)
  8658. , i = function(e, t, n, r) {
  8659. var o = function(e) {
  8660. return e.dom().getBoundingClientRect()
  8661. }(t);
  8662. return {
  8663. x: n - (e ? o.left + t.dom().clientLeft + Yd(t) : 0),
  8664. y: r - (e ? o.top + t.dom().clientTop + Xd(t) : 0)
  8665. }
  8666. }(e.inline, o, t, n);
  8667. return function(e, t, n) {
  8668. var r = Wd(e)
  8669. , o = Kd(e);
  8670. return 0 <= t && 0 <= n && t <= r && n <= o
  8671. }(o, i.x, i.y)
  8672. }, Zd = function(e) {
  8673. return function(e) {
  8674. return R.from(e).map(it.fromDom)
  8675. }(e.inline ? e.getBody() : e.getContentAreaContainer()).map(function(e) {
  8676. return Ot(ve(e), e)
  8677. }).getOr(!1)
  8678. };
  8679. function Jd(n) {
  8680. function r() {
  8681. var e = n.theme;
  8682. return e && e.getNotificationManagerImpl ? e.getNotificationManagerImpl() : function t() {
  8683. function e() {
  8684. throw new Error("Theme did not provide a NotificationManager implementation.")
  8685. }
  8686. return {
  8687. open: e,
  8688. close: e,
  8689. reposition: e,
  8690. getArgs: e
  8691. }
  8692. }()
  8693. }
  8694. function o() {
  8695. 0 < u.length && r().reposition(u)
  8696. }
  8697. function i(t) {
  8698. p(u, function(e) {
  8699. return e === t
  8700. }).each(function(e) {
  8701. u.splice(e, 1)
  8702. })
  8703. }
  8704. function t(t) {
  8705. if (!n.removed && Zd(n))
  8706. return g(u, function(e) {
  8707. return function(e, t) {
  8708. return !(e.type !== t.type || e.text !== t.text || e.progressBar || e.timeout || t.progressBar || t.timeout)
  8709. }(r().getArgs(e), t)
  8710. }).getOrThunk(function() {
  8711. n.editorManager.setActive(n);
  8712. var e = r().open(t, function() {
  8713. i(e),
  8714. o()
  8715. });
  8716. return function(e) {
  8717. u.push(e)
  8718. }(e),
  8719. o(),
  8720. e
  8721. })
  8722. }
  8723. var a, u = [];
  8724. return (a = n).on("SkinLoaded", function() {
  8725. var e = a.settings.service_message;
  8726. e && t({
  8727. text: e,
  8728. type: "warning",
  8729. timeout: 0
  8730. })
  8731. }),
  8732. a.on("ResizeEditor ResizeWindow NodeChange", function() {
  8733. Pn.requestAnimationFrame(o)
  8734. }),
  8735. a.on("remove", function() {
  8736. F(u.slice(), function(e) {
  8737. r().close(e)
  8738. })
  8739. }),
  8740. {
  8741. open: t,
  8742. close: function() {
  8743. R.from(u[0]).each(function(e) {
  8744. r().close(e),
  8745. i(e),
  8746. o()
  8747. })
  8748. },
  8749. getNotifications: function() {
  8750. return u
  8751. }
  8752. }
  8753. }
  8754. var Qd = wa.PluginManager
  8755. , eh = wa.ThemeManager;
  8756. function th(n) {
  8757. function r() {
  8758. var e = n.theme;
  8759. return e && e.getWindowManagerImpl ? e.getWindowManagerImpl() : function t() {
  8760. function e() {
  8761. throw new Error("Theme did not provide a WindowManager implementation.")
  8762. }
  8763. return {
  8764. open: e,
  8765. openUrl: e,
  8766. alert: e,
  8767. confirm: e,
  8768. close: e,
  8769. getParams: e,
  8770. setParams: e
  8771. }
  8772. }()
  8773. }
  8774. function o(e, t) {
  8775. return function() {
  8776. return t ? t.apply(e, arguments) : undefined
  8777. }
  8778. }
  8779. function i(e) {
  8780. c.push(e),
  8781. function(e) {
  8782. n.fire("OpenWindow", {
  8783. dialog: e
  8784. })
  8785. }(e)
  8786. }
  8787. function a(t) {
  8788. !function(e) {
  8789. n.fire("CloseWindow", {
  8790. dialog: e
  8791. })
  8792. }(t),
  8793. 0 === (c = U(c, function(e) {
  8794. return e !== t
  8795. })).length && n.focus()
  8796. }
  8797. function u(e) {
  8798. n.editorManager.setActive(n),
  8799. xd(n);
  8800. var t = e();
  8801. return i(t),
  8802. t
  8803. }
  8804. var c = [];
  8805. return n.on("remove", function() {
  8806. F(c, function(e) {
  8807. r().close(e)
  8808. })
  8809. }),
  8810. {
  8811. open: function(e, t) {
  8812. return u(function() {
  8813. return r().open(e, t, a)
  8814. })
  8815. },
  8816. openUrl: function(e) {
  8817. return u(function() {
  8818. return r().openUrl(e, a)
  8819. })
  8820. },
  8821. alert: function(e, t, n) {
  8822. r().alert(e, o(n || this, t))
  8823. },
  8824. confirm: function(e, t, n) {
  8825. r().confirm(e, o(n || this, t))
  8826. },
  8827. close: function() {
  8828. R.from(c[c.length - 1]).each(function(e) {
  8829. r().close(e),
  8830. a(e)
  8831. })
  8832. }
  8833. }
  8834. }
  8835. function nh(e, t) {
  8836. e.notificationManager.open({
  8837. type: "error",
  8838. text: t
  8839. })
  8840. }
  8841. function rh(e, t) {
  8842. e._skinLoaded ? nh(e, t) : e.on("SkinLoaded", function() {
  8843. nh(e, t)
  8844. })
  8845. }
  8846. function oh(e, t, n) {
  8847. !function(e, t, n) {
  8848. e.fire(t, n)
  8849. }(e, t, {
  8850. message: n
  8851. }),
  8852. j.console.error(n)
  8853. }
  8854. function ih(e, t, n) {
  8855. return n ? "Failed to load " + e + ": " + n + " from url " + t : "Failed to load " + e + " url: " + t
  8856. }
  8857. function ah(e) {
  8858. e.contentCSS = e.contentCSS.concat(function(t) {
  8859. var e = Ms(t)
  8860. , n = t.editorManager.baseURL + "/skins/content"
  8861. , r = "content" + t.editorManager.suffix + ".css"
  8862. , o = !0 === t.inline;
  8863. return X(e, function(e) {
  8864. return function(e) {
  8865. return /^[a-z0-9\-]+$/i.test(e)
  8866. }(e) && !o ? n + "/" + e + "/" + r : t.documentBaseURI.toAbsolute(e)
  8867. })
  8868. }(e))
  8869. }
  8870. var uh = function(e) {
  8871. for (var t = [], n = 1; n < arguments.length; n++)
  8872. t[n - 1] = arguments[n];
  8873. var r = j.window.console;
  8874. r && (r.error ? r.error.apply(r, arguments) : r.log.apply(r, arguments))
  8875. }
  8876. , ch = {
  8877. pluginLoadError: function(e, t, n) {
  8878. oh(e, "PluginLoadError", ih("plugin", t, n))
  8879. },
  8880. iconsLoadError: function(e, t, n) {
  8881. oh(e, "IconsLoadError", ih("icons", t, n))
  8882. },
  8883. languageLoadError: function(e, t, n) {
  8884. oh(e, "LanguageLoadError", ih("language", t, n))
  8885. },
  8886. pluginInitError: function(e, t, n) {
  8887. var r = sa.translate(["Failed to initialize plugin: {0}", t]);
  8888. uh(r, n),
  8889. rh(e, r)
  8890. },
  8891. uploadError: function(e, t) {
  8892. rh(e, sa.translate(["Failed to upload image: {0}", t]))
  8893. },
  8894. displayError: rh,
  8895. initError: uh
  8896. };
  8897. function sh(e) {
  8898. return {
  8899. getBookmark: d(ql, e),
  8900. moveToBookmark: d($l, e)
  8901. }
  8902. }
  8903. (sh = sh || {}).isBookmarkNode = Wl;
  8904. function lh(r, a) {
  8905. var u, c, s, l, f, d, h, m, g, p, v, y, i, b, C, w, x, z = a.dom, E = Zn.each, N = a.getDoc(), S = j.document, k = Math.abs, T = Math.round, A = a.getBody();
  8906. function M(e) {
  8907. return e && ("IMG" === e.nodeName || a.dom.is(e, "figure.image"))
  8908. }
  8909. function n(e) {
  8910. var t = e.target;
  8911. !function(e, t) {
  8912. if ("longpress" !== e.type && 0 !== e.type.indexOf("touch"))
  8913. return M(e.target) && !dh(e.clientX, e.clientY, t);
  8914. var n = e.touches[0];
  8915. return M(e.target) && !dh(n.clientX, n.clientY, t)
  8916. }(e, a.selection.getRng()) || e.isDefaultPrevented() || a.selection.select(t)
  8917. }
  8918. function R(e) {
  8919. return a.dom.is(e, "figure.image") ? e.querySelector("img") : e
  8920. }
  8921. function _(e) {
  8922. var t = Ds(a);
  8923. return !1 !== t && !Wn.iOS && ("string" != typeof t && (t = "table,img,figure.image,div"),
  8924. "false" !== e.getAttribute("data-mce-resize") && (e !== a.getBody() && me(it.fromDom(e), t)))
  8925. }
  8926. function D(e) {
  8927. var t, n, r, o;
  8928. t = e.screenX - d,
  8929. n = e.screenY - h,
  8930. b = t * f[2] + p,
  8931. C = n * f[3] + v,
  8932. b = b < 5 ? 5 : b,
  8933. C = C < 5 ? 5 : C,
  8934. (M(u) && !1 !== Os(a) ? !hh.modifierPressed(e) : hh.modifierPressed(e)) && (k(t) > k(n) ? (C = T(b * y),
  8935. b = T(C / y)) : (b = T(C / y),
  8936. C = T(b * y))),
  8937. z.setStyles(R(c), {
  8938. width: b,
  8939. height: C
  8940. }),
  8941. r = 0 < (r = f.startPos.x + t) ? r : 0,
  8942. o = 0 < (o = f.startPos.y + n) ? o : 0,
  8943. z.setStyles(s, {
  8944. left: r,
  8945. top: o,
  8946. display: "block"
  8947. }),
  8948. s.innerHTML = b + " &times; " + C,
  8949. f[2] < 0 && c.clientWidth <= b && z.setStyle(c, "left", m + (p - b)),
  8950. f[3] < 0 && c.clientHeight <= C && z.setStyle(c, "top", g + (v - C)),
  8951. (t = A.scrollWidth - w) + (n = A.scrollHeight - x) !== 0 && z.setStyles(s, {
  8952. left: r - t,
  8953. top: o - n
  8954. }),
  8955. i || (function(e, t, n, r) {
  8956. e.fire("ObjectResizeStart", {
  8957. target: t,
  8958. width: n,
  8959. height: r
  8960. })
  8961. }(a, u, p, v),
  8962. i = !0)
  8963. }
  8964. function o(e) {
  8965. function t(e, t) {
  8966. if (e)
  8967. do {
  8968. if (e === t)
  8969. return !0
  8970. } while (e = e.parentNode)
  8971. }
  8972. var n;
  8973. i || a.removed || (E(z.select("img[data-mce-selected],hr[data-mce-selected]"), function(e) {
  8974. e.removeAttribute("data-mce-selected")
  8975. }),
  8976. n = "mousedown" === e.type ? e.target : r.getNode(),
  8977. t(n = z.$(n).closest("table,img,figure.image,hr")[0], A) && (V(),
  8978. t(r.getStart(!0), n) && t(r.getEnd(!0), n)) ? B(n) : P())
  8979. }
  8980. function O(e) {
  8981. return mh(function(e, t) {
  8982. for (; t && t !== e; ) {
  8983. if (gh(t) || mh(t))
  8984. return t;
  8985. t = t.parentNode
  8986. }
  8987. return null
  8988. }(a.getBody(), e))
  8989. }
  8990. l = {
  8991. nw: [0, 0, -1, -1],
  8992. ne: [1, 0, 1, -1],
  8993. se: [1, 1, 1, 1],
  8994. sw: [0, 1, -1, 1]
  8995. };
  8996. var H = function() {
  8997. i = !1;
  8998. function e(e, t) {
  8999. t && (u.style[e] || !a.schema.isValid(u.nodeName.toLowerCase(), e) ? z.setStyle(R(u), e, t) : z.setAttrib(R(u), e, t))
  9000. }
  9001. e("width", b),
  9002. e("height", C),
  9003. z.unbind(N, "mousemove", D),
  9004. z.unbind(N, "mouseup", H),
  9005. S !== N && (z.unbind(S, "mousemove", D),
  9006. z.unbind(S, "mouseup", H)),
  9007. z.remove(c),
  9008. z.remove(s),
  9009. B(u),
  9010. function(e, t, n, r) {
  9011. e.fire("ObjectResized", {
  9012. target: t,
  9013. width: n,
  9014. height: r
  9015. })
  9016. }(a, u, b, C),
  9017. z.setAttrib(u, "style", z.getAttrib(u, "style")),
  9018. a.nodeChanged()
  9019. }
  9020. , B = function(e) {
  9021. var t, r, o, n, i;
  9022. P(),
  9023. L(),
  9024. t = z.getPos(e, A),
  9025. m = t.x,
  9026. g = t.y,
  9027. i = e.getBoundingClientRect(),
  9028. r = i.width || i.right - i.left,
  9029. o = i.height || i.bottom - i.top,
  9030. u !== e && (u = e,
  9031. b = C = 0),
  9032. n = a.fire("ObjectSelected", {
  9033. target: e
  9034. }),
  9035. _(e) && !n.isDefaultPrevented() ? E(l, function(t, e) {
  9036. var n;
  9037. (n = z.get("mceResizeHandle" + e)) && z.remove(n),
  9038. n = z.add(A, "div", {
  9039. id: "mceResizeHandle" + e,
  9040. "data-mce-bogus": "all",
  9041. "class": "mce-resizehandle",
  9042. unselectable: !0,
  9043. style: "cursor:" + e + "-resize; margin:0; padding:0"
  9044. }),
  9045. 11 === Wn.ie && (n.contentEditable = !1),
  9046. z.bind(n, "mousedown", function(e) {
  9047. e.stopImmediatePropagation(),
  9048. e.preventDefault(),
  9049. function(e) {
  9050. d = e.screenX,
  9051. h = e.screenY,
  9052. p = R(u).clientWidth,
  9053. v = R(u).clientHeight,
  9054. y = v / p,
  9055. (f = t).startPos = {
  9056. x: r * t[0] + m,
  9057. y: o * t[1] + g
  9058. },
  9059. w = A.scrollWidth,
  9060. x = A.scrollHeight,
  9061. c = u.cloneNode(!0),
  9062. z.addClass(c, "mce-clonedresizable"),
  9063. z.setAttrib(c, "data-mce-bogus", "all"),
  9064. c.contentEditable = !1,
  9065. c.unSelectabe = !0,
  9066. z.setStyles(c, {
  9067. left: m,
  9068. top: g,
  9069. margin: 0
  9070. }),
  9071. c.removeAttribute("data-mce-selected"),
  9072. A.appendChild(c),
  9073. z.bind(N, "mousemove", D),
  9074. z.bind(N, "mouseup", H),
  9075. S !== N && (z.bind(S, "mousemove", D),
  9076. z.bind(S, "mouseup", H)),
  9077. s = z.add(A, "div", {
  9078. "class": "mce-resize-helper",
  9079. "data-mce-bogus": "all"
  9080. }, p + " &times; " + v)
  9081. }(e)
  9082. }),
  9083. t.elm = n,
  9084. z.setStyles(n, {
  9085. left: r * t[0] + m - n.offsetWidth / 2,
  9086. top: o * t[1] + g - n.offsetHeight / 2
  9087. })
  9088. }) : P(),
  9089. u.setAttribute("data-mce-selected", "1")
  9090. }
  9091. , P = function() {
  9092. var e, t;
  9093. for (e in L(),
  9094. u && u.removeAttribute("data-mce-selected"),
  9095. l)
  9096. (t = z.get("mceResizeHandle" + e)) && (z.unbind(t),
  9097. z.remove(t))
  9098. }
  9099. , L = function() {
  9100. for (var e in l) {
  9101. var t = l[e];
  9102. t.elm && (z.unbind(t.elm),
  9103. delete t.elm)
  9104. }
  9105. }
  9106. , V = function() {
  9107. try {
  9108. a.getDoc().execCommand("enableObjectResizing", !1, !1)
  9109. } catch (e) {}
  9110. };
  9111. return a.on("init", function() {
  9112. if (V(),
  9113. Wn.browser.isIE() || Wn.browser.isEdge()) {
  9114. a.on("mousedown click", function(e) {
  9115. var t = e.target
  9116. , n = t.nodeName;
  9117. i || !/^(TABLE|IMG|HR)$/.test(n) || O(t) || (2 !== e.button && a.selection.select(t, "TABLE" === n),
  9118. "mousedown" === e.type && a.nodeChanged())
  9119. });
  9120. var e = function(e) {
  9121. function t(e) {
  9122. Pn.setEditorTimeout(a, function() {
  9123. return a.selection.select(e)
  9124. })
  9125. }
  9126. if (O(e.target))
  9127. return e.preventDefault(),
  9128. void t(e.target);
  9129. /^(TABLE|IMG|HR)$/.test(e.target.nodeName) && (e.preventDefault(),
  9130. "IMG" === e.target.tagName && t(e.target))
  9131. };
  9132. z.bind(A, "mscontrolselect", e),
  9133. a.on("remove", function() {
  9134. return z.unbind(A, "mscontrolselect", e)
  9135. })
  9136. }
  9137. var t = Pn.throttle(function(e) {
  9138. a.composing || o(e)
  9139. });
  9140. a.on("nodechange ResizeEditor ResizeWindow drop FullscreenStateChanged", t),
  9141. a.on("keyup compositionend", function(e) {
  9142. u && "TABLE" === u.nodeName && t(e)
  9143. }),
  9144. a.on("hide blur", P),
  9145. a.on("contextmenu longpress", n, !0)
  9146. }),
  9147. a.on("remove", L),
  9148. {
  9149. isResizable: _,
  9150. showResizeRect: B,
  9151. hideResizeRect: P,
  9152. updateResizeRect: o,
  9153. destroy: function() {
  9154. u = c = null
  9155. }
  9156. }
  9157. }
  9158. var fh = sh
  9159. , dh = function(t, n, e) {
  9160. if (e.collapsed)
  9161. return !1;
  9162. if (Wn.browser.isIE() && e.startOffset === e.endOffset - 1 && e.startContainer === e.endContainer) {
  9163. var r = e.startContainer.childNodes[e.startOffset];
  9164. if (Qt.isElement(r))
  9165. return C(r.getClientRects(), function(e) {
  9166. return Za(e, t, n)
  9167. })
  9168. }
  9169. return C(e.getClientRects(), function(e) {
  9170. return Za(e, t, n)
  9171. })
  9172. }
  9173. , hh = {
  9174. BACKSPACE: 8,
  9175. DELETE: 46,
  9176. DOWN: 40,
  9177. ENTER: 13,
  9178. LEFT: 37,
  9179. RIGHT: 39,
  9180. SPACEBAR: 32,
  9181. TAB: 9,
  9182. UP: 38,
  9183. END: 35,
  9184. HOME: 36,
  9185. modifierPressed: function(e) {
  9186. return e.shiftKey || e.ctrlKey || e.altKey || this.metaKeyPressed(e)
  9187. },
  9188. metaKeyPressed: function(e) {
  9189. return Wn.mac ? e.metaKey : e.ctrlKey && !e.altKey
  9190. }
  9191. }
  9192. , mh = Qt.isContentEditableFalse
  9193. , gh = Qt.isContentEditableTrue;
  9194. function ph(e) {
  9195. var t = it.fromDom(j.document)
  9196. , n = Le(t)
  9197. , r = function(e, t) {
  9198. var n = t.owner(e);
  9199. return lm(t, n)
  9200. }(e, fm)
  9201. , o = Ft(e)
  9202. , i = m(r, function(e, t) {
  9203. var n = Ft(t);
  9204. return {
  9205. left: e.left + n.left(),
  9206. top: e.top + n.top()
  9207. }
  9208. }, {
  9209. left: 0,
  9210. top: 0
  9211. });
  9212. return It(i.left + o.left() + n.left(), i.top + o.top() + n.top())
  9213. }
  9214. function vh(e) {
  9215. return "textarea" === Oe(e)
  9216. }
  9217. function yh(e, t) {
  9218. var n = function(e) {
  9219. var t = e.dom().ownerDocument
  9220. , n = t.body
  9221. , r = t.defaultView
  9222. , o = t.documentElement;
  9223. if (n === e.dom())
  9224. return It(n.offsetLeft, n.offsetTop);
  9225. var i = Pe(r.pageYOffset, o.scrollTop)
  9226. , a = Pe(r.pageXOffset, o.scrollLeft)
  9227. , u = Pe(o.clientTop, n.clientTop)
  9228. , c = Pe(o.clientLeft, n.clientLeft);
  9229. return Ft(e).translate(a - c, i - u)
  9230. }(e)
  9231. , r = function(e) {
  9232. return sm.get(e)
  9233. }(e);
  9234. return {
  9235. element: e,
  9236. bottom: n.top() + r,
  9237. height: r,
  9238. pos: n,
  9239. cleanup: t
  9240. }
  9241. }
  9242. function bh(e, t) {
  9243. var n = function(e, t) {
  9244. var n = Ee(e);
  9245. if (0 === n.length || vh(e))
  9246. return {
  9247. element: e,
  9248. offset: t
  9249. };
  9250. if (t < n.length && !vh(n[t]))
  9251. return {
  9252. element: n[t],
  9253. offset: 0
  9254. };
  9255. var r = n[n.length - 1];
  9256. return vh(r) ? {
  9257. element: e,
  9258. offset: t
  9259. } : "img" === Oe(r) ? {
  9260. element: r,
  9261. offset: 1
  9262. } : Lt(r) ? {
  9263. element: r,
  9264. offset: tf(r).length
  9265. } : {
  9266. element: r,
  9267. offset: Ee(r).length
  9268. }
  9269. }(e, t)
  9270. , r = it.fromHtml('<span data-mce-bogus="all">' + mu.ZWSP + "</span>");
  9271. return Te(n.element, r),
  9272. yh(r, function() {
  9273. return Bt(r)
  9274. })
  9275. }
  9276. function Ch(n, r, o, i) {
  9277. hm(n, function(e, t) {
  9278. return dm(n, r, o, i)
  9279. }, o)
  9280. }
  9281. function wh(e, t, n, r, o) {
  9282. var i = {
  9283. elm: r.element.dom(),
  9284. alignToTop: o
  9285. };
  9286. !function(e, t) {
  9287. return e.fire("ScrollIntoView", t).isDefaultPrevented()
  9288. }(e, i) && (n(t, Le(t).top(), r, o),
  9289. function(e, t) {
  9290. e.fire("AfterScrollIntoView", t)
  9291. }(e, i))
  9292. }
  9293. function xh(e, t, n, r) {
  9294. var o = it.fromDom(e.getDoc());
  9295. wh(e, o, n, function(e) {
  9296. return yh(it.fromDom(e), i)
  9297. }(t), r)
  9298. }
  9299. function zh(e, t, n, r) {
  9300. var o = e.pos;
  9301. if (n)
  9302. Ve(o.left(), o.top(), r);
  9303. else {
  9304. var i = o.top() - t + e.height;
  9305. Ve(o.left(), i, r)
  9306. }
  9307. }
  9308. function Eh(e, t, n, r, o) {
  9309. var i = n + t
  9310. , a = r.pos.top()
  9311. , u = r.bottom
  9312. , c = n <= u - a;
  9313. if (a < t)
  9314. zh(r, n, !1 !== o, e);
  9315. else if (i < a) {
  9316. zh(r, n, c ? !1 !== o : !0 === o, e)
  9317. } else
  9318. i < u && !c && zh(r, n, !0 === o, e)
  9319. }
  9320. function Nh(e, t, n, r) {
  9321. var o = e.dom().defaultView.innerHeight;
  9322. Eh(e, t, o, n, r)
  9323. }
  9324. function Sh(e, t, n, r) {
  9325. var o = e.dom().defaultView.innerHeight;
  9326. Eh(e, t, o, n, r);
  9327. var i = ph(n.element)
  9328. , a = jt(j.window);
  9329. i.top() < a.y() ? Ie(n.element, !1 !== r) : i.top() > a.bottom() && Ie(n.element, !0 === r)
  9330. }
  9331. function kh(e, t, n) {
  9332. return Ch(e, Nh, t, n)
  9333. }
  9334. function Th(e, t, n) {
  9335. return xh(e, t, Nh, n)
  9336. }
  9337. function Ah(e, t, n) {
  9338. return Ch(e, Sh, t, n)
  9339. }
  9340. function Mh(e, t, n) {
  9341. return xh(e, t, Sh, n)
  9342. }
  9343. function Rh(e) {
  9344. return Qt.isContentEditableTrue(e) || Qt.isContentEditableFalse(e)
  9345. }
  9346. function _h(e, t) {
  9347. var n = (t || j.document).createDocumentFragment();
  9348. return F(e, function(e) {
  9349. n.appendChild(e.dom())
  9350. }),
  9351. it.fromDom(n)
  9352. }
  9353. function Dh(e, t, n) {
  9354. return Ot(t, e) ? function(e) {
  9355. return e.slice(0, -1)
  9356. }(function(e, t) {
  9357. for (var n = B(t) ? t : s, r = e.dom(), o = []; null !== r.parentNode && r.parentNode !== undefined; ) {
  9358. var i = r.parentNode
  9359. , a = it.fromDom(i);
  9360. if (o.push(a),
  9361. !0 === n(a))
  9362. break;
  9363. r = i
  9364. }
  9365. return o
  9366. }(e, function(e) {
  9367. return n(e) || pe(e, t)
  9368. })) : []
  9369. }
  9370. function Oh(e, t) {
  9371. return Dh(e, t, $(!1))
  9372. }
  9373. function Hh(o, e) {
  9374. return tu(function(e) {
  9375. var t = e.startContainer
  9376. , n = e.startOffset;
  9377. return Qt.isText(t) ? 0 === n ? R.some(it.fromDom(t)) : R.none() : R.from(t.childNodes[n]).map(it.fromDom)
  9378. }(e), function(e) {
  9379. var t = e.endContainer
  9380. , n = e.endOffset;
  9381. return Qt.isText(t) ? n === t.data.length ? R.some(it.fromDom(t)) : R.none() : R.from(t.childNodes[n - 1]).map(it.fromDom)
  9382. }(e), function(e, t) {
  9383. var n = g(Cm(o), d(pe, e))
  9384. , r = g(wm(o), d(pe, t));
  9385. return n.isSome() && r.isSome()
  9386. }).getOr(!1)
  9387. }
  9388. function Bh(e, t, n, r) {
  9389. var o = n
  9390. , i = new Fi(n,o)
  9391. , a = e.schema.getNonEmptyElements();
  9392. do {
  9393. if (3 === n.nodeType && 0 !== Zn.trim(n.nodeValue).length)
  9394. return void (r ? t.setStart(n, 0) : t.setEnd(n, n.nodeValue.length));
  9395. if (a[n.nodeName] && !/^(TD|TH)$/.test(n.nodeName))
  9396. return void (r ? t.setStartBefore(n) : "BR" === n.nodeName ? t.setEndBefore(n) : t.setEndAfter(n))
  9397. } while (n = r ? i.next() : i.prev());
  9398. "BODY" === o.nodeName && (r ? t.setStart(o, 0) : t.setEnd(o, o.childNodes.length))
  9399. }
  9400. function Ph(e) {
  9401. var t = e.selection.getSel();
  9402. return t && 0 < t.rangeCount
  9403. }
  9404. function Lh(e, t) {
  9405. var n = parseInt(Xe(e, t), 10);
  9406. return isNaN(n) ? 1 : n
  9407. }
  9408. function Vh(e) {
  9409. return y(e, function(e, t) {
  9410. return t.cells().length > e ? t.cells().length : e
  9411. }, 0)
  9412. }
  9413. function Ih(e, t) {
  9414. for (var n = e.rows(), r = 0; r < n.length; r++)
  9415. for (var o = n[r].cells(), i = 0; i < o.length; i++)
  9416. if (pe(o[i], t))
  9417. return R.some(Em(i, r));
  9418. return R.none()
  9419. }
  9420. function Fh(e, t, n, r, o) {
  9421. for (var i = [], a = e.rows(), u = n; u <= o; u++) {
  9422. var c = a[u].cells()
  9423. , s = t < r ? c.slice(t, r + 1) : c.slice(r, t + 1);
  9424. i.push(zm(a[u].element(), s))
  9425. }
  9426. return i
  9427. }
  9428. function Uh(e) {
  9429. var t = [];
  9430. if (e)
  9431. for (var n = 0; n < e.rangeCount; n++)
  9432. t.push(e.getRangeAt(n));
  9433. return t
  9434. }
  9435. function jh(e) {
  9436. return U(Am(e), dr)
  9437. }
  9438. function qh(e) {
  9439. return Ca(e, "td[data-mce-selected],th[data-mce-selected]")
  9440. }
  9441. function $h(e, t) {
  9442. var n = qh(t)
  9443. , r = jh(e);
  9444. return 0 < n.length ? n : r
  9445. }
  9446. function Wh(t, n) {
  9447. return g(t, function(e) {
  9448. return "li" === Oe(e) && Hh(e, n)
  9449. }).fold($([]), function(e) {
  9450. return function(e) {
  9451. return g(e, function(e) {
  9452. return "ul" === Oe(e) || "ol" === Oe(e)
  9453. })
  9454. }(t).map(function(e) {
  9455. return [it.fromTag("li"), it.fromTag(Oe(e))]
  9456. }).getOr([])
  9457. })
  9458. }
  9459. function Kh(e, t) {
  9460. var n = it.fromDom(t.commonAncestorContainer)
  9461. , r = bm(n, e)
  9462. , o = U(r, function(e) {
  9463. return Qn(e) || ir(e)
  9464. })
  9465. , i = Wh(r, t)
  9466. , a = o.concat(i.length ? i : function(t) {
  9467. return sr(t) ? be(t).filter(cr).fold($([]), function(e) {
  9468. return [t, e]
  9469. }) : cr(t) ? [t] : []
  9470. }(n));
  9471. return X(a, Oa)
  9472. }
  9473. function Xh() {
  9474. return _h([])
  9475. }
  9476. function Yh(e, t) {
  9477. return function(e, t) {
  9478. var n = y(t, function(e, t) {
  9479. return Ht(t, e),
  9480. t
  9481. }, e);
  9482. return 0 < t.length ? _h([n]) : n
  9483. }(it.fromDom(t.cloneContents()), Kh(e, t))
  9484. }
  9485. function Gh(e, o) {
  9486. return function(e, t) {
  9487. return Sa(t, "table", d(pe, e))
  9488. }(e, o[0]).bind(function(e) {
  9489. var t = o[0]
  9490. , n = o[o.length - 1]
  9491. , r = Nm(e);
  9492. return km(r, t, n).map(function(e) {
  9493. return _h([Sm(e)])
  9494. })
  9495. }).getOrThunk(Xh)
  9496. }
  9497. function Zh(e, t, n) {
  9498. return null !== function(e, t, n) {
  9499. for (; e && e !== t; ) {
  9500. if (n(e))
  9501. return e;
  9502. e = e.parentNode
  9503. }
  9504. return null
  9505. }(e, t, n)
  9506. }
  9507. function Jh(e, t, n) {
  9508. return Zh(e, t, function(e) {
  9509. return e.nodeName === n
  9510. })
  9511. }
  9512. function Qh(e) {
  9513. return e && "TABLE" === e.nodeName
  9514. }
  9515. function em(e, t, n) {
  9516. for (var r = new Fi(t,e.getParent(t.parentNode, e.isBlock) || e.getRoot()); t = r[n ? "prev" : "next"](); )
  9517. if (Qt.isBr(t))
  9518. return !0
  9519. }
  9520. function tm(e, t, n, r, o) {
  9521. var i, a, u = e.getRoot(), c = e.schema.getNonEmptyElements(), s = e.getParent(o.parentNode, e.isBlock) || u;
  9522. if (r && Qt.isBr(o) && t && e.isEmpty(s))
  9523. return R.some(Wu(o.parentNode, e.nodeIndex(o)));
  9524. for (var l, f, d = new Fi(o,s); a = d[r ? "prev" : "next"](); ) {
  9525. if ("false" === e.getContentEditableParent(a) || (f = u,
  9526. La(l = a) && !1 === Zh(l, f, sc)))
  9527. return R.none();
  9528. if (Qt.isText(a) && 0 < a.nodeValue.length)
  9529. return !1 === Jh(a, u, "A") ? R.some(Wu(a, r ? a.nodeValue.length : 0)) : R.none();
  9530. if (e.isBlock(a) || c[a.nodeName.toLowerCase()])
  9531. return R.none();
  9532. i = a
  9533. }
  9534. return n && i ? R.some(Wu(i, 0)) : R.none()
  9535. }
  9536. function nm(e, t, n, r) {
  9537. var o, i, a, u, c, s, l, f = e.getRoot(), d = !1;
  9538. if (o = r[(n ? "start" : "end") + "Container"],
  9539. i = r[(n ? "start" : "end") + "Offset"],
  9540. s = Qt.isElement(o) && i === o.childNodes.length,
  9541. u = e.schema.getNonEmptyElements(),
  9542. c = n,
  9543. La(o))
  9544. return R.none();
  9545. if (Qt.isElement(o) && i > o.childNodes.length - 1 && (c = !1),
  9546. Qt.isDocument(o) && (o = f,
  9547. i = 0),
  9548. o === f) {
  9549. if (c && (a = o.childNodes[0 < i ? i - 1 : 0])) {
  9550. if (La(a))
  9551. return R.none();
  9552. if (u[a.nodeName] || Qh(a))
  9553. return R.none()
  9554. }
  9555. if (o.hasChildNodes()) {
  9556. if (i = Math.min(!c && 0 < i ? i - 1 : i, o.childNodes.length - 1),
  9557. o = o.childNodes[i],
  9558. i = Qt.isText(o) && s ? o.data.length : 0,
  9559. !t && o === f.lastChild && Qh(o))
  9560. return R.none();
  9561. if (function(e, t) {
  9562. for (; t && t !== e; ) {
  9563. if (Qt.isContentEditableFalse(t))
  9564. return !0;
  9565. t = t.parentNode
  9566. }
  9567. return !1
  9568. }(f, o) || La(o))
  9569. return R.none();
  9570. if (o.hasChildNodes() && !1 === Qh(o)) {
  9571. var h = new Fi(a = o,f);
  9572. do {
  9573. if (Qt.isContentEditableFalse(a) || La(a)) {
  9574. d = !1;
  9575. break
  9576. }
  9577. if (Qt.isText(a) && 0 < a.nodeValue.length) {
  9578. i = c ? 0 : a.nodeValue.length,
  9579. o = a,
  9580. d = !0;
  9581. break
  9582. }
  9583. if (u[a.nodeName.toLowerCase()] && (!(l = a) || !/^(TD|TH|CAPTION)$/.test(l.nodeName))) {
  9584. i = e.nodeIndex(a),
  9585. o = a.parentNode,
  9586. c || i++,
  9587. d = !0;
  9588. break
  9589. }
  9590. } while (a = c ? h.next() : h.prev())
  9591. }
  9592. }
  9593. }
  9594. return t && (Qt.isText(o) && 0 === i && tm(e, s, t, !0, o).each(function(e) {
  9595. o = e.container(),
  9596. i = e.offset(),
  9597. d = !0
  9598. }),
  9599. Qt.isElement(o) && (!(a = (a = o.childNodes[i]) || o.childNodes[i - 1]) || !Qt.isBr(a) || function(e, t) {
  9600. return e.previousSibling && e.previousSibling.nodeName === t
  9601. }(a, "A") || em(e, a, !1) || em(e, a, !0) || tm(e, s, t, !0, a).each(function(e) {
  9602. o = e.container(),
  9603. i = e.offset(),
  9604. d = !0
  9605. }))),
  9606. c && !t && Qt.isText(o) && i === o.nodeValue.length && tm(e, s, t, !1, o).each(function(e) {
  9607. o = e.container(),
  9608. i = e.offset(),
  9609. d = !0
  9610. }),
  9611. d ? R.some(Wu(o, i)) : R.none()
  9612. }
  9613. function rm(e) {
  9614. return 0 === e.dom().length ? (Bt(e),
  9615. R.none()) : R.some(e)
  9616. }
  9617. function om(e, t, n, r, o) {
  9618. var i = n ? t.startContainer : t.endContainer
  9619. , a = n ? t.startOffset : t.endOffset;
  9620. return R.from(i).map(it.fromDom).map(function(e) {
  9621. return r && t.collapsed ? e : Ne(e, o(e, a)).getOr(e)
  9622. }).bind(function(e) {
  9623. return Pt(e) ? R.some(e) : be(e)
  9624. }).map(function(e) {
  9625. return e.dom()
  9626. }).getOr(e)
  9627. }
  9628. function im(e, t, n) {
  9629. return om(e, t, !0, n, function(e, t) {
  9630. return Math.min(function(e) {
  9631. return e.dom().childNodes.length
  9632. }(e), t)
  9633. })
  9634. }
  9635. function am(e, t, n) {
  9636. return om(e, t, !1, n, function(e, t) {
  9637. return 0 < t ? t - 1 : t
  9638. })
  9639. }
  9640. function um(e, t) {
  9641. for (var n = e; e && Qt.isText(e) && 0 === e.length; )
  9642. e = t ? e.nextSibling : e.previousSibling;
  9643. return e || n
  9644. }
  9645. function cm(e, t, n) {
  9646. if (e && e.hasOwnProperty(t)) {
  9647. var r = U(e[t], function(e) {
  9648. return e !== n
  9649. });
  9650. 0 === r.length ? delete e[t] : e[t] = r
  9651. }
  9652. }
  9653. var sm = function PN(r, o) {
  9654. function e(e) {
  9655. var t = o(e);
  9656. if (t <= 0 || null === t) {
  9657. var n = Ge(e, r);
  9658. return parseFloat(n) || 0
  9659. }
  9660. return t
  9661. }
  9662. function i(o, e) {
  9663. return y(e, function(e, t) {
  9664. var n = Ge(o, t)
  9665. , r = n === undefined ? 0 : parseInt(n, 10);
  9666. return isNaN(r) ? e : e + r
  9667. }, 0)
  9668. }
  9669. return {
  9670. set: function(e, t) {
  9671. if (!P(t) && !t.match(/^[0-9]+$/))
  9672. throw new Error(r + ".set accepts only positive integer values. Value was " + t);
  9673. var n = e.dom();
  9674. $e(n) && (n.style[r] = t + "px")
  9675. },
  9676. get: e,
  9677. getOuter: e,
  9678. aggregate: i,
  9679. max: function(e, t, n) {
  9680. var r = i(e, n);
  9681. return r < t ? t - r : 0
  9682. }
  9683. }
  9684. }("height", function(e) {
  9685. var t = e.dom();
  9686. return Be(e) ? t.getBoundingClientRect().height : t.offsetHeight
  9687. })
  9688. , lm = function(r, e) {
  9689. return r.view(e).fold($([]), function(e) {
  9690. var t = r.owner(e)
  9691. , n = lm(r, t);
  9692. return [e].concat(n)
  9693. })
  9694. }
  9695. , fm = /* */
  9696. Object.freeze({
  9697. __proto__: null,
  9698. view: function(e) {
  9699. return (e.dom() === j.document ? R.none() : R.from(e.dom().defaultView.frameElement)).map(it.fromDom)
  9700. },
  9701. owner: function(e) {
  9702. return ve(e)
  9703. }
  9704. })
  9705. , dm = function(e, t, n, r) {
  9706. var o = it.fromDom(e.getBody())
  9707. , i = it.fromDom(e.getDoc());
  9708. !function(e) {
  9709. e.dom().offsetWidth
  9710. }(o);
  9711. var a = bh(it.fromDom(n.startContainer), n.startOffset);
  9712. wh(e, i, t, a, r),
  9713. a.cleanup()
  9714. }
  9715. , hm = function(e, t, n) {
  9716. var r = n.startContainer
  9717. , o = n.startOffset
  9718. , i = n.endContainer
  9719. , a = n.endOffset;
  9720. t(it.fromDom(r), it.fromDom(i));
  9721. var u = e.dom.createRng();
  9722. u.setStart(r, o),
  9723. u.setEnd(i, a),
  9724. e.selection.setRng(n)
  9725. }
  9726. , mm = function(e, t, n) {
  9727. (e.inline ? Th : Mh)(e, t, n)
  9728. }
  9729. , gm = function(e, t, n) {
  9730. (e.inline ? kh : Ah)(e, t, n)
  9731. }
  9732. , pm = function(e, t, n) {
  9733. var r, o, i = n;
  9734. if (i.caretPositionFromPoint)
  9735. (o = i.caretPositionFromPoint(e, t)) && ((r = n.createRange()).setStart(o.offsetNode, o.offset),
  9736. r.collapse(!0));
  9737. else if (n.caretRangeFromPoint)
  9738. r = n.caretRangeFromPoint(e, t);
  9739. else if (i.body.createTextRange) {
  9740. r = i.body.createTextRange();
  9741. try {
  9742. r.moveToPoint(e, t),
  9743. r.collapse(!0)
  9744. } catch (a) {
  9745. r = function(e, n, t) {
  9746. var r, o, i;
  9747. if (r = t.elementFromPoint(e, n),
  9748. o = t.body.createTextRange(),
  9749. r && "HTML" !== r.tagName || (r = t.body),
  9750. o.moveToElementText(r),
  9751. 0 < (i = (i = Zn.toArray(o.getClientRects())).sort(function(e, t) {
  9752. return (e = Math.abs(Math.max(e.top - n, e.bottom - n))) - (t = Math.abs(Math.max(t.top - n, t.bottom - n)))
  9753. })).length) {
  9754. n = (i[0].bottom + i[0].top) / 2;
  9755. try {
  9756. return o.moveToPoint(e, n),
  9757. o.collapse(!0),
  9758. o
  9759. } catch (a) {}
  9760. }
  9761. return null
  9762. }(e, t, n)
  9763. }
  9764. return function(e, t) {
  9765. var n = e && e.parentElement ? e.parentElement() : null;
  9766. return Qt.isContentEditableFalse(function(e, t, n) {
  9767. for (; e && e !== t; ) {
  9768. if (n(e))
  9769. return e;
  9770. e = e.parentNode
  9771. }
  9772. return null
  9773. }(n, t, Rh)) ? null : e
  9774. }(r, n.body)
  9775. }
  9776. return r
  9777. }
  9778. , vm = function(n, e) {
  9779. return X(e, function(e) {
  9780. var t = n.fire("GetSelectionRange", {
  9781. range: e
  9782. });
  9783. return t.range !== e ? t.range : e
  9784. })
  9785. }
  9786. , ym = Oh
  9787. , bm = function(e, t) {
  9788. return [e].concat(Oh(e, t))
  9789. }
  9790. , Cm = function(t) {
  9791. return Se(t).fold($([t]), function(e) {
  9792. return [t].concat(Cm(e))
  9793. })
  9794. }
  9795. , wm = function(t) {
  9796. return ke(t).fold($([t]), function(e) {
  9797. return "br" === Oe(e) ? Ce(e).map(function(e) {
  9798. return [t].concat(wm(e))
  9799. }).getOr([]) : [t].concat(wm(e))
  9800. })
  9801. }
  9802. , xm = de("element", "width", "rows")
  9803. , zm = de("element", "cells")
  9804. , Em = de("x", "y")
  9805. , Nm = function(e) {
  9806. var o = xm(Oa(e), 0, []);
  9807. return F(Ca(e, "tr"), function(n, r) {
  9808. F(Ca(n, "td,th"), function(e, t) {
  9809. !function(e, t, n, r, o) {
  9810. for (var i = Lh(o, "rowspan"), a = Lh(o, "colspan"), u = e.rows(), c = n; c < n + i; c++) {
  9811. u[c] || (u[c] = zm(Ha(r), []));
  9812. for (var s = t; s < t + a; s++) {
  9813. u[c].cells()[s] = c === n && s === t ? o : Oa(o)
  9814. }
  9815. }
  9816. }(o, function(e, t, n) {
  9817. for (; r = t,
  9818. o = n,
  9819. i = void 0,
  9820. ((i = e.rows())[o] ? i[o].cells() : [])[r]; )
  9821. t++;
  9822. var r, o, i;
  9823. return t
  9824. }(o, t, r), r, n, e)
  9825. })
  9826. }),
  9827. xm(o.element(), Vh(o.rows()), o.rows())
  9828. }
  9829. , Sm = function(e) {
  9830. return function(e, t) {
  9831. var n = Oa(e.element())
  9832. , r = it.fromTag("tbody");
  9833. return Re(r, t),
  9834. Ht(n, r),
  9835. n
  9836. }(e, function(e) {
  9837. return X(e.rows(), function(e) {
  9838. var t = X(e.cells(), function(e) {
  9839. var t = Ha(e);
  9840. return Ye(t, "colspan"),
  9841. Ye(t, "rowspan"),
  9842. t
  9843. })
  9844. , n = Oa(e.element());
  9845. return Re(n, t),
  9846. n
  9847. })
  9848. }(e))
  9849. }
  9850. , km = function(n, e, r) {
  9851. return Ih(n, e).bind(function(t) {
  9852. return Ih(n, r).map(function(e) {
  9853. return function(e, t, n) {
  9854. var r = t.x()
  9855. , o = t.y()
  9856. , i = n.x()
  9857. , a = n.y()
  9858. , u = o < a ? Fh(e, r, o, i, a) : Fh(e, r, a, i, o);
  9859. return xm(e.element(), Vh(u), u)
  9860. }(n, t, e)
  9861. })
  9862. })
  9863. }
  9864. , Tm = Uh
  9865. , Am = function(e) {
  9866. return v(e, function(e) {
  9867. var t = Ja(e);
  9868. return t ? [it.fromDom(t)] : []
  9869. })
  9870. }
  9871. , Mm = function(e) {
  9872. return 1 < Uh(e).length
  9873. }
  9874. , Rm = $h
  9875. , _m = function(e) {
  9876. return $h(Tm(e.selection.getSel()), it.fromDom(e.getBody()))
  9877. }
  9878. , Dm = function(e, t) {
  9879. var n = Rm(t, e);
  9880. return 0 < n.length ? Gh(e, n) : function(e, t) {
  9881. return 0 < t.length && t[0].collapsed ? Xh() : Yh(e, t[0])
  9882. }(e, t)
  9883. }
  9884. , Om = function(e, t) {
  9885. if (void 0 === t && (t = {}),
  9886. t.get = !0,
  9887. t.format = t.format || "html",
  9888. t.selection = !0,
  9889. (t = e.fire("BeforeGetContent", t)).isDefaultPrevented())
  9890. return e.fire("GetContent", t),
  9891. t.content;
  9892. if ("text" === t.format)
  9893. return function(r) {
  9894. return R.from(r.selection.getRng()).map(function(e) {
  9895. var t = r.dom.add(r.getBody(), "div", {
  9896. "data-mce-bogus": "all",
  9897. style: "overflow: hidden; opacity: 0;"
  9898. }, e.cloneContents())
  9899. , n = mu.trim(t.innerText);
  9900. return r.dom.remove(t),
  9901. n
  9902. }).getOr("")
  9903. }(e);
  9904. t.getInner = !0;
  9905. var n = function(e, t) {
  9906. var n, r = e.selection.getRng(), o = e.dom.create("body"), i = e.selection.getSel(), a = vm(e, Tm(i));
  9907. return (n = t.contextual ? Dm(it.fromDom(e.getBody()), a).dom() : r.cloneContents()) && o.appendChild(n),
  9908. e.selection.serializer.serialize(o, t)
  9909. }(e, t);
  9910. return "tree" === t.format ? n : (t.content = e.selection.isCollapsed() ? "" : n,
  9911. e.fire("GetContent", t),
  9912. t.content)
  9913. }
  9914. , Hm = function(e, t) {
  9915. return e && t && e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset
  9916. }
  9917. , Bm = function(e, t) {
  9918. var n = t.collapsed
  9919. , r = t.cloneRange()
  9920. , o = Wu.fromRangeStart(t);
  9921. return nm(e, n, !0, r).each(function(e) {
  9922. n && Wu.isAbove(o, e) || r.setStart(e.container(), e.offset())
  9923. }),
  9924. n || nm(e, n, !1, r).each(function(e) {
  9925. r.setEnd(e.container(), e.offset())
  9926. }),
  9927. n && r.collapse(!0),
  9928. Hm(t, r) ? R.none() : R.some(r)
  9929. }
  9930. , Pm = function(e, t, n) {
  9931. if ((n = function(e, t) {
  9932. return (e = e || {
  9933. format: "html"
  9934. }).set = !0,
  9935. e.selection = !0,
  9936. e.content = t,
  9937. e
  9938. }(n, t)).no_events || !(n = e.fire("BeforeSetContent", n)).isDefaultPrevented()) {
  9939. var r = e.selection.getRng();
  9940. !function(r, e) {
  9941. var t = R.from(e.firstChild).map(it.fromDom)
  9942. , n = R.from(e.lastChild).map(it.fromDom);
  9943. r.deleteContents(),
  9944. r.insertNode(e);
  9945. var o = t.bind(Ce).filter(Lt).bind(rm)
  9946. , i = n.bind(we).filter(Lt).bind(rm);
  9947. tu(o, t.filter(Lt), function(e, t) {
  9948. !function(e, t) {
  9949. e.insertData(0, t)
  9950. }(t.dom(), e.dom().data),
  9951. Bt(e)
  9952. }),
  9953. tu(i, n.filter(Lt), function(e, t) {
  9954. var n = t.dom().length;
  9955. t.dom().appendData(e.dom().data),
  9956. r.setEnd(t.dom(), n),
  9957. Bt(e)
  9958. }),
  9959. r.collapse(!1)
  9960. }(r, r.createContextualFragment(n.content)),
  9961. e.selection.setRng(r),
  9962. gm(e, r),
  9963. n.no_events || e.fire("SetContent", n)
  9964. } else
  9965. e.fire("SetContent", n)
  9966. };
  9967. function Lm(e) {
  9968. return !!e.select
  9969. }
  9970. function Vm(e) {
  9971. return !(!e || !e.ownerDocument) && Ot(it.fromDom(e.ownerDocument), it.fromDom(e))
  9972. }
  9973. function Im(u, c, e, s) {
  9974. function t(e, t) {
  9975. return Pm(s, e, t)
  9976. }
  9977. function r() {
  9978. var e, t, n = d();
  9979. return !(n && n.anchorNode && n.focusNode) || ((e = u.createRng()).setStart(n.anchorNode, n.anchorOffset),
  9980. e.collapse(!0),
  9981. (t = u.createRng()).setStart(n.focusNode, n.focusOffset),
  9982. t.collapse(!0),
  9983. e.compareBoundaryPoints(e.START_TO_START, t) <= 0)
  9984. }
  9985. var n, o, l, f, i = function p(i, n) {
  9986. var a, u;
  9987. return {
  9988. selectorChangedWithUnbind: function(e, t) {
  9989. return a || (a = {},
  9990. u = {},
  9991. n.on("NodeChange", function(e) {
  9992. var n = e.element
  9993. , r = i.getParents(n, null, i.getRoot())
  9994. , o = {};
  9995. Zn.each(a, function(e, n) {
  9996. Zn.each(r, function(t) {
  9997. if (i.is(t, n))
  9998. return u[n] || (Zn.each(e, function(e) {
  9999. e(!0, {
  10000. node: t,
  10001. selector: n,
  10002. parents: r
  10003. })
  10004. }),
  10005. u[n] = e),
  10006. o[n] = e,
  10007. !1
  10008. })
  10009. }),
  10010. Zn.each(u, function(e, t) {
  10011. o[t] || (delete u[t],
  10012. Zn.each(e, function(e) {
  10013. e(!1, {
  10014. node: n,
  10015. selector: t,
  10016. parents: r
  10017. })
  10018. }))
  10019. })
  10020. })),
  10021. a[e] || (a[e] = []),
  10022. a[e].push(t),
  10023. {
  10024. unbind: function() {
  10025. cm(a, e, t),
  10026. cm(u, e, t)
  10027. }
  10028. }
  10029. }
  10030. }
  10031. }(u, s).selectorChangedWithUnbind, a = function(e) {
  10032. var t = h();
  10033. t.collapse(!!e),
  10034. m(t)
  10035. }, d = function() {
  10036. return c.getSelection ? c.getSelection() : c.document.selection
  10037. }, h = function() {
  10038. function e(e, t, n) {
  10039. try {
  10040. return t.compareBoundaryPoints(e, n)
  10041. } catch (r) {
  10042. return -1
  10043. }
  10044. }
  10045. var t, n, r, o;
  10046. if (!c)
  10047. return null;
  10048. if (null == (o = c.document))
  10049. return null;
  10050. if (s.bookmark !== undefined && !1 === Dd(s)) {
  10051. var i = Ed(s);
  10052. if (i.isSome())
  10053. return i.map(function(e) {
  10054. return vm(s, [e])[0]
  10055. }).getOr(o.createRange())
  10056. }
  10057. try {
  10058. (t = d()) && !Qt.isRestrictedNode(t.anchorNode) && (n = 0 < t.rangeCount ? t.getRangeAt(0) : t.createRange ? t.createRange() : o.createRange())
  10059. } catch (a) {}
  10060. return (n = (n = vm(s, [n])[0]) || (o.createRange ? o.createRange() : o.body.createTextRange())).setStart && 9 === n.startContainer.nodeType && n.collapsed && (r = u.getRoot(),
  10061. n.setStart(r, 0),
  10062. n.setEnd(r, 0)),
  10063. l && f && (0 === e(n.START_TO_START, n, l) && 0 === e(n.END_TO_END, n, l) ? n = f : f = l = null),
  10064. n
  10065. }, m = function(e, t) {
  10066. var n, r;
  10067. if (function(e) {
  10068. return !!e && (!!Lm(e) || Vm(e.startContainer) && Vm(e.endContainer))
  10069. }(e)) {
  10070. var o = Lm(e) ? e : null;
  10071. if (o) {
  10072. f = null;
  10073. try {
  10074. o.select()
  10075. } catch (i) {}
  10076. } else {
  10077. if (n = d(),
  10078. e = s.fire("SetSelectionRange", {
  10079. range: e,
  10080. forward: t
  10081. }).range,
  10082. n) {
  10083. f = e;
  10084. try {
  10085. n.removeAllRanges(),
  10086. n.addRange(e)
  10087. } catch (i) {}
  10088. !1 === t && n.extend && (n.collapse(e.endContainer, e.endOffset),
  10089. n.extend(e.startContainer, e.startOffset)),
  10090. l = 0 < n.rangeCount ? n.getRangeAt(0) : null
  10091. }
  10092. e.collapsed || e.startContainer !== e.endContainer || !n.setBaseAndExtent || Wn.ie || e.endOffset - e.startOffset < 2 && e.startContainer.hasChildNodes() && (r = e.startContainer.childNodes[e.startOffset]) && "IMG" === r.tagName && (n.setBaseAndExtent(e.startContainer, e.startOffset, e.endContainer, e.endOffset),
  10093. n.anchorNode === e.startContainer && n.focusNode === e.endContainer || n.setBaseAndExtent(r, 0, r, 1)),
  10094. s.fire("AfterSetSelectionRange", {
  10095. range: e,
  10096. forward: t
  10097. })
  10098. }
  10099. }
  10100. }, g = {
  10101. bookmarkManager: null,
  10102. controlSelection: null,
  10103. dom: u,
  10104. win: c,
  10105. serializer: e,
  10106. editor: s,
  10107. collapse: a,
  10108. setCursorLocation: function(e, t) {
  10109. var n = u.createRng();
  10110. e ? (n.setStart(e, t),
  10111. n.setEnd(e, t),
  10112. m(n),
  10113. a(!1)) : (Bh(u, n, s.getBody(), !0),
  10114. m(n))
  10115. },
  10116. getContent: function(e) {
  10117. return Om(s, e)
  10118. },
  10119. setContent: t,
  10120. getBookmark: function(e, t) {
  10121. return n.getBookmark(e, t)
  10122. },
  10123. moveToBookmark: function(e) {
  10124. return n.moveToBookmark(e)
  10125. },
  10126. select: function(e, t) {
  10127. return function(r, e, o) {
  10128. return R.from(e).map(function(e) {
  10129. var t = r.nodeIndex(e)
  10130. , n = r.createRng();
  10131. return n.setStart(e.parentNode, t),
  10132. n.setEnd(e.parentNode, t + 1),
  10133. o && (Bh(r, n, e, !0),
  10134. Bh(r, n, e, !1)),
  10135. n
  10136. })
  10137. }(u, e, t).each(m),
  10138. e
  10139. },
  10140. isCollapsed: function() {
  10141. var e = h()
  10142. , t = d();
  10143. return !(!e || e.item) && (e.compareEndPoints ? 0 === e.compareEndPoints("StartToEnd", e) : !t || e.collapsed)
  10144. },
  10145. isForward: r,
  10146. setNode: function(e) {
  10147. return t(u.getOuterHTML(e)),
  10148. e
  10149. },
  10150. getNode: function() {
  10151. return function(e, t) {
  10152. var n, r, o, i, a;
  10153. return t ? (r = t.startContainer,
  10154. o = t.endContainer,
  10155. i = t.startOffset,
  10156. a = t.endOffset,
  10157. n = t.commonAncestorContainer,
  10158. !t.collapsed && (r === o && a - i < 2 && r.hasChildNodes() && (n = r.childNodes[i]),
  10159. 3 === r.nodeType && 3 === o.nodeType && (r = r.length === i ? um(r.nextSibling, !0) : r.parentNode,
  10160. o = 0 === a ? um(o.previousSibling, !1) : o.parentNode,
  10161. r && r === o)) ? r : n && 3 === n.nodeType ? n.parentNode : n) : e
  10162. }(s.getBody(), h())
  10163. },
  10164. getSel: d,
  10165. setRng: m,
  10166. getRng: h,
  10167. getStart: function(e) {
  10168. return im(s.getBody(), h(), e)
  10169. },
  10170. getEnd: function(e) {
  10171. return am(s.getBody(), h(), e)
  10172. },
  10173. getSelectedBlocks: function(e, t) {
  10174. return function(e, t, n, r) {
  10175. var o, i, a = [];
  10176. if (i = e.getRoot(),
  10177. n = e.getParent(n || im(i, t, t.collapsed), e.isBlock),
  10178. r = e.getParent(r || am(i, t, t.collapsed), e.isBlock),
  10179. n && n !== i && a.push(n),
  10180. n && r && n !== r)
  10181. for (var u = new Fi(o = n,i); (o = u.next()) && o !== r; )
  10182. e.isBlock(o) && a.push(o);
  10183. return r && n !== r && r !== i && a.push(r),
  10184. a
  10185. }(u, h(), e, t)
  10186. },
  10187. normalize: function() {
  10188. var e = h()
  10189. , t = d();
  10190. if (Mm(t) || !Ph(s))
  10191. return e;
  10192. var n = Bm(u, e);
  10193. return n.each(function(e) {
  10194. m(e, r())
  10195. }),
  10196. n.getOr(e)
  10197. },
  10198. selectorChanged: function(e, t) {
  10199. return i(e, t),
  10200. g
  10201. },
  10202. selectorChangedWithUnbind: i,
  10203. getScrollContainer: function() {
  10204. for (var e, t = u.getRoot(); t && "BODY" !== t.nodeName; ) {
  10205. if (t.scrollHeight > t.clientHeight) {
  10206. e = t;
  10207. break
  10208. }
  10209. t = t.parentNode
  10210. }
  10211. return e
  10212. },
  10213. scrollIntoView: function(e, t) {
  10214. return mm(s, e, t)
  10215. },
  10216. placeCaretAt: function(e, t) {
  10217. return m(pm(e, t, s.getDoc()))
  10218. },
  10219. getBoundingClientRect: function() {
  10220. var e = h();
  10221. return e.collapsed ? Vc.fromRangeStart(e).getClientRects()[0] : e.getBoundingClientRect()
  10222. },
  10223. destroy: function() {
  10224. c = l = f = null,
  10225. o.destroy()
  10226. }
  10227. };
  10228. return n = fh(g),
  10229. o = lh(g, s),
  10230. g.bookmarkManager = n,
  10231. g.controlSelection = o,
  10232. g
  10233. }
  10234. function Fm(e, i, a) {
  10235. e.addNodeFilter("font", function(e) {
  10236. F(e, function(e) {
  10237. var t = i.parse(e.attr("style"))
  10238. , n = e.attr("color")
  10239. , r = e.attr("face")
  10240. , o = e.attr("size");
  10241. n && (t.color = n),
  10242. r && (t["font-family"] = r),
  10243. o && (t["font-size"] = a[parseInt(e.attr("size"), 10) - 1]),
  10244. e.name = "span",
  10245. e.attr("style", i.serialize(t)),
  10246. function(t, e) {
  10247. F(e, function(e) {
  10248. t.attr(e, null)
  10249. })
  10250. }(e, ["color", "face", "size"])
  10251. })
  10252. })
  10253. }
  10254. function Um(e, t) {
  10255. var n = $r();
  10256. t.convert_fonts_to_spans && Fm(e, n, Zn.explode(t.font_size_legacy_values)),
  10257. function(e, n) {
  10258. e.addNodeFilter("strike", function(e) {
  10259. F(e, function(e) {
  10260. var t = n.parse(e.attr("style"));
  10261. t["text-decoration"] = "line-through",
  10262. e.name = "span",
  10263. e.attr("style", n.serialize(t))
  10264. })
  10265. })
  10266. }(e, n)
  10267. }
  10268. function jm(e, t, n, r) {
  10269. (e.padd_empty_with_br || t.insert) && n[r.name] ? r.empty().append(new hf("br",1)).shortEnded = !0 : r.empty().append(new hf("#text",3)).value = qr
  10270. }
  10271. function qm(t, e, n, r) {
  10272. return r.isEmpty(e, n, function(e) {
  10273. return function(e, t) {
  10274. var n = e.getElementRule(t.name);
  10275. return n && n.paddEmpty
  10276. }(t, e)
  10277. })
  10278. }
  10279. function $m(T, A) {
  10280. void 0 === A && (A = Pr());
  10281. var M = {}
  10282. , R = []
  10283. , _ = {}
  10284. , D = {};
  10285. (T = T || {}).validate = !("validate"in T) || T.validate,
  10286. T.root_name = T.root_name || "body";
  10287. var O = function(e) {
  10288. var t, n, r;
  10289. (n = e.name)in M && ((r = _[n]) ? r.push(e) : _[n] = [e]),
  10290. t = R.length;
  10291. for (; t--; )
  10292. (n = R[t].name)in e.attributes.map && ((r = D[n]) ? r.push(e) : D[n] = [e]);
  10293. return e
  10294. }
  10295. , e = {
  10296. schema: A,
  10297. addAttributeFilter: function(e, n) {
  10298. tg(ng(e), function(e) {
  10299. var t;
  10300. for (t = 0; t < R.length; t++)
  10301. if (R[t].name === e)
  10302. return void R[t].callbacks.push(n);
  10303. R.push({
  10304. name: e,
  10305. callbacks: [n]
  10306. })
  10307. })
  10308. },
  10309. getAttributeFilters: function() {
  10310. return [].concat(R)
  10311. },
  10312. addNodeFilter: function(e, n) {
  10313. tg(ng(e), function(e) {
  10314. var t = M[e];
  10315. t || (M[e] = t = []),
  10316. t.push(n)
  10317. })
  10318. },
  10319. getNodeFilters: function() {
  10320. var e = [];
  10321. for (var t in M)
  10322. M.hasOwnProperty(t) && e.push({
  10323. name: t,
  10324. callbacks: M[t]
  10325. });
  10326. return e
  10327. },
  10328. filterNode: O,
  10329. parse: function(e, a) {
  10330. var t, n, r, o, i, u, c, s, l, f, d, h = [];
  10331. a = a || {},
  10332. _ = {},
  10333. D = {},
  10334. l = rg(eg("script,style,head,html,body,title,meta,param"), A.getBlockElements());
  10335. var m, g = A.getNonEmptyElements(), p = A.children, v = T.validate, y = "forced_root_block"in a ? a.forced_root_block : T.forced_root_block, b = !1 === (m = y) ? "" : !0 === m ? "p" : m, C = A.getWhiteSpaceElements(), w = /^[ \t\r\n]+/, x = /[ \t\r\n]+$/, z = /[ \t\r\n]+/g, E = /^[ \t\r\n]+$/;
  10336. f = C.hasOwnProperty(a.context) || C.hasOwnProperty(T.root_name);
  10337. function N(e) {
  10338. var t, n, r, o, i = A.getBlockElements();
  10339. for (t = e.prev; t && 3 === t.type; ) {
  10340. if (0 < (r = t.value.replace(x, "")).length)
  10341. return void (t.value = r);
  10342. if (n = t.next) {
  10343. if (3 === n.type && n.value.length) {
  10344. t = t.prev;
  10345. continue
  10346. }
  10347. if (!i[n.name] && "script" !== n.name && "style" !== n.name) {
  10348. t = t.prev;
  10349. continue
  10350. }
  10351. }
  10352. o = t.prev,
  10353. t.remove(),
  10354. t = o
  10355. }
  10356. }
  10357. var S = function(e, t) {
  10358. var n, r = new hf(e,t);
  10359. return e in M && ((n = _[e]) ? n.push(r) : _[e] = [r]),
  10360. r
  10361. };
  10362. t = fd({
  10363. validate: v,
  10364. allow_script_urls: T.allow_script_urls,
  10365. allow_conditional_comments: T.allow_conditional_comments,
  10366. preserve_cdata: T.preserve_cdata,
  10367. self_closing_elements: function(e) {
  10368. var t, n = {};
  10369. for (t in e)
  10370. "li" !== t && "p" !== t && (n[t] = e[t]);
  10371. return n
  10372. }(A.getSelfClosingElements()),
  10373. cdata: function(e) {
  10374. d.append(S("#cdata", 4)).value = e
  10375. },
  10376. text: function(e, t) {
  10377. var n;
  10378. f || (e = e.replace(z, " "),
  10379. function(e, t) {
  10380. return e && (t[e.name] || "br" === e.name)
  10381. }(d.lastChild, l) && (e = e.replace(w, ""))),
  10382. 0 !== e.length && ((n = S("#text", 3)).raw = !!t,
  10383. d.append(n).value = e)
  10384. },
  10385. comment: function(e) {
  10386. d.append(S("#comment", 8)).value = e
  10387. },
  10388. pi: function(e, t) {
  10389. d.append(S(e, 7)).value = t,
  10390. N(d)
  10391. },
  10392. doctype: function(e) {
  10393. d.append(S("#doctype", 10)).value = e,
  10394. N(d)
  10395. },
  10396. start: function(e, t, n) {
  10397. var r, o, i, a, u;
  10398. if (i = v ? A.getElementRule(e) : {}) {
  10399. for ((r = S(i.outputName || e, 1)).attributes = t,
  10400. r.shortEnded = n,
  10401. d.append(r),
  10402. (u = p[d.name]) && p[r.name] && !u[r.name] && h.push(r),
  10403. o = R.length; o--; )
  10404. (a = R[o].name)in t.map && ((c = D[a]) ? c.push(r) : D[a] = [r]);
  10405. l[e] && N(r),
  10406. n || (d = r),
  10407. !f && C[e] && (f = !0)
  10408. }
  10409. },
  10410. end: function(e) {
  10411. var t, n, r, o, i;
  10412. if (n = v ? A.getElementRule(e) : {}) {
  10413. if (l[e] && !f) {
  10414. if ((t = d.firstChild) && 3 === t.type)
  10415. if (0 < (r = t.value.replace(w, "")).length)
  10416. t.value = r,
  10417. t = t.next;
  10418. else
  10419. for (o = t.next,
  10420. t.remove(),
  10421. t = o; t && 3 === t.type; )
  10422. r = t.value,
  10423. o = t.next,
  10424. 0 !== r.length && !E.test(r) || (t.remove(),
  10425. t = o),
  10426. t = o;
  10427. if ((t = d.lastChild) && 3 === t.type)
  10428. if (0 < (r = t.value.replace(x, "")).length)
  10429. t.value = r,
  10430. t = t.prev;
  10431. else
  10432. for (o = t.prev,
  10433. t.remove(),
  10434. t = o; t && 3 === t.type; )
  10435. r = t.value,
  10436. o = t.prev,
  10437. 0 !== r.length && !E.test(r) || (t.remove(),
  10438. t = o),
  10439. t = o
  10440. }
  10441. if (f && C[e] && (f = !1),
  10442. n.removeEmpty && qm(A, g, C, d) && !d.attr("name") && !d.attr("id"))
  10443. return i = d.parent,
  10444. l[d.name] ? d.empty().remove() : d.unwrap(),
  10445. void (d = i);
  10446. n.paddEmpty && (function(e) {
  10447. return Qm(e, "#text") && e.firstChild.value === qr
  10448. }(d) || qm(A, g, C, d)) && jm(T, a, l, d),
  10449. d = d.parent
  10450. }
  10451. }
  10452. }, A);
  10453. var k = d = new hf(a.context || T.root_name,11);
  10454. if (t.parse(e, a.format),
  10455. v && h.length && (a.context ? a.invalid = !0 : function(e) {
  10456. var t, n, r, o, i, a, u, c, s, l, f, d, h, m, g, p;
  10457. for (d = eg("tr,td,th,tbody,thead,tfoot,table"),
  10458. l = A.getNonEmptyElements(),
  10459. f = A.getWhiteSpaceElements(),
  10460. h = A.getTextBlockElements(),
  10461. m = A.getSpecialElements(),
  10462. t = 0; t < e.length; t++)
  10463. if ((n = e[t]).parent && !n.fixed)
  10464. if (h[n.name] && "li" === n.parent.name) {
  10465. for (g = n.next; g && h[g.name]; )
  10466. g.name = "li",
  10467. g.fixed = !0,
  10468. n.parent.insert(g, n.parent),
  10469. g = g.next;
  10470. n.unwrap(n)
  10471. } else {
  10472. for (o = [n],
  10473. r = n.parent; r && !A.isValidChild(r.name, n.name) && !d[r.name]; r = r.parent)
  10474. o.push(r);
  10475. if (r && 1 < o.length) {
  10476. for (o.reverse(),
  10477. i = a = O(o[0].clone()),
  10478. s = 0; s < o.length - 1; s++) {
  10479. for (A.isValidChild(a.name, o[s].name) ? (u = O(o[s].clone()),
  10480. a.append(u)) : u = a,
  10481. c = o[s].firstChild; c && c !== o[s + 1]; )
  10482. p = c.next,
  10483. u.append(c),
  10484. c = p;
  10485. a = u
  10486. }
  10487. qm(A, l, f, i) ? r.insert(n, o[0], !0) : (r.insert(i, o[0], !0),
  10488. r.insert(n, i)),
  10489. r = o[0],
  10490. (qm(A, l, f, r) || Qm(r, "br")) && r.empty().remove()
  10491. } else if (n.parent) {
  10492. if ("li" === n.name) {
  10493. if ((g = n.prev) && ("ul" === g.name || "ul" === g.name)) {
  10494. g.append(n);
  10495. continue
  10496. }
  10497. if ((g = n.next) && ("ul" === g.name || "ul" === g.name)) {
  10498. g.insert(n, g.firstChild, !0);
  10499. continue
  10500. }
  10501. n.wrap(O(new hf("ul",1)));
  10502. continue
  10503. }
  10504. A.isValidChild(n.parent.name, "div") && A.isValidChild("div", n.name) ? n.wrap(O(new hf("div",1))) : m[n.name] ? n.empty().remove() : n.unwrap()
  10505. }
  10506. }
  10507. }(h)),
  10508. b && ("body" === k.name || a.isRootContent) && function() {
  10509. function e(e) {
  10510. e && ((r = e.firstChild) && 3 === r.type && (r.value = r.value.replace(w, "")),
  10511. (r = e.lastChild) && 3 === r.type && (r.value = r.value.replace(x, "")))
  10512. }
  10513. var t, n, r = k.firstChild;
  10514. if (A.isValidChild(k.name, b.toLowerCase())) {
  10515. for (; r; )
  10516. t = r.next,
  10517. 3 === r.type || 1 === r.type && "p" !== r.name && !l[r.name] && !r.attr("data-mce-type") ? (n || ((n = S(b, 1)).attr(T.forced_root_block_attrs),
  10518. k.insert(n, r)),
  10519. n.append(r)) : (e(n),
  10520. n = null),
  10521. r = t;
  10522. e(n)
  10523. }
  10524. }(),
  10525. !a.invalid) {
  10526. for (s in _)
  10527. if (_.hasOwnProperty(s)) {
  10528. for (c = M[s],
  10529. i = (n = _[s]).length; i--; )
  10530. n[i].parent || n.splice(i, 1);
  10531. for (r = 0,
  10532. o = c.length; r < o; r++)
  10533. c[r](n, s, a)
  10534. }
  10535. for (r = 0,
  10536. o = R.length; r < o; r++)
  10537. if ((c = R[r]).name in D) {
  10538. for (i = (n = D[c.name]).length; i--; )
  10539. n[i].parent || n.splice(i, 1);
  10540. for (i = 0,
  10541. u = c.callbacks.length; i < u; i++)
  10542. c.callbacks[i](n, c.name, a)
  10543. }
  10544. }
  10545. return k
  10546. }
  10547. };
  10548. return function(e, g) {
  10549. var p = e.schema;
  10550. g.remove_trailing_brs && e.addNodeFilter("br", function(e, t, n) {
  10551. var r, o, i, a, u, c, s, l, f = e.length, d = Zn.extend({}, p.getBlockElements()), h = p.getNonEmptyElements(), m = p.getNonEmptyElements();
  10552. for (d.body = 1,
  10553. r = 0; r < f; r++)
  10554. if (i = (o = e[r]).parent,
  10555. d[o.parent.name] && o === i.lastChild) {
  10556. for (u = o.prev; u; ) {
  10557. if ("span" !== (c = u.name) || "bookmark" !== u.attr("data-mce-type")) {
  10558. if ("br" !== c)
  10559. break;
  10560. if ("br" === c) {
  10561. o = null;
  10562. break
  10563. }
  10564. }
  10565. u = u.prev
  10566. }
  10567. o && (o.remove(),
  10568. qm(p, h, m, i) && (s = p.getElementRule(i.name)) && (s.removeEmpty ? i.remove() : s.paddEmpty && jm(g, n, d, i)))
  10569. } else {
  10570. for (a = o; i && i.firstChild === a && i.lastChild === a && !d[(a = i).name]; )
  10571. i = i.parent;
  10572. a === i && !0 !== g.padd_empty_with_br && ((l = new hf("#text",3)).value = qr,
  10573. o.replace(l))
  10574. }
  10575. }),
  10576. e.addAttributeFilter("href", function(e) {
  10577. var t, n, r, o = e.length;
  10578. if (!g.allow_unsafe_link_target)
  10579. for (; o--; )
  10580. "a" === (t = e[o]).name && "_blank" === t.attr("target") && t.attr("rel", (n = t.attr("rel"),
  10581. void 0,
  10582. r = n ? Zn.trim(n) : "",
  10583. /\b(noopener)\b/g.test(r) ? r : r.split(" ").filter(function(e) {
  10584. return 0 < e.length
  10585. }).concat(["noopener"]).sort().join(" ")))
  10586. }),
  10587. g.allow_html_in_named_anchor || e.addAttributeFilter("id,name", function(e) {
  10588. for (var t, n, r, o, i = e.length; i--; )
  10589. if ("a" === (o = e[i]).name && o.firstChild && !o.attr("href"))
  10590. for (r = o.parent,
  10591. t = o.lastChild; n = t.prev,
  10592. r.insert(t, o),
  10593. t = n; )
  10594. ;
  10595. }),
  10596. g.fix_list_elements && e.addNodeFilter("ul,ol", function(e) {
  10597. for (var t, n, r = e.length; r--; )
  10598. if ("ul" === (n = (t = e[r]).parent).name || "ol" === n.name)
  10599. if (t.prev && "li" === t.prev.name)
  10600. t.prev.append(t);
  10601. else {
  10602. var o = new hf("li",1);
  10603. o.attr("style", "list-style-type: none"),
  10604. t.wrap(o)
  10605. }
  10606. }),
  10607. g.validate && p.getValidClasses() && e.addAttributeFilter("class", function(e) {
  10608. for (var t, n, r, o, i, a, u, c = e.length, s = p.getValidClasses(); c--; ) {
  10609. for (n = (t = e[c]).attr("class").split(" "),
  10610. i = "",
  10611. r = 0; r < n.length; r++)
  10612. o = n[r],
  10613. u = !1,
  10614. (a = s["*"]) && a[o] && (u = !0),
  10615. a = s[t.name],
  10616. !u && a && a[o] && (u = !0),
  10617. u && (i && (i += " "),
  10618. i += o);
  10619. i.length || (i = null),
  10620. t.attr("class", i)
  10621. }
  10622. })
  10623. }(e, T),
  10624. Jm(e, T),
  10625. e
  10626. }
  10627. function Wm(e, t, n) {
  10628. -1 === Zn.inArray(t, n) && (e.addAttributeFilter(n, function(e, t) {
  10629. for (var n = e.length; n--; )
  10630. e[n].attr(t, null)
  10631. }),
  10632. t.push(n))
  10633. }
  10634. function Km(e, t, n, r, o) {
  10635. return function(e, t, n) {
  10636. return t.no_events || !e ? n : function(e, t) {
  10637. return e.fire("PostProcess", t)
  10638. }(e, te(te({}, t), {
  10639. content: n
  10640. })).content
  10641. }(e, o, function(e, t, n) {
  10642. return wf(e, t).serialize(n)
  10643. }(t, n, r))
  10644. }
  10645. function Xm(a, u) {
  10646. var e = ["data-mce-selected"]
  10647. , c = u && u.dom ? u.dom : Qi.DOM
  10648. , s = u && u.schema ? u.schema : Pr(a);
  10649. a.entity_encoding = a.entity_encoding || "named",
  10650. a.remove_trailing_brs = !("remove_trailing_brs"in a) || a.remove_trailing_brs;
  10651. var l = $m(a, s);
  10652. return og(l, a, c),
  10653. {
  10654. schema: s,
  10655. addNodeFilter: l.addNodeFilter,
  10656. addAttributeFilter: l.addAttributeFilter,
  10657. serialize: function(e, t) {
  10658. void 0 === t && (t = {});
  10659. var n = te({
  10660. format: "html"
  10661. }, t)
  10662. , r = ag(u, e, n)
  10663. , o = function(e, t, n) {
  10664. var r = mu.trim(n.getInner ? t.innerHTML : e.getOuterHTML(t));
  10665. return n.selection || hr(it.fromDom(t)) ? r : Zn.trim(r)
  10666. }(c, r, n)
  10667. , i = function(e, t, n) {
  10668. var r = n.selection ? te({
  10669. forced_root_block: !1
  10670. }, n) : n
  10671. , o = e.parse(t, r);
  10672. return ig(o),
  10673. o
  10674. }(l, o, n);
  10675. return "tree" === n.format ? i : Km(u, a, s, i, n)
  10676. },
  10677. addRules: function(e) {
  10678. s.addValidElements(e)
  10679. },
  10680. setRules: function(e) {
  10681. s.setValidElements(e)
  10682. },
  10683. addTempAttr: d(Wm, l, e),
  10684. getTempAttrs: function() {
  10685. return e
  10686. },
  10687. getNodeFilters: l.getNodeFilters,
  10688. getAttributeFilters: l.getAttributeFilters
  10689. }
  10690. }
  10691. function Ym(e, t) {
  10692. var n = Xm(e, t);
  10693. return {
  10694. schema: n.schema,
  10695. addNodeFilter: n.addNodeFilter,
  10696. addAttributeFilter: n.addAttributeFilter,
  10697. serialize: n.serialize,
  10698. addRules: n.addRules,
  10699. setRules: n.setRules,
  10700. addTempAttr: n.addTempAttr,
  10701. getTempAttrs: n.getTempAttrs,
  10702. getNodeFilters: n.getNodeFilters,
  10703. getAttributeFilters: n.getAttributeFilters
  10704. }
  10705. }
  10706. function Gm(e) {
  10707. var t, n, r = decodeURIComponent(e).split(",");
  10708. return (n = /data:([^;]+)/.exec(r[0])) && (t = n[1]),
  10709. {
  10710. type: t,
  10711. data: r[1]
  10712. }
  10713. }
  10714. function Zm(e) {
  10715. return (e || "blobid") + lg++
  10716. }
  10717. var Jm = function(e, t) {
  10718. t.inline_styles && Um(e, t)
  10719. }
  10720. , Qm = function(e, t) {
  10721. return e && e.firstChild && e.firstChild === e.lastChild && e.firstChild.name === t
  10722. }
  10723. , eg = Zn.makeMap
  10724. , tg = Zn.each
  10725. , ng = Zn.explode
  10726. , rg = Zn.extend
  10727. , og = function(t, c, s) {
  10728. t.addAttributeFilter("data-mce-tabindex", function(e, t) {
  10729. for (var n, r = e.length; r--; )
  10730. (n = e[r]).attr("tabindex", n.attr("data-mce-tabindex")),
  10731. n.attr(t, null)
  10732. }),
  10733. t.addAttributeFilter("src,href,style", function(e, t) {
  10734. for (var n, r, o = e.length, i = "data-mce-" + t, a = c.url_converter, u = c.url_converter_scope; o--; )
  10735. (r = (n = e[o]).attr(i)) !== undefined ? (n.attr(t, 0 < r.length ? r : null),
  10736. n.attr(i, null)) : (r = n.attr(t),
  10737. "style" === t ? r = s.serializeStyle(s.parseStyle(r), n.name) : a && (r = a.call(u, r, t, n.name)),
  10738. n.attr(t, 0 < r.length ? r : null))
  10739. }),
  10740. t.addAttributeFilter("class", function(e) {
  10741. for (var t, n, r = e.length; r--; )
  10742. (n = (t = e[r]).attr("class")) && (n = t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g, ""),
  10743. t.attr("class", 0 < n.length ? n : null))
  10744. }),
  10745. t.addAttributeFilter("data-mce-type", function(e, t, n) {
  10746. for (var r, o = e.length; o--; ) {
  10747. if ("bookmark" === (r = e[o]).attr("data-mce-type") && !n.cleanup)
  10748. R.from(r.firstChild).exists(function(e) {
  10749. return !mu.isZwsp(e.value)
  10750. }) ? r.unwrap() : r.remove()
  10751. }
  10752. }),
  10753. t.addNodeFilter("noscript", function(e) {
  10754. for (var t, n = e.length; n--; )
  10755. (t = e[n].firstChild) && (t.value = Sr.decode(t.value))
  10756. }),
  10757. t.addNodeFilter("script,style", function(e, t) {
  10758. for (var n, r, o, i = e.length, a = function(e) {
  10759. 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, "")
  10760. }; i--; )
  10761. r = (n = e[i]).firstChild ? n.firstChild.value : "",
  10762. "script" === t ? ((o = n.attr("type")) && n.attr("type", "mce-no/type" === o ? null : o.replace(/^mce\-/, "")),
  10763. "xhtml" === c.element_format && 0 < r.length && (n.firstChild.value = "// <![CDATA[\n" + a(r) + "\n// ]]>")) : "xhtml" === c.element_format && 0 < r.length && (n.firstChild.value = "\x3c!--\n" + a(r) + "\n--\x3e")
  10764. }),
  10765. t.addNodeFilter("#comment", function(e) {
  10766. for (var t, n = e.length; n--; )
  10767. t = e[n],
  10768. c.preserve_cdata && 0 === t.value.indexOf("[CDATA[") ? (t.name = "#cdata",
  10769. t.type = 4,
  10770. t.value = s.decode(t.value.replace(/^\[CDATA\[|\]\]$/g, ""))) : 0 === t.value.indexOf("mce:protected ") && (t.name = "#text",
  10771. t.type = 3,
  10772. t.raw = !0,
  10773. t.value = unescape(t.value).substr(14))
  10774. }),
  10775. t.addNodeFilter("xml:namespace,input", function(e, t) {
  10776. for (var n, r = e.length; r--; )
  10777. 7 === (n = e[r]).type ? n.remove() : 1 === n.type && ("input" !== t || n.attr("type") || n.attr("type", "text"))
  10778. }),
  10779. t.addAttributeFilter("data-mce-type", function(e) {
  10780. F(e, function(e) {
  10781. "format-caret" === e.attr("data-mce-type") && (e.isEmpty(t.schema.getNonEmptyElements()) ? e.remove() : e.unwrap())
  10782. })
  10783. }),
  10784. t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder", function(e, t) {
  10785. for (var n = e.length; n--; )
  10786. e[n].attr(t, null)
  10787. })
  10788. }
  10789. , ig = function(e) {
  10790. function t(e) {
  10791. return e && "br" === e.name
  10792. }
  10793. var n, r;
  10794. t(n = e.lastChild) && t(r = n.prev) && (n.remove(),
  10795. r.remove())
  10796. }
  10797. , ag = function(e, t, n) {
  10798. return function(e, t) {
  10799. return e && e.hasEventListeners("PreProcess") && !t.no_events
  10800. }(e, n) ? function(e, t, n) {
  10801. var r, o, i, a = e.dom;
  10802. return t = t.cloneNode(!0),
  10803. (r = j.document.implementation).createHTMLDocument && (o = r.createHTMLDocument(""),
  10804. Zn.each("BODY" === t.nodeName ? t.childNodes : [t], function(e) {
  10805. o.body.appendChild(o.importNode(e, !0))
  10806. }),
  10807. t = "BODY" !== t.nodeName ? o.body.firstChild : o.body,
  10808. i = a.doc,
  10809. a.doc = o),
  10810. function(e, t) {
  10811. e.fire("PreProcess", t)
  10812. }(e, te(te({}, n), {
  10813. node: t
  10814. })),
  10815. i && (a.doc = i),
  10816. t
  10817. }(e, t, n) : t
  10818. }
  10819. , ug = function(e) {
  10820. return 0 === e.indexOf("blob:") ? function(i) {
  10821. return new wn(function(e, t) {
  10822. function n() {
  10823. t("Cannot convert " + i + " to Blob. Resource might not exist or is inaccessible.")
  10824. }
  10825. try {
  10826. var r = new j.XMLHttpRequest;
  10827. r.open("GET", i, !0),
  10828. r.responseType = "blob",
  10829. r.onload = function() {
  10830. 200 === this.status ? e(this.response) : n()
  10831. }
  10832. ,
  10833. r.onerror = n,
  10834. r.send()
  10835. } catch (o) {
  10836. n()
  10837. }
  10838. }
  10839. )
  10840. }(e) : 0 === e.indexOf("data:") ? function(i) {
  10841. return new wn(function(e) {
  10842. var t, n, r, o = Gm(i);
  10843. try {
  10844. t = j.atob(o.data)
  10845. } catch (HN) {
  10846. return void e(new j.Blob([]))
  10847. }
  10848. for (n = new Uint8Array(t.length),
  10849. r = 0; r < n.length; r++)
  10850. n[r] = t.charCodeAt(r);
  10851. e(new j.Blob([n],{
  10852. type: o.type
  10853. }))
  10854. }
  10855. )
  10856. }(e) : null
  10857. }
  10858. , cg = function(n) {
  10859. return new wn(function(e) {
  10860. var t = new j.FileReader;
  10861. t.onloadend = function() {
  10862. e(t.result)
  10863. }
  10864. ,
  10865. t.readAsDataURL(n)
  10866. }
  10867. )
  10868. }
  10869. , sg = Gm
  10870. , lg = 0;
  10871. function fg(o, i) {
  10872. var a = {};
  10873. return {
  10874. findAll: function(e, n) {
  10875. var t;
  10876. n = n || $(!0),
  10877. t = U(function(e) {
  10878. return e ? G(e.getElementsByTagName("img")) : []
  10879. }(e), function(e) {
  10880. var t = e.src;
  10881. return !!Wn.fileApi && (!e.hasAttribute("data-mce-bogus") && (!e.hasAttribute("data-mce-placeholder") && (!(!t || t === Wn.transparentSrc) && (0 === t.indexOf("blob:") ? !o.isUploaded(t) && n(e) : 0 === t.indexOf("data:") && n(e)))))
  10882. });
  10883. var r = X(t, function(n) {
  10884. if (a[n.src])
  10885. return new wn(function(t) {
  10886. a[n.src].then(function(e) {
  10887. if ("string" == typeof e)
  10888. return e;
  10889. t({
  10890. image: n,
  10891. blobInfo: e.blobInfo
  10892. })
  10893. })
  10894. }
  10895. );
  10896. var e = new wn(function(e, t) {
  10897. !function(n, r, o, t) {
  10898. var i, a;
  10899. 0 !== r.src.indexOf("blob:") ? (i = sg(r.src).data,
  10900. (a = n.findFirst(function(e) {
  10901. return e.base64() === i
  10902. })) ? o({
  10903. image: r,
  10904. blobInfo: a
  10905. }) : ug(r.src).then(function(e) {
  10906. a = n.create(Zm(), e, i),
  10907. n.add(a),
  10908. o({
  10909. image: r,
  10910. blobInfo: a
  10911. })
  10912. }, function(e) {
  10913. t(e)
  10914. })) : (a = n.getByUri(r.src)) ? o({
  10915. image: r,
  10916. blobInfo: a
  10917. }) : ug(r.src).then(function(t) {
  10918. cg(t).then(function(e) {
  10919. i = sg(e).data,
  10920. a = n.create(Zm(), t, i),
  10921. n.add(a),
  10922. o({
  10923. image: r,
  10924. blobInfo: a
  10925. })
  10926. })
  10927. }, function(e) {
  10928. t(e)
  10929. })
  10930. }(i, n, e, t)
  10931. }
  10932. ).then(function(e) {
  10933. return delete a[e.image.src],
  10934. e
  10935. })["catch"](function(e) {
  10936. return delete a[n.src],
  10937. e
  10938. });
  10939. return a[n.src] = e
  10940. });
  10941. return wn.all(r)
  10942. }
  10943. }
  10944. }
  10945. function dg(c, a) {
  10946. function n(e, t, n, r) {
  10947. var o, i;
  10948. (o = new j.XMLHttpRequest).open("POST", a.url),
  10949. o.withCredentials = a.credentials,
  10950. o.upload.onprogress = function(e) {
  10951. r(e.loaded / e.total * 100)
  10952. }
  10953. ,
  10954. o.onerror = function() {
  10955. n("Image upload failed due to a XHR Transport error. Code: " + o.status)
  10956. }
  10957. ,
  10958. o.onload = function() {
  10959. var e;
  10960. o.status < 200 || 300 <= o.status ? n("HTTP Error: " + o.status) : (e = JSON.parse(o.responseText)) && "string" == typeof e.location ? t(function(e, t) {
  10961. return e ? e.replace(/\/$/, "") + "/" + t.replace(/^\//, "") : t
  10962. }(a.basePath, e.location)) : n("Invalid JSON: " + o.responseText)
  10963. }
  10964. ,
  10965. (i = new j.FormData).append("file", e.blob(), e.filename()),
  10966. o.send(i)
  10967. }
  10968. function s(e, t) {
  10969. return {
  10970. url: t,
  10971. blobInfo: e,
  10972. status: !0
  10973. }
  10974. }
  10975. function l(e, t) {
  10976. return {
  10977. url: "",
  10978. blobInfo: e,
  10979. status: !1,
  10980. error: t
  10981. }
  10982. }
  10983. function f(e, t) {
  10984. Zn.each(o[e], function(e) {
  10985. e(t)
  10986. }),
  10987. delete o[e]
  10988. }
  10989. function r(e, t) {
  10990. return e = Zn.grep(e, function(e) {
  10991. return !c.isUploaded(e.blobUri())
  10992. }),
  10993. wn.all(Zn.map(e, function(e) {
  10994. return c.isPending(e.blobUri()) ? function(e) {
  10995. var t = e.blobUri();
  10996. return new wn(function(e) {
  10997. o[t] = o[t] || [],
  10998. o[t].push(e)
  10999. }
  11000. )
  11001. }(e) : function(i, a, u) {
  11002. return c.markPending(i.blobUri()),
  11003. new wn(function(t) {
  11004. function e() {}
  11005. var n;
  11006. try {
  11007. var r = function() {
  11008. n && (n.close(),
  11009. e)
  11010. };
  11011. a(i, function(e) {
  11012. r(),
  11013. c.markUploaded(i.blobUri(), e),
  11014. f(i.blobUri(), s(i, e)),
  11015. t(s(i, e))
  11016. }, function(e) {
  11017. r(),
  11018. c.removeFailed(i.blobUri()),
  11019. f(i.blobUri(), l(i, e)),
  11020. t(l(i, e))
  11021. }, function(e) {
  11022. e < 0 || 100 < e || (n = n || u()).progressBar.value(e)
  11023. })
  11024. } catch (o) {
  11025. t(l(i, o.message))
  11026. }
  11027. }
  11028. )
  11029. }(e, a.handler, t)
  11030. }))
  11031. }
  11032. var o = {};
  11033. return !1 === B(a.handler) && (a.handler = n),
  11034. {
  11035. upload: function(e, t) {
  11036. return !a.url && function(e) {
  11037. return e === n
  11038. }(a.handler) ? new wn(function(e) {
  11039. e([])
  11040. }
  11041. ) : r(e, t)
  11042. }
  11043. }
  11044. }
  11045. function hg(o) {
  11046. function t(t) {
  11047. return function(e) {
  11048. return o.selection ? t(e) : []
  11049. }
  11050. }
  11051. function r(e, t, n) {
  11052. for (var r = 0; -1 !== (r = e.indexOf(t, r)) && (e = e.substring(0, r) + n + e.substr(r + t.length),
  11053. r += n.length - t.length + 1),
  11054. -1 !== r; )
  11055. ;
  11056. return e
  11057. }
  11058. function i(e, t, n) {
  11059. return e = r(e, 'src="' + t + '"', 'src="' + n + '"'),
  11060. e = r(e, 'data-mce-src="' + t + '"', 'data-mce-src="' + n + '"')
  11061. }
  11062. function n(t, n) {
  11063. F(o.undoManager.data, function(e) {
  11064. "fragmented" === e.type ? e.fragments = X(e.fragments, function(e) {
  11065. return i(e, t, n)
  11066. }) : e.content = i(e.content, t, n)
  11067. })
  11068. }
  11069. function a() {
  11070. return o.notificationManager.open({
  11071. text: o.translate("Image uploading..."),
  11072. type: "info",
  11073. timeout: -1,
  11074. progressBar: !0
  11075. })
  11076. }
  11077. function u(e, t) {
  11078. h.removeByUri(e.src),
  11079. n(e.src, t),
  11080. o.$(e).attr({
  11081. src: ys(o) ? function(e) {
  11082. return e + (-1 === e.indexOf("?") ? "?" : "&") + (new Date).getTime()
  11083. }(t) : t,
  11084. "data-mce-src": o.convertURL(t, "src")
  11085. })
  11086. }
  11087. function c(n) {
  11088. return f = f || dg(m, {
  11089. url: Cs(o),
  11090. basePath: ws(o),
  11091. credentials: xs(o),
  11092. handler: zs(o)
  11093. }),
  11094. p().then(t(function(r) {
  11095. var e = X(r, function(e) {
  11096. return e.blobInfo
  11097. });
  11098. return f.upload(e, a).then(t(function(e) {
  11099. var t = X(e, function(e, t) {
  11100. var n = r[t].image;
  11101. return e.status && bs(o) ? u(n, e.url) : e.error && ch.uploadError(o, e.error),
  11102. {
  11103. element: n,
  11104. status: e.status
  11105. }
  11106. });
  11107. return n && n(t),
  11108. t
  11109. }))
  11110. }))
  11111. }
  11112. function e(e) {
  11113. if (vs(o))
  11114. return c(e)
  11115. }
  11116. function s(t) {
  11117. return !1 !== b(g, function(e) {
  11118. return e(t)
  11119. }) && (0 !== t.getAttribute("src").indexOf("data:") || ps(o)(t))
  11120. }
  11121. function l(e) {
  11122. return e.replace(/src="(blob:[^"]+)"/g, function(e, n) {
  11123. var t = m.getResultUri(n);
  11124. if (t)
  11125. return 'src="' + t + '"';
  11126. var r = h.getByUri(n);
  11127. return (r = r || y(o.editorManager.get(), function(e, t) {
  11128. return e || t.editorUpload && t.editorUpload.blobCache.getByUri(n)
  11129. }, null)) ? 'src="data:' + r.blob().type + ";base64," + r.base64() + '"' : e
  11130. })
  11131. }
  11132. var f, d, h = function() {
  11133. var n = []
  11134. , o = function(e) {
  11135. var t, n;
  11136. if (!e.blob || !e.base64)
  11137. throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");
  11138. return t = e.id || Gg("blobid"),
  11139. n = e.name || t,
  11140. {
  11141. id: $(t),
  11142. name: $(n),
  11143. filename: $(n + "." + function(e) {
  11144. return {
  11145. "image/jpeg": "jpg",
  11146. "image/jpg": "jpg",
  11147. "image/gif": "gif",
  11148. "image/png": "png"
  11149. }[e.toLowerCase()] || "dat"
  11150. }(e.blob.type)),
  11151. blob: $(e.blob),
  11152. base64: $(e.base64),
  11153. blobUri: $(e.blobUri || j.URL.createObjectURL(e.blob)),
  11154. uri: $(e.uri)
  11155. }
  11156. }
  11157. , t = function(t) {
  11158. return e(function(e) {
  11159. return e.id() === t
  11160. })
  11161. }
  11162. , e = function(e) {
  11163. return U(n, e)[0]
  11164. };
  11165. return {
  11166. create: function(e, t, n, r) {
  11167. if (K(e))
  11168. return o({
  11169. id: e,
  11170. name: r,
  11171. blob: t,
  11172. base64: n
  11173. });
  11174. if (_(e))
  11175. return o(e);
  11176. throw new Error("Unknown input type")
  11177. },
  11178. add: function(e) {
  11179. t(e.id()) || n.push(e)
  11180. },
  11181. get: t,
  11182. getByUri: function(t) {
  11183. return e(function(e) {
  11184. return e.blobUri() === t
  11185. })
  11186. },
  11187. findFirst: e,
  11188. removeByUri: function(t) {
  11189. n = U(n, function(e) {
  11190. return e.blobUri() !== t || (j.URL.revokeObjectURL(e.blobUri()),
  11191. !1)
  11192. })
  11193. },
  11194. destroy: function() {
  11195. F(n, function(e) {
  11196. j.URL.revokeObjectURL(e.blobUri())
  11197. }),
  11198. n = []
  11199. }
  11200. }
  11201. }(), m = function v() {
  11202. function n(e, t) {
  11203. return {
  11204. status: e,
  11205. resultUri: t
  11206. }
  11207. }
  11208. function t(e) {
  11209. return e in r
  11210. }
  11211. var r = {};
  11212. return {
  11213. hasBlobUri: t,
  11214. getResultUri: function(e) {
  11215. var t = r[e];
  11216. return t ? t.resultUri : null
  11217. },
  11218. isPending: function(e) {
  11219. return !!t(e) && 1 === r[e].status
  11220. },
  11221. isUploaded: function(e) {
  11222. return !!t(e) && 2 === r[e].status
  11223. },
  11224. markPending: function(e) {
  11225. r[e] = n(1, null)
  11226. },
  11227. markUploaded: function(e, t) {
  11228. r[e] = n(2, t)
  11229. },
  11230. removeFailed: function(e) {
  11231. delete r[e]
  11232. },
  11233. destroy: function() {
  11234. r = {}
  11235. }
  11236. }
  11237. }(), g = [], p = function() {
  11238. return (d = d || fg(m, h)).findAll(o.getBody(), s).then(t(function(e) {
  11239. return e = U(e, function(e) {
  11240. return "string" != typeof e || (ch.displayError(o, e),
  11241. !1)
  11242. }),
  11243. F(e, function(e) {
  11244. n(e.image.src, e.blobInfo.blobUri()),
  11245. e.image.src = e.blobInfo.blobUri(),
  11246. e.image.removeAttribute("data-mce-src")
  11247. }),
  11248. e
  11249. }))
  11250. };
  11251. return o.on("SetContent", function() {
  11252. vs(o) ? e() : p()
  11253. }),
  11254. o.on("RawSaveContent", function(e) {
  11255. e.content = l(e.content)
  11256. }),
  11257. o.on("GetContent", function(e) {
  11258. e.source_view || "raw" === e.format || (e.content = l(e.content))
  11259. }),
  11260. o.on("PostRender", function() {
  11261. o.parser.addNodeFilter("img", function(e) {
  11262. F(e, function(e) {
  11263. var t = e.attr("src");
  11264. if (!h.getByUri(t)) {
  11265. var n = m.getResultUri(t);
  11266. n && e.attr("src", n)
  11267. }
  11268. })
  11269. })
  11270. }),
  11271. {
  11272. blobCache: h,
  11273. addFilter: function(e) {
  11274. g.push(e)
  11275. },
  11276. uploadImages: c,
  11277. uploadImagesAuto: e,
  11278. scanForImages: p,
  11279. destroy: function() {
  11280. h.destroy(),
  11281. m.destroy(),
  11282. d = f = null
  11283. }
  11284. }
  11285. }
  11286. function mg(e, t, n) {
  11287. var r = e.formatter.get(n);
  11288. if (r)
  11289. for (var o = 0; o < r.length; o++)
  11290. if (!1 === r[o].inherit && e.dom.is(t, r[o].selector))
  11291. return !0;
  11292. return !1
  11293. }
  11294. function gg(t, e, n, r) {
  11295. var o = t.dom.getRoot();
  11296. return e !== o && (e = t.dom.getParent(e, function(e) {
  11297. return !!mg(t, e, n) || (e.parentNode === o || !!tp(t, e, n, r, !0))
  11298. }),
  11299. tp(t, e, n, r))
  11300. }
  11301. function pg(e, t, n) {
  11302. return !!ep(t, n.inline) || (!!ep(t, n.block) || (n.selector ? 1 === t.nodeType && e.is(t, n.selector) : void 0))
  11303. }
  11304. function vg(e, t, n, r, o, i) {
  11305. var a, u, c, s = n[r];
  11306. if (n.onmatch)
  11307. return n.onmatch(t, n, r);
  11308. if (s)
  11309. if ("undefined" == typeof s.length) {
  11310. for (a in s)
  11311. if (s.hasOwnProperty(a)) {
  11312. if (u = "attributes" === r ? e.getAttrib(t, a) : vl(e, t, a),
  11313. o && !u && !n.exact)
  11314. return;
  11315. if ((!o || n.exact) && !ep(u, pl(e, ml(s[a], i), a)))
  11316. return
  11317. }
  11318. } else
  11319. for (c = 0; c < s.length; c++)
  11320. if ("attributes" === r ? e.getAttrib(t, s[c]) : vl(e, t, s[c]))
  11321. return n;
  11322. return n
  11323. }
  11324. function yg(e, t, n, r) {
  11325. var o;
  11326. return r ? gg(e, r, t, n) : (r = e.selection.getNode(),
  11327. !!gg(e, r, t, n) || !((o = e.selection.getStart()) === r || !gg(e, o, t, n)))
  11328. }
  11329. function bg(r, o, i) {
  11330. var e, a = [], u = {};
  11331. return e = r.selection.getStart(),
  11332. r.dom.getParent(e, function(e) {
  11333. var t, n;
  11334. for (t = 0; t < o.length; t++)
  11335. n = o[t],
  11336. !u[n] && tp(r, e, n, i) && (u[n] = !0,
  11337. a.push(n))
  11338. }, r.dom.getRoot()),
  11339. a
  11340. }
  11341. function Cg(e, t) {
  11342. var n, r, o, i, a, u = e.formatter.get(t), c = e.dom;
  11343. if (u)
  11344. for (n = e.selection.getStart(),
  11345. r = bl(c, n),
  11346. i = u.length - 1; 0 <= i; i--) {
  11347. if (!(a = u[i].selector) || u[i].defaultBlock)
  11348. return !0;
  11349. for (o = r.length - 1; 0 <= o; o--)
  11350. if (c.is(r[o], a))
  11351. return !0
  11352. }
  11353. return !1
  11354. }
  11355. function wg(e, t) {
  11356. return e.splitText(t)
  11357. }
  11358. function xg(e) {
  11359. var t = e.startContainer
  11360. , n = e.startOffset
  11361. , r = e.endContainer
  11362. , o = e.endOffset;
  11363. return t === r && Qt.isText(t) ? 0 < n && n < t.nodeValue.length && (t = (r = wg(t, n)).previousSibling,
  11364. n < o ? (t = r = wg(r, o -= n).previousSibling,
  11365. o = r.nodeValue.length,
  11366. n = 0) : o = 0) : (Qt.isText(t) && 0 < n && n < t.nodeValue.length && (t = wg(t, n),
  11367. n = 0),
  11368. Qt.isText(r) && 0 < o && o < r.nodeValue.length && (o = (r = wg(r, o).previousSibling).nodeValue.length)),
  11369. {
  11370. startContainer: t,
  11371. startOffset: n,
  11372. endContainer: r,
  11373. endOffset: o
  11374. }
  11375. }
  11376. function zg(e, t, n) {
  11377. if (0 !== n) {
  11378. var r = e.data.slice(t, t + n)
  11379. , o = t + n >= e.data.length
  11380. , i = 0 === t;
  11381. e.replaceData(t, n, function(n, r, o) {
  11382. return y(n, function(e, t) {
  11383. return ul(t) || Kl(t) ? e.previousCharIsSpace || "" === e.str && r || e.str.length === n.length - 1 && o ? {
  11384. previousCharIsSpace: !1,
  11385. str: e.str + qr
  11386. } : {
  11387. previousCharIsSpace: !0,
  11388. str: e.str + " "
  11389. } : {
  11390. previousCharIsSpace: !1,
  11391. str: e.str + t
  11392. }
  11393. }, {
  11394. previousCharIsSpace: !1,
  11395. str: ""
  11396. }).str
  11397. }(r, i, o))
  11398. }
  11399. }
  11400. function Eg(e, t) {
  11401. var n = e.data.slice(t)
  11402. , r = n.length - function(e) {
  11403. return e.replace(/^\s+/g, "")
  11404. }(n).length;
  11405. return zg(e, t, r)
  11406. }
  11407. function Ng(e, t) {
  11408. var n = it.fromDom(e);
  11409. return function(e, t, n) {
  11410. return Sa(e, t, n).isSome()
  11411. }(it.fromDom(t), "pre,code", d(pe, n))
  11412. }
  11413. function Sg(e, t) {
  11414. return qa(t) && !1 === function(e, t) {
  11415. return Qt.isText(t) && /^[ \t\r\n]*$/.test(t.data) && !1 === Ng(e, t)
  11416. }(e, t) || function(e) {
  11417. return Qt.isElement(e) && "A" === e.nodeName && e.hasAttribute("name")
  11418. }(t) || np(t)
  11419. }
  11420. function kg(e, t) {
  11421. return function(e, t) {
  11422. var n = e.container()
  11423. , r = e.offset();
  11424. return !1 === Vc.isTextPosition(e) && n === t.parentNode && r > Vc.before(t).offset()
  11425. }(t, e) ? Vc(t.container(), t.offset() - 1) : t
  11426. }
  11427. function Tg(e) {
  11428. return qa(e.previousSibling) ? R.some(function(e) {
  11429. return Qt.isText(e) ? Vc(e, e.data.length) : Vc.after(e)
  11430. }(e.previousSibling)) : e.previousSibling ? Ul.lastPositionIn(e.previousSibling) : R.none()
  11431. }
  11432. function Ag(e) {
  11433. return qa(e.nextSibling) ? R.some(function(e) {
  11434. return Qt.isText(e) ? Vc(e, 0) : Vc.before(e)
  11435. }(e.nextSibling)) : e.nextSibling ? Ul.firstPositionIn(e.nextSibling) : R.none()
  11436. }
  11437. function Mg(e, t) {
  11438. return Tg(t).orThunk(function() {
  11439. return Ag(t)
  11440. }).orThunk(function() {
  11441. return function(e, t) {
  11442. var n = Vc.before(t.previousSibling ? t.previousSibling : t.parentNode);
  11443. return Ul.prevPosition(e, n).fold(function() {
  11444. return Ul.nextPosition(e, Vc.after(t))
  11445. }, R.some)
  11446. }(e, t)
  11447. })
  11448. }
  11449. function Rg(e, t) {
  11450. return Ag(t).orThunk(function() {
  11451. return Tg(t)
  11452. }).orThunk(function() {
  11453. return function(e, t) {
  11454. return Ul.nextPosition(e, Vc.after(t)).fold(function() {
  11455. return Ul.prevPosition(e, Vc.before(t))
  11456. }, R.some)
  11457. }(e, t)
  11458. })
  11459. }
  11460. function _g(e, t, n) {
  11461. return function(e, t, n) {
  11462. return e ? Rg(t, n) : Mg(t, n)
  11463. }(e, t, n).map(d(kg, n))
  11464. }
  11465. function Dg(t, n, e) {
  11466. e.fold(function() {
  11467. t.focus()
  11468. }, function(e) {
  11469. t.selection.setRng(e.toRange(), n)
  11470. })
  11471. }
  11472. function Og(e, t) {
  11473. return t && e.schema.getBlockElements().hasOwnProperty(Oe(t))
  11474. }
  11475. function Hg(e) {
  11476. if (ip(e)) {
  11477. var t = it.fromHtml('<br data-mce-bogus="1">');
  11478. return _e(e),
  11479. Ht(e, t),
  11480. R.some(Vc.before(t.dom()))
  11481. }
  11482. return R.none()
  11483. }
  11484. function Bg(e, t, a) {
  11485. var n = Ce(e).filter(Lt)
  11486. , r = we(e).filter(Lt);
  11487. return Bt(e),
  11488. function(e, t, n, r) {
  11489. return e.isSome() && t.isSome() && n.isSome() ? R.some(r(e.getOrDie(), t.getOrDie(), n.getOrDie())) : R.none()
  11490. }(n, r, t, function(e, t, n) {
  11491. var r = e.dom()
  11492. , o = t.dom()
  11493. , i = r.data.length;
  11494. return function(e, t, n) {
  11495. var r = se(e.data).length;
  11496. e.appendData(t.data),
  11497. Bt(it.fromDom(t)),
  11498. n && Eg(e, r)
  11499. }(r, o, a),
  11500. n.container() === o ? Vc(r, i) : n
  11501. }).orThunk(function() {
  11502. return a && (n.each(function(e) {
  11503. return function(e, t) {
  11504. var n = e.data.slice(0, t)
  11505. , r = n.length - se(n).length;
  11506. return zg(e, t - r, r)
  11507. }(e.dom(), e.dom().length)
  11508. }),
  11509. r.each(function(e) {
  11510. return Eg(e.dom(), 0)
  11511. })),
  11512. t
  11513. })
  11514. }
  11515. function Pg(e) {
  11516. return 0 < function(e) {
  11517. for (var t = []; e; ) {
  11518. if (3 === e.nodeType && e.nodeValue !== up || 1 < e.childNodes.length)
  11519. return [];
  11520. 1 === e.nodeType && t.push(e),
  11521. e = e.firstChild
  11522. }
  11523. return t
  11524. }(e).length
  11525. }
  11526. function Lg(e) {
  11527. if (e) {
  11528. var t = new Fi(e,e);
  11529. for (e = t.current(); e; e = t.next())
  11530. if (Qt.isText(e))
  11531. return e
  11532. }
  11533. return null
  11534. }
  11535. function Vg(e) {
  11536. var t = it.fromTag("span");
  11537. return Ke(t, {
  11538. id: cp,
  11539. "data-mce-bogus": "1",
  11540. "data-mce-type": "format-caret"
  11541. }),
  11542. e && Ht(t, it.fromText(up)),
  11543. t
  11544. }
  11545. function Ig(e, t, n) {
  11546. void 0 === n && (n = !0);
  11547. var r = e.dom
  11548. , o = e.selection;
  11549. if (Pg(t))
  11550. ap(e, !1, it.fromDom(t), n);
  11551. else {
  11552. var i = o.getRng()
  11553. , a = r.getParent(t, r.isBlock)
  11554. , u = function(e) {
  11555. var t = Lg(e);
  11556. return t && t.nodeValue.charAt(0) === up && t.deleteData(0, 1),
  11557. t
  11558. }(t);
  11559. i.startContainer === u && 0 < i.startOffset && i.setStart(u, i.startOffset - 1),
  11560. i.endContainer === u && 0 < i.endOffset && i.setEnd(u, i.endOffset - 1),
  11561. r.remove(t, !0),
  11562. a && r.isEmpty(a) && Jg(it.fromDom(a)),
  11563. o.setRng(i)
  11564. }
  11565. }
  11566. function Fg(e, t, n) {
  11567. void 0 === n && (n = !0);
  11568. var r = e.dom
  11569. , o = e.selection;
  11570. if (t)
  11571. Ig(e, t, n);
  11572. else if (!(t = lc(e.getBody(), o.getStart())))
  11573. for (; t = r.get(cp); )
  11574. Ig(e, t, !1)
  11575. }
  11576. function Ug(e, t, n) {
  11577. var r = e.dom
  11578. , o = r.getParent(n, d(dl, e));
  11579. o && r.isEmpty(o) ? n.parentNode.replaceChild(t, n) : (Zg(it.fromDom(n)),
  11580. r.isEmpty(n) ? n.parentNode.replaceChild(t, n) : r.insertAfter(t, n))
  11581. }
  11582. function jg(e, t) {
  11583. return e.appendChild(t),
  11584. t
  11585. }
  11586. function qg(e, t) {
  11587. var n = m(e, function(e, t) {
  11588. return jg(e, t.cloneNode(!1))
  11589. }, t);
  11590. return jg(n, n.ownerDocument.createTextNode(up))
  11591. }
  11592. function $g(t) {
  11593. t.on("mouseup keydown", function(e) {
  11594. !function(e, t) {
  11595. var n = e.selection
  11596. , r = e.getBody();
  11597. Fg(e, null, !1),
  11598. 8 !== t && 46 !== t || !n.isCollapsed() || n.getStart().innerHTML !== up || Fg(e, lc(r, n.getStart())),
  11599. 37 !== t && 39 !== t || Fg(e, lc(r, n.getStart()))
  11600. }(t, e.keyCode)
  11601. })
  11602. }
  11603. function Wg(e, t) {
  11604. return e.schema.getTextInlineElements().hasOwnProperty(Oe(t)) && !sc(t.dom()) && !Qt.isBogus(t.dom())
  11605. }
  11606. var Kg, Xg, Yg = 0, Gg = function(e) {
  11607. return e + Yg++ + function() {
  11608. function e() {
  11609. return Math.round(4294967295 * Math.random()).toString(36)
  11610. }
  11611. return "s" + (new Date).getTime().toString(36) + e() + e() + e()
  11612. }()
  11613. }, Zg = function(e) {
  11614. var t = Ca(e, "br")
  11615. , n = U(function(e) {
  11616. for (var t = [], n = e.dom(); n; )
  11617. t.push(it.fromDom(n)),
  11618. n = n.lastChild;
  11619. return t
  11620. }(e).slice(-1), er);
  11621. t.length === n.length && F(n, Bt)
  11622. }, Jg = function(e) {
  11623. _e(e),
  11624. Ht(e, it.fromHtml('<br data-mce-bogus="1">'))
  11625. }, Qg = function(n) {
  11626. ke(n).each(function(t) {
  11627. Ce(t).each(function(e) {
  11628. ar(n) && er(t) && ar(e) && Bt(t)
  11629. })
  11630. })
  11631. }, ep = gl, tp = function(e, t, n, r, o) {
  11632. var i, a, u, c, s = e.formatter.get(n), l = e.dom;
  11633. if (s && t)
  11634. for (a = 0; a < s.length; a++)
  11635. if (i = s[a],
  11636. pg(e.dom, t, i) && vg(l, t, i, "attributes", o, r) && vg(l, t, i, "styles", o, r)) {
  11637. if (c = i.classes)
  11638. for (u = 0; u < c.length; u++)
  11639. if (!e.dom.hasClass(t, c[u]))
  11640. return;
  11641. return i
  11642. }
  11643. }, np = Qt.hasAttribute("data-mce-bookmark"), rp = Qt.hasAttribute("data-mce-bogus"), op = Qt.hasAttributeValue("data-mce-bogus", "all"), ip = function(e, t) {
  11644. return void 0 === t && (t = !0),
  11645. function(e, t) {
  11646. var n, r = 0;
  11647. if (Sg(e, e))
  11648. return !1;
  11649. if (!(n = e.firstChild))
  11650. return !0;
  11651. var o = new Fi(n,e);
  11652. do {
  11653. if (t) {
  11654. if (op(n)) {
  11655. n = o.next(!0);
  11656. continue
  11657. }
  11658. if (rp(n)) {
  11659. n = o.next();
  11660. continue
  11661. }
  11662. }
  11663. if (Qt.isBr(n))
  11664. r++,
  11665. n = o.next();
  11666. else {
  11667. if (Sg(e, n))
  11668. return !1;
  11669. n = o.next()
  11670. }
  11671. } while (n);
  11672. return r <= 1
  11673. }(e.dom(), t)
  11674. }, ap = function(t, n, e, r) {
  11675. void 0 === r && (r = !0);
  11676. var o = _g(n, t.getBody(), e.dom())
  11677. , i = Ea(e, d(Og, t), function(t) {
  11678. return function(e) {
  11679. return e.dom() === t
  11680. }
  11681. }(t.getBody()))
  11682. , a = Bg(e, o, function(e, t) {
  11683. return ee(e.schema.getTextInlineElements(), Oe(t))
  11684. }(t, e));
  11685. t.dom.isEmpty(t.getBody()) ? (t.setContent(""),
  11686. t.selection.setCursorLocation()) : i.bind(Hg).fold(function() {
  11687. r && Dg(t, n, a)
  11688. }, function(e) {
  11689. r && Dg(t, n, R.some(e))
  11690. })
  11691. }, up = mu.ZWSP, cp = "_mce_caret", sp = {}, lp = Xn.filter, fp = Xn.each;
  11692. Xg = function(e) {
  11693. var t, n, r = e.selection.getRng();
  11694. t = Qt.matchNodeNames(["pre"]),
  11695. r.collapsed || (n = e.selection.getSelectedBlocks(),
  11696. fp(lp(lp(n, t), function(e) {
  11697. return t(e.previousSibling) && -1 !== Xn.indexOf(n, e.previousSibling)
  11698. }), function(e) {
  11699. !function(e, t) {
  11700. Ii(t).remove(),
  11701. Ii(e).append("<br><br>").append(t.childNodes)
  11702. }(e.previousSibling, e)
  11703. }))
  11704. }
  11705. ,
  11706. sp[Kg = "pre"] || (sp[Kg] = []),
  11707. sp[Kg].push(Xg);
  11708. function dp(o) {
  11709. this.compare = function(e, t) {
  11710. if (e.nodeName !== t.nodeName)
  11711. return !1;
  11712. function n(n) {
  11713. var r = {};
  11714. return Ap(o.getAttribs(n), function(e) {
  11715. var t = e.nodeName.toLowerCase();
  11716. 0 !== t.indexOf("_") && "style" !== t && 0 !== t.indexOf("data-") && (r[t] = o.getAttrib(n, t))
  11717. }),
  11718. r
  11719. }
  11720. function r(e, t) {
  11721. var n, r;
  11722. for (r in e)
  11723. if (e.hasOwnProperty(r)) {
  11724. if (void 0 === (n = t[r]))
  11725. return !1;
  11726. if (e[r] !== n)
  11727. return !1;
  11728. delete t[r]
  11729. }
  11730. for (r in t)
  11731. if (t.hasOwnProperty(r))
  11732. return !1;
  11733. return !0
  11734. }
  11735. return !!r(n(e), n(t)) && (!!r(o.parseStyle(o.getAttrib(e, "style")), o.parseStyle(o.getAttrib(t, "style"))) && (!Wl(e) && !Wl(t)))
  11736. }
  11737. }
  11738. function hp(e, t, n) {
  11739. return e.isChildOf(t, n) && t !== n && !e.isBlock(n)
  11740. }
  11741. function mp(e, t, n) {
  11742. var r, o;
  11743. if (r = t[n ? "startContainer" : "endContainer"],
  11744. o = t[n ? "startOffset" : "endOffset"],
  11745. Qt.isElement(r)) {
  11746. var i = r.childNodes.length - 1;
  11747. !n && o && o--,
  11748. r = r.childNodes[i < o ? i : o]
  11749. }
  11750. return Qt.isText(r) && n && o >= r.nodeValue.length && (r = new Fi(r,e.getBody()).next() || r),
  11751. Qt.isText(r) && !n && 0 === o && (r = new Fi(r,e.getBody()).prev() || r),
  11752. r
  11753. }
  11754. function gp(e, t, n, r) {
  11755. var o = e.create(n, r);
  11756. return t.parentNode.insertBefore(o, t),
  11757. o.appendChild(t),
  11758. o
  11759. }
  11760. function pp(e, t, n, r, o) {
  11761. var i = it.fromDom(t)
  11762. , a = it.fromDom(e.create(r, o))
  11763. , u = n ? ze(i) : xe(i);
  11764. return Re(a, u),
  11765. n ? (Te(i, a),
  11766. Me(a, i)) : (Ae(i, a),
  11767. Ht(a, i)),
  11768. a.dom()
  11769. }
  11770. function vp(e, t, n, r) {
  11771. return !(t = fl(t, n, r)) || "BR" === t.nodeName || e.isBlock(t)
  11772. }
  11773. function yp(e, r, o, t, i) {
  11774. var n, a = e.dom;
  11775. if (!function(e, t, n) {
  11776. return !!_p(t, n.inline) || (!!_p(t, n.block) || (n.selector ? Qt.isElement(t) && e.is(t, n.selector) : void 0))
  11777. }(a, t, r) && !function(e, t) {
  11778. return t.links && "A" === e.nodeName
  11779. }(t, r))
  11780. return !1;
  11781. var u = t;
  11782. if ("all" !== r.remove) {
  11783. Rp(r.styles, function(e, t) {
  11784. e = pl(a, ml(e, o), t),
  11785. "number" == typeof t && (t = e,
  11786. i = null),
  11787. !r.remove_similar && i && !_p(vl(a, i, t), e) || a.setStyle(u, t, ""),
  11788. n = !0
  11789. }),
  11790. n && "" === a.getAttrib(u, "style") && (u.removeAttribute("style"),
  11791. u.removeAttribute("data-mce-style")),
  11792. Rp(r.attributes, function(e, t) {
  11793. var n;
  11794. if (e = ml(e, o),
  11795. "number" == typeof t && (t = e,
  11796. i = null),
  11797. r.remove_similar || !i || _p(a.getAttrib(i, t), e)) {
  11798. if ("class" === t && (e = a.getAttrib(u, t)) && (n = "",
  11799. Rp(e.split(/\s+/), function(e) {
  11800. /mce\-\w+/.test(e) && (n += (n ? " " : "") + e)
  11801. }),
  11802. n))
  11803. return void a.setAttrib(u, t, n);
  11804. "class" === t && u.removeAttribute("className"),
  11805. Mp.test(t) && u.removeAttribute("data-mce-" + t),
  11806. u.removeAttribute(t)
  11807. }
  11808. }),
  11809. Rp(r.classes, function(e) {
  11810. e = ml(e, o),
  11811. i && !a.hasClass(i, e) || a.removeClass(u, e)
  11812. });
  11813. for (var c = a.getAttribs(u), s = 0; s < c.length; s++) {
  11814. var l = c[s].nodeName;
  11815. if (0 !== l.indexOf("_") && 0 !== l.indexOf("data-"))
  11816. return !1
  11817. }
  11818. }
  11819. return "none" !== r.remove ? (function(t, e, n) {
  11820. var r, o = e.parentNode, i = t.dom, a = as(t);
  11821. n.block && (a ? o === i.getRoot() && (n.list_block && _p(e, n.list_block) || Rp(Zn.grep(e.childNodes), function(e) {
  11822. hl(t, a, e.nodeName.toLowerCase()) ? r ? r.appendChild(e) : (r = gp(i, e, a),
  11823. i.setAttribs(r, t.settings.forced_root_block_attrs)) : r = 0
  11824. })) : i.isBlock(e) && !i.isBlock(o) && (vp(i, e, !1) || vp(i, e.firstChild, !0, !0) || e.insertBefore(i.create("br"), e.firstChild),
  11825. vp(i, e, !0) || vp(i, e.lastChild, !1, !0) || e.appendChild(i.create("br")))),
  11826. n.selector && n.inline && !_p(n.inline, e) || i.remove(e, !0)
  11827. }(e, u, r),
  11828. !0) : void 0
  11829. }
  11830. function bp(u, n, a, e, r) {
  11831. function c(e) {
  11832. var t = function(n, e, r, o, i) {
  11833. var a;
  11834. return Rp(bl(n.dom, e.parentNode).reverse(), function(e) {
  11835. var t;
  11836. a || "_start" === e.id || "_end" === e.id || (t = tp(n, e, r, o, i)) && !1 !== t.split && (a = e)
  11837. }),
  11838. a
  11839. }(u, e, n, a, r);
  11840. return function(e, t, n, r, o, i, a, u) {
  11841. var c, s, l, f, d, h, m = e.dom;
  11842. if (n) {
  11843. for (h = n.parentNode,
  11844. c = r.parentNode; c && c !== h; c = c.parentNode) {
  11845. for (s = m.clone(c, !1),
  11846. d = 0; d < t.length; d++)
  11847. if (yp(e, t[d], u, s, s)) {
  11848. s = 0;
  11849. break
  11850. }
  11851. s && (l && s.appendChild(l),
  11852. f = f || s,
  11853. l = s)
  11854. }
  11855. !i || a.mixed && m.isBlock(n) || (r = m.split(n, r)),
  11856. l && (o.parentNode.insertBefore(l, o),
  11857. f.appendChild(o))
  11858. }
  11859. return r
  11860. }(u, l, t, e, e, !0, f, a)
  11861. }
  11862. function s(e) {
  11863. var t = h.get(e ? "_start" : "_end")
  11864. , n = t[e ? "firstChild" : "lastChild"];
  11865. return function(e) {
  11866. return Wl(e) && Qt.isElement(e) && ("_start" === e.id || "_end" === e.id)
  11867. }(n) && (n = n[e ? "firstChild" : "lastChild"]),
  11868. Qt.isText(n) && 0 === n.data.length && (n = e ? t.previousSibling || t.nextSibling : t.nextSibling || t.previousSibling),
  11869. h.remove(t, !0),
  11870. n
  11871. }
  11872. function t(e) {
  11873. var t, n, r = e.commonAncestorContainer, o = Tl(u, e, l, !0);
  11874. if (f.split) {
  11875. if (o = xg(o),
  11876. (t = mp(u, o, !0)) !== (n = mp(u, o))) {
  11877. if (/^(TR|TH|TD)$/.test(t.nodeName) && t.firstChild && (t = "TR" === t.nodeName ? t.firstChild.firstChild || t : t.firstChild || t),
  11878. r && /^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName) && function(e) {
  11879. return /^(TH|TD)$/.test(e.nodeName)
  11880. }(n) && n.firstChild && (n = n.firstChild || n),
  11881. hp(h, t, n)) {
  11882. var i = R.from(t.firstChild).getOr(t);
  11883. return c(pp(h, i, !0, "span", {
  11884. id: "_start",
  11885. "data-mce-type": "bookmark"
  11886. })),
  11887. void s(!0)
  11888. }
  11889. if (hp(h, n, t)) {
  11890. i = R.from(n.lastChild).getOr(n);
  11891. return c(pp(h, i, !1, "span", {
  11892. id: "_end",
  11893. "data-mce-type": "bookmark"
  11894. })),
  11895. void s(!1)
  11896. }
  11897. t = gp(h, t, "span", {
  11898. id: "_start",
  11899. "data-mce-type": "bookmark"
  11900. }),
  11901. n = gp(h, n, "span", {
  11902. id: "_end",
  11903. "data-mce-type": "bookmark"
  11904. });
  11905. var a = h.createRng();
  11906. a.setStartAfter(t),
  11907. a.setEndBefore(n),
  11908. ef(h, a, function(e) {
  11909. F(e, function(e) {
  11910. Wl(e) || Wl(e.parentNode) || c(e)
  11911. })
  11912. }),
  11913. c(t),
  11914. c(n),
  11915. t = s(!0),
  11916. n = s()
  11917. } else
  11918. t = n = c(t);
  11919. o.startContainer = t.parentNode ? t.parentNode : t,
  11920. o.startOffset = h.nodeIndex(t),
  11921. o.endContainer = n.parentNode ? n.parentNode : n,
  11922. o.endOffset = h.nodeIndex(n) + 1
  11923. }
  11924. ef(h, o, function(e) {
  11925. Rp(e, function(e) {
  11926. g(e),
  11927. Qt.isElement(e) && "underline" === u.dom.getStyle(e, "text-decoration") && e.parentNode && "underline" === yl(h, e.parentNode) && yp(u, {
  11928. deep: !1,
  11929. exact: !0,
  11930. inline: "span",
  11931. styles: {
  11932. textDecoration: "underline"
  11933. }
  11934. }, null, e)
  11935. })
  11936. })
  11937. }
  11938. var o, i, l = u.formatter.get(n), f = l[0], d = !0, h = u.dom, m = u.selection, g = function(e) {
  11939. var t, n, r, o, i;
  11940. if (Qt.isElement(e) && h.getContentEditable(e) && (o = d,
  11941. d = "true" === h.getContentEditable(e),
  11942. i = !0),
  11943. t = Zn.grep(e.childNodes),
  11944. d && !i)
  11945. for (n = 0,
  11946. r = l.length; n < r && !yp(u, l[n], a, e, e); n++)
  11947. ;
  11948. if (f.deep && t.length) {
  11949. for (n = 0,
  11950. r = t.length; n < r; n++)
  11951. g(t[n]);
  11952. i && (d = o)
  11953. }
  11954. };
  11955. if (e)
  11956. sl(e) ? ((i = h.createRng()).setStartBefore(e),
  11957. i.setEndAfter(e),
  11958. t(i)) : t(e);
  11959. else if ("false" !== h.getContentEditable(m.getNode()))
  11960. m.isCollapsed() && f.inline && !h.select("td[data-mce-selected],th[data-mce-selected]").length ? function(e, t, n, r) {
  11961. var o, i, a, u, c, s, l, f = e.dom, d = e.selection, h = [], m = d.getRng();
  11962. for (o = m.startContainer,
  11963. i = m.startOffset,
  11964. 3 === (c = o).nodeType && (i !== o.nodeValue.length && (u = !0),
  11965. c = c.parentNode); c; ) {
  11966. if (tp(e, c, t, n, r)) {
  11967. s = c;
  11968. break
  11969. }
  11970. c.nextSibling && (u = !0),
  11971. h.push(c),
  11972. c = c.parentNode
  11973. }
  11974. if (s)
  11975. if (u) {
  11976. a = d.getBookmark(),
  11977. m.collapse(!0);
  11978. var g = Tl(e, m, e.formatter.get(t), !0);
  11979. g = xg(g),
  11980. e.formatter.remove(t, n, g),
  11981. d.moveToBookmark(a)
  11982. } else {
  11983. l = lc(e.getBody(), s);
  11984. var p = Vg(!1).dom()
  11985. , v = qg(h, p);
  11986. Ug(e, p, l || s),
  11987. Ig(e, l, !1),
  11988. d.setCursorLocation(v, 1),
  11989. f.isEmpty(s) && f.remove(s)
  11990. }
  11991. }(u, n, a, r) : (o = Wc.getPersistentBookmark(u.selection, !0),
  11992. t(m.getRng()),
  11993. m.moveToBookmark(o),
  11994. f.inline && yg(u, n, a, m.getStart()) && ll(h, m, m.getRng()),
  11995. u.nodeChanged());
  11996. else {
  11997. e = m.getNode();
  11998. for (var p = 0, v = l.length; p < v && (!l[p].ceFalseOverride || !yp(u, l[p], a, e, e)); p++)
  11999. ;
  12000. }
  12001. }
  12002. function Cp(e) {
  12003. return Qt.isElement(e) && !Wl(e) && !sc(e) && !Qt.isBogus(e)
  12004. }
  12005. function wp(e, t) {
  12006. var n;
  12007. for (n = e; n; n = n[t]) {
  12008. if (Qt.isText(n) && 0 !== n.nodeValue.length)
  12009. return e;
  12010. if (Qt.isElement(n) && !Wl(n))
  12011. return n
  12012. }
  12013. return e
  12014. }
  12015. function xp(e, t, n) {
  12016. var r, o, i = new dp(e);
  12017. if (t && n && (t = wp(t, "previousSibling"),
  12018. n = wp(n, "nextSibling"),
  12019. i.compare(t, n))) {
  12020. for (r = t.nextSibling; r && r !== n; )
  12021. r = (o = r).nextSibling,
  12022. t.appendChild(o);
  12023. return e.remove(n),
  12024. Zn.each(Zn.grep(n.childNodes), function(e) {
  12025. t.appendChild(e)
  12026. }),
  12027. t
  12028. }
  12029. return n
  12030. }
  12031. function zp(n, e) {
  12032. return d(function(e, t) {
  12033. return !(!t || !vl(n, t, e))
  12034. }, e)
  12035. }
  12036. function Ep(r, e, t) {
  12037. return d(function(e, t, n) {
  12038. r.setStyle(n, e, t),
  12039. "" === n.getAttribute("style") && n.removeAttribute("style"),
  12040. Hp(r, n)
  12041. }, e, t)
  12042. }
  12043. function Np(e, t) {
  12044. var n;
  12045. 1 === t.nodeType && t.parentNode && 1 === t.parentNode.nodeType && (n = yl(e, t.parentNode),
  12046. e.getStyle(t, "color") && n ? e.setStyle(t, "text-decoration", n) : e.getStyle(t, "text-decoration") === n && e.setStyle(t, "text-decoration", null))
  12047. }
  12048. function Sp(n, e, r, o) {
  12049. Dp(e, function(t) {
  12050. Dp(n.dom.select(t.inline, o), function(e) {
  12051. Cp(e) && yp(n, t, r, e, t.exact ? e : null)
  12052. }),
  12053. function(r, e, t) {
  12054. if (e.clear_child_styles) {
  12055. var n = e.links ? "*:not(a)" : "*";
  12056. Dp(r.select(n, t), function(n) {
  12057. Cp(n) && Dp(e.styles, function(e, t) {
  12058. r.setStyle(n, t, "")
  12059. })
  12060. })
  12061. }
  12062. }(n.dom, t, o)
  12063. })
  12064. }
  12065. function kp(t) {
  12066. var n = Vc.fromRangeStart(t)
  12067. , r = Vc.fromRangeEnd(t)
  12068. , o = t.commonAncestorContainer;
  12069. return Ul.fromPosition(!1, o, r).map(function(e) {
  12070. return !kc(n, r, o) && kc(n, e, o) ? function(e, t, n, r) {
  12071. var o = j.document.createRange();
  12072. return o.setStart(e, t),
  12073. o.setEnd(n, r),
  12074. o
  12075. }(n.container(), n.offset(), e.container(), e.offset()) : t
  12076. }).getOr(t)
  12077. }
  12078. function Tp(e, t, n, r, o) {
  12079. return null === t.get() && function(t, n) {
  12080. var r = at({});
  12081. t.set({}),
  12082. n.on("NodeChange", function(e) {
  12083. Vp(n, e.element, r, t.get())
  12084. })
  12085. }(t, e),
  12086. function(e, t, n, r) {
  12087. var o = e.get();
  12088. F(t.split(","), function(e) {
  12089. o[e] || (o[e] = {
  12090. similar: r,
  12091. callbacks: []
  12092. }),
  12093. o[e].callbacks.push(n)
  12094. }),
  12095. e.set(o)
  12096. }(t, n, r, o),
  12097. {
  12098. unbind: function() {
  12099. return function(e, t, n) {
  12100. var r = e.get();
  12101. F(t.split(","), function(e) {
  12102. r[e].callbacks = U(r[e].callbacks, function(e) {
  12103. return e !== n
  12104. }),
  12105. 0 === r[e].callbacks.length && delete r[e]
  12106. }),
  12107. e.set(r)
  12108. }(t, n, r)
  12109. }
  12110. }
  12111. }
  12112. var Ap = Zn.each
  12113. , Mp = /^(src|href|style)$/
  12114. , Rp = Zn.each
  12115. , _p = gl
  12116. , Dp = Zn.each
  12117. , Op = function(e, t, n) {
  12118. Dp(e.childNodes, function(e) {
  12119. Cp(e) && (t(e) && n(e),
  12120. e.hasChildNodes() && Op(e, t, n))
  12121. })
  12122. }
  12123. , Hp = function(e, t) {
  12124. "SPAN" === t.nodeName && 0 === e.getAttribs(t).length && e.remove(t, !0)
  12125. }
  12126. , Bp = function(e) {
  12127. return e.collapsed ? e : kp(e)
  12128. }
  12129. , Pp = Zn.each
  12130. , Lp = function(m, g, p, r) {
  12131. function v(n, e) {
  12132. if (e = e || C,
  12133. n) {
  12134. if (e.onformat && e.onformat(n, e, p, r),
  12135. Pp(e.styles, function(e, t) {
  12136. i.setStyle(n, t, ml(e, p))
  12137. }),
  12138. e.styles) {
  12139. var t = i.getAttrib(n, "style");
  12140. t && i.setAttrib(n, "data-mce-style", t)
  12141. }
  12142. Pp(e.attributes, function(e, t) {
  12143. i.setAttrib(n, t, ml(e, p))
  12144. }),
  12145. Pp(e.classes, function(e) {
  12146. e = ml(e, p),
  12147. i.hasClass(n, e) || i.addClass(n, e)
  12148. })
  12149. }
  12150. }
  12151. function y(e, t) {
  12152. var n = !1;
  12153. return !!C.selector && (Pp(e, function(e) {
  12154. if (!("collapsed"in e && e.collapsed !== o))
  12155. return i.is(t, e.selector) && !sc(t) ? (v(t, e),
  12156. !(n = !0)) : void 0
  12157. }),
  12158. n)
  12159. }
  12160. function e(c, e, t, s) {
  12161. var l, f, d = [], h = !0;
  12162. l = C.inline || C.block,
  12163. f = c.create(l),
  12164. v(f),
  12165. ef(c, e, function(e) {
  12166. var a, u = function(e) {
  12167. var t = !1
  12168. , n = h
  12169. , r = e.nodeName.toLowerCase()
  12170. , o = e.parentNode.nodeName.toLowerCase();
  12171. if (Qt.isElement(e) && c.getContentEditable(e) && (n = h,
  12172. h = "true" === c.getContentEditable(e),
  12173. t = !0),
  12174. gl(r, "br"))
  12175. return a = 0,
  12176. void (C.block && c.remove(e));
  12177. if (C.wrapper && tp(m, e, g, p))
  12178. a = 0;
  12179. else {
  12180. if (h && !t && C.block && !C.wrapper && dl(m, r) && hl(m, o, l))
  12181. return e = c.rename(e, l),
  12182. v(e),
  12183. d.push(e),
  12184. void (a = 0);
  12185. if (C.selector) {
  12186. var i = y(b, e);
  12187. if (!C.inline || i)
  12188. return void (a = 0)
  12189. }
  12190. !h || t || !hl(m, l, r) || !hl(m, o, l) || !s && 3 === e.nodeType && 1 === e.nodeValue.length && 65279 === e.nodeValue.charCodeAt(0) || sc(e) || C.inline && c.isBlock(e) ? (a = 0,
  12191. Pp(Zn.grep(e.childNodes), u),
  12192. t && (h = n),
  12193. a = 0) : (a || (a = c.clone(f, !1),
  12194. e.parentNode.insertBefore(a, e),
  12195. d.push(a)),
  12196. a.appendChild(e))
  12197. }
  12198. };
  12199. Pp(e, u)
  12200. }),
  12201. !0 === C.links && Pp(d, function(e) {
  12202. var t = function(e) {
  12203. "A" === e.nodeName && v(e, C),
  12204. Pp(Zn.grep(e.childNodes), t)
  12205. };
  12206. t(e)
  12207. }),
  12208. Pp(d, function(e) {
  12209. function t(e) {
  12210. var t = !1;
  12211. return Pp(e.childNodes, function(e) {
  12212. if (function(e) {
  12213. return e && 1 === e.nodeType && !Wl(e) && !sc(e) && !Qt.isBogus(e)
  12214. }(e))
  12215. return t = e,
  12216. !1
  12217. }),
  12218. t
  12219. }
  12220. var n, r, o, i, a;
  12221. (r = 0,
  12222. Pp(e.childNodes, function(e) {
  12223. (function(e) {
  12224. return e && Qt.isText(e) && 0 === e.length
  12225. }
  12226. )(e) || Wl(e) || r++
  12227. }),
  12228. n = r,
  12229. !(1 < d.length) && c.isBlock(e) || 0 !== n) ? (C.inline || C.wrapper) && (C.exact || 1 !== n || ((i = t(o = e)) && !Wl(i) && pg(c, i, C) && (a = c.clone(i, !1),
  12230. v(a),
  12231. c.replace(a, o, !0),
  12232. c.remove(i, !0)),
  12233. e = a || o),
  12234. Sp(m, b, p, e),
  12235. function(t, n, r, o, i) {
  12236. tp(t, i.parentNode, r, o) && yp(t, n, o, i) || n.merge_with_parents && t.dom.getParent(i.parentNode, function(e) {
  12237. if (tp(t, e, r, o))
  12238. return yp(t, n, o, i),
  12239. !0
  12240. })
  12241. }(m, C, g, p, e),
  12242. function(e, t, n, r) {
  12243. t.styles && t.styles.backgroundColor && Op(r, zp(e, "fontSize"), Ep(e, "backgroundColor", ml(t.styles.backgroundColor, n)))
  12244. }(c, C, p, e),
  12245. function(e, t, n, r) {
  12246. "sub" !== t.inline && "sup" !== t.inline || (Op(r, zp(e, "fontSize"), Ep(e, "fontSize", "")),
  12247. e.remove(e.select("sup" === t.inline ? "sub" : "sup", r), !0))
  12248. }(c, C, 0, e),
  12249. function(e, t, n, r) {
  12250. r && !1 !== t.merge_siblings && (r = xp(e, fl(r), r),
  12251. r = xp(e, r, fl(r, !0)))
  12252. }(c, C, 0, e)) : c.remove(e, !0)
  12253. })
  12254. }
  12255. var t, n, b = m.formatter.get(g), C = b[0], o = !r && m.selection.isCollapsed(), i = m.dom, a = m.selection;
  12256. if ("false" !== i.getContentEditable(a.getNode())) {
  12257. if (C) {
  12258. if (r)
  12259. sl(r) ? y(b, r) || ((n = i.createRng()).setStartBefore(r),
  12260. n.setEndAfter(r),
  12261. e(i, Tl(m, n, b), 0, !0)) : e(i, r, 0, !0);
  12262. else if (o && C.inline && !i.select("td[data-mce-selected],th[data-mce-selected]").length)
  12263. !function(e, t, n) {
  12264. var r, o, i, a, u, c, s = e.selection;
  12265. a = (r = s.getRng()).startOffset,
  12266. c = r.startContainer.nodeValue,
  12267. (o = lc(e.getBody(), s.getStart())) && (i = Lg(o));
  12268. var l = /[^\s\u00a0\u00ad\u200b\ufeff]/;
  12269. c && 0 < a && a < c.length && l.test(c.charAt(a)) && l.test(c.charAt(a - 1)) ? (u = s.getBookmark(),
  12270. r.collapse(!0),
  12271. r = Tl(e, r, e.formatter.get(t)),
  12272. r = xg(r),
  12273. e.formatter.apply(t, n, r),
  12274. s.moveToBookmark(u)) : (o && i.nodeValue === up || (i = (o = function(e, t) {
  12275. return e.importNode(t, !0)
  12276. }(e.getDoc(), Vg(!0).dom())).firstChild,
  12277. r.insertNode(o),
  12278. a = 1),
  12279. e.formatter.apply(t, n, o),
  12280. s.setCursorLocation(i, a))
  12281. }(m, g, p);
  12282. else {
  12283. var u = m.selection.getNode();
  12284. m.settings.forced_root_block || !b[0].defaultBlock || i.getParent(u, i.isBlock) || Lp(m, b[0].defaultBlock),
  12285. m.selection.setRng(Bp(m.selection.getRng())),
  12286. t = Wc.getPersistentBookmark(m.selection, !0),
  12287. e(i, Tl(m, a.getRng(), b)),
  12288. C.styles && function(e, t, n, r) {
  12289. (t.styles.color || t.styles.textDecoration) && (Zn.walk(r, d(Np, e), "childNodes"),
  12290. Np(e, r))
  12291. }(i, C, 0, u),
  12292. a.moveToBookmark(t),
  12293. ll(i, a, a.getRng()),
  12294. m.nodeChanged()
  12295. }
  12296. !function(e, t) {
  12297. fp(sp[e], function(e) {
  12298. e(t)
  12299. })
  12300. }(g, m)
  12301. }
  12302. } else {
  12303. r = a.getNode();
  12304. for (var c = 0, s = b.length; c < s; c++)
  12305. if (b[c].ceFalseOverride && i.is(r, b[c].selector))
  12306. return void v(r, b[c])
  12307. }
  12308. }
  12309. , Vp = function(r, e, t, n) {
  12310. var o = Z(t.get())
  12311. , i = {}
  12312. , a = {}
  12313. , u = U(bl(r.dom, e), function(e) {
  12314. return 1 === e.nodeType && !e.getAttribute("data-mce-bogus")
  12315. });
  12316. N(n, function(e, n) {
  12317. Zn.each(u, function(t) {
  12318. return r.formatter.matchNode(t, n, {}, e.similar) ? (-1 === o.indexOf(n) && (F(e.callbacks, function(e) {
  12319. e(!0, {
  12320. node: t,
  12321. format: n,
  12322. parents: u
  12323. })
  12324. }),
  12325. i[n] = e.callbacks),
  12326. a[n] = e.callbacks,
  12327. !1) : !mg(r, t, n) && void 0
  12328. })
  12329. });
  12330. var c = Ip(t.get(), a, e, u);
  12331. t.set(te(te({}, i), c))
  12332. }
  12333. , Ip = function(e, n, r, o) {
  12334. return T(e, function(e, t) {
  12335. return !!ee(n, t) || (F(e, function(e) {
  12336. e(!1, {
  12337. node: r,
  12338. format: t,
  12339. parents: o
  12340. })
  12341. }),
  12342. !1)
  12343. }).t
  12344. }
  12345. , Fp = function(r) {
  12346. var t = {
  12347. valigntop: [{
  12348. selector: "td,th",
  12349. styles: {
  12350. verticalAlign: "top"
  12351. }
  12352. }],
  12353. valignmiddle: [{
  12354. selector: "td,th",
  12355. styles: {
  12356. verticalAlign: "middle"
  12357. }
  12358. }],
  12359. valignbottom: [{
  12360. selector: "td,th",
  12361. styles: {
  12362. verticalAlign: "bottom"
  12363. }
  12364. }],
  12365. alignleft: [{
  12366. selector: "figure.image",
  12367. collapsed: !1,
  12368. classes: "align-left",
  12369. ceFalseOverride: !0,
  12370. preview: "font-family font-size"
  12371. }, {
  12372. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  12373. styles: {
  12374. textAlign: "left"
  12375. },
  12376. inherit: !1,
  12377. preview: !1,
  12378. defaultBlock: "div"
  12379. }, {
  12380. selector: "img,table",
  12381. collapsed: !1,
  12382. styles: {
  12383. "float": "left"
  12384. },
  12385. preview: "font-family font-size"
  12386. }],
  12387. aligncenter: [{
  12388. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  12389. styles: {
  12390. textAlign: "center"
  12391. },
  12392. inherit: !1,
  12393. preview: "font-family font-size",
  12394. defaultBlock: "div"
  12395. }, {
  12396. selector: "figure.image",
  12397. collapsed: !1,
  12398. classes: "align-center",
  12399. ceFalseOverride: !0,
  12400. preview: "font-family font-size"
  12401. }, {
  12402. selector: "img",
  12403. collapsed: !1,
  12404. styles: {
  12405. display: "block",
  12406. marginLeft: "auto",
  12407. marginRight: "auto"
  12408. },
  12409. preview: !1
  12410. }, {
  12411. selector: "table",
  12412. collapsed: !1,
  12413. styles: {
  12414. marginLeft: "auto",
  12415. marginRight: "auto"
  12416. },
  12417. preview: "font-family font-size"
  12418. }],
  12419. alignright: [{
  12420. selector: "figure.image",
  12421. collapsed: !1,
  12422. classes: "align-right",
  12423. ceFalseOverride: !0,
  12424. preview: "font-family font-size"
  12425. }, {
  12426. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  12427. styles: {
  12428. textAlign: "right"
  12429. },
  12430. inherit: !1,
  12431. preview: "font-family font-size",
  12432. defaultBlock: "div"
  12433. }, {
  12434. selector: "img,table",
  12435. collapsed: !1,
  12436. styles: {
  12437. "float": "right"
  12438. },
  12439. preview: "font-family font-size"
  12440. }],
  12441. alignjustify: [{
  12442. selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
  12443. styles: {
  12444. textAlign: "justify"
  12445. },
  12446. inherit: !1,
  12447. defaultBlock: "div",
  12448. preview: "font-family font-size"
  12449. }],
  12450. bold: [{
  12451. inline: "strong",
  12452. remove: "all"
  12453. }, {
  12454. inline: "span",
  12455. styles: {
  12456. fontWeight: "bold"
  12457. }
  12458. }, {
  12459. inline: "b",
  12460. remove: "all"
  12461. }],
  12462. italic: [{
  12463. inline: "em",
  12464. remove: "all"
  12465. }, {
  12466. inline: "span",
  12467. styles: {
  12468. fontStyle: "italic"
  12469. }
  12470. }, {
  12471. inline: "i",
  12472. remove: "all"
  12473. }],
  12474. underline: [{
  12475. inline: "span",
  12476. styles: {
  12477. textDecoration: "underline"
  12478. },
  12479. exact: !0
  12480. }, {
  12481. inline: "u",
  12482. remove: "all"
  12483. }],
  12484. strikethrough: [{
  12485. inline: "span",
  12486. styles: {
  12487. textDecoration: "line-through"
  12488. },
  12489. exact: !0
  12490. }, {
  12491. inline: "strike",
  12492. remove: "all"
  12493. }],
  12494. forecolor: {
  12495. inline: "span",
  12496. styles: {
  12497. color: "%value"
  12498. },
  12499. links: !0,
  12500. remove_similar: !0,
  12501. clear_child_styles: !0
  12502. },
  12503. hilitecolor: {
  12504. inline: "span",
  12505. styles: {
  12506. backgroundColor: "%value"
  12507. },
  12508. links: !0,
  12509. remove_similar: !0,
  12510. clear_child_styles: !0
  12511. },
  12512. fontname: {
  12513. inline: "span",
  12514. toggle: !1,
  12515. styles: {
  12516. fontFamily: "%value"
  12517. },
  12518. clear_child_styles: !0
  12519. },
  12520. fontsize: {
  12521. inline: "span",
  12522. toggle: !1,
  12523. styles: {
  12524. fontSize: "%value"
  12525. },
  12526. clear_child_styles: !0
  12527. },
  12528. fontsize_class: {
  12529. inline: "span",
  12530. attributes: {
  12531. "class": "%value"
  12532. }
  12533. },
  12534. blockquote: {
  12535. block: "blockquote",
  12536. wrapper: !0,
  12537. remove: "all"
  12538. },
  12539. subscript: {
  12540. inline: "sub"
  12541. },
  12542. superscript: {
  12543. inline: "sup"
  12544. },
  12545. code: {
  12546. inline: "code"
  12547. },
  12548. link: {
  12549. inline: "a",
  12550. selector: "a",
  12551. remove: "all",
  12552. split: !0,
  12553. deep: !0,
  12554. onmatch: function() {
  12555. return !0
  12556. },
  12557. onformat: function(n, e, t) {
  12558. Zn.each(t, function(e, t) {
  12559. r.setAttrib(n, t, e)
  12560. })
  12561. }
  12562. },
  12563. removeformat: [{
  12564. selector: "b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",
  12565. remove: "all",
  12566. split: !0,
  12567. expand: !1,
  12568. block_expand: !0,
  12569. deep: !0
  12570. }, {
  12571. selector: "span",
  12572. attributes: ["style", "class"],
  12573. remove: "empty",
  12574. split: !0,
  12575. expand: !1,
  12576. deep: !0
  12577. }, {
  12578. selector: "*",
  12579. attributes: ["style", "class"],
  12580. split: !1,
  12581. expand: !1,
  12582. deep: !0
  12583. }]
  12584. };
  12585. return Zn.each("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/), function(e) {
  12586. t[e] = {
  12587. block: e,
  12588. remove: "all"
  12589. }
  12590. }),
  12591. t
  12592. };
  12593. function Up(e, t) {
  12594. function c(e) {
  12595. var t;
  12596. return r = "string" == typeof e ? {
  12597. name: e,
  12598. classes: [],
  12599. attrs: {}
  12600. } : e,
  12601. function(e, t) {
  12602. t.classes.length && jv.addClass(e, t.classes.join(" ")),
  12603. jv.setAttribs(e, t.attrs)
  12604. }(t = jv.create(r.name), r),
  12605. t
  12606. }
  12607. var n, r, o, s = t && t.schema || Pr({}), l = function(n, e, t) {
  12608. var r, o, i, a = 0 < e.length && e[0], u = a && a.name;
  12609. if (i = function(e, t) {
  12610. var n = "string" != typeof e ? e.nodeName.toLowerCase() : e
  12611. , r = s.getElementRule(n)
  12612. , o = r && r.parentsRequired;
  12613. return !(!o || !o.length) && (t && -1 !== Zn.inArray(o, t) ? t : o[0])
  12614. }(n, u))
  12615. u === i ? (o = e[0],
  12616. e = e.slice(1)) : o = i;
  12617. else if (a)
  12618. o = e[0],
  12619. e = e.slice(1);
  12620. else if (!t)
  12621. return n;
  12622. return o && (r = c(o)).appendChild(n),
  12623. t && (r || (r = jv.create("div")).appendChild(n),
  12624. Zn.each(t, function(e) {
  12625. var t = c(e);
  12626. r.insertBefore(t, n)
  12627. })),
  12628. l(r, e, o && o.siblings)
  12629. };
  12630. return e && e.length ? (r = e[0],
  12631. n = c(r),
  12632. (o = jv.create("div")).appendChild(l(n, e.slice(1), r.siblings)),
  12633. o) : ""
  12634. }
  12635. function jp(e) {
  12636. var t, a = {
  12637. classes: [],
  12638. attrs: {}
  12639. };
  12640. return "*" !== (e = a.selector = Zn.trim(e)) && (t = e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g, function(e, t, n, r, o) {
  12641. switch (t) {
  12642. case "#":
  12643. a.attrs.id = n;
  12644. break;
  12645. case ".":
  12646. a.classes.push(n);
  12647. break;
  12648. case ":":
  12649. -1 !== Zn.inArray("checked disabled enabled read-only required".split(" "), n) && (a.attrs[n] = n)
  12650. }
  12651. if ("[" === r) {
  12652. var i = o.match(/([\w\-]+)(?:\=\"([^\"]+))?/);
  12653. i && (a.attrs[i[1]] = i[2])
  12654. }
  12655. return ""
  12656. })),
  12657. a.name = t || "div",
  12658. a
  12659. }
  12660. function qp(n, e) {
  12661. var t, r, o, i, a, u, c = "";
  12662. if (!1 === (u = n.settings.preview_styles))
  12663. return "";
  12664. function s(e) {
  12665. return e.replace(/%(\w+)/g, "")
  12666. }
  12667. if ("string" != typeof u && (u = "font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),
  12668. "string" == typeof e) {
  12669. if (!(e = n.formatter.get(e)))
  12670. return;
  12671. e = e[0]
  12672. }
  12673. return "preview"in e && !1 === (u = e.preview) ? "" : (t = e.block || e.inline || "span",
  12674. r = (i = function(e) {
  12675. return e && "string" == typeof e ? (e = (e = e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g, "$1"),
  12676. Zn.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/), function(e) {
  12677. var t = Zn.map(e.split(/(?:~\+|~|\+)/), jp)
  12678. , n = t.pop();
  12679. return t.length && (n.siblings = t),
  12680. n
  12681. }).reverse()) : []
  12682. }(e.selector)).length ? (i[0].name || (i[0].name = t),
  12683. t = e.selector,
  12684. Up(i, n)) : Up([t], n),
  12685. o = jv.select(t, r)[0] || r.firstChild,
  12686. Uv(e.styles, function(e, t) {
  12687. (e = s(e)) && jv.setStyle(o, t, e)
  12688. }),
  12689. Uv(e.attributes, function(e, t) {
  12690. (e = s(e)) && jv.setAttrib(o, t, e)
  12691. }),
  12692. Uv(e.classes, function(e) {
  12693. e = s(e),
  12694. jv.hasClass(o, e) || jv.addClass(o, e)
  12695. }),
  12696. n.fire("PreviewFormats"),
  12697. jv.setStyles(r, {
  12698. position: "absolute",
  12699. left: -65535
  12700. }),
  12701. n.getBody().appendChild(r),
  12702. a = jv.getStyle(n.getBody(), "fontSize", !0),
  12703. a = /px$/.test(a) ? parseInt(a, 10) : 0,
  12704. Uv(u.split(" "), function(e) {
  12705. var t = jv.getStyle(o, e, !0);
  12706. if (!("background-color" === e && /transparent|rgba\s*\([^)]+,\s*0\)/.test(t) && (t = jv.getStyle(n.getBody(), e, !0),
  12707. "#ffffff" === jv.toHex(t).toLowerCase()) || "color" === e && "#000000" === jv.toHex(t).toLowerCase())) {
  12708. if ("font-size" === e && /em|%$/.test(t)) {
  12709. if (0 === a)
  12710. return;
  12711. t = parseFloat(t) / (/%$/.test(t) ? 100 : 1) * a + "px"
  12712. }
  12713. "border" === e && t && (c += "padding:0 2px;"),
  12714. c += e + ":" + t + ";"
  12715. }
  12716. }),
  12717. n.fire("AfterPreviewFormats"),
  12718. jv.remove(r),
  12719. c)
  12720. }
  12721. function $p(e, t, n, r, o) {
  12722. var i = t.get(n);
  12723. !yg(e, n, r, o) || "toggle"in i[0] && !i[0].toggle ? Lp(e, n, r, o) : bp(e, n, r, o)
  12724. }
  12725. function Wp(e) {
  12726. var t = function o(e) {
  12727. var n = {}
  12728. , r = function(e, t) {
  12729. e && ("string" != typeof e ? Zn.each(e, function(e, t) {
  12730. r(t, e)
  12731. }) : (D(t) || (t = [t]),
  12732. Zn.each(t, function(e) {
  12733. "undefined" == typeof e.deep && (e.deep = !e.selector),
  12734. "undefined" == typeof e.split && (e.split = !e.selector || e.inline),
  12735. "undefined" == typeof e.remove && e.selector && !e.inline && (e.remove = "none"),
  12736. e.selector && e.inline && (e.mixed = !0,
  12737. e.block_expand = !0),
  12738. "string" == typeof e.classes && (e.classes = e.classes.split(/\s+/))
  12739. }),
  12740. n[e] = t))
  12741. };
  12742. return r(Fp(e.dom)),
  12743. r(e.settings.formats),
  12744. {
  12745. get: function(e) {
  12746. return e ? n[e] : n
  12747. },
  12748. has: function(e) {
  12749. return ee(n, e)
  12750. },
  12751. register: r,
  12752. unregister: function(e) {
  12753. return e && n[e] && delete n[e],
  12754. n
  12755. }
  12756. }
  12757. }(e)
  12758. , n = at(null);
  12759. return qv(e),
  12760. $g(e),
  12761. {
  12762. get: t.get,
  12763. has: t.has,
  12764. register: t.register,
  12765. unregister: t.unregister,
  12766. apply: d(Lp, e),
  12767. remove: d(bp, e),
  12768. toggle: d($p, e, t),
  12769. match: d(yg, e),
  12770. matchAll: d(bg, e),
  12771. matchNode: d(tp, e),
  12772. canApply: d(Cg, e),
  12773. formatChanged: d(Tp, e, n),
  12774. getCssText: d(qp, e)
  12775. }
  12776. }
  12777. function Kp(e) {
  12778. return Qt.isElement(e) ? e.outerHTML : Qt.isText(e) ? Sr.encodeRaw(e.data, !1) : Qt.isComment(e) ? "\x3c!--" + e.data + "--\x3e" : ""
  12779. }
  12780. function Xp(e, t, n) {
  12781. var r = function(e) {
  12782. var t, n, r;
  12783. for (r = j.document.createElement("div"),
  12784. t = j.document.createDocumentFragment(),
  12785. e && (r.innerHTML = e); n = r.firstChild; )
  12786. t.appendChild(n);
  12787. return t
  12788. }(t);
  12789. if (e.hasChildNodes() && n < e.childNodes.length) {
  12790. var o = e.childNodes[n];
  12791. o.parentNode.insertBefore(r, o)
  12792. } else
  12793. e.appendChild(r)
  12794. }
  12795. function Yp(e) {
  12796. return {
  12797. type: "fragmented",
  12798. fragments: e,
  12799. content: "",
  12800. bookmark: null,
  12801. beforeBookmark: null
  12802. }
  12803. }
  12804. function Gp(e) {
  12805. return {
  12806. type: "complete",
  12807. fragments: null,
  12808. content: e,
  12809. bookmark: null,
  12810. beforeBookmark: null
  12811. }
  12812. }
  12813. function Zp(e) {
  12814. return "fragmented" === e.type ? e.fragments.join("") : e.content
  12815. }
  12816. function Jp(e) {
  12817. var t = it.fromTag("body", Zv.get().getOrThunk(function() {
  12818. var e = j.document.implementation.createHTMLDocument("undo");
  12819. return Zv.set(R.some(e)),
  12820. e
  12821. }));
  12822. return _a(t, Zp(e)),
  12823. F(Ca(t, "*[data-mce-bogus]"), De),
  12824. function(e) {
  12825. return e.dom().innerHTML
  12826. }(t)
  12827. }
  12828. function Qp(e) {
  12829. return 0 === e.get()
  12830. }
  12831. function ev(e, t, n) {
  12832. Qp(n) && (e.typing = t)
  12833. }
  12834. function tv(e, t) {
  12835. e.typing && (ev(e, !1, t),
  12836. e.add())
  12837. }
  12838. function nv(n) {
  12839. var r = at(R.none())
  12840. , o = at(0)
  12841. , i = at(0)
  12842. , a = {
  12843. data: [],
  12844. typing: !1,
  12845. beforeChange: function() {
  12846. !function(e, t, n) {
  12847. Qp(t) && n.set(R.some(Wc.getUndoBookmark(e.selection)))
  12848. }(n, o, r)
  12849. },
  12850. add: function(e, t) {
  12851. return function(e, t, n, r, o, i, a) {
  12852. var u = e.settings
  12853. , c = Jv(e);
  12854. if (i = i || {},
  12855. i = Zn.extend(i, c),
  12856. !1 === Qp(r) || e.removed)
  12857. return null;
  12858. var s = t.data[n.get()];
  12859. if (e.fire("BeforeAddUndo", {
  12860. level: i,
  12861. lastLevel: s,
  12862. originalEvent: a
  12863. }).isDefaultPrevented())
  12864. return null;
  12865. if (s && ey(s, i))
  12866. return null;
  12867. if (t.data[n.get()] && o.get().each(function(e) {
  12868. t.data[n.get()].beforeBookmark = e
  12869. }),
  12870. u.custom_undo_redo_levels && t.data.length > u.custom_undo_redo_levels) {
  12871. for (var l = 0; l < t.data.length - 1; l++)
  12872. t.data[l] = t.data[l + 1];
  12873. t.data.length--,
  12874. n.set(t.data.length)
  12875. }
  12876. i.bookmark = Wc.getUndoBookmark(e.selection),
  12877. n.get() < t.data.length - 1 && (t.data.length = n.get() + 1),
  12878. t.data.push(i),
  12879. n.set(t.data.length - 1);
  12880. var f = {
  12881. level: i,
  12882. lastLevel: s,
  12883. originalEvent: a
  12884. };
  12885. return e.fire("AddUndo", f),
  12886. 0 < n.get() && (e.setDirty(!0),
  12887. e.fire("change", f)),
  12888. i
  12889. }(n, a, i, o, r, e, t)
  12890. },
  12891. undo: function() {
  12892. return function(e, t, n, r) {
  12893. var o;
  12894. return t.typing && (t.add(),
  12895. t.typing = !1,
  12896. ev(t, !1, n)),
  12897. 0 < r.get() && (r.set(r.get() - 1),
  12898. o = t.data[r.get()],
  12899. Qv(e, o, !0),
  12900. e.setDirty(!0),
  12901. e.fire("Undo", {
  12902. level: o
  12903. })),
  12904. o
  12905. }(n, a, o, i)
  12906. },
  12907. redo: function() {
  12908. return function(e, t, n) {
  12909. var r;
  12910. return t.get() < n.length - 1 && (t.set(t.get() + 1),
  12911. r = n[t.get()],
  12912. Qv(e, r, !1),
  12913. e.setDirty(!0),
  12914. e.fire("Redo", {
  12915. level: r
  12916. })),
  12917. r
  12918. }(n, i, a.data)
  12919. },
  12920. clear: function() {
  12921. !function(e, t, n) {
  12922. t.data = [],
  12923. n.set(0),
  12924. t.typing = !1,
  12925. e.fire("ClearUndos")
  12926. }(n, a, i)
  12927. },
  12928. reset: function() {
  12929. !function(e) {
  12930. e.clear(),
  12931. e.add()
  12932. }(a)
  12933. },
  12934. hasUndo: function() {
  12935. return function(e, t, n) {
  12936. return 0 < n.get() || t.typing && t.data[0] && !ey(Jv(e), t.data[0])
  12937. }(n, a, i)
  12938. },
  12939. hasRedo: function() {
  12940. return function(e, t) {
  12941. return t.get() < e.data.length - 1 && !e.typing
  12942. }(a, i)
  12943. },
  12944. transact: function(e) {
  12945. return function(e, t, n) {
  12946. return tv(e, t),
  12947. e.beforeChange(),
  12948. e.ignore(n),
  12949. e.add()
  12950. }(a, o, e)
  12951. },
  12952. ignore: function(e) {
  12953. !function(e, t) {
  12954. try {
  12955. e.set(e.get() + 1),
  12956. t()
  12957. } finally {
  12958. e.set(e.get() - 1)
  12959. }
  12960. }(o, e)
  12961. },
  12962. extra: function(e, t) {
  12963. !function(e, t, n, r, o) {
  12964. if (t.transact(r)) {
  12965. var i = t.data[n.get()].bookmark
  12966. , a = t.data[n.get() - 1];
  12967. Qv(e, a, !0),
  12968. t.transact(o) && (t.data[n.get() - 1].beforeBookmark = i)
  12969. }
  12970. }(n, a, i, e, t)
  12971. }
  12972. };
  12973. return function(n, r, o) {
  12974. function i(e) {
  12975. ev(r, !1, o),
  12976. r.add({}, e)
  12977. }
  12978. var a = at(!1);
  12979. n.on("init", function() {
  12980. r.add()
  12981. }),
  12982. n.on("BeforeExecCommand", function(e) {
  12983. var t = e.command;
  12984. "Undo" !== t && "Redo" !== t && "mceRepaint" !== t && (tv(r, o),
  12985. r.beforeChange())
  12986. }),
  12987. n.on("ExecCommand", function(e) {
  12988. var t = e.command;
  12989. "Undo" !== t && "Redo" !== t && "mceRepaint" !== t && i(e)
  12990. }),
  12991. n.on("ObjectResizeStart cut", function() {
  12992. r.beforeChange()
  12993. }),
  12994. n.on("SaveContent ObjectResized blur", i),
  12995. n.on("dragend", i),
  12996. n.on("keyup", function(e) {
  12997. var t = e.keyCode;
  12998. e.isDefaultPrevented() || ((33 <= t && t <= 36 || 37 <= t && t <= 40 || 45 === t || e.ctrlKey) && (i(),
  12999. n.nodeChanged()),
  13000. 46 !== t && 8 !== t || n.nodeChanged(),
  13001. a.get() && r.typing && !1 === ey(Jv(n), r.data[0]) && (!1 === n.isDirty() && (n.setDirty(!0),
  13002. n.fire("change", {
  13003. level: r.data[0],
  13004. lastLevel: null
  13005. })),
  13006. n.fire("TypingUndo"),
  13007. a.set(!1),
  13008. n.nodeChanged()))
  13009. }),
  13010. n.on("keydown", function(e) {
  13011. var t = e.keyCode;
  13012. if (!e.isDefaultPrevented())
  13013. if (33 <= t && t <= 36 || 37 <= t && t <= 40 || 45 === t)
  13014. r.typing && i(e);
  13015. else {
  13016. var n = e.ctrlKey && !e.altKey || e.metaKey;
  13017. !(t < 16 || 20 < t) || 224 === t || 91 === t || r.typing || n || (r.beforeChange(),
  13018. ev(r, !0, o),
  13019. r.add({}, e),
  13020. a.set(!0))
  13021. }
  13022. }),
  13023. n.on("mousedown", function(e) {
  13024. r.typing && i(e)
  13025. });
  13026. n.on("input", function(e) {
  13027. e.inputType && (function(e) {
  13028. return "insertReplacementText" === e.inputType
  13029. }(e) || function(e) {
  13030. return "insertText" === e.inputType && null === e.data
  13031. }(e)) && i(e)
  13032. }),
  13033. n.on("AddUndo Undo Redo ClearUndos", function(e) {
  13034. e.isDefaultPrevented() || n.nodeChanged()
  13035. })
  13036. }(n, a, o),
  13037. function(e) {
  13038. e.addShortcut("meta+z", "", "Undo"),
  13039. e.addShortcut("meta+y,meta+shift+z", "", "Redo")
  13040. }(n),
  13041. a
  13042. }
  13043. function rv(e) {
  13044. return "keydown" === e.type || "keyup" === e.type
  13045. }
  13046. function ov(e) {
  13047. var t = e.keyCode;
  13048. return t === hh.BACKSPACE || t === hh.DELETE
  13049. }
  13050. function iv(o) {
  13051. var i = o.dom
  13052. , a = as(o)
  13053. , u = Hs(o)
  13054. , c = function(e, t) {
  13055. if (!function(e) {
  13056. if (rv(e)) {
  13057. var t = e.keyCode;
  13058. return !ov(e) && (hh.metaKeyPressed(e) || e.altKey || 112 <= t && t <= 123 || h(ty, t))
  13059. }
  13060. return !1
  13061. }(e)) {
  13062. var n = o.getBody()
  13063. , r = !function(e) {
  13064. return rv(e) && !(ov(e) || "keyup" === e.type && 229 === e.keyCode)
  13065. }(e) && function(e, t, n) {
  13066. if (ip(it.fromDom(t), !1)) {
  13067. var r = "" === n
  13068. , o = t.firstElementChild;
  13069. return !o || !e.getStyle(t.firstElementChild, "padding-left") && !e.getStyle(t.firstElementChild, "padding-right") && (r ? !e.isBlock(o) : n === o.nodeName.toLowerCase())
  13070. }
  13071. return !1
  13072. }(i, n, a);
  13073. "" !== i.getAttrib(n, ny) === r && !t || (i.setAttrib(n, ny, r ? u : null),
  13074. i.setAttrib(n, "aria-placeholder", r ? u : null),
  13075. function(e, t) {
  13076. e.fire("PlaceholderToggle", {
  13077. state: t
  13078. })
  13079. }(o, r),
  13080. o.on(r ? "keydown" : "keyup", c),
  13081. o.off(r ? "keyup" : "keydown", c))
  13082. }
  13083. };
  13084. u && o.on("init", function(e) {
  13085. c(e, !0),
  13086. o.on("change SetContent ExecCommand", c),
  13087. o.on("remove", function() {
  13088. var e = o.getBody();
  13089. i.setAttrib(e, ny, null),
  13090. i.setAttrib(e, "aria-placeholder", null)
  13091. })
  13092. })
  13093. }
  13094. function av(e) {
  13095. return e.touches === undefined || 1 !== e.touches.length ? R.none() : R.some(e.touches[0])
  13096. }
  13097. function uv(e, t) {
  13098. return e.hasOwnProperty(t.nodeName)
  13099. }
  13100. function cv(e, t) {
  13101. if (Qt.isText(t)) {
  13102. if (0 === t.nodeValue.length)
  13103. return !0;
  13104. if (/^\s+$/.test(t.nodeValue) && (!t.nextSibling || uv(e, t.nextSibling)))
  13105. return !0
  13106. }
  13107. return !1
  13108. }
  13109. function sv(e) {
  13110. var t, n, r, o, i, a, u, c, s, l, f = e.dom, d = e.selection, h = e.schema, m = h.getBlockElements(), g = d.getStart(), p = e.getBody(), v = as(e);
  13111. if (g && Qt.isElement(g) && v && (l = p.nodeName.toLowerCase(),
  13112. h.isValidChild(l, v.toLowerCase()) && !function(t, e, n) {
  13113. return C(ym(it.fromDom(n), it.fromDom(e)), function(e) {
  13114. return uv(t, e.dom())
  13115. })
  13116. }(m, p, g))) {
  13117. for (n = (t = d.getRng()).startContainer,
  13118. r = t.startOffset,
  13119. o = t.endContainer,
  13120. i = t.endOffset,
  13121. s = Dd(e),
  13122. g = p.firstChild; g; )
  13123. if (y = m,
  13124. b = g,
  13125. Qt.isText(b) || Qt.isElement(b) && !uv(y, b) && !Wl(b)) {
  13126. if (cv(m, g)) {
  13127. g = (u = g).nextSibling,
  13128. f.remove(u);
  13129. continue
  13130. }
  13131. a || (a = f.create(v, us(e)),
  13132. g.parentNode.insertBefore(a, g),
  13133. c = !0),
  13134. g = (u = g).nextSibling,
  13135. a.appendChild(u)
  13136. } else
  13137. a = null,
  13138. g = g.nextSibling;
  13139. var y, b;
  13140. c && s && (t.setStart(n, r),
  13141. t.setEnd(o, i),
  13142. d.setRng(t),
  13143. e.nodeChanged())
  13144. }
  13145. }
  13146. function lv(e) {
  13147. return iy(e) && e.data[0] === mu.ZWSP
  13148. }
  13149. function fv(e) {
  13150. return iy(e) && e.data[e.data.length - 1] === mu.ZWSP
  13151. }
  13152. function dv(e) {
  13153. return e.ownerDocument.createTextNode(mu.ZWSP)
  13154. }
  13155. function hv(e, t) {
  13156. return e ? function(e) {
  13157. if (iy(e.previousSibling))
  13158. return fv(e.previousSibling) || e.previousSibling.appendData(mu.ZWSP),
  13159. e.previousSibling;
  13160. if (iy(e))
  13161. return lv(e) || e.insertData(0, mu.ZWSP),
  13162. e;
  13163. var t = dv(e);
  13164. return e.parentNode.insertBefore(t, e),
  13165. t
  13166. }(t) : function(e) {
  13167. if (iy(e.nextSibling))
  13168. return lv(e.nextSibling) || e.nextSibling.insertData(0, mu.ZWSP),
  13169. e.nextSibling;
  13170. if (iy(e))
  13171. return fv(e) || e.appendData(mu.ZWSP),
  13172. e;
  13173. var t = dv(e);
  13174. return e.nextSibling ? e.parentNode.insertBefore(t, e.nextSibling) : e.parentNode.appendChild(t),
  13175. t
  13176. }(t)
  13177. }
  13178. function mv(e, t) {
  13179. return Qt.isText(e.container()) ? hv(t, e.container()) : hv(t, e.getNode())
  13180. }
  13181. function gv(e, t) {
  13182. var n = t.get();
  13183. return n && e.container() === n && Pa(n)
  13184. }
  13185. function pv(e, t) {
  13186. if (!t)
  13187. return t;
  13188. var n = t.container()
  13189. , r = t.offset();
  13190. return e ? Pa(n) ? Qt.isText(n.nextSibling) ? Vc(n.nextSibling, 0) : Vc.after(n) : Ia(t) ? Vc(n, r + 1) : t : Pa(n) ? Qt.isText(n.previousSibling) ? Vc(n.previousSibling, n.previousSibling.data.length) : Vc.before(n) : Fa(t) ? Vc(n, r - 1) : t
  13191. }
  13192. function vv(e, t) {
  13193. var n = Sc(t, e);
  13194. return n || e
  13195. }
  13196. function yv(e, t, n) {
  13197. var r = ly.normalizeForwards(n)
  13198. , o = vv(t, r.container());
  13199. return ly.findRootInline(e, o, r).fold(function() {
  13200. return Ul.nextPosition(o, r).bind(d(ly.findRootInline, e, o)).map(function(e) {
  13201. return dy.before(e)
  13202. })
  13203. }, R.none)
  13204. }
  13205. function bv(e, t) {
  13206. return null === lc(e, t)
  13207. }
  13208. function Cv(e, t, n) {
  13209. return ly.findRootInline(e, t, n).filter(d(bv, t))
  13210. }
  13211. function wv(e, t, n) {
  13212. var r = ly.normalizeBackwards(n);
  13213. return Cv(e, t, r).bind(function(e) {
  13214. return Ul.prevPosition(e, r).isNone() ? R.some(dy.start(e)) : R.none()
  13215. })
  13216. }
  13217. function xv(e, t, n) {
  13218. var r = ly.normalizeForwards(n);
  13219. return Cv(e, t, r).bind(function(e) {
  13220. return Ul.nextPosition(e, r).isNone() ? R.some(dy.end(e)) : R.none()
  13221. })
  13222. }
  13223. function zv(e, t, n) {
  13224. var r = ly.normalizeBackwards(n)
  13225. , o = vv(t, r.container());
  13226. return ly.findRootInline(e, o, r).fold(function() {
  13227. return Ul.prevPosition(o, r).bind(d(ly.findRootInline, e, o)).map(function(e) {
  13228. return dy.after(e)
  13229. })
  13230. }, R.none)
  13231. }
  13232. function Ev(e) {
  13233. return !1 === ly.isRtl(hy(e))
  13234. }
  13235. function Nv(e, t, n) {
  13236. return fy([yv, wv, xv, zv], [e, t, n]).filter(Ev)
  13237. }
  13238. function Sv(e) {
  13239. return e.fold($("before"), $("start"), $("end"), $("after"))
  13240. }
  13241. function kv(e) {
  13242. return e.fold(dy.before, dy.before, dy.after, dy.after)
  13243. }
  13244. function Tv(n, e, r, t, o, i) {
  13245. return tu(ly.findRootInline(e, r, t), ly.findRootInline(e, r, o), function(e, t) {
  13246. return e !== t && ly.hasSameParentBlock(r, e, t) ? dy.after(n ? e : t) : i
  13247. }).getOr(i)
  13248. }
  13249. function Av(e, t) {
  13250. return e.fold($(!0), function(e) {
  13251. return !function(e, t) {
  13252. return Sv(e) === Sv(t) && hy(e) === hy(t)
  13253. }(e, t)
  13254. })
  13255. }
  13256. function Mv(e, t) {
  13257. return e ? t.fold(q(R.some, dy.start), R.none, q(R.some, dy.after), R.none) : t.fold(R.none, q(R.some, dy.before), R.none, q(R.some, dy.end))
  13258. }
  13259. function Rv(e, t, n, r) {
  13260. var o = ly.normalizePosition(e, r)
  13261. , i = Nv(t, n, o);
  13262. return Nv(t, n, o).bind(d(Mv, e)).orThunk(function() {
  13263. return function(t, n, r, o, e) {
  13264. var i = ly.normalizePosition(t, e);
  13265. return Ul.fromPosition(t, r, i).map(d(ly.normalizePosition, t)).fold(function() {
  13266. return o.map(kv)
  13267. }, function(e) {
  13268. return Nv(n, r, e).map(d(Tv, t, n, r, i, e)).filter(d(Av, o))
  13269. }).filter(Ev)
  13270. }(e, t, n, i, r)
  13271. })
  13272. }
  13273. function _v(e) {
  13274. return B(e.selection.getSel().modify)
  13275. }
  13276. function Dv(e, t, n) {
  13277. var r = e ? 1 : -1;
  13278. return t.setRng(Vc(n.container(), n.offset() + r).toRange()),
  13279. t.getSel().modify("move", e ? "forward" : "backward", "word"),
  13280. !0
  13281. }
  13282. function Ov(e, t) {
  13283. var n = e.dom.createRng();
  13284. n.setStart(t.container(), t.offset()),
  13285. n.setEnd(t.container(), t.offset()),
  13286. e.selection.setRng(n)
  13287. }
  13288. function Hv(e) {
  13289. return !1 !== e.settings.inline_boundaries
  13290. }
  13291. function Bv(e, t) {
  13292. e ? t.setAttribute("data-mce-selected", "inline-boundary") : t.removeAttribute("data-mce-selected")
  13293. }
  13294. function Pv(t, e, n) {
  13295. return cy(e, n).map(function(e) {
  13296. return Ov(t, e),
  13297. n
  13298. })
  13299. }
  13300. function Lv(e, t, n) {
  13301. return function() {
  13302. return !!Hv(t) && yy(e, t)
  13303. }
  13304. }
  13305. function Vv(e) {
  13306. return y(e, function(e, t) {
  13307. return e.concat(function(t) {
  13308. function e(e) {
  13309. return X(e, function(e) {
  13310. return (e = Wa(e)).node = t,
  13311. e
  13312. })
  13313. }
  13314. if (Qt.isElement(t))
  13315. return e(t.getClientRects());
  13316. if (Qt.isText(t)) {
  13317. var n = t.ownerDocument.createRange();
  13318. return n.setStart(t, 0),
  13319. n.setEnd(t, t.data.length),
  13320. e(n.getClientRects())
  13321. }
  13322. }(t))
  13323. }, [])
  13324. }
  13325. var Iv, Fv, Uv = Zn.each, jv = Qi.DOM, qv = function(e) {
  13326. e.addShortcut("meta+b", "", "Bold"),
  13327. e.addShortcut("meta+i", "", "Italic"),
  13328. e.addShortcut("meta+u", "", "Underline");
  13329. for (var t = 1; t <= 6; t++)
  13330. e.addShortcut("access+" + t, "", ["FormatBlock", !1, "h" + t]);
  13331. e.addShortcut("access+7", "", ["FormatBlock", !1, "p"]),
  13332. e.addShortcut("access+8", "", ["FormatBlock", !1, "div"]),
  13333. e.addShortcut("access+9", "", ["FormatBlock", !1, "address"])
  13334. }, $v = 0, Wv = 2, Kv = 1, Xv = function(m, g) {
  13335. function p(e, t, n, r) {
  13336. for (var o = e; o - t < r && o < n && m[o] === g[o - t]; )
  13337. ++o;
  13338. return function(e, t, n) {
  13339. return {
  13340. start: e,
  13341. end: t,
  13342. diag: n
  13343. }
  13344. }(e, o, t)
  13345. }
  13346. var e = m.length + g.length + 2
  13347. , v = new Array(e)
  13348. , y = new Array(e)
  13349. , s = function(e, t, n, r, o) {
  13350. var i = l(e, t, n, r);
  13351. if (null === i || i.start === t && i.diag === t - r || i.end === e && i.diag === e - n)
  13352. for (var a = e, u = n; a < t || u < r; )
  13353. a < t && u < r && m[a] === g[u] ? (o.push([0, m[a]]),
  13354. ++a,
  13355. ++u) : r - n < t - e ? (o.push([2, m[a]]),
  13356. ++a) : (o.push([1, g[u]]),
  13357. ++u);
  13358. else {
  13359. s(e, i.start, n, i.start - i.diag, o);
  13360. for (var c = i.start; c < i.end; ++c)
  13361. o.push([0, m[c]]);
  13362. s(i.end, t, i.end - i.diag, r, o)
  13363. }
  13364. }
  13365. , l = function(e, t, n, r) {
  13366. var o = t - e
  13367. , i = r - n;
  13368. if (0 == o || 0 == i)
  13369. return null;
  13370. var a, u, c, s, l, f = o - i, d = i + o, h = (d % 2 == 0 ? d : 1 + d) / 2;
  13371. for (v[1 + h] = e,
  13372. y[1 + h] = t + 1,
  13373. a = 0; a <= h; ++a) {
  13374. for (u = -a; u <= a; u += 2) {
  13375. for (c = u + h,
  13376. u === -a || u !== a && v[c - 1] < v[c + 1] ? v[c] = v[c + 1] : v[c] = v[c - 1] + 1,
  13377. l = (s = v[c]) - e + n - u; s < t && l < r && m[s] === g[l]; )
  13378. v[c] = ++s,
  13379. ++l;
  13380. if (f % 2 != 0 && f - a <= u && u <= f + a && y[c - f] <= v[c])
  13381. return p(y[c - f], u + e - n, t, r)
  13382. }
  13383. for (u = f - a; u <= f + a; u += 2) {
  13384. for (c = u + h - f,
  13385. u === f - a || u !== f + a && y[c + 1] <= y[c - 1] ? y[c] = y[c + 1] - 1 : y[c] = y[c - 1],
  13386. l = (s = y[c] - 1) - e + n - u; e <= s && n <= l && m[s] === g[l]; )
  13387. y[c] = s--,
  13388. l--;
  13389. if (f % 2 == 0 && -a <= u && u <= a && y[c] <= v[c + f])
  13390. return p(y[c], u + e - n, t, r)
  13391. }
  13392. }
  13393. }
  13394. , t = [];
  13395. return s(0, m.length, 0, g.length, t),
  13396. t
  13397. }, Yv = function(e) {
  13398. return U(X(G(e.childNodes), Kp), function(e) {
  13399. return 0 < e.length
  13400. })
  13401. }, Gv = function(e, t) {
  13402. var n = X(G(t.childNodes), Kp);
  13403. return function(e, t) {
  13404. var n = 0;
  13405. F(e, function(e) {
  13406. e[0] === $v ? n++ : e[0] === Kv ? (Xp(t, e[1], n),
  13407. n++) : e[0] === Wv && function(e, t) {
  13408. if (e.hasChildNodes() && t < e.childNodes.length) {
  13409. var n = e.childNodes[t];
  13410. n.parentNode.removeChild(n)
  13411. }
  13412. }(t, n)
  13413. })
  13414. }(Xv(n, e), t),
  13415. t
  13416. }, Zv = at(R.none()), Jv = function(n) {
  13417. var e, t, r;
  13418. return e = Yv(n.getBody()),
  13419. function(e) {
  13420. return -1 !== e.indexOf("</iframe>")
  13421. }(t = (r = v(e, function(e) {
  13422. var t = dd.trimInternal(n.serializer, e);
  13423. return 0 < t.length ? [t] : []
  13424. })).join("")) ? Yp(r) : Gp(t)
  13425. }, Qv = function(e, t, n) {
  13426. "fragmented" === t.type ? Gv(t.fragments, e.getBody()) : e.setContent(t.content, {
  13427. format: "raw"
  13428. }),
  13429. e.selection.moveToBookmark(n ? t.beforeBookmark : t.bookmark)
  13430. }, ey = function(e, t) {
  13431. return !(!e || !t) && (!!function(e, t) {
  13432. return Zp(e) === Zp(t)
  13433. }(e, t) || function(e, t) {
  13434. return Jp(e) === Jp(t)
  13435. }(e, t))
  13436. }, ty = [9, 27, hh.HOME, hh.END, 19, 20, 44, 144, 145, 33, 34, 45, 16, 17, 18, 91, 92, 93, hh.DOWN, hh.UP, hh.LEFT, hh.RIGHT].concat(Wn.browser.isFirefox() ? [224] : []), ny = "data-mce-placeholder", ry = function(n) {
  13437. var r = at(R.none())
  13438. , o = at(!1)
  13439. , i = da(function(e) {
  13440. n.fire("longpress", te(te({}, e), {
  13441. type: "longpress"
  13442. })),
  13443. o.set(!0)
  13444. }, 400);
  13445. n.on("touchstart", function(n) {
  13446. av(n).each(function(e) {
  13447. i.cancel();
  13448. var t = {
  13449. x: $(e.clientX),
  13450. y: $(e.clientY),
  13451. target: $(n.target)
  13452. };
  13453. i.throttle(n),
  13454. o.set(!1),
  13455. r.set(R.some(t))
  13456. })
  13457. }, !0),
  13458. n.on("touchmove", function(e) {
  13459. i.cancel(),
  13460. av(e).each(function(t) {
  13461. r.get().each(function(e) {
  13462. !function(e, t) {
  13463. var n = Math.abs(e.clientX - t.x())
  13464. , r = Math.abs(e.clientY - t.y());
  13465. return 5 < n || 5 < r
  13466. }(t, e) || (r.set(R.none()),
  13467. o.set(!1),
  13468. n.fire("longpresscancel"))
  13469. })
  13470. })
  13471. }, !0),
  13472. n.on("touchend touchcancel", function(t) {
  13473. i.cancel(),
  13474. "touchcancel" !== t.type && r.get().filter(function(e) {
  13475. return e.target().isEqualNode(t.target)
  13476. }).each(function() {
  13477. o.get() ? t.preventDefault() : n.fire("tap", te(te({}, t), {
  13478. type: "tap"
  13479. }))
  13480. })
  13481. }, !0)
  13482. }, oy = function(e) {
  13483. as(e) && e.on("NodeChange", d(sv, e))
  13484. }, iy = Qt.isText, ay = d(hv, !0), uy = d(hv, !1), cy = function(n, e) {
  13485. return e.fold(function(e) {
  13486. Zc.remove(n.get());
  13487. var t = ay(e);
  13488. return n.set(t),
  13489. R.some(Vc(t, t.length - 1))
  13490. }, function(e) {
  13491. return Ul.firstPositionIn(e).map(function(e) {
  13492. if (gv(e, n))
  13493. return Vc(n.get(), 1);
  13494. Zc.remove(n.get());
  13495. var t = mv(e, !0);
  13496. return n.set(t),
  13497. Vc(t, 1)
  13498. })
  13499. }, function(e) {
  13500. return Ul.lastPositionIn(e).map(function(e) {
  13501. if (gv(e, n))
  13502. return Vc(n.get(), n.get().length - 1);
  13503. Zc.remove(n.get());
  13504. var t = mv(e, !1);
  13505. return n.set(t),
  13506. Vc(t, t.length - 1)
  13507. })
  13508. }, function(e) {
  13509. Zc.remove(n.get());
  13510. var t = uy(e);
  13511. return n.set(t),
  13512. R.some(Vc(t, 1))
  13513. })
  13514. }, sy = /[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/, ly = {
  13515. isInlineTarget: function(e, t) {
  13516. return me(it.fromDom(t), _s(e))
  13517. },
  13518. findRootInline: function(e, t, n) {
  13519. var r = function(e, t, n) {
  13520. return U(Qi.DOM.getParents(n.container(), "*", t), e)
  13521. }(e, t, n);
  13522. return R.from(r[r.length - 1])
  13523. },
  13524. isRtl: function(e) {
  13525. return "rtl" === Qi.DOM.getStyle(e, "direction", !0) || function(e) {
  13526. return sy.test(e)
  13527. }(e.textContent)
  13528. },
  13529. isAtZwsp: function(e) {
  13530. return Ia(e) || Fa(e)
  13531. },
  13532. normalizePosition: pv,
  13533. normalizeForwards: d(pv, !0),
  13534. normalizeBackwards: d(pv, !1),
  13535. hasSameParentBlock: function(e, t, n) {
  13536. var r = Sc(t, e)
  13537. , o = Sc(n, e);
  13538. return r && r === o
  13539. }
  13540. }, fy = function(e, t) {
  13541. for (var n = 0; n < e.length; n++) {
  13542. var r = e[n].apply(null, t);
  13543. if (r.isSome())
  13544. return r
  13545. }
  13546. return R.none()
  13547. }, dy = gd([{
  13548. before: ["element"]
  13549. }, {
  13550. start: ["element"]
  13551. }, {
  13552. end: ["element"]
  13553. }, {
  13554. after: ["element"]
  13555. }]), hy = function(e) {
  13556. return e.fold(W, W, W, W)
  13557. }, my = Nv, gy = Rv, py = (d(Rv, !1),
  13558. d(Rv, !0),
  13559. kv), vy = function(e) {
  13560. return e.fold(dy.start, dy.start, dy.end, dy.end)
  13561. }, yy = function(e, t) {
  13562. var n = t.selection.getRng()
  13563. , r = e ? Vc.fromRangeEnd(n) : Vc.fromRangeStart(n);
  13564. return !!_v(t) && (e && Ia(r) ? Dv(!0, t.selection, r) : !(e || !Fa(r)) && Dv(!1, t.selection, r))
  13565. }, by = {
  13566. move: function(e, t, n) {
  13567. return function() {
  13568. return !!Hv(e) && function(t, n, e) {
  13569. var r = t.getBody()
  13570. , o = Vc.fromRangeStart(t.selection.getRng())
  13571. , i = d(ly.isInlineTarget, t);
  13572. return gy(e, i, r, o).bind(function(e) {
  13573. return Pv(t, n, e)
  13574. })
  13575. }(e, t, n).isSome()
  13576. }
  13577. },
  13578. moveNextWord: d(Lv, !0),
  13579. movePrevWord: d(Lv, !1),
  13580. setupSelectedState: function(t) {
  13581. var n = at(null)
  13582. , r = d(ly.isInlineTarget, t);
  13583. return t.on("NodeChange", function(e) {
  13584. Hv(t) && (function(e, t, n) {
  13585. var r = U(t.select('*[data-mce-selected="inline-boundary"]'), e)
  13586. , o = U(n, e);
  13587. F(x(r, o), d(Bv, !1)),
  13588. F(x(o, r), d(Bv, !0))
  13589. }(r, t.dom, e.parents),
  13590. function(e, t) {
  13591. if (e.selection.isCollapsed() && !0 !== e.composing && t.get()) {
  13592. var n = Vc.fromRangeStart(e.selection.getRng());
  13593. Vc.isTextPosition(n) && !1 === ly.isAtZwsp(n) && (Ov(e, Zc.removeAndReposition(t.get(), n)),
  13594. t.set(null))
  13595. }
  13596. }(t, n),
  13597. function(n, r, o, e) {
  13598. if (r.selection.isCollapsed()) {
  13599. var t = U(e, n);
  13600. F(t, function(e) {
  13601. var t = Vc.fromRangeStart(r.selection.getRng());
  13602. my(n, r.getBody(), t).bind(function(e) {
  13603. return Pv(r, o, e)
  13604. })
  13605. })
  13606. }
  13607. }(r, t, n, e.parents))
  13608. }),
  13609. n
  13610. },
  13611. setCaretPosition: Ov
  13612. };
  13613. (Fv = Iv = Iv || {})[Fv.Up = -1] = "Up",
  13614. Fv[Fv.Down = 1] = "Down";
  13615. function Cy(o, i, a, e, u, t) {
  13616. function n(e) {
  13617. var t, n, r;
  13618. for (r = Vv([e]),
  13619. -1 === o && (r = r.reverse()),
  13620. t = 0; t < r.length; t++)
  13621. if (n = r[t],
  13622. !a(n, c)) {
  13623. if (0 < l.length && i(n, Xn.last(l)) && s++,
  13624. n.line = s,
  13625. u(n))
  13626. return !0;
  13627. l.push(n)
  13628. }
  13629. }
  13630. var r, c, s = 0, l = [];
  13631. return (c = Xn.last(t.getClientRects())) && (n(r = t.getNode()),
  13632. function(e, t, n, r) {
  13633. for (; r = Nc(r, e, $a, t); )
  13634. if (n(r))
  13635. return
  13636. }(o, e, n, r)),
  13637. l
  13638. }
  13639. function wy(t) {
  13640. return function(e) {
  13641. return function(e, t) {
  13642. return t.line > e
  13643. }(t, e)
  13644. }
  13645. }
  13646. function xy(t) {
  13647. return function(e) {
  13648. return function(e, t) {
  13649. return t.line === e
  13650. }(t, e)
  13651. }
  13652. }
  13653. function zy(e, t) {
  13654. return Math.abs(e.left - t)
  13655. }
  13656. function Ey(e, t) {
  13657. return Math.abs(e.right - t)
  13658. }
  13659. function Ny(e, t) {
  13660. return e >= t.left && e <= t.right
  13661. }
  13662. function Sy(e, o) {
  13663. return Xn.reduce(e, function(e, t) {
  13664. var n, r;
  13665. return n = Math.min(zy(e, o), Ey(e, o)),
  13666. r = Math.min(zy(t, o), Ey(t, o)),
  13667. Ny(o, t) ? t : Ny(o, e) ? e : r === n && Uy(t.node) ? t : r < n ? t : e
  13668. })
  13669. }
  13670. function ky(e, t, n, r) {
  13671. for (; r = jy(r, e, $a, t); )
  13672. if (n(r))
  13673. return
  13674. }
  13675. function Ty(e, t, n) {
  13676. var r, o = Vv(function(e) {
  13677. return U(G(e.getElementsByTagName("*")), wc)
  13678. }(e)), i = U(o, function(e) {
  13679. return n >= e.top && n <= e.bottom
  13680. });
  13681. return (r = (r = Sy(i, t)) && Sy(function(e, r) {
  13682. function t(t, e) {
  13683. var n;
  13684. return n = U(Vv([e]), function(e) {
  13685. return !t(e, r)
  13686. }),
  13687. o = o.concat(n),
  13688. 0 === n.length
  13689. }
  13690. var o = [];
  13691. return o.push(r),
  13692. ky(Iv.Up, e, d(t, Ya), r.node),
  13693. ky(Iv.Down, e, d(t, Ga), r.node),
  13694. o
  13695. }(e, r), t)) && wc(r.node) ? function(e, t) {
  13696. return {
  13697. node: e.node,
  13698. before: zy(e, t) < Ey(e, t)
  13699. }
  13700. }(r, t) : null
  13701. }
  13702. function Ay(e, t, n, r, o) {
  13703. return t._selectionOverrides.showCaret(e, n, r, o)
  13704. }
  13705. function My(e, t) {
  13706. return e.fire("BeforeObjectSelected", {
  13707. target: t
  13708. }).isDefaultPrevented() ? null : function(e) {
  13709. var t = e.ownerDocument.createRange();
  13710. return t.selectNode(e),
  13711. t
  13712. }(t)
  13713. }
  13714. function Ry(e, t, n) {
  13715. var r = Rc(1, e.getBody(), t)
  13716. , o = Vc.fromRangeStart(r)
  13717. , i = o.getNode();
  13718. if ($y(i))
  13719. return Ay(1, e, i, !o.isAtEnd(), !1);
  13720. var a = o.getNode(!0);
  13721. if ($y(a))
  13722. return Ay(1, e, a, !1, !1);
  13723. var u = e.dom.getParent(o.getNode(), function(e) {
  13724. return $y(e) || qy(e)
  13725. });
  13726. return $y(u) ? Ay(1, e, u, !1, n) : null
  13727. }
  13728. function _y(e, t, n) {
  13729. if (!t || !t.collapsed)
  13730. return t;
  13731. var r = Ry(e, t, n);
  13732. return r || t
  13733. }
  13734. function Dy(n, r, o) {
  13735. return R.from(o.container()).filter(Qt.isText).exists(function(e) {
  13736. var t = n ? 0 : -1;
  13737. return r(e.data.charAt(o.offset() + t))
  13738. })
  13739. }
  13740. function Oy(e) {
  13741. var t = e.container();
  13742. return Qt.isText(t) && 0 === t.data.length
  13743. }
  13744. function Hy(t, n) {
  13745. return function(e) {
  13746. return R.from(Tc(t ? 0 : -1, e)).filter(n).isSome()
  13747. }
  13748. }
  13749. function By(e) {
  13750. return "IMG" === e.nodeName && "block" === Ge(it.fromDom(e), "display")
  13751. }
  13752. function Py(e) {
  13753. return Qt.isContentEditableFalse(e) && !Qt.isBogusAll(e)
  13754. }
  13755. var Ly, Vy, Iy = d(Cy, Iv.Up, Ya, Ga), Fy = d(Cy, Iv.Down, Ga, Ya), Uy = Qt.isContentEditableFalse, jy = Nc, qy = Qt.isContentEditableTrue, $y = Qt.isContentEditableFalse, Wy = d(Dy, !0, ul), Ky = d(Dy, !1, ul), Xy = Hy(!0, By), Yy = Hy(!1, By), Gy = Hy(!0, Qt.isTable), Zy = Hy(!1, Qt.isTable), Jy = Hy(!0, Py), Qy = Hy(!1, Py);
  13756. (Vy = Ly = Ly || {})[Vy.Br = 0] = "Br",
  13757. Vy[Vy.Block = 1] = "Block",
  13758. Vy[Vy.Wrap = 2] = "Wrap",
  13759. Vy[Vy.Eol = 3] = "Eol";
  13760. function eb(e, t) {
  13761. return e === Pc.Backwards ? w(t) : t
  13762. }
  13763. function tb(e, t, n, r) {
  13764. for (var o, i, a, u, c, s, l = Xs(n), f = r, d = []; f && (c = l,
  13765. s = f,
  13766. o = t === Pc.Forwards ? c.next(s) : c.prev(s)); ) {
  13767. if (Qt.isBr(o.getNode(!1)))
  13768. return t === Pc.Forwards ? {
  13769. positions: eb(t, d).concat([o]),
  13770. breakType: Ly.Br,
  13771. breakAt: R.some(o)
  13772. } : {
  13773. positions: eb(t, d),
  13774. breakType: Ly.Br,
  13775. breakAt: R.some(o)
  13776. };
  13777. if (o.isVisible()) {
  13778. if (e(f, o)) {
  13779. var h = (i = t,
  13780. a = f,
  13781. u = o,
  13782. Qt.isBr(u.getNode(i === Pc.Forwards)) ? Ly.Br : !1 === kc(a, u) ? Ly.Block : Ly.Wrap);
  13783. return {
  13784. positions: eb(t, d),
  13785. breakType: h,
  13786. breakAt: R.some(o)
  13787. }
  13788. }
  13789. d.push(o),
  13790. f = o
  13791. } else
  13792. f = o
  13793. }
  13794. return {
  13795. positions: eb(t, d),
  13796. breakType: Ly.Eol,
  13797. breakAt: R.none()
  13798. }
  13799. }
  13800. function nb(n, r, o, e) {
  13801. return r(o, e).breakAt.map(function(e) {
  13802. var t = r(o, e).positions;
  13803. return n === Pc.Backwards ? t.concat(e) : [e].concat(t)
  13804. }).getOr([])
  13805. }
  13806. function rb(e, i) {
  13807. return y(e, function(e, o) {
  13808. return e.fold(function() {
  13809. return R.some(o)
  13810. }, function(r) {
  13811. return tu(z(r.getClientRects()), z(o.getClientRects()), function(e, t) {
  13812. var n = Math.abs(i - e.left);
  13813. return Math.abs(i - t.left) <= n ? o : r
  13814. }).or(e)
  13815. })
  13816. }, R.none())
  13817. }
  13818. function ob(t, e) {
  13819. return z(e.getClientRects()).bind(function(e) {
  13820. return rb(t, e.left)
  13821. })
  13822. }
  13823. function ib(e, t, n, r) {
  13824. var o = e === Pc.Forwards
  13825. , i = o ? Jy : Qy;
  13826. if (!r.collapsed) {
  13827. var a = Hw(r);
  13828. if (Ow(a))
  13829. return Ay(e, t, a, e === Pc.Backwards, !0)
  13830. }
  13831. var u = function(e) {
  13832. return Ba(e.startContainer)
  13833. }(r)
  13834. , c = Dc(e, t.getBody(), r);
  13835. if (i(c))
  13836. return My(t, c.getNode(!o));
  13837. var s = ly.normalizePosition(o, n(c));
  13838. if (!s)
  13839. return u ? r : null;
  13840. if (i(s))
  13841. return Ay(e, t, s.getNode(!o), o, !0);
  13842. var l = n(s);
  13843. return l && i(l) && Bc(s, l) ? Ay(e, t, l.getNode(!o), o, !0) : u ? _y(t, s.toRange(), !0) : null
  13844. }
  13845. function ab(e, t, n, r) {
  13846. var o, i, a, u, c, s, l, f, d;
  13847. if (d = Hw(r),
  13848. o = Dc(e, t.getBody(), r),
  13849. i = n(t.getBody(), wy(1), o),
  13850. a = U(i, xy(1)),
  13851. c = Xn.last(o.getClientRects()),
  13852. (Jy(o) || Gy(o)) && (d = o.getNode()),
  13853. (Qy(o) || Zy(o)) && (d = o.getNode(!0)),
  13854. !c)
  13855. return null;
  13856. if (s = c.left,
  13857. (u = Sy(a, s)) && Ow(u.node))
  13858. return l = Math.abs(s - u.left),
  13859. f = Math.abs(s - u.right),
  13860. Ay(e, t, u.node, l < f, !0);
  13861. if (d) {
  13862. var h = function(e, t, n, r) {
  13863. function o(e) {
  13864. return Xn.last(e.getClientRects())
  13865. }
  13866. var i, a, u, c, s, l, f = Xs(t), d = [], h = 0;
  13867. l = o(c = 1 === e ? (i = f.next,
  13868. a = Ga,
  13869. u = Ya,
  13870. Vc.after(r)) : (i = f.prev,
  13871. a = Ya,
  13872. u = Ga,
  13873. Vc.before(r)));
  13874. do {
  13875. if (c.isVisible() && !u(s = o(c), l)) {
  13876. if (0 < d.length && a(s, Xn.last(d)) && h++,
  13877. (s = Wa(s)).position = c,
  13878. s.line = h,
  13879. n(s))
  13880. return d;
  13881. d.push(s)
  13882. }
  13883. } while (c = i(c));
  13884. return d
  13885. }(e, t.getBody(), wy(1), d);
  13886. if (u = Sy(U(h, xy(1)), s))
  13887. return _y(t, u.position.toRange(), !0);
  13888. if (u = Xn.last(U(h, xy(0))))
  13889. return _y(t, u.position.toRange(), !0)
  13890. }
  13891. }
  13892. function ub(e, t, n) {
  13893. var r, o, i = Xs(e.getBody()), a = d(Hc, i.next), u = d(Hc, i.prev);
  13894. if (n.collapsed && e.settings.forced_root_block) {
  13895. if (!(r = e.dom.getParent(n.startContainer, "PRE")))
  13896. return;
  13897. (1 === t ? a(Vc.fromRangeStart(n)) : u(Vc.fromRangeStart(n))) || (o = function(e) {
  13898. var t = e.dom.create(as(e));
  13899. return (!Wn.ie || 11 <= Wn.ie) && (t.innerHTML = '<br data-mce-bogus="1">'),
  13900. t
  13901. }(e),
  13902. 1 === t ? e.$(r).after(o) : e.$(r).before(o),
  13903. e.selection.select(o, !0),
  13904. e.selection.collapse())
  13905. }
  13906. }
  13907. function cb(t, n) {
  13908. return function() {
  13909. var e = function(e, t) {
  13910. var n, r = Xs(e.getBody()), o = d(Hc, r.next), i = d(Hc, r.prev), a = t ? Pc.Forwards : Pc.Backwards, u = t ? o : i, c = e.selection.getRng();
  13911. return (n = ib(a, e, u, c)) ? n : (n = ub(e, a, c)) || null
  13912. }(t, n);
  13913. return !!e && (t.selection.setRng(e),
  13914. !0)
  13915. }
  13916. }
  13917. function sb(t, n) {
  13918. return function() {
  13919. var e = function(e, t) {
  13920. var n, r = t ? 1 : -1, o = t ? Fy : Iy, i = e.selection.getRng();
  13921. return (n = ab(r, e, o, i)) ? n : (n = ub(e, r, i)) || null
  13922. }(t, n);
  13923. return !!e && (t.selection.setRng(e),
  13924. !0)
  13925. }
  13926. }
  13927. function lb(n, r) {
  13928. return function() {
  13929. var e = r ? Vc.fromRangeEnd(n.selection.getRng()) : Vc.fromRangeStart(n.selection.getRng())
  13930. , t = r ? Rw(n.getBody(), e) : Mw(n.getBody(), e);
  13931. return (r ? E(t.positions) : z(t.positions)).filter(function(t) {
  13932. return function(e) {
  13933. return t ? Qy(e) : Jy(e)
  13934. }
  13935. }(r)).fold($(!1), function(e) {
  13936. return n.selection.setRng(e.toRange()),
  13937. !0
  13938. })
  13939. }
  13940. }
  13941. function fb(e, t, n, r, o) {
  13942. var i = Ca(it.fromDom(n), "td,th,caption").map(function(e) {
  13943. return e.dom()
  13944. });
  13945. return function(e, o, i) {
  13946. return y(e, function(e, r) {
  13947. return e.fold(function() {
  13948. return R.some(r)
  13949. }, function(e) {
  13950. var t = Math.sqrt(Math.abs(e.x - o) + Math.abs(e.y - i))
  13951. , n = Math.sqrt(Math.abs(r.x - o) + Math.abs(r.y - i));
  13952. return R.some(n < t ? r : e)
  13953. })
  13954. }, R.none())
  13955. }(U(function(n, e) {
  13956. return v(e, function(e) {
  13957. var t = function(e, t) {
  13958. return {
  13959. left: e.left - t,
  13960. top: e.top - t,
  13961. right: e.right + 2 * t,
  13962. bottom: e.bottom + 2 * t,
  13963. width: e.width + t,
  13964. height: e.height + t
  13965. }
  13966. }(Wa(e.getBoundingClientRect()), -1);
  13967. return [{
  13968. x: t.left,
  13969. y: n(t),
  13970. cell: e
  13971. }, {
  13972. x: t.right,
  13973. y: n(t),
  13974. cell: e
  13975. }]
  13976. })
  13977. }(e, i), function(e) {
  13978. return t(e, o)
  13979. }), r, o).map(function(e) {
  13980. return e.cell
  13981. })
  13982. }
  13983. function db(t, n) {
  13984. return z(n.getClientRects()).bind(function(e) {
  13985. return Bw(t, e.left, e.top)
  13986. }).bind(function(e) {
  13987. return ob(function(t) {
  13988. return Ul.lastPositionIn(t).map(function(e) {
  13989. return Mw(t, e).positions.concat(e)
  13990. }).getOr([])
  13991. }(e), n)
  13992. })
  13993. }
  13994. function hb(t, n) {
  13995. return E(n.getClientRects()).bind(function(e) {
  13996. return Pw(t, e.left, e.top)
  13997. }).bind(function(e) {
  13998. return ob(function(t) {
  13999. return Ul.firstPositionIn(t).map(function(e) {
  14000. return [e].concat(Rw(t, e).positions)
  14001. }).getOr([])
  14002. }(e), n)
  14003. })
  14004. }
  14005. function mb(e, t) {
  14006. e.selection.setRng(t),
  14007. gm(e, t)
  14008. }
  14009. function gb(e, t, n) {
  14010. var r = e(t, n);
  14011. return function(e) {
  14012. return e.breakType === Ly.Wrap && 0 === e.positions.length
  14013. }(r) || !Qt.isBr(n.getNode()) && function(e) {
  14014. return e.breakType === Ly.Br && 1 === e.positions.length
  14015. }(r) ? !function(t, n, e) {
  14016. return e.breakAt.map(function(e) {
  14017. return t(n, e).breakAt.isSome()
  14018. }).getOr(!1)
  14019. }(e, t, r) : r.breakAt.isNone()
  14020. }
  14021. function pb(e, t, n, r) {
  14022. var o = e.selection.getRng()
  14023. , i = t ? 1 : -1;
  14024. if (Cc() && function(e, t, n) {
  14025. var r = Vc.fromRangeStart(t);
  14026. return Ul.positionIn(!e, n).map(function(e) {
  14027. return e.isEqual(r)
  14028. }).getOr(!1)
  14029. }(t, o, n)) {
  14030. var a = Ay(i, e, n, !t, !0);
  14031. return mb(e, a),
  14032. !0
  14033. }
  14034. return !1
  14035. }
  14036. function vb(e, t) {
  14037. var n = t.getNode(e);
  14038. return Qt.isElement(n) && "TABLE" === n.nodeName ? R.some(n) : R.none()
  14039. }
  14040. function yb(n, r, o) {
  14041. var e = vb(!!r, o)
  14042. , i = !1 === r;
  14043. e.fold(function() {
  14044. return mb(n, o.toRange())
  14045. }, function(t) {
  14046. return Ul.positionIn(i, n.getBody()).filter(function(e) {
  14047. return e.isEqual(o)
  14048. }).fold(function() {
  14049. return mb(n, o.toRange())
  14050. }, function(e) {
  14051. return function(n, r, o, e) {
  14052. var i = as(r);
  14053. i ? r.undoManager.transact(function() {
  14054. var e = it.fromTag(i);
  14055. Ke(e, us(r)),
  14056. Ht(e, it.fromTag("br")),
  14057. n ? Ae(it.fromDom(o), e) : Te(it.fromDom(o), e);
  14058. var t = r.dom.createRng();
  14059. t.setStart(e.dom(), 0),
  14060. t.setEnd(e.dom(), 0),
  14061. mb(r, t)
  14062. }) : mb(r, e.toRange())
  14063. }(r, n, t, o)
  14064. })
  14065. })
  14066. }
  14067. function bb(e, t, n, r) {
  14068. var o = e.selection.getRng()
  14069. , i = Vc.fromRangeStart(o)
  14070. , a = e.getBody();
  14071. if (!t && Lw(r, i)) {
  14072. var u = function(t, n, e) {
  14073. return db(n, e).orThunk(function() {
  14074. return z(e.getClientRects()).bind(function(e) {
  14075. return rb(_w(t, Vc.before(n)), e.left)
  14076. })
  14077. }).getOr(Vc.before(n))
  14078. }(a, n, i);
  14079. return yb(e, t, u),
  14080. !0
  14081. }
  14082. if (t && Vw(r, i)) {
  14083. u = function(t, n, e) {
  14084. return hb(n, e).orThunk(function() {
  14085. return z(e.getClientRects()).bind(function(e) {
  14086. return rb(Dw(t, Vc.after(n)), e.left)
  14087. })
  14088. }).getOr(Vc.after(n))
  14089. }(a, n, i);
  14090. return yb(e, t, u),
  14091. !0
  14092. }
  14093. return !1
  14094. }
  14095. function Cb(t, n) {
  14096. return function() {
  14097. return R.from(t.dom.getParent(t.selection.getNode(), "td,th")).bind(function(e) {
  14098. return R.from(t.dom.getParent(e, "table")).map(function(e) {
  14099. return pb(t, n, e)
  14100. })
  14101. }).getOr(!1)
  14102. }
  14103. }
  14104. function wb(n, r) {
  14105. return function() {
  14106. return R.from(n.dom.getParent(n.selection.getNode(), "td,th")).bind(function(t) {
  14107. return R.from(n.dom.getParent(t, "table")).map(function(e) {
  14108. return bb(n, r, e, t)
  14109. })
  14110. }).getOr(!1)
  14111. }
  14112. }
  14113. function xb(e) {
  14114. return h(["figcaption"], Oe(e))
  14115. }
  14116. function zb(e) {
  14117. var t = j.document.createRange();
  14118. return t.setStartBefore(e.dom()),
  14119. t.setEndBefore(e.dom()),
  14120. t
  14121. }
  14122. function Eb(e, t, n) {
  14123. n ? Ht(e, t) : Me(e, t)
  14124. }
  14125. function Nb(e, t, n, r) {
  14126. return "" === t ? function(e, t) {
  14127. var n = it.fromTag("br");
  14128. return Eb(e, n, t),
  14129. zb(n)
  14130. }(e, r) : function(e, t, n, r) {
  14131. var o = it.fromTag(n)
  14132. , i = it.fromTag("br");
  14133. return Ke(o, r),
  14134. Ht(o, i),
  14135. Eb(e, o, t),
  14136. zb(i)
  14137. }(e, r, t, n)
  14138. }
  14139. function Sb(e, t, n) {
  14140. return t ? function(e, t) {
  14141. return Rw(e, t).breakAt.isNone()
  14142. }(e.dom(), n) : function(e, t) {
  14143. return Mw(e, t).breakAt.isNone()
  14144. }(e.dom(), n)
  14145. }
  14146. function kb(t, n) {
  14147. var r = it.fromDom(t.getBody())
  14148. , o = Vc.fromRangeStart(t.selection.getRng())
  14149. , i = as(t)
  14150. , a = us(t);
  14151. return function(e, t) {
  14152. var n = d(pe, t);
  14153. return Na(it.fromDom(e.container()), ar, n).filter(xb)
  14154. }(o, r).exists(function() {
  14155. if (Sb(r, n, o)) {
  14156. var e = Nb(r, i, a, n);
  14157. return t.selection.setRng(e),
  14158. !0
  14159. }
  14160. return !1
  14161. })
  14162. }
  14163. function Tb(e, t) {
  14164. return function() {
  14165. return !!e.selection.isCollapsed() && kb(e, t)
  14166. }
  14167. }
  14168. function Ab(e, t) {
  14169. return v(function(e) {
  14170. return X(e, function(e) {
  14171. return te({
  14172. shiftKey: !1,
  14173. altKey: !1,
  14174. ctrlKey: !1,
  14175. metaKey: !1,
  14176. keyCode: 0,
  14177. action: i
  14178. }, e)
  14179. })
  14180. }(e), function(e) {
  14181. return function(e, t) {
  14182. return t.keyCode === e.keyCode && t.shiftKey === e.shiftKey && t.altKey === e.altKey && t.ctrlKey === e.ctrlKey && t.metaKey === e.metaKey
  14183. }(e, t) ? [e] : []
  14184. })
  14185. }
  14186. function Mb(e, t) {
  14187. return {
  14188. from: $(e),
  14189. to: $(t)
  14190. }
  14191. }
  14192. function Rb(e, t) {
  14193. var n = it.fromDom(e)
  14194. , r = it.fromDom(t.container());
  14195. return jw(n, r).map(function(e) {
  14196. return function(e, t) {
  14197. return {
  14198. block: $(e),
  14199. position: $(t)
  14200. }
  14201. }(e, t)
  14202. })
  14203. }
  14204. function _b(t, n, e) {
  14205. var r = Rb(t, Vc.fromRangeStart(e))
  14206. , o = r.bind(function(e) {
  14207. return Ul.fromPosition(n, t, e.position()).bind(function(e) {
  14208. return Rb(t, e).map(function(e) {
  14209. return function(t, n, r) {
  14210. return Qt.isBr(r.position().getNode()) && !1 === ip(r.block()) ? Ul.positionIn(!1, r.block().dom()).bind(function(e) {
  14211. return e.isEqual(r.position()) ? Ul.fromPosition(n, t, e).bind(function(e) {
  14212. return Rb(t, e)
  14213. }) : R.some(r)
  14214. }).getOr(r) : r
  14215. }(t, n, e)
  14216. })
  14217. })
  14218. });
  14219. return tu(r, o, Mb).filter(function(e) {
  14220. return function(e) {
  14221. return !1 === pe(e.from().block(), e.to().block())
  14222. }(e) && function(e) {
  14223. return be(e.from().block()).bind(function(t) {
  14224. return be(e.to().block()).filter(function(e) {
  14225. return pe(t, e)
  14226. })
  14227. }).isSome()
  14228. }(e) && function(e) {
  14229. return !1 === Qt.isContentEditableFalse(e.from().block().dom()) && !1 === Qt.isContentEditableFalse(e.to().block().dom())
  14230. }(e)
  14231. })
  14232. }
  14233. function Db(e) {
  14234. var t = function(e) {
  14235. var t = Ee(e);
  14236. return p(t, ar).fold(function() {
  14237. return t
  14238. }, function(e) {
  14239. return t.slice(0, e)
  14240. })
  14241. }(e);
  14242. return F(t, Bt),
  14243. t
  14244. }
  14245. function Ob(e, t) {
  14246. var n = bm(t, e);
  14247. return g(n.reverse(), function(e) {
  14248. return ip(e)
  14249. }).each(Bt)
  14250. }
  14251. function Hb(e, t, n, r) {
  14252. if (ip(n))
  14253. return Jg(n),
  14254. Ul.firstPositionIn(n.dom());
  14255. (function(e) {
  14256. return 0 === U(xe(e), function(e) {
  14257. return !ip(e)
  14258. }).length
  14259. }
  14260. )(r) && ip(t) && Te(r, it.fromTag("br"));
  14261. var o = Ul.prevPosition(n.dom(), Vc.before(r.dom()));
  14262. return F(Db(t), function(e) {
  14263. Te(r, e)
  14264. }),
  14265. Ob(e, t),
  14266. o
  14267. }
  14268. function Bb(e, t, n) {
  14269. if (ip(n))
  14270. return Bt(n),
  14271. ip(t) && Jg(t),
  14272. Ul.firstPositionIn(t.dom());
  14273. var r = Ul.lastPositionIn(n.dom());
  14274. return F(Db(t), function(e) {
  14275. Ht(n, e)
  14276. }),
  14277. Ob(e, t),
  14278. r
  14279. }
  14280. function Pb(e, t) {
  14281. return Ot(t, e) ? function(e, t) {
  14282. var n = bm(t, e);
  14283. return R.from(n[n.length - 1])
  14284. }(t, e) : R.none()
  14285. }
  14286. function Lb(e, t) {
  14287. Ul.positionIn(e, t.dom()).map(function(e) {
  14288. return e.getNode()
  14289. }).map(it.fromDom).filter(er).each(Bt)
  14290. }
  14291. function Vb(e, t, n) {
  14292. return Lb(!0, t),
  14293. Lb(!1, n),
  14294. Pb(t, n).fold(d(Bb, e, t, n), d(Hb, e, t, n))
  14295. }
  14296. function Ib(e, t) {
  14297. var n = it.fromDom(t)
  14298. , r = d(pe, e);
  14299. return Ea(n, dr, r).isSome()
  14300. }
  14301. function Fb(e, t) {
  14302. var n = Ul.prevPosition(e.dom(), Vc.fromRangeStart(t)).isNone()
  14303. , r = Ul.nextPosition(e.dom(), Vc.fromRangeEnd(t)).isNone();
  14304. return !function(e, t) {
  14305. return Ib(e, t.startContainer) || Ib(e, t.endContainer)
  14306. }(e, t) && n && r
  14307. }
  14308. function Ub(e) {
  14309. var t = it.fromDom(e.getBody())
  14310. , n = e.selection.getRng();
  14311. return Fb(t, n) ? function(e) {
  14312. return e.setContent(""),
  14313. e.selection.setCursorLocation(),
  14314. !0
  14315. }(e) : function(n, r) {
  14316. var o = r.getRng();
  14317. return tu(jw(n, it.fromDom(o.startContainer)), jw(n, it.fromDom(o.endContainer)), function(e, t) {
  14318. return !1 === pe(e, t) && (o.deleteContents(),
  14319. Kw(n, !0, e, t).each(function(e) {
  14320. r.setRng(e.toRange())
  14321. }),
  14322. !0)
  14323. }).getOr(!1)
  14324. }(t, e.selection)
  14325. }
  14326. function jb(e) {
  14327. return Oc(e).exists(er)
  14328. }
  14329. function qb(e, t, n) {
  14330. var r = U(bm(it.fromDom(n.container()), t), ar)
  14331. , o = z(r).getOr(t);
  14332. return Ul.fromPosition(e, o.dom(), n).filter(jb)
  14333. }
  14334. function $b(e, t) {
  14335. return Oc(t).exists(er) || qb(!0, e, t).isSome()
  14336. }
  14337. function Wb(e, t) {
  14338. return function(e) {
  14339. return R.from(e.getNode(!0)).map(it.fromDom)
  14340. }(t).exists(er) || qb(!1, e, t).isSome()
  14341. }
  14342. function Kb(e, t, n, r) {
  14343. var o = r.getNode(!1 === t);
  14344. return jw(it.fromDom(e), it.fromDom(n.getNode())).map(function(e) {
  14345. return ip(e) ? Jw.remove(e.dom()) : Jw.moveToElement(o)
  14346. }).orThunk(function() {
  14347. return R.some(Jw.moveToElement(o))
  14348. })
  14349. }
  14350. function Xb(t, n, r) {
  14351. return Ul.fromPosition(n, t, r).bind(function(e) {
  14352. return function(e) {
  14353. return dr(it.fromDom(e)) || sr(it.fromDom(e))
  14354. }(e.getNode()) ? R.none() : function(t, e, n, r) {
  14355. function o(e) {
  14356. return Qn(it.fromDom(e)) && !kc(n, r, t)
  14357. }
  14358. return _c(!e, n).fold(function() {
  14359. return _c(e, r).fold($(!1), o)
  14360. }, o)
  14361. }(t, n, r, e) ? R.none() : n && Qt.isContentEditableFalse(e.getNode()) ? Kb(t, n, r, e) : !1 === n && Qt.isContentEditableFalse(e.getNode(!0)) ? Kb(t, n, r, e) : n && Qy(r) ? R.some(Jw.moveToPosition(e)) : !1 === n && Jy(r) ? R.some(Jw.moveToPosition(e)) : R.none()
  14362. })
  14363. }
  14364. function Yb(t, e, n) {
  14365. return function(e, t) {
  14366. var n = t.getNode(!1 === e)
  14367. , r = e ? "after" : "before";
  14368. return Qt.isElement(n) && n.getAttribute("data-mce-caret") === r
  14369. }(e, n) ? function(e, t) {
  14370. return e && Qt.isContentEditableFalse(t.nextSibling) ? R.some(Jw.moveToElement(t.nextSibling)) : !1 === e && Qt.isContentEditableFalse(t.previousSibling) ? R.some(Jw.moveToElement(t.previousSibling)) : R.none()
  14371. }(e, n.getNode(!1 === e)).fold(function() {
  14372. return Xb(t, e, n)
  14373. }, R.some) : Xb(t, e, n).bind(function(e) {
  14374. return function(t, n, e) {
  14375. return e.fold(function(e) {
  14376. return R.some(Jw.remove(e))
  14377. }, function(e) {
  14378. return R.some(Jw.moveToElement(e))
  14379. }, function(e) {
  14380. return kc(n, e, t) ? R.none() : R.some(Jw.moveToPosition(e))
  14381. })
  14382. }(t, n, e)
  14383. })
  14384. }
  14385. function Gb(e, t) {
  14386. return R.from(Qw(e.getBody(), t))
  14387. }
  14388. function Zb(t, n) {
  14389. var e = t.selection.getNode();
  14390. return Gb(t, e).filter(Qt.isContentEditableFalse).fold(function() {
  14391. return function(e, t, n) {
  14392. var r = Rc(t ? 1 : -1, e, n)
  14393. , o = Vc.fromRangeStart(r)
  14394. , i = it.fromDom(e);
  14395. return !1 === t && Qy(o) ? R.some(Jw.remove(o.getNode(!0))) : t && Jy(o) ? R.some(Jw.remove(o.getNode())) : !1 === t && Jy(o) && Wb(i, o) ? Gw(i, o).map(function(e) {
  14396. return Jw.remove(e.getNode())
  14397. }) : t && Qy(o) && $b(i, o) ? Zw(i, o).map(function(e) {
  14398. return Jw.remove(e.getNode())
  14399. }) : Yb(e, t, o)
  14400. }(t.getBody(), n, t.selection.getRng()).map(function(e) {
  14401. return e.fold(function(t, n) {
  14402. return function(e) {
  14403. return t._selectionOverrides.hideFakeCaret(),
  14404. ap(t, n, it.fromDom(e)),
  14405. !0
  14406. }
  14407. }(t, n), function(n, r) {
  14408. return function(e) {
  14409. var t = r ? Vc.before(e) : Vc.after(e);
  14410. return n.selection.setRng(t.toRange()),
  14411. !0
  14412. }
  14413. }(t, n), function(t) {
  14414. return function(e) {
  14415. return t.selection.setRng(e.toRange()),
  14416. !0
  14417. }
  14418. }(t))
  14419. }).getOr(!1)
  14420. }, function() {
  14421. return !0
  14422. })
  14423. }
  14424. function Jb(e, t) {
  14425. var n = e.selection.getNode();
  14426. return !!Qt.isContentEditableFalse(n) && Gb(e, n.parentNode).filter(Qt.isContentEditableFalse).fold(function() {
  14427. return function(e) {
  14428. F(Ca(e, ".mce-offscreen-selection"), Bt)
  14429. }(it.fromDom(e.getBody())),
  14430. ap(e, t, it.fromDom(e.selection.getNode())),
  14431. qw(e),
  14432. !0
  14433. }, function() {
  14434. return !0
  14435. })
  14436. }
  14437. function Qb(e, t, n, r, o, i) {
  14438. var a = Ay(r, e, i.getNode(!o), o, !0);
  14439. if (t.collapsed) {
  14440. var u = t.cloneRange();
  14441. o ? u.setEnd(a.startContainer, a.startOffset) : u.setStart(a.endContainer, a.endOffset),
  14442. u.deleteContents()
  14443. } else
  14444. t.deleteContents();
  14445. return e.selection.setRng(a),
  14446. function(e, t) {
  14447. Qt.isText(t) && 0 === t.data.length && e.remove(t)
  14448. }(e.dom, n),
  14449. !0
  14450. }
  14451. function eC(t, n) {
  14452. return function(e) {
  14453. return cy(n, e).map(function(e) {
  14454. return by.setCaretPosition(t, e),
  14455. !0
  14456. }).getOr(!1)
  14457. }
  14458. }
  14459. function tC(e, t, n, r) {
  14460. var o = e.getBody()
  14461. , i = d(ly.isInlineTarget, e);
  14462. e.undoManager.ignore(function() {
  14463. e.selection.setRng(function(e, t) {
  14464. var n = j.document.createRange();
  14465. return n.setStart(e.container(), e.offset()),
  14466. n.setEnd(t.container(), t.offset()),
  14467. n
  14468. }(n, r)),
  14469. e.execCommand("Delete"),
  14470. my(i, o, Vc.fromRangeStart(e.selection.getRng())).map(vy).map(eC(e, t))
  14471. }),
  14472. e.nodeChanged()
  14473. }
  14474. function nC(n, r, o, i) {
  14475. var a = function(e, t) {
  14476. var n = Sc(t, e);
  14477. return n || e
  14478. }(n.getBody(), i.container())
  14479. , u = d(ly.isInlineTarget, n)
  14480. , c = my(u, a, i);
  14481. return c.bind(function(e) {
  14482. return o ? e.fold($(R.some(vy(e))), R.none, $(R.some(py(e))), R.none) : e.fold(R.none, $(R.some(py(e))), R.none, $(R.some(vy(e))))
  14483. }).map(eC(n, r)).getOrThunk(function() {
  14484. var t = Ul.navigate(o, a, i)
  14485. , e = t.bind(function(e) {
  14486. return my(u, a, e)
  14487. });
  14488. return c.isSome() && e.isSome() ? ly.findRootInline(u, a, i).map(function(e) {
  14489. return !!function(o) {
  14490. return tu(Ul.firstPositionIn(o), Ul.lastPositionIn(o), function(e, t) {
  14491. var n = ly.normalizePosition(!0, e)
  14492. , r = ly.normalizePosition(!1, t);
  14493. return Ul.nextPosition(o, n).map(function(e) {
  14494. return e.isEqual(r)
  14495. }).getOr(!0)
  14496. }).getOr(!0)
  14497. }(e) && (ap(n, o, it.fromDom(e)),
  14498. !0)
  14499. }).getOr(!1) : e.bind(function(e) {
  14500. return t.map(function(e) {
  14501. return o ? tC(n, r, i, e) : tC(n, r, e, i),
  14502. !0
  14503. })
  14504. }).getOr(!1)
  14505. })
  14506. }
  14507. function rC(e) {
  14508. return 1 === Ee(e).length
  14509. }
  14510. function oC(e, t, n, r) {
  14511. var o = d(Wg, t)
  14512. , i = X(U(r, o), function(e) {
  14513. return e.dom()
  14514. });
  14515. if (0 === i.length)
  14516. ap(t, e, n);
  14517. else {
  14518. var a = function(e, t) {
  14519. var n = Vg(!1)
  14520. , r = qg(t, n.dom());
  14521. return Te(it.fromDom(e), n),
  14522. Bt(it.fromDom(e)),
  14523. Vc(r, 0)
  14524. }(n.dom(), i);
  14525. t.selection.setRng(a.toRange())
  14526. }
  14527. }
  14528. function iC(n, r) {
  14529. var e = it.fromDom(n.getBody())
  14530. , t = it.fromDom(n.selection.getStart())
  14531. , o = U(function(e, t) {
  14532. var n = bm(t, e);
  14533. return p(n, ar).fold($(n), function(e) {
  14534. return n.slice(0, e)
  14535. })
  14536. }(e, t), rC);
  14537. return E(o).map(function(e) {
  14538. var t = Vc.fromRangeStart(n.selection.getRng());
  14539. return !(!$w(r, t, e.dom()) || function(e) {
  14540. return sc(e.dom()) && Pg(e.dom())
  14541. }(e)) && (oC(r, n, e, o),
  14542. !0)
  14543. }).getOr(!1)
  14544. }
  14545. function aC(e, t) {
  14546. return {
  14547. start: $(e),
  14548. end: $(t)
  14549. }
  14550. }
  14551. function uC(e, t) {
  14552. return Ta(it.fromDom(e), "td,th", t)
  14553. }
  14554. function cC(e, t) {
  14555. return Sa(e, "table", t)
  14556. }
  14557. function sC(e) {
  14558. return !1 === pe(e.start(), e.end())
  14559. }
  14560. function lC(e, n) {
  14561. return cC(e.start(), n).bind(function(t) {
  14562. return cC(e.end(), n).bind(function(e) {
  14563. return function(e, t) {
  14564. return e ? R.some(t) : R.none()
  14565. }(pe(t, e), t)
  14566. })
  14567. })
  14568. }
  14569. function fC(e) {
  14570. return Ca(e, "td,th")
  14571. }
  14572. function dC(n, e) {
  14573. var t = uC(e.startContainer, n)
  14574. , r = uC(e.endContainer, n);
  14575. return e.collapsed ? R.none() : tu(t, r, aC).fold(function() {
  14576. return t.fold(function() {
  14577. return r.bind(function(t) {
  14578. return cC(t, n).bind(function(e) {
  14579. return z(fC(e)).map(function(e) {
  14580. return aC(e, t)
  14581. })
  14582. })
  14583. })
  14584. }, function(t) {
  14585. return cC(t, n).bind(function(e) {
  14586. return E(fC(e)).map(function(e) {
  14587. return aC(t, e)
  14588. })
  14589. })
  14590. })
  14591. }, function(e) {
  14592. return ax(n, e) ? R.none() : function(t, e) {
  14593. return cC(t.start(), e).bind(function(e) {
  14594. return E(fC(e)).map(function(e) {
  14595. return aC(t.start(), e)
  14596. })
  14597. })
  14598. }(e, n)
  14599. })
  14600. }
  14601. function hC(t, e) {
  14602. return lC(t, e).map(function(e) {
  14603. return function(e, t, n) {
  14604. return {
  14605. rng: $(e),
  14606. table: $(t),
  14607. cells: $(n)
  14608. }
  14609. }(t, e, fC(e))
  14610. })
  14611. }
  14612. function mC(e, t) {
  14613. var n = function(t) {
  14614. return function(e) {
  14615. return pe(t, e)
  14616. }
  14617. }(e);
  14618. return function(e, t) {
  14619. var n = uC(e.startContainer, t)
  14620. , r = uC(e.endContainer, t);
  14621. return tu(n, r, aC).filter(sC).filter(function(e) {
  14622. return ax(t, e)
  14623. }).orThunk(function() {
  14624. return dC(t, e)
  14625. })
  14626. }(t, n).bind(function(e) {
  14627. return hC(e, n)
  14628. })
  14629. }
  14630. function gC(e, t) {
  14631. return p(e, function(e) {
  14632. return pe(e, t)
  14633. })
  14634. }
  14635. function pC(n) {
  14636. return function(n) {
  14637. return tu(gC(n.cells(), n.rng().start()), gC(n.cells(), n.rng().end()), function(e, t) {
  14638. return n.cells().slice(e, t + 1)
  14639. })
  14640. }(n).map(function(e) {
  14641. var t = n.cells();
  14642. return e.length === t.length ? ix.removeTable(n.table()) : ix.emptyCells(e)
  14643. })
  14644. }
  14645. function vC(e, t) {
  14646. return F(t, Jg),
  14647. e.selection.setCursorLocation(t[0].dom(), 0),
  14648. !0
  14649. }
  14650. function yC(e, t) {
  14651. return ap(e, !1, t),
  14652. !0
  14653. }
  14654. function bC(t, e, n) {
  14655. return function(e, t) {
  14656. return mC(e, t).bind(pC)
  14657. }(e, n).map(function(e) {
  14658. return e.fold(d(yC, t), d(vC, t))
  14659. })
  14660. }
  14661. function CC(t, e, n, r) {
  14662. return ux(e, r).fold(function() {
  14663. return bC(t, e, n)
  14664. }, function(e) {
  14665. return function(e, t) {
  14666. return cx(e, t)
  14667. }(t, e)
  14668. }).getOr(!1)
  14669. }
  14670. function wC(e, t) {
  14671. return g(bm(t, e), dr)
  14672. }
  14673. function xC(t, n, r, o, i) {
  14674. return Ul.navigate(r, t.getBody(), i).bind(function(e) {
  14675. return function(e, n, r, o) {
  14676. return Ul.firstPositionIn(e.dom()).bind(function(t) {
  14677. return Ul.lastPositionIn(e.dom()).map(function(e) {
  14678. return n ? r.isEqual(t) && o.isEqual(e) : r.isEqual(e) && o.isEqual(t)
  14679. })
  14680. }).getOr(!0)
  14681. }(o, r, i, e) ? function(e, t) {
  14682. return cx(e, t)
  14683. }(t, o) : function(e, t, n) {
  14684. return ux(e, it.fromDom(n.getNode())).map(function(e) {
  14685. return !1 === pe(e, t)
  14686. })
  14687. }(n, o, e)
  14688. }).or(R.some(!0))
  14689. }
  14690. function zC(t, n, r, e) {
  14691. var o = Vc.fromRangeStart(t.selection.getRng());
  14692. return wC(r, e).bind(function(e) {
  14693. return ip(e) ? cx(t, e) : function(e, t, n, r, o) {
  14694. return Ul.navigate(n, e.getBody(), o).bind(function(e) {
  14695. return wC(t, it.fromDom(e.getNode())).map(function(e) {
  14696. return !1 === pe(e, r)
  14697. })
  14698. })
  14699. }(t, r, n, e, o)
  14700. }).getOr(!1)
  14701. }
  14702. function EC(e, t) {
  14703. return e ? Gy(t) : Zy(t)
  14704. }
  14705. function NC(t, n, e) {
  14706. var r = it.fromDom(t.getBody());
  14707. return ux(r, e).fold(function() {
  14708. return zC(t, n, r, e) || function(e, t) {
  14709. var n = Vc.fromRangeStart(e.selection.getRng());
  14710. return EC(t, n) || Ul.fromPosition(t, e.getBody(), n).map(function(e) {
  14711. return EC(t, e)
  14712. }).getOr(!1)
  14713. }(t, n)
  14714. }, function(e) {
  14715. return function(e, t, n, r) {
  14716. var o = Vc.fromRangeStart(e.selection.getRng());
  14717. return ip(r) ? cx(e, r) : xC(e, n, t, r, o)
  14718. }(t, n, r, e).getOr(!1)
  14719. })
  14720. }
  14721. function SC(e) {
  14722. var t = parseInt(e, 10);
  14723. return isNaN(t) ? 0 : t
  14724. }
  14725. function kC(e, t) {
  14726. return (e || function(e) {
  14727. return "table" === Oe(e)
  14728. }(t) ? "margin" : "padding") + ("rtl" === Ge(t, "direction") ? "-right" : "-left")
  14729. }
  14730. function TC(e) {
  14731. var t = fx(e);
  14732. return !0 !== e.readonly && (1 < t.length || function(r, e) {
  14733. return b(e, function(e) {
  14734. var t = kC(Ts(r), e)
  14735. , n = Ze(e, t).map(SC).getOr(0);
  14736. return "false" !== r.dom.getContentEditable(e.dom()) && 0 < n
  14737. })
  14738. }(e, t))
  14739. }
  14740. function AC(e) {
  14741. return cr(e) || sr(e)
  14742. }
  14743. function MC(e, t) {
  14744. var n = e.dom
  14745. , r = e.selection
  14746. , o = e.formatter
  14747. , i = As(e)
  14748. , a = /[a-z%]+$/i.exec(i)[0]
  14749. , u = parseInt(i, 10)
  14750. , c = Ts(e)
  14751. , s = as(e);
  14752. e.queryCommandState("InsertUnorderedList") || e.queryCommandState("InsertOrderedList") || "" !== s || n.getParent(r.getNode(), n.isBlock) || o.apply("div"),
  14753. F(fx(e), function(e) {
  14754. !function(e, t, n, r, o, i) {
  14755. var a = kC(n, it.fromDom(i));
  14756. if ("outdent" === t) {
  14757. var u = Math.max(0, SC(i.style[a]) - r);
  14758. e.setStyle(i, a, u ? u + o : "")
  14759. } else {
  14760. u = SC(i.style[a]) + r + o;
  14761. e.setStyle(i, a, u)
  14762. }
  14763. }(n, t, c, u, a, e.dom())
  14764. })
  14765. }
  14766. function RC(e, t, n) {
  14767. return Ul.navigateIgnore(e, t, n, Oy)
  14768. }
  14769. function _C(e, t) {
  14770. return g(bm(it.fromDom(t.container()), e), ar)
  14771. }
  14772. function DC(e, n, r) {
  14773. return RC(e, n.dom(), r).forall(function(t) {
  14774. return _C(n, r).fold(function() {
  14775. return !1 === kc(t, r, n.dom())
  14776. }, function(e) {
  14777. return !1 === kc(t, r, n.dom()) && Ot(e, it.fromDom(t.container()))
  14778. })
  14779. })
  14780. }
  14781. function OC(t, n, r) {
  14782. return _C(n, r).fold(function() {
  14783. return RC(t, n.dom(), r).forall(function(e) {
  14784. return !1 === kc(e, r, n.dom())
  14785. })
  14786. }, function(e) {
  14787. return RC(t, e.dom(), r).isNone()
  14788. })
  14789. }
  14790. function HC(e) {
  14791. return R.from(e.dom.getParent(e.selection.getStart(!0), e.dom.isBlock))
  14792. }
  14793. function BC(e, t) {
  14794. return e && e.parentNode && e.parentNode.nodeName === t
  14795. }
  14796. function PC(e) {
  14797. return e && /^(OL|UL|LI)$/.test(e.nodeName)
  14798. }
  14799. function LC(e) {
  14800. var t = e.parentNode;
  14801. return /^(LI|DT|DD)$/.test(t.nodeName) ? t : e
  14802. }
  14803. function VC(e, t, n) {
  14804. for (var r = e[n ? "firstChild" : "lastChild"]; r && !Qt.isElement(r); )
  14805. r = r[n ? "nextSibling" : "previousSibling"];
  14806. return r === t
  14807. }
  14808. function IC(e) {
  14809. e.innerHTML = '<br data-mce-bogus="1">'
  14810. }
  14811. function FC(e, t) {
  14812. return e.nodeName === t || e.previousSibling && e.previousSibling.nodeName === t
  14813. }
  14814. function UC(e, t) {
  14815. return t && e.isBlock(t) && !/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName) && !/^(fixed|absolute)/i.test(t.style.position) && "true" !== e.getContentEditable(t)
  14816. }
  14817. function jC(e, t, n) {
  14818. return !1 === Qt.isText(t) ? n : e ? 1 === n && t.data.charAt(n - 1) === mu.ZWSP ? 0 : n : n === t.data.length - 1 && t.data.charAt(n) === mu.ZWSP ? t.data.length : n
  14819. }
  14820. function qC(e, t) {
  14821. var n, r, o = e.getRoot();
  14822. for (n = t; n !== o && "false" !== e.getContentEditable(n); )
  14823. "true" === e.getContentEditable(n) && (r = n),
  14824. n = n.parentNode;
  14825. return n !== o ? r : o
  14826. }
  14827. function $C(e, t) {
  14828. var n = as(e);
  14829. n && n.toLowerCase() === t.tagName.toLowerCase() && e.dom.setAttribs(t, us(e))
  14830. }
  14831. function WC(e, t, n) {
  14832. var r = e.create("span", {}, "&nbsp;");
  14833. n.parentNode.insertBefore(r, n),
  14834. t.scrollIntoView(r),
  14835. e.remove(r)
  14836. }
  14837. function KC(e, t, n, r) {
  14838. var o = e.createRng();
  14839. r ? (o.setStartBefore(n),
  14840. o.setEndBefore(n)) : (o.setStartAfter(n),
  14841. o.setEndAfter(n)),
  14842. t.setRng(o)
  14843. }
  14844. function XC(e, t) {
  14845. var n, r, o = e.selection, i = e.dom, a = o.getRng();
  14846. Bm(i, a).each(function(e) {
  14847. a.setStart(e.startContainer, e.startOffset),
  14848. a.setEnd(e.endContainer, e.endOffset)
  14849. });
  14850. var u = a.startOffset
  14851. , c = a.startContainer;
  14852. if (1 === c.nodeType && c.hasChildNodes()) {
  14853. var s = u > c.childNodes.length - 1;
  14854. c = c.childNodes[Math.min(u, c.childNodes.length - 1)] || c,
  14855. u = s && 3 === c.nodeType ? c.nodeValue.length : 0
  14856. }
  14857. var l = i.getParent(c, i.isBlock)
  14858. , f = l ? i.getParent(l.parentNode, i.isBlock) : null
  14859. , d = f ? f.nodeName.toUpperCase() : ""
  14860. , h = !(!t || !t.ctrlKey);
  14861. "LI" !== d || h || (l = f),
  14862. c && 3 === c.nodeType && u >= c.nodeValue.length && !function(e, t, n) {
  14863. for (var r, o = new Fi(t,n), i = e.getNonEmptyElements(); r = o.next(); )
  14864. if (i[r.nodeName.toLowerCase()] || 0 < r.length)
  14865. return !0
  14866. }(e.schema, c, l) && (n = i.create("br"),
  14867. a.insertNode(n),
  14868. a.setStartAfter(n),
  14869. a.setEndAfter(n),
  14870. r = !0),
  14871. n = i.create("br"),
  14872. Ju(i, a, n),
  14873. WC(i, o, n),
  14874. KC(i, o, n, r),
  14875. e.undoManager.add()
  14876. }
  14877. function YC(e, t) {
  14878. var n = it.fromTag("br");
  14879. Te(it.fromDom(t), n),
  14880. e.undoManager.add()
  14881. }
  14882. function GC(e, t) {
  14883. Nx(e.getBody(), t) || Ae(it.fromDom(t), it.fromTag("br"));
  14884. var n = it.fromTag("br");
  14885. Ae(it.fromDom(t), n),
  14886. WC(e.dom, e.selection, n.dom()),
  14887. KC(e.dom, e.selection, n.dom(), !1),
  14888. e.undoManager.add()
  14889. }
  14890. function ZC(e) {
  14891. return e && "A" === e.nodeName && "href"in e
  14892. }
  14893. function JC(e) {
  14894. return e.fold($(!1), ZC, ZC, $(!1))
  14895. }
  14896. function QC(e, t) {
  14897. t.fold(i, d(YC, e), d(GC, e), i)
  14898. }
  14899. function ew(e, t) {
  14900. return Cx(e).filter(function(e) {
  14901. return 0 < t.length && me(it.fromDom(e), t)
  14902. }).isSome()
  14903. }
  14904. function tw(e, t) {
  14905. return Tx(e)
  14906. }
  14907. function nw(n) {
  14908. return function(e, t) {
  14909. return "" === as(e) === n
  14910. }
  14911. }
  14912. function rw(n) {
  14913. return function(e, t) {
  14914. return xx(e) === n
  14915. }
  14916. }
  14917. function ow(n, r) {
  14918. return function(e, t) {
  14919. return wx(e) === n.toUpperCase() === r
  14920. }
  14921. }
  14922. function iw(e) {
  14923. return ow("pre", e)
  14924. }
  14925. function aw(n) {
  14926. return function(e, t) {
  14927. return is(e) === n
  14928. }
  14929. }
  14930. function uw(e, t) {
  14931. return kx(e)
  14932. }
  14933. function cw(e, t) {
  14934. return t
  14935. }
  14936. function sw(e) {
  14937. var t = as(e)
  14938. , n = bx(e.dom, e.selection.getStart());
  14939. return n && e.schema.isValidChild(n.nodeName, t || "P")
  14940. }
  14941. function lw(e, t) {
  14942. return function(n, r) {
  14943. return y(e, function(e, t) {
  14944. return e && t(n, r)
  14945. }, !0) ? R.some(t) : R.none()
  14946. }
  14947. }
  14948. function fw(n, r) {
  14949. var e = r.container()
  14950. , t = r.offset();
  14951. return Qt.isText(e) ? (e.insertData(t, n),
  14952. R.some(Wu(e, t + n.length))) : Oc(r).map(function(e) {
  14953. var t = it.fromText(n);
  14954. return r.isAtEnd() ? Ae(e, t) : Te(e, t),
  14955. Wu(t.dom(), n.length)
  14956. })
  14957. }
  14958. function dw(e) {
  14959. return Wu.isTextPosition(e) && !e.isAtStart() && !e.isAtEnd()
  14960. }
  14961. function hw(e, t) {
  14962. var n = U(bm(it.fromDom(t.container()), e), ar);
  14963. return z(n).getOr(e)
  14964. }
  14965. function mw(e, t) {
  14966. return dw(t) ? Ky(t) : Ky(t) || Ul.prevPosition(hw(e, t).dom(), t).exists(Ky)
  14967. }
  14968. function gw(e, t) {
  14969. return dw(t) ? Wy(t) : Wy(t) || Ul.nextPosition(hw(e, t).dom(), t).exists(Wy)
  14970. }
  14971. function pw(e) {
  14972. return Oc(e).bind(function(e) {
  14973. return Na(e, Pt)
  14974. }).exists(function(e) {
  14975. return function(e) {
  14976. return h(["pre", "pre-wrap"], e)
  14977. }(Ge(e, "white-space"))
  14978. })
  14979. }
  14980. function vw(e, t) {
  14981. return function(e, t) {
  14982. return Ul.prevPosition(e.dom(), t).isNone()
  14983. }(e, t) || function(e, t) {
  14984. return Ul.nextPosition(e.dom(), t).isNone()
  14985. }(e, t) || dx(e, t) || hx(e, t) || Wb(e, t) || $b(e, t)
  14986. }
  14987. function yw(e, t) {
  14988. var n = function(e) {
  14989. var t = e.container()
  14990. , n = e.offset();
  14991. return Qt.isText(t) && n < t.data.length ? Wu(t, n + 1) : e
  14992. }(t);
  14993. return !pw(n) && (hx(e, n) || gx(e, n) || $b(e, n) || gw(e, n))
  14994. }
  14995. function bw(e, t) {
  14996. return function(e, t) {
  14997. return !pw(t) && (dx(e, t) || mx(e, t) || Wb(e, t) || mw(e, t))
  14998. }(e, t) || yw(e, t)
  14999. }
  15000. function Cw(e, t) {
  15001. return Kl(e.charAt(t))
  15002. }
  15003. function ww(e) {
  15004. var t = e.container();
  15005. return Qt.isText(t) && ae(t.data, qr)
  15006. }
  15007. function xw(e) {
  15008. var t = e.data
  15009. , n = function(e) {
  15010. var n = e.split("");
  15011. return X(n, function(e, t) {
  15012. return Kl(e) && 0 < t && t < n.length - 1 && cl(n[t - 1]) && cl(n[t + 1]) ? " " : e
  15013. }).join("")
  15014. }(t);
  15015. return n !== t && (e.data = n,
  15016. !0)
  15017. }
  15018. function zw(n, e) {
  15019. return R.some(e).filter(ww).bind(function(e) {
  15020. var t = e.container();
  15021. return function(e, t) {
  15022. var n = t.data
  15023. , r = Wu(t, 0);
  15024. return !(!Cw(n, 0) || bw(e, r)) && (t.data = " " + n.slice(1),
  15025. !0)
  15026. }(n, t) || xw(t) || function(e, t) {
  15027. var n = t.data
  15028. , r = Wu(t, n.length - 1);
  15029. return !(!Cw(n, n.length - 1) || bw(e, r)) && (t.data = n.slice(0, -1) + " ",
  15030. !0)
  15031. }(n, t) ? R.some(e) : R.none()
  15032. })
  15033. }
  15034. function Ew(t) {
  15035. var e = it.fromDom(t.getBody());
  15036. t.selection.isCollapsed() && zw(e, Wu.fromRangeStart(t.selection.getRng())).each(function(e) {
  15037. t.selection.setRng(e.toRange())
  15038. })
  15039. }
  15040. function Nw(t, n) {
  15041. return function(e) {
  15042. return function(e, t) {
  15043. return !pw(t) && (vw(e, t) || mw(e, t) || gw(e, t))
  15044. }(t, e) ? Dx(n) : Ox(n)
  15045. }
  15046. }
  15047. function Sw(e) {
  15048. var t = Vc.fromRangeStart(e.selection.getRng())
  15049. , n = it.fromDom(e.getBody());
  15050. if (e.selection.isCollapsed()) {
  15051. var r = d(ly.isInlineTarget, e)
  15052. , o = Vc.fromRangeStart(e.selection.getRng());
  15053. return my(r, e.getBody(), o).bind(function(t) {
  15054. return function(e) {
  15055. return e.fold(function(e) {
  15056. return Ul.prevPosition(t.dom(), Vc.before(e))
  15057. }, function(e) {
  15058. return Ul.firstPositionIn(e)
  15059. }, function(e) {
  15060. return Ul.lastPositionIn(e)
  15061. }, function(e) {
  15062. return Ul.nextPosition(t.dom(), Vc.after(e))
  15063. })
  15064. }
  15065. }(n)).bind(Nw(n, t)).exists(function(t) {
  15066. return function(e) {
  15067. return t.selection.setRng(e.toRange()),
  15068. t.nodeChanged(),
  15069. !0
  15070. }
  15071. }(e))
  15072. }
  15073. return !1
  15074. }
  15075. function kw(e, t) {
  15076. t.hasAttribute("data-mce-caret") && (ja(t),
  15077. function(e) {
  15078. e.selection.setRng(e.selection.getRng())
  15079. }(e),
  15080. e.selection.scrollIntoView(t))
  15081. }
  15082. function Tw(e, t) {
  15083. var n = function(e) {
  15084. return ka(it.fromDom(e.getBody()), "*[data-mce-caret]").fold($(null), function(e) {
  15085. return e.dom()
  15086. })
  15087. }(e);
  15088. if (n)
  15089. return "compositionstart" === t.type ? (t.preventDefault(),
  15090. t.stopPropagation(),
  15091. void kw(e, n)) : void (Va(n) && (kw(e, n),
  15092. e.undoManager.add()))
  15093. }
  15094. function Aw(t) {
  15095. !function(e) {
  15096. var t = fa(function() {
  15097. e.composing || Ew(e)
  15098. }, 0);
  15099. Px.isIE() && (e.on("keypress", function(e) {
  15100. t.throttle()
  15101. }),
  15102. e.on("remove", function(e) {
  15103. t.cancel()
  15104. }))
  15105. }(t),
  15106. t.on("input", function(e) {
  15107. !1 === e.isComposing && Ew(t)
  15108. })
  15109. }
  15110. var Mw = d(tb, Wu.isAbove, -1)
  15111. , Rw = d(tb, Wu.isBelow, 1)
  15112. , _w = d(nb, -1, Mw)
  15113. , Dw = d(nb, 1, Rw)
  15114. , Ow = Qt.isContentEditableFalse
  15115. , Hw = Ja
  15116. , Bw = d(fb, function(e) {
  15117. return e.bottom
  15118. }, function(e, t) {
  15119. return e.y < t
  15120. })
  15121. , Pw = d(fb, function(e) {
  15122. return e.top
  15123. }, function(e, t) {
  15124. return e.y > t
  15125. })
  15126. , Lw = d(gb, Mw)
  15127. , Vw = d(gb, Rw)
  15128. , Iw = function(e) {
  15129. for (var t = [], n = 1; n < arguments.length; n++)
  15130. t[n - 1] = arguments[n];
  15131. var r = Array.prototype.slice.call(arguments, 1);
  15132. return function() {
  15133. return e.apply(null, r)
  15134. }
  15135. }
  15136. , Fw = function(e, t) {
  15137. return g(Ab(e, t), function(e) {
  15138. return e.action()
  15139. })
  15140. }
  15141. , Uw = function(t, n) {
  15142. t.on("keydown", function(e) {
  15143. !1 === e.isDefaultPrevented() && function(e, t, n) {
  15144. var r = fe().os;
  15145. Fw([{
  15146. keyCode: hh.RIGHT,
  15147. action: cb(e, !0)
  15148. }, {
  15149. keyCode: hh.LEFT,
  15150. action: cb(e, !1)
  15151. }, {
  15152. keyCode: hh.UP,
  15153. action: sb(e, !1)
  15154. }, {
  15155. keyCode: hh.DOWN,
  15156. action: sb(e, !0)
  15157. }, {
  15158. keyCode: hh.RIGHT,
  15159. action: Cb(e, !0)
  15160. }, {
  15161. keyCode: hh.LEFT,
  15162. action: Cb(e, !1)
  15163. }, {
  15164. keyCode: hh.UP,
  15165. action: wb(e, !1)
  15166. }, {
  15167. keyCode: hh.DOWN,
  15168. action: wb(e, !0)
  15169. }, {
  15170. keyCode: hh.RIGHT,
  15171. action: by.move(e, t, !0)
  15172. }, {
  15173. keyCode: hh.LEFT,
  15174. action: by.move(e, t, !1)
  15175. }, {
  15176. keyCode: hh.RIGHT,
  15177. ctrlKey: !r.isOSX(),
  15178. altKey: r.isOSX(),
  15179. action: by.moveNextWord(e, t)
  15180. }, {
  15181. keyCode: hh.LEFT,
  15182. ctrlKey: !r.isOSX(),
  15183. altKey: r.isOSX(),
  15184. action: by.movePrevWord(e, t)
  15185. }, {
  15186. keyCode: hh.UP,
  15187. action: Tb(e, !1)
  15188. }, {
  15189. keyCode: hh.DOWN,
  15190. action: Tb(e, !0)
  15191. }], n).each(function(e) {
  15192. n.preventDefault()
  15193. })
  15194. }(t, n, e)
  15195. })
  15196. }
  15197. , jw = function(e, t) {
  15198. return Ot(e, t) ? Na(t, function(e) {
  15199. return ur(e) || sr(e)
  15200. }, function(t) {
  15201. return function(e) {
  15202. return pe(t, it.fromDom(e.dom().parentNode))
  15203. }
  15204. }(e)) : R.none()
  15205. }
  15206. , qw = function(e) {
  15207. e.dom.isEmpty(e.getBody()) && (e.setContent(""),
  15208. function(e) {
  15209. var t = e.getBody()
  15210. , n = t.firstChild && e.dom.isBlock(t.firstChild) ? t.firstChild : t;
  15211. e.selection.setCursorLocation(n, 0)
  15212. }(e))
  15213. }
  15214. , $w = function(i, a, u) {
  15215. return tu(Ul.firstPositionIn(u), Ul.lastPositionIn(u), function(e, t) {
  15216. var n = ly.normalizePosition(!0, e)
  15217. , r = ly.normalizePosition(!1, t)
  15218. , o = ly.normalizePosition(!1, a);
  15219. return i ? Ul.nextPosition(u, o).map(function(e) {
  15220. return e.isEqual(r) && a.isEqual(n)
  15221. }).getOr(!1) : Ul.prevPosition(u, o).map(function(e) {
  15222. return e.isEqual(n) && a.isEqual(r)
  15223. }).getOr(!1)
  15224. }).getOr(!0)
  15225. }
  15226. , Ww = function(e, t, n) {
  15227. return n.collapsed ? _b(e, t, n) : R.none()
  15228. }
  15229. , Kw = function(e, t, n, r) {
  15230. return t ? Vb(e, r, n) : Vb(e, n, r)
  15231. }
  15232. , Xw = function(t, n) {
  15233. var r = it.fromDom(t.getBody())
  15234. , e = Ww(r.dom(), n, t.selection.getRng()).bind(function(e) {
  15235. return Kw(r, n, e.from().block(), e.to().block())
  15236. });
  15237. return e.each(function(e) {
  15238. t.selection.setRng(e.toRange())
  15239. }),
  15240. e.isSome()
  15241. }
  15242. , Yw = function(e, t) {
  15243. return !e.selection.isCollapsed() && Ub(e)
  15244. }
  15245. , Gw = d(qb, !1)
  15246. , Zw = d(qb, !0)
  15247. , Jw = gd([{
  15248. remove: ["element"]
  15249. }, {
  15250. moveToElement: ["element"]
  15251. }, {
  15252. moveToPosition: ["position"]
  15253. }])
  15254. , Qw = function(e, t) {
  15255. for (; t && t !== e; ) {
  15256. if (Qt.isContentEditableTrue(t) || Qt.isContentEditableFalse(t))
  15257. return t;
  15258. t = t.parentNode
  15259. }
  15260. return null
  15261. }
  15262. , ex = function(e, t) {
  15263. return e.selection.isCollapsed() ? Zb(e, t) : Jb(e, t)
  15264. }
  15265. , tx = function(e) {
  15266. var t, n = Qw(e.getBody(), e.selection.getNode());
  15267. return Qt.isContentEditableTrue(n) && e.dom.isBlock(n) && e.dom.isEmpty(n) && (t = e.dom.create("br", {
  15268. "data-mce-bogus": "1"
  15269. }),
  15270. e.dom.setHTML(n, ""),
  15271. n.appendChild(t),
  15272. e.selection.setRng(Vc.before(t).toRange())),
  15273. !0
  15274. }
  15275. , nx = function(e, t) {
  15276. return function(e, t) {
  15277. var n = e.selection.getRng();
  15278. if (!Qt.isText(n.commonAncestorContainer))
  15279. return !1;
  15280. var r = t ? Pc.Forwards : Pc.Backwards
  15281. , o = Xs(e.getBody())
  15282. , i = d(Hc, o.next)
  15283. , a = d(Hc, o.prev)
  15284. , u = t ? i : a
  15285. , c = t ? Jy : Qy
  15286. , s = Dc(r, e.getBody(), n)
  15287. , l = ly.normalizePosition(t, u(s));
  15288. if (!l || !Bc(s, l))
  15289. return !1;
  15290. if (c(l))
  15291. return Qb(e, n, s.getNode(), r, t, l);
  15292. var f = u(l);
  15293. return !!(f && c(f) && Bc(l, f)) && Qb(e, n, s.getNode(), r, t, f)
  15294. }(e, t)
  15295. }
  15296. , rx = function(e, t, n) {
  15297. if (e.selection.isCollapsed() && function(e) {
  15298. return !1 !== e.settings.inline_boundaries
  15299. }(e)) {
  15300. var r = Vc.fromRangeStart(e.selection.getRng());
  15301. return nC(e, t, n, r)
  15302. }
  15303. return !1
  15304. }
  15305. , ox = function(e, t) {
  15306. return !!e.selection.isCollapsed() && iC(e, t)
  15307. }
  15308. , ix = gd([{
  15309. removeTable: ["element"]
  15310. }, {
  15311. emptyCells: ["cells"]
  15312. }])
  15313. , ax = function(e, t) {
  15314. return lC(t, e).isSome()
  15315. }
  15316. , ux = function(e, t) {
  15317. return g(bm(t, e), function(e) {
  15318. return "caption" === Oe(e)
  15319. })
  15320. }
  15321. , cx = function(e, t) {
  15322. return Jg(t),
  15323. e.selection.setCursorLocation(t.dom(), 0),
  15324. R.some(!0)
  15325. }
  15326. , sx = function(e, t) {
  15327. var n = it.fromDom(e.selection.getStart(!0))
  15328. , r = _m(e);
  15329. return e.selection.isCollapsed() && 0 === r.length ? NC(e, t, n) : function(e, t) {
  15330. var n = it.fromDom(e.getBody())
  15331. , r = e.selection.getRng()
  15332. , o = _m(e);
  15333. return 0 !== o.length ? vC(e, o) : CC(e, n, r, t)
  15334. }(e, n)
  15335. }
  15336. , lx = function(e, t) {
  15337. return !!e.selection.isCollapsed() && function(t, n) {
  15338. var e = Vc.fromRangeStart(t.selection.getRng());
  15339. return Ul.fromPosition(n, t.getBody(), e).filter(function(e) {
  15340. return n ? Xy(e) : Yy(e)
  15341. }).bind(function(e) {
  15342. return R.from(Tc(n ? 0 : -1, e))
  15343. }).map(function(e) {
  15344. return t.selection.select(e),
  15345. !0
  15346. }).getOr(!1)
  15347. }(e, t)
  15348. }
  15349. , fx = function(e) {
  15350. return U(X(e.selection.getSelectedBlocks(), it.fromDom), function(e) {
  15351. return !AC(e) && !function(e) {
  15352. return be(e).map(AC).getOr(!1)
  15353. }(e) && function(e) {
  15354. return Na(e, function(e) {
  15355. return Qt.isContentEditableTrue(e.dom()) || Qt.isContentEditableFalse(e.dom())
  15356. }).exists(function(e) {
  15357. return Qt.isContentEditableTrue(e.dom())
  15358. })
  15359. }(e)
  15360. })
  15361. }
  15362. , dx = d(OC, !1)
  15363. , hx = d(OC, !0)
  15364. , mx = d(DC, !1)
  15365. , gx = d(DC, !0)
  15366. , px = function(e, t, n) {
  15367. if (e.selection.isCollapsed() && TC(e)) {
  15368. var r = e.dom
  15369. , o = e.selection.getRng()
  15370. , i = Vc.fromRangeStart(o)
  15371. , a = r.getParent(o.startContainer, r.isBlock);
  15372. if (null !== a && dx(it.fromDom(a), i))
  15373. return MC(e, "outdent"),
  15374. !0
  15375. }
  15376. return !1
  15377. }
  15378. , vx = function(t, n) {
  15379. t.on("keydown", function(e) {
  15380. !1 === e.isDefaultPrevented() && function(e, t, n) {
  15381. Fw([{
  15382. keyCode: hh.BACKSPACE,
  15383. action: Iw(px, e, !1)
  15384. }, {
  15385. keyCode: hh.BACKSPACE,
  15386. action: Iw(ex, e, !1)
  15387. }, {
  15388. keyCode: hh.DELETE,
  15389. action: Iw(ex, e, !0)
  15390. }, {
  15391. keyCode: hh.BACKSPACE,
  15392. action: Iw(nx, e, !1)
  15393. }, {
  15394. keyCode: hh.DELETE,
  15395. action: Iw(nx, e, !0)
  15396. }, {
  15397. keyCode: hh.BACKSPACE,
  15398. action: Iw(rx, e, t, !1)
  15399. }, {
  15400. keyCode: hh.DELETE,
  15401. action: Iw(rx, e, t, !0)
  15402. }, {
  15403. keyCode: hh.BACKSPACE,
  15404. action: Iw(sx, e, !1)
  15405. }, {
  15406. keyCode: hh.DELETE,
  15407. action: Iw(sx, e, !0)
  15408. }, {
  15409. keyCode: hh.BACKSPACE,
  15410. action: Iw(lx, e, !1)
  15411. }, {
  15412. keyCode: hh.DELETE,
  15413. action: Iw(lx, e, !0)
  15414. }, {
  15415. keyCode: hh.BACKSPACE,
  15416. action: Iw(Yw, e, !1)
  15417. }, {
  15418. keyCode: hh.DELETE,
  15419. action: Iw(Yw, e, !0)
  15420. }, {
  15421. keyCode: hh.BACKSPACE,
  15422. action: Iw(Xw, e, !1)
  15423. }, {
  15424. keyCode: hh.DELETE,
  15425. action: Iw(Xw, e, !0)
  15426. }, {
  15427. keyCode: hh.BACKSPACE,
  15428. action: Iw(ox, e, !1)
  15429. }, {
  15430. keyCode: hh.DELETE,
  15431. action: Iw(ox, e, !0)
  15432. }], n).each(function(e) {
  15433. n.preventDefault()
  15434. })
  15435. }(t, n, e)
  15436. }),
  15437. t.on("keyup", function(e) {
  15438. !1 === e.isDefaultPrevented() && function(e, t) {
  15439. Fw([{
  15440. keyCode: hh.BACKSPACE,
  15441. action: Iw(tx, e)
  15442. }, {
  15443. keyCode: hh.DELETE,
  15444. action: Iw(tx, e)
  15445. }], t)
  15446. }(t, e)
  15447. })
  15448. }
  15449. , yx = function(e, t) {
  15450. var n, r, o = t, i = e.dom, a = e.schema.getMoveCaretBeforeOnEnterElements();
  15451. if (t) {
  15452. if (/^(LI|DT|DD)$/.test(t.nodeName)) {
  15453. var u = function(e) {
  15454. for (; e; ) {
  15455. if (1 === e.nodeType || 3 === e.nodeType && e.data && /[\r\n\s]/.test(e.data))
  15456. return e;
  15457. e = e.nextSibling
  15458. }
  15459. }(t.firstChild);
  15460. u && /^(UL|OL|DL)$/.test(u.nodeName) && t.insertBefore(i.doc.createTextNode(qr), t.firstChild)
  15461. }
  15462. if (r = i.createRng(),
  15463. t.normalize(),
  15464. t.hasChildNodes()) {
  15465. for (var c = new Fi(t,t); n = c.current(); ) {
  15466. if (Qt.isText(n)) {
  15467. r.setStart(n, 0),
  15468. r.setEnd(n, 0);
  15469. break
  15470. }
  15471. if (a[n.nodeName.toLowerCase()]) {
  15472. r.setStartBefore(n),
  15473. r.setEndBefore(n);
  15474. break
  15475. }
  15476. o = n,
  15477. n = c.next()
  15478. }
  15479. n || (r.setStart(o, 0),
  15480. r.setEnd(o, 0))
  15481. } else
  15482. Qt.isBr(t) ? t.nextSibling && i.isBlock(t.nextSibling) ? (r.setStartBefore(t),
  15483. r.setEndBefore(t)) : (r.setStartAfter(t),
  15484. r.setEndAfter(t)) : (r.setStart(t, 0),
  15485. r.setEnd(t, 0));
  15486. e.selection.setRng(r),
  15487. gm(e, r)
  15488. }
  15489. }
  15490. , bx = function(e, t) {
  15491. var n, r, o = e.getRoot();
  15492. for (n = t; n !== o && "false" !== e.getContentEditable(n); )
  15493. "true" === e.getContentEditable(n) && (r = n),
  15494. n = n.parentNode;
  15495. return n !== o ? r : o
  15496. }
  15497. , Cx = HC
  15498. , wx = function(e) {
  15499. return HC(e).fold($(""), function(e) {
  15500. return e.nodeName.toUpperCase()
  15501. })
  15502. }
  15503. , xx = function(e) {
  15504. return HC(e).filter(function(e) {
  15505. return sr(it.fromDom(e))
  15506. }).isSome()
  15507. }
  15508. , zx = function(e, t, n, r, o) {
  15509. var i = e.dom
  15510. , a = e.selection.getRng();
  15511. if (n !== e.getBody()) {
  15512. !function(e) {
  15513. return PC(e) && PC(e.parentNode)
  15514. }(n) || (o = "LI");
  15515. var u = o ? t(o) : i.create("BR");
  15516. if (VC(n, r, !0) && VC(n, r, !1))
  15517. BC(n, "LI") ? i.insertAfter(u, LC(n)) : i.replace(u, n);
  15518. else if (VC(n, r, !0))
  15519. BC(n, "LI") ? (i.insertAfter(u, LC(n)),
  15520. u.appendChild(i.doc.createTextNode(" ")),
  15521. u.appendChild(n)) : n.parentNode.insertBefore(u, n);
  15522. else if (VC(n, r, !1))
  15523. i.insertAfter(u, LC(n));
  15524. else {
  15525. n = LC(n);
  15526. var c = a.cloneRange();
  15527. c.setStartAfter(r),
  15528. c.setEndAfter(n);
  15529. var s = c.extractContents();
  15530. "LI" === o && function(e, t) {
  15531. return e.firstChild && e.firstChild.nodeName === t
  15532. }(s, "LI") ? (u = s.firstChild,
  15533. i.insertAfter(s, n)) : (i.insertAfter(s, n),
  15534. i.insertAfter(u, n))
  15535. }
  15536. i.remove(r),
  15537. yx(e, u)
  15538. }
  15539. }
  15540. , Ex = function(a, e) {
  15541. function t(e) {
  15542. var t, n, r, o = c, i = b.getTextInlineElements();
  15543. if (e || "TABLE" === m || "HR" === m ? (t = y.create(e || p),
  15544. $C(a, t)) : t = s.cloneNode(!1),
  15545. r = t,
  15546. !1 === ls(a))
  15547. y.setAttrib(t, "style", null),
  15548. y.setAttrib(t, "class", null);
  15549. else
  15550. do {
  15551. if (i[o.nodeName]) {
  15552. if (sc(o) || Wl(o))
  15553. continue;
  15554. n = o.cloneNode(!1),
  15555. y.setAttrib(n, "id", ""),
  15556. t.hasChildNodes() ? n.appendChild(t.firstChild) : r = n,
  15557. t.appendChild(n)
  15558. }
  15559. } while ((o = o.parentNode) && o !== u);
  15560. return IC(r),
  15561. t
  15562. }
  15563. function n(e) {
  15564. var t, n, r = jC(e, c, i);
  15565. if (Qt.isText(c) && (e ? 0 < r : r < c.nodeValue.length))
  15566. return !1;
  15567. if (c.parentNode === s && v && !e)
  15568. return !0;
  15569. if (e && Qt.isElement(c) && c === s.firstChild)
  15570. return !0;
  15571. if (FC(c, "TABLE") || FC(c, "HR"))
  15572. return v && !e || !v && e;
  15573. var o = new Fi(c,s);
  15574. for (Qt.isText(c) && (e && 0 === r ? o.prev() : e || r !== c.nodeValue.length || o.next()); t = o.current(); ) {
  15575. if (Qt.isElement(t)) {
  15576. if (!t.getAttribute("data-mce-bogus") && (n = t.nodeName.toLowerCase(),
  15577. C[n] && "br" !== n))
  15578. return !1
  15579. } else if (Qt.isText(t) && !/^[ \t\r\n]*$/.test(t.nodeValue))
  15580. return !1;
  15581. e ? o.prev() : o.next()
  15582. }
  15583. return !0
  15584. }
  15585. function r() {
  15586. f = /^(H[1-6]|PRE|FIGURE)$/.test(m) && "HGROUP" !== g ? t(p) : t(),
  15587. fs(a) && UC(y, h) && y.isEmpty(s) ? f = y.split(h, s) : y.insertAfter(f, s),
  15588. yx(a, f)
  15589. }
  15590. var o, u, c, i, s, l, f, d, h, m, g, p, v, y = a.dom, b = a.schema, C = b.getNonEmptyElements(), w = a.selection.getRng();
  15591. Bm(y, w).each(function(e) {
  15592. w.setStart(e.startContainer, e.startOffset),
  15593. w.setEnd(e.endContainer, e.endOffset)
  15594. }),
  15595. c = w.startContainer,
  15596. i = w.startOffset,
  15597. p = as(a),
  15598. l = !(!e || !e.shiftKey);
  15599. var x = !(!e || !e.ctrlKey);
  15600. Qt.isElement(c) && c.hasChildNodes() && (v = i > c.childNodes.length - 1,
  15601. c = c.childNodes[Math.min(i, c.childNodes.length - 1)] || c,
  15602. i = v && Qt.isText(c) ? c.nodeValue.length : 0),
  15603. (u = qC(y, c)) && ((p && !l || !p && l) && (c = function(e, t, n, r, o) {
  15604. var i, a, u, c, s, l, f = t || "P", d = e.dom, h = qC(d, r);
  15605. if (!(a = d.getParent(r, d.isBlock)) || !UC(d, a)) {
  15606. if (l = (a = a || h) === e.getBody() || function(e) {
  15607. return e && /^(TD|TH|CAPTION)$/.test(e.nodeName)
  15608. }(a) ? a.nodeName.toLowerCase() : a.parentNode.nodeName.toLowerCase(),
  15609. !a.hasChildNodes())
  15610. return i = d.create(f),
  15611. $C(e, i),
  15612. a.appendChild(i),
  15613. n.setStart(i, 0),
  15614. n.setEnd(i, 0),
  15615. i;
  15616. for (c = r; c.parentNode !== a; )
  15617. c = c.parentNode;
  15618. for (; c && !d.isBlock(c); )
  15619. c = (u = c).previousSibling;
  15620. if (u && e.schema.isValidChild(l, f.toLowerCase())) {
  15621. for (i = d.create(f),
  15622. $C(e, i),
  15623. u.parentNode.insertBefore(i, u),
  15624. c = u; c && !d.isBlock(c); )
  15625. s = c.nextSibling,
  15626. i.appendChild(c),
  15627. c = s;
  15628. n.setStart(r, o),
  15629. n.setEnd(r, o)
  15630. }
  15631. }
  15632. return r
  15633. }(a, p, w, c, i)),
  15634. s = y.getParent(c, y.isBlock),
  15635. h = s ? y.getParent(s.parentNode, y.isBlock) : null,
  15636. m = s ? s.nodeName.toUpperCase() : "",
  15637. "LI" !== (g = h ? h.nodeName.toUpperCase() : "") || x || (h = (s = h).parentNode,
  15638. m = g),
  15639. /^(LI|DT|DD)$/.test(m) && y.isEmpty(s) ? zx(a, t, h, s, p) : p && s === a.getBody() || (p = p || "P",
  15640. Ba(s) ? (f = ja(s),
  15641. y.isEmpty(s) && IC(s),
  15642. yx(a, f)) : n() ? r() : n(!0) ? (f = s.parentNode.insertBefore(t(), s),
  15643. yx(a, FC(s, "HR") ? f : s)) : ((o = function(e) {
  15644. var t = e.cloneRange();
  15645. return t.setStart(e.startContainer, jC(!0, e.startContainer, e.startOffset)),
  15646. t.setEnd(e.endContainer, jC(!1, e.endContainer, e.endOffset)),
  15647. t
  15648. }(w).cloneRange()).setEndAfter(s),
  15649. function(e) {
  15650. F(xa(it.fromDom(e), Lt), function(e) {
  15651. var t = e.dom();
  15652. t.nodeValue = mu.trim(t.nodeValue)
  15653. })
  15654. }(d = o.extractContents()),
  15655. function(e) {
  15656. for (; Qt.isText(e) && (e.nodeValue = e.nodeValue.replace(/^[\r\n]+/, "")),
  15657. e = e.firstChild; )
  15658. ;
  15659. }(d),
  15660. f = d.firstChild,
  15661. y.insertAfter(d, s),
  15662. function(e, t, n) {
  15663. var r, o = n, i = [];
  15664. if (o) {
  15665. for (; o = o.firstChild; ) {
  15666. if (e.isBlock(o))
  15667. return;
  15668. Qt.isElement(o) && !t[o.nodeName.toLowerCase()] && i.push(o)
  15669. }
  15670. for (r = i.length; r--; )
  15671. !(o = i[r]).hasChildNodes() || o.firstChild === o.lastChild && "" === o.firstChild.nodeValue ? e.remove(o) : (a = e,
  15672. (u = o) && "A" === u.nodeName && a.isEmpty(u) && e.remove(o));
  15673. var a, u
  15674. }
  15675. }(y, C, f),
  15676. function(e, t) {
  15677. var n;
  15678. t.normalize(),
  15679. (n = t.lastChild) && !/^(left|right)$/gi.test(e.getStyle(n, "float", !0)) || e.add(t, "br")
  15680. }(y, s),
  15681. y.isEmpty(s) && IC(s),
  15682. f.normalize(),
  15683. y.isEmpty(f) ? (y.remove(f),
  15684. r()) : yx(a, f)),
  15685. y.setAttrib(f, "id", ""),
  15686. a.fire("NewBlock", {
  15687. newBlock: f
  15688. })))
  15689. }
  15690. , Nx = function(e, t) {
  15691. return !!function(e) {
  15692. return Qt.isBr(e.getNode())
  15693. }(Vc.after(t)) || Ul.nextPosition(e, Vc.after(t)).map(function(e) {
  15694. return Qt.isBr(e.getNode())
  15695. }).getOr(!1)
  15696. }
  15697. , Sx = function(e, t) {
  15698. var n = function(e) {
  15699. var t = d(ly.isInlineTarget, e)
  15700. , n = Vc.fromRangeStart(e.selection.getRng());
  15701. return my(t, e.getBody(), n).filter(JC)
  15702. }(e);
  15703. n.isSome() ? n.each(d(QC, e)) : XC(e, t)
  15704. }
  15705. , kx = function(e) {
  15706. return ew(e, cs(e))
  15707. }
  15708. , Tx = function(e) {
  15709. return ew(e, ss(e))
  15710. }
  15711. , Ax = gd([{
  15712. br: []
  15713. }, {
  15714. block: []
  15715. }, {
  15716. none: []
  15717. }])
  15718. , Mx = function(e, t) {
  15719. return fy([lw([tw], Ax.none()), lw([ow("summary", !0)], Ax.br()), lw([iw(!0), aw(!1), cw], Ax.br()), lw([iw(!0), aw(!1)], Ax.block()), lw([iw(!0), aw(!0), cw], Ax.block()), lw([iw(!0), aw(!0)], Ax.br()), lw([rw(!0), cw], Ax.br()), lw([rw(!0)], Ax.block()), lw([nw(!0), cw, sw], Ax.block()), lw([nw(!0)], Ax.br()), lw([uw], Ax.br()), lw([nw(!1), cw], Ax.br()), lw([sw], Ax.block())], [e, !(!t || !t.shiftKey)]).getOr(Ax.none())
  15720. }
  15721. , Rx = function(e, t) {
  15722. Mx(e, t).fold(function() {
  15723. Sx(e, t)
  15724. }, function() {
  15725. Ex(e, t)
  15726. }, i)
  15727. }
  15728. , _x = function(t) {
  15729. t.on("keydown", function(e) {
  15730. e.keyCode === hh.ENTER && function(e, t) {
  15731. t.isDefaultPrevented() || (t.preventDefault(),
  15732. function(e) {
  15733. e.typing && (e.typing = !1,
  15734. e.add())
  15735. }(e.undoManager),
  15736. e.undoManager.transact(function() {
  15737. !1 === e.selection.isCollapsed() && e.execCommand("Delete"),
  15738. Rx(e, t)
  15739. }))
  15740. }(t, e)
  15741. })
  15742. }
  15743. , Dx = d(fw, qr)
  15744. , Ox = d(fw, " ")
  15745. , Hx = function(t) {
  15746. t.on("keydown", function(e) {
  15747. !1 === e.isDefaultPrevented() && function(e, t) {
  15748. Fw([{
  15749. keyCode: hh.SPACEBAR,
  15750. action: Iw(Sw, e)
  15751. }], t).each(function(e) {
  15752. t.preventDefault()
  15753. })
  15754. }(t, e)
  15755. })
  15756. }
  15757. , Bx = function(e) {
  15758. e.on("keyup compositionstart", d(Tw, e))
  15759. }
  15760. , Px = fe().browser
  15761. , Lx = function(t) {
  15762. t.on("keydown", function(e) {
  15763. !1 === e.isDefaultPrevented() && function(e, t) {
  15764. Fw([{
  15765. keyCode: hh.END,
  15766. action: lb(e, !0)
  15767. }, {
  15768. keyCode: hh.HOME,
  15769. action: lb(e, !1)
  15770. }], t).each(function(e) {
  15771. t.preventDefault()
  15772. })
  15773. }(t, e)
  15774. })
  15775. }
  15776. , Vx = function(e) {
  15777. var t = by.setupSelectedState(e);
  15778. Bx(e),
  15779. Uw(e, t),
  15780. vx(e, t),
  15781. _x(e),
  15782. Hx(e),
  15783. Aw(e),
  15784. Lx(e)
  15785. }
  15786. , Ix = (Fx.prototype.nodeChanged = function(e) {
  15787. var t, n, r, o = this.editor.selection;
  15788. this.editor.initialized && o && !this.editor.settings.disable_nodechange && !this.editor.readonly && (r = this.editor.getBody(),
  15789. (t = o.getStart(!0) || r).ownerDocument === this.editor.getDoc() && this.editor.dom.isChildOf(t, r) || (t = r),
  15790. n = [],
  15791. this.editor.dom.getParent(t, function(e) {
  15792. if (e === r)
  15793. return !0;
  15794. n.push(e)
  15795. }),
  15796. (e = e || {}).element = t,
  15797. e.parents = n,
  15798. this.editor.fire("NodeChange", e))
  15799. }
  15800. ,
  15801. Fx.prototype.isSameElementPath = function(e) {
  15802. var t, n;
  15803. if ((n = this.editor.$(e).parentsUntil(this.editor.getBody()).add(e)).length === this.lastPath.length) {
  15804. for (t = n.length; 0 <= t && n[t] === this.lastPath[t]; t--)
  15805. ;
  15806. if (-1 === t)
  15807. return this.lastPath = n,
  15808. !0
  15809. }
  15810. return this.lastPath = n,
  15811. !1
  15812. }
  15813. ,
  15814. Fx);
  15815. function Fx(r) {
  15816. var o;
  15817. this.lastPath = [],
  15818. this.editor = r;
  15819. var t = this;
  15820. "onselectionchange"in r.getDoc() || r.on("NodeChange click mouseup keyup focus", function(e) {
  15821. var t, n;
  15822. n = {
  15823. startContainer: (t = r.selection.getRng()).startContainer,
  15824. startOffset: t.startOffset,
  15825. endContainer: t.endContainer,
  15826. endOffset: t.endOffset
  15827. },
  15828. "nodechange" !== e.type && Hm(n, o) || r.fire("SelectionChange"),
  15829. o = n
  15830. }),
  15831. r.on("contextmenu", function() {
  15832. r.fire("SelectionChange")
  15833. }),
  15834. r.on("SelectionChange", function() {
  15835. var e = r.selection.getStart(!0);
  15836. !e || !Wn.range && r.selection.isCollapsed() || Ph(r) && !t.isSameElementPath(e) && r.dom.isChildOf(e, r.getBody()) && r.nodeChanged({
  15837. selectionChange: !0
  15838. })
  15839. }),
  15840. r.on("mouseup", function(e) {
  15841. !e.isDefaultPrevented() && Ph(r) && ("IMG" === r.selection.getNode().nodeName ? Pn.setEditorTimeout(r, function() {
  15842. r.nodeChanged()
  15843. }) : r.nodeChanged())
  15844. })
  15845. }
  15846. function Ux(e) {
  15847. !function(t) {
  15848. t.on("click", function(e) {
  15849. t.dom.getParent(e.target, "details") && e.preventDefault()
  15850. })
  15851. }(e),
  15852. function(e) {
  15853. e.parser.addNodeFilter("details", function(e) {
  15854. F(e, function(e) {
  15855. e.attr("data-mce-open", e.attr("open")),
  15856. e.attr("open", "open")
  15857. })
  15858. }),
  15859. e.serializer.addNodeFilter("details", function(e) {
  15860. F(e, function(e) {
  15861. var t = e.attr("data-mce-open");
  15862. e.attr("open", K(t) ? t : null),
  15863. e.attr("data-mce-open", null)
  15864. })
  15865. })
  15866. }(e)
  15867. }
  15868. function jx(e) {
  15869. return Qt.isElement(e) && ur(it.fromDom(e))
  15870. }
  15871. function qx(t) {
  15872. t.on("click", function(e) {
  15873. 3 <= e.detail && function(e) {
  15874. var t = e.selection.getRng()
  15875. , n = Wu.fromRangeStart(t)
  15876. , r = Wu.fromRangeEnd(t);
  15877. if (Wu.isElementPosition(n)) {
  15878. var o = n.container();
  15879. jx(o) && Ul.firstPositionIn(o).each(function(e) {
  15880. return t.setStart(e.container(), e.offset())
  15881. })
  15882. }
  15883. if (Wu.isElementPosition(r)) {
  15884. o = n.container();
  15885. jx(o) && Ul.lastPositionIn(o).each(function(e) {
  15886. return t.setEnd(e.container(), e.offset())
  15887. })
  15888. }
  15889. e.selection.setRng(Bp(t))
  15890. }(t)
  15891. })
  15892. }
  15893. function $x(e) {
  15894. var t, n, r, o;
  15895. return o = e.getBoundingClientRect(),
  15896. n = (t = e.ownerDocument).documentElement,
  15897. r = t.defaultView,
  15898. {
  15899. top: o.top + r.pageYOffset - n.clientTop,
  15900. left: o.left + r.pageXOffset - n.clientLeft
  15901. }
  15902. }
  15903. function Wx(e) {
  15904. e && e.parentNode && e.parentNode.removeChild(e)
  15905. }
  15906. function Kx(i, a) {
  15907. return function(e) {
  15908. if (function(e) {
  15909. return 0 === e.button
  15910. }(e)) {
  15911. var t = g(a.dom.getParents(e.target), _u(Nz, Sz)).getOr(null);
  15912. if (function(e, t) {
  15913. return Nz(t) && t !== e
  15914. }(a.getBody(), t)) {
  15915. var n = a.dom.getPos(t)
  15916. , r = a.getBody()
  15917. , o = a.getDoc().documentElement;
  15918. i.element = t,
  15919. i.screenX = e.screenX,
  15920. i.screenY = e.screenY,
  15921. i.maxX = (a.inline ? r.scrollWidth : o.offsetWidth) - 2,
  15922. i.maxY = (a.inline ? r.scrollHeight : o.offsetHeight) - 2,
  15923. i.relX = e.pageX - n.x,
  15924. i.relY = e.pageY - n.y,
  15925. i.width = t.offsetWidth,
  15926. i.height = t.offsetHeight,
  15927. i.ghost = function(e, t, n, r) {
  15928. var o = t.cloneNode(!0);
  15929. e.dom.setStyles(o, {
  15930. width: n,
  15931. height: r
  15932. }),
  15933. e.dom.setAttrib(o, "data-mce-selected", null);
  15934. var i = e.dom.create("div", {
  15935. "class": "mce-drag-container",
  15936. "data-mce-bogus": "all",
  15937. unselectable: "on",
  15938. contenteditable: "false"
  15939. });
  15940. return e.dom.setStyles(i, {
  15941. position: "absolute",
  15942. opacity: .5,
  15943. overflow: "hidden",
  15944. border: 0,
  15945. padding: 0,
  15946. margin: 0,
  15947. width: n,
  15948. height: r
  15949. }),
  15950. e.dom.setStyles(o, {
  15951. margin: 0,
  15952. boxSizing: "border-box"
  15953. }),
  15954. i.appendChild(o),
  15955. i
  15956. }(a, t, i.width, i.height)
  15957. }
  15958. }
  15959. }
  15960. }
  15961. function Xx(r, o) {
  15962. return function(e) {
  15963. if (r.dragging && function(e, t, n) {
  15964. return t !== n && !e.dom.isChildOf(t, n) && !Nz(t)
  15965. }(o, function(e) {
  15966. var t = e.getSel().getRangeAt(0).startContainer;
  15967. return 3 === t.nodeType ? t.parentNode : t
  15968. }(o.selection), r.element)) {
  15969. var t = function(e) {
  15970. var t = e.cloneNode(!0);
  15971. return t.removeAttribute("data-mce-selected"),
  15972. t
  15973. }(r.element)
  15974. , n = o.fire("drop", {
  15975. targetClone: t,
  15976. clientX: e.clientX,
  15977. clientY: e.clientY
  15978. });
  15979. n.isDefaultPrevented() || (t = n.targetClone,
  15980. o.undoManager.transact(function() {
  15981. Wx(r.element),
  15982. o.insertContent(o.dom.getOuterHTML(t)),
  15983. o._selectionOverrides.hideFakeCaret()
  15984. }))
  15985. }
  15986. kz(r)
  15987. }
  15988. }
  15989. function Yx(e) {
  15990. var t, n, r, o, i, a, u = {};
  15991. t = Qi.DOM,
  15992. a = j.document,
  15993. n = Kx(u, e),
  15994. r = function(r, o) {
  15995. var i = Pn.throttle(function(e, t) {
  15996. o._selectionOverrides.hideFakeCaret(),
  15997. o.selection.placeCaretAt(e, t)
  15998. }, 0);
  15999. return function(e) {
  16000. var t = Math.max(Math.abs(e.screenX - r.screenX), Math.abs(e.screenY - r.screenY));
  16001. if (function(e) {
  16002. return e.element
  16003. }(r) && !r.dragging && 10 < t) {
  16004. if (o.fire("dragstart", {
  16005. target: r.element
  16006. }).isDefaultPrevented())
  16007. return;
  16008. r.dragging = !0,
  16009. o.focus()
  16010. }
  16011. if (r.dragging) {
  16012. var n = function(e, t) {
  16013. return {
  16014. pageX: t.pageX - e.relX,
  16015. pageY: t.pageY + 5
  16016. }
  16017. }(r, Ez(o, e));
  16018. !function(e, t) {
  16019. e.parentNode !== t && t.appendChild(e)
  16020. }(r.ghost, o.getBody()),
  16021. function(e, t, n, r, o, i) {
  16022. var a = 0
  16023. , u = 0;
  16024. e.style.left = t.pageX + "px",
  16025. e.style.top = t.pageY + "px",
  16026. t.pageX + n > o && (a = t.pageX + n - o),
  16027. t.pageY + r > i && (u = t.pageY + r - i),
  16028. e.style.width = n - a + "px",
  16029. e.style.height = r - u + "px"
  16030. }(r.ghost, n, r.width, r.height, r.maxX, r.maxY),
  16031. i(e.clientX, e.clientY)
  16032. }
  16033. }
  16034. }(u, e),
  16035. o = Xx(u, e),
  16036. i = function(e, t) {
  16037. return function() {
  16038. e.dragging && t.fire("dragend"),
  16039. kz(e)
  16040. }
  16041. }(u, e),
  16042. e.on("mousedown", n),
  16043. e.on("mousemove", r),
  16044. e.on("mouseup", o),
  16045. t.bind(a, "mousemove", r),
  16046. t.bind(a, "mouseup", i),
  16047. e.on("remove", function() {
  16048. t.unbind(a, "mousemove", r),
  16049. t.unbind(a, "mouseup", i)
  16050. })
  16051. }
  16052. function Gx(e, t) {
  16053. for (var n = e.getBody(); t && t !== n; ) {
  16054. if (Mz(t) || Rz(t))
  16055. return t;
  16056. t = t.parentNode
  16057. }
  16058. return null
  16059. }
  16060. function Zx(g) {
  16061. function a(e) {
  16062. e && g.selection.setRng(e)
  16063. }
  16064. function r() {
  16065. return g.selection.getRng()
  16066. }
  16067. function p(e, t, n, r) {
  16068. return void 0 === r && (r = !0),
  16069. g.fire("ShowCaret", {
  16070. target: t,
  16071. direction: e,
  16072. before: n
  16073. }).isDefaultPrevented() ? null : (r && g.selection.scrollIntoView(t, -1 === e),
  16074. o.show(n, t))
  16075. }
  16076. function t(e) {
  16077. return La(e) || vu(e) || yu(e)
  16078. }
  16079. var v, y = g.getBody(), o = bc(g, y, function(e) {
  16080. return g.dom.isBlock(e)
  16081. }, function() {
  16082. return Dd(g)
  16083. }), b = "sel-" + g.dom.uniqueId(), C = function(e) {
  16084. return t(e.startContainer) || t(e.endContainer)
  16085. }, u = function(e) {
  16086. var t = g.schema.getShortEndedElements()
  16087. , n = g.dom.createRng()
  16088. , r = e.startContainer
  16089. , o = e.startOffset
  16090. , i = e.endContainer
  16091. , a = e.endOffset;
  16092. return ee(t, r.nodeName.toLowerCase()) ? 0 === o ? n.setStartBefore(r) : n.setStartAfter(r) : n.setStart(r, o),
  16093. ee(t, i.nodeName.toLowerCase()) ? 0 === a ? n.setEndBefore(i) : n.setEndAfter(i) : n.setEnd(i, a),
  16094. n
  16095. }, c = function(e, t) {
  16096. var n, r, o, i, a, u, c, s, l, f, d = g.$, h = g.dom;
  16097. if (!e)
  16098. return null;
  16099. if (e.collapsed) {
  16100. if (!C(e))
  16101. if (!1 === t) {
  16102. if (s = Dc(-1, y, e),
  16103. wc(s.getNode(!0)))
  16104. return p(-1, s.getNode(!0), !1, !1);
  16105. if (wc(s.getNode()))
  16106. return p(-1, s.getNode(), !s.isAtEnd(), !1)
  16107. } else {
  16108. if (s = Dc(1, y, e),
  16109. wc(s.getNode()))
  16110. return p(1, s.getNode(), !s.isAtEnd(), !1);
  16111. if (wc(s.getNode(!0)))
  16112. return p(1, s.getNode(!0), !1, !1)
  16113. }
  16114. return null
  16115. }
  16116. if (i = e.startContainer,
  16117. a = e.startOffset,
  16118. u = e.endOffset,
  16119. 3 === i.nodeType && 0 === a && Rz(i.parentNode) && (i = i.parentNode,
  16120. a = h.nodeIndex(i),
  16121. i = i.parentNode),
  16122. 1 !== i.nodeType)
  16123. return null;
  16124. if (u === a + 1 && i === e.endContainer && (n = i.childNodes[a]),
  16125. !Rz(n))
  16126. return null;
  16127. if (l = f = n.cloneNode(!0),
  16128. (c = g.fire("ObjectSelected", {
  16129. target: n,
  16130. targetClone: l
  16131. })).isDefaultPrevented())
  16132. return null;
  16133. r = ka(it.fromDom(g.getBody()), "#" + b).fold(function() {
  16134. return d([])
  16135. }, function(e) {
  16136. return d([e.dom()])
  16137. }),
  16138. l = c.targetClone,
  16139. 0 === r.length && (r = d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id", b)).appendTo(g.getBody()),
  16140. e = g.dom.createRng(),
  16141. l === f && Wn.ie ? (r.empty().append('<p style="font-size: 0" data-mce-bogus="all">\xa0</p>').append(l),
  16142. e.setStartAfter(r[0].firstChild.firstChild),
  16143. e.setEndAfter(l)) : (r.empty().append(qr).append(l).append(qr),
  16144. e.setStart(r[0].firstChild, 1),
  16145. e.setEnd(r[0].lastChild, 0)),
  16146. r.css({
  16147. top: h.getPos(n, g.getBody()).y
  16148. }),
  16149. r[0].focus(),
  16150. (o = g.selection.getSel()).removeAllRanges(),
  16151. o.addRange(e);
  16152. var m = it.fromDom(n);
  16153. return F(Ca(it.fromDom(g.getBody()), "*[data-mce-selected]"), function(e) {
  16154. pe(m, e) || Ye(e, "data-mce-selected")
  16155. }),
  16156. g.dom.getAttrib(n, "data-mce-selected") || n.setAttribute("data-mce-selected", "1"),
  16157. v = n,
  16158. w(),
  16159. e
  16160. }, s = function() {
  16161. v && (v.removeAttribute("data-mce-selected"),
  16162. ka(it.fromDom(g.getBody()), "#" + b).each(Bt),
  16163. v = null),
  16164. ka(it.fromDom(g.getBody()), "#" + b).each(Bt),
  16165. v = null
  16166. }, w = function() {
  16167. o.hide()
  16168. };
  16169. return Wn.ceFalse && function() {
  16170. g.on("mouseup", function(e) {
  16171. var t = r();
  16172. t.collapsed && Gd(g, e.clientX, e.clientY) && a(Ry(g, t, !1))
  16173. }),
  16174. g.on("click", function(e) {
  16175. var t;
  16176. (t = Gx(g, e.target)) && (Rz(t) && (e.preventDefault(),
  16177. g.focus()),
  16178. Mz(t) && g.dom.isChildOf(t, g.selection.getNode()) && s())
  16179. }),
  16180. g.on("blur NewBlock", function() {
  16181. s()
  16182. }),
  16183. g.on("ResizeWindow FullscreenStateChanged", function() {
  16184. return o.reposition()
  16185. });
  16186. function i(e, t) {
  16187. var n = g.dom.getParent(e, g.dom.isBlock)
  16188. , r = g.dom.getParent(t, g.dom.isBlock);
  16189. return !(!n || !g.dom.isChildOf(n, r) || !1 !== Rz(Gx(g, n))) || n && !function(e, t) {
  16190. return g.dom.getParent(e, g.dom.isBlock) === g.dom.getParent(t, g.dom.isBlock)
  16191. }(n, r) && function(e) {
  16192. var t = Xs(e);
  16193. if (!e.firstChild)
  16194. return !1;
  16195. var n = Vc.before(e.firstChild)
  16196. , r = t.next(n);
  16197. return r && !Jy(r) && !Qy(r)
  16198. }(n)
  16199. }
  16200. var n;
  16201. (n = g).on("tap", function(e) {
  16202. var t = Gx(n, e.target);
  16203. Rz(t) && (e.preventDefault(),
  16204. c(My(n, t)))
  16205. }, !0),
  16206. g.on("mousedown", function(e) {
  16207. var t, n = e.target;
  16208. if ((n === y || "HTML" === n.nodeName || g.dom.isChildOf(n, y)) && !1 !== Gd(g, e.clientX, e.clientY))
  16209. if (t = Gx(g, n))
  16210. Rz(t) ? (e.preventDefault(),
  16211. c(My(g, t))) : (s(),
  16212. Mz(t) && e.shiftKey || dh(e.clientX, e.clientY, g.selection.getRng()) || (w(),
  16213. g.selection.placeCaretAt(e.clientX, e.clientY)));
  16214. else if (!1 === wc(n)) {
  16215. s(),
  16216. w();
  16217. var r = Ty(y, e.clientX, e.clientY);
  16218. if (r && !i(e.target, r.node)) {
  16219. e.preventDefault();
  16220. var o = p(1, r.node, r.before, !1);
  16221. g.getBody().focus(),
  16222. a(o)
  16223. }
  16224. }
  16225. }),
  16226. g.on("keypress", function(e) {
  16227. hh.modifierPressed(e) || (e.keyCode,
  16228. Rz(g.selection.getNode()) && e.preventDefault())
  16229. }),
  16230. g.on("GetSelectionRange", function(e) {
  16231. var t = e.range;
  16232. if (v) {
  16233. if (!v.parentNode)
  16234. return void (v = null);
  16235. (t = t.cloneRange()).selectNode(v),
  16236. e.range = t
  16237. }
  16238. }),
  16239. g.on("SetSelectionRange", function(e) {
  16240. e.range = u(e.range);
  16241. var t = c(e.range, e.forward);
  16242. t && (e.range = t)
  16243. });
  16244. g.on("AfterSetSelectionRange", function(e) {
  16245. var t = e.range;
  16246. C(t) || function(e) {
  16247. return "mcepastebin" === e.id
  16248. }(t.startContainer.parentNode) || w(),
  16249. function(e) {
  16250. return g.dom.hasClass(e, "mce-offscreen-selection")
  16251. }(t.startContainer.parentNode) || s()
  16252. }),
  16253. g.on("copy", function(e) {
  16254. var t = e.clipboardData;
  16255. if (!e.isDefaultPrevented() && e.clipboardData && !Wn.ie) {
  16256. var n = function() {
  16257. var e = g.dom.get(b);
  16258. return e ? e.getElementsByTagName("*")[0] : e
  16259. }();
  16260. n && (e.preventDefault(),
  16261. t.clearData(),
  16262. t.setData("text/html", n.outerHTML),
  16263. t.setData("text/plain", n.outerText))
  16264. }
  16265. }),
  16266. Tz(g),
  16267. Az(g)
  16268. }(),
  16269. {
  16270. showCaret: p,
  16271. showBlockCaretContainer: function(e) {
  16272. e.hasAttribute("data-mce-caret") && (ja(e),
  16273. a(r()),
  16274. g.selection.scrollIntoView(e))
  16275. },
  16276. hideFakeCaret: w,
  16277. destroy: function() {
  16278. o.destroy(),
  16279. v = null
  16280. }
  16281. }
  16282. }
  16283. function Jx(a) {
  16284. function e(e, t) {
  16285. try {
  16286. a.getDoc().execCommand(e, !1, t)
  16287. } catch (n) {}
  16288. }
  16289. function u(e) {
  16290. return e.isDefaultPrevented()
  16291. }
  16292. function t() {
  16293. a.shortcuts.add("meta+a", null, "SelectAll")
  16294. }
  16295. function n() {
  16296. a.on("keydown", function(e) {
  16297. if (!u(e) && e.keyCode === i && l.isCollapsed() && 0 === l.getRng().startOffset) {
  16298. var t = l.getNode().previousSibling;
  16299. if (t && t.nodeName && "table" === t.nodeName.toLowerCase())
  16300. return e.preventDefault(),
  16301. !1
  16302. }
  16303. })
  16304. }
  16305. function r() {
  16306. a.inline || (a.contentStyles.push("body {min-height: 150px}"),
  16307. a.on("click", function(e) {
  16308. var t;
  16309. if ("HTML" === e.target.nodeName) {
  16310. if (11 < Wn.ie)
  16311. return void a.getBody().focus();
  16312. t = a.selection.getRng(),
  16313. a.getBody().focus(),
  16314. a.selection.setRng(t),
  16315. a.selection.normalize(),
  16316. a.nodeChanged()
  16317. }
  16318. }))
  16319. }
  16320. var o = Zn.each
  16321. , i = hh.BACKSPACE
  16322. , c = hh.DELETE
  16323. , s = a.dom
  16324. , l = a.selection
  16325. , f = a.settings
  16326. , d = a.parser
  16327. , h = Wn.gecko
  16328. , m = Wn.ie
  16329. , g = Wn.webkit
  16330. , p = "data:text/mce-internal,"
  16331. , v = m ? "Text" : "URL";
  16332. function y(e) {
  16333. var t = s.create("body")
  16334. , n = e.cloneContents();
  16335. return t.appendChild(n),
  16336. l.serializer.serialize(t, {
  16337. format: "html"
  16338. })
  16339. }
  16340. function b() {
  16341. var e = s.getAttribs(l.getStart().cloneNode(!1));
  16342. return function() {
  16343. var t = l.getStart();
  16344. t !== a.getBody() && (s.setAttrib(t, "style", null),
  16345. o(e, function(e) {
  16346. t.setAttributeNode(e.cloneNode(!0))
  16347. }))
  16348. }
  16349. }
  16350. function C() {
  16351. return !l.isCollapsed() && s.getParent(l.getStart(), s.isBlock) !== s.getParent(l.getEnd(), s.isBlock)
  16352. }
  16353. return a.on("keydown", function(e) {
  16354. var t, n, r, o, i;
  16355. if (!u(e) && e.keyCode === hh.BACKSPACE && (n = (t = l.getRng()).startContainer,
  16356. r = t.startOffset,
  16357. o = s.getRoot(),
  16358. i = n,
  16359. t.collapsed && 0 === r)) {
  16360. for (; i && i.parentNode && i.parentNode.firstChild === i && i.parentNode !== o; )
  16361. i = i.parentNode;
  16362. "BLOCKQUOTE" === i.tagName && (a.formatter.toggle("blockquote", null, i),
  16363. (t = s.createRng()).setStart(n, 0),
  16364. t.setEnd(n, 0),
  16365. l.setRng(t))
  16366. }
  16367. }),
  16368. a.on("keydown", function(e) {
  16369. var t, n, r = e.keyCode;
  16370. if (!u(e) && (r === c || r === i)) {
  16371. if (t = a.selection.isCollapsed(),
  16372. n = a.getBody(),
  16373. t && !s.isEmpty(n))
  16374. return;
  16375. if (!t && !function(e) {
  16376. var t = y(e)
  16377. , n = s.createRng();
  16378. return n.selectNode(a.getBody()),
  16379. t === y(n)
  16380. }(a.selection.getRng()))
  16381. return;
  16382. e.preventDefault(),
  16383. a.setContent(""),
  16384. n.firstChild && s.isBlock(n.firstChild) ? a.selection.setCursorLocation(n.firstChild, 0) : a.selection.setCursorLocation(n, 0),
  16385. a.nodeChanged()
  16386. }
  16387. }),
  16388. Wn.windowsPhone || a.on("keyup focusin mouseup", function(e) {
  16389. hh.modifierPressed(e) || l.normalize()
  16390. }, !0),
  16391. g && (a.inline || s.bind(a.getDoc(), "mousedown mouseup", function(e) {
  16392. var t;
  16393. if (e.target === a.getDoc().documentElement)
  16394. if (t = l.getRng(),
  16395. a.getBody().focus(),
  16396. "mousedown" === e.type) {
  16397. if (La(t.startContainer))
  16398. return;
  16399. l.placeCaretAt(e.clientX, e.clientY)
  16400. } else
  16401. l.setRng(t)
  16402. }),
  16403. a.on("click", function(e) {
  16404. var t = e.target;
  16405. /^(IMG|HR)$/.test(t.nodeName) && "false" !== s.getContentEditableParent(t) && (e.preventDefault(),
  16406. a.selection.select(t),
  16407. a.nodeChanged()),
  16408. "A" === t.nodeName && s.hasClass(t, "mce-item-anchor") && (e.preventDefault(),
  16409. l.select(t))
  16410. }),
  16411. f.forced_root_block && a.on("init", function() {
  16412. e("DefaultParagraphSeparator", as(a))
  16413. }),
  16414. a.on("init", function() {
  16415. a.dom.bind(a.getBody(), "submit", function(e) {
  16416. e.preventDefault()
  16417. })
  16418. }),
  16419. n(),
  16420. d.addNodeFilter("br", function(e) {
  16421. for (var t = e.length; t--; )
  16422. "Apple-interchange-newline" === e[t].attr("class") && e[t].remove()
  16423. }),
  16424. Wn.iOS ? (a.inline || a.on("keydown", function() {
  16425. j.document.activeElement === j.document.body && a.getWin().focus()
  16426. }),
  16427. r(),
  16428. a.on("click", function(e) {
  16429. var t = e.target;
  16430. do {
  16431. if ("A" === t.tagName)
  16432. return void e.preventDefault()
  16433. } while (t = t.parentNode)
  16434. }),
  16435. a.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")) : t()),
  16436. 11 <= Wn.ie && (r(),
  16437. n()),
  16438. Wn.ie && (t(),
  16439. e("AutoUrlDetect", !1),
  16440. a.on("dragstart", function(e) {
  16441. !function(e) {
  16442. var t, n;
  16443. e.dataTransfer && (a.selection.isCollapsed() && "IMG" === e.target.tagName && l.select(e.target),
  16444. 0 < (t = a.selection.getContent()).length && (n = p + escape(a.id) + "," + escape(t),
  16445. e.dataTransfer.setData(v, n)))
  16446. }(e)
  16447. }),
  16448. a.on("drop", function(e) {
  16449. if (!u(e)) {
  16450. var t = function(e) {
  16451. var t;
  16452. return e.dataTransfer && (t = e.dataTransfer.getData(v)) && 0 <= t.indexOf(p) ? (t = t.substr(p.length).split(","),
  16453. {
  16454. id: unescape(t[0]),
  16455. html: unescape(t[1])
  16456. }) : null
  16457. }(e);
  16458. if (t && t.id !== a.id) {
  16459. e.preventDefault();
  16460. var n = pm(e.x, e.y, a.getDoc());
  16461. l.setRng(n),
  16462. function(e, t) {
  16463. a.queryCommandSupported("mceInsertClipboardContent") ? a.execCommand("mceInsertClipboardContent", !1, {
  16464. content: e,
  16465. internal: t
  16466. }) : a.execCommand("mceInsertContent", !1, e)
  16467. }(t.html, !0)
  16468. }
  16469. }
  16470. })),
  16471. h && (a.on("keydown", function(e) {
  16472. if (!u(e) && e.keyCode === i) {
  16473. if (!a.getBody().getElementsByTagName("hr").length)
  16474. return;
  16475. if (l.isCollapsed() && 0 === l.getRng().startOffset) {
  16476. var t = l.getNode()
  16477. , n = t.previousSibling;
  16478. if ("HR" === t.nodeName)
  16479. return s.remove(t),
  16480. void e.preventDefault();
  16481. n && n.nodeName && "hr" === n.nodeName.toLowerCase() && (s.remove(n),
  16482. e.preventDefault())
  16483. }
  16484. }
  16485. }),
  16486. j.Range.prototype.getClientRects || a.on("mousedown", function(e) {
  16487. if (!u(e) && "HTML" === e.target.nodeName) {
  16488. var t = a.getBody();
  16489. t.blur(),
  16490. Pn.setEditorTimeout(a, function() {
  16491. t.focus()
  16492. })
  16493. }
  16494. }),
  16495. a.on("keypress", function(e) {
  16496. var t;
  16497. if (!u(e) && (8 === e.keyCode || 46 === e.keyCode) && C())
  16498. return t = b(),
  16499. a.getDoc().execCommand("delete", !1, null),
  16500. t(),
  16501. e.preventDefault(),
  16502. !1
  16503. }),
  16504. s.bind(a.getDoc(), "cut", function(e) {
  16505. var t;
  16506. !u(e) && C() && (t = b(),
  16507. Pn.setEditorTimeout(a, function() {
  16508. t()
  16509. }))
  16510. }),
  16511. f.readonly || a.on("BeforeExecCommand mousedown", function() {
  16512. e("StyleWithCSS", !1),
  16513. e("enableInlineTableEditing", !1),
  16514. f.object_resizing || e("enableObjectResizing", !1)
  16515. }),
  16516. a.on("SetContent ExecCommand", function(e) {
  16517. "setcontent" !== e.type && "mceInsertLink" !== e.command || o(s.select("a"), function(e) {
  16518. var t = e.parentNode
  16519. , n = s.getRoot();
  16520. if (t.lastChild === e) {
  16521. for (; t && !s.isBlock(t); ) {
  16522. if (t.parentNode.lastChild !== t || t === n)
  16523. return;
  16524. t = t.parentNode
  16525. }
  16526. s.add(t, "br", {
  16527. "data-mce-bogus": 1
  16528. })
  16529. }
  16530. })
  16531. }),
  16532. a.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),
  16533. Wn.mac && a.on("keydown", function(e) {
  16534. !hh.metaKeyPressed(e) || e.shiftKey || 37 !== e.keyCode && 39 !== e.keyCode || (e.preventDefault(),
  16535. a.selection.getSel().modify("move", 37 === e.keyCode ? "backward" : "forward", "lineboundary"))
  16536. }),
  16537. n()),
  16538. {
  16539. refreshContentEditable: function() {},
  16540. isHidden: function() {
  16541. var e;
  16542. return !(!h || a.removed) && (!(e = a.selection.getSel()) || !e.rangeCount || 0 === e.rangeCount)
  16543. }
  16544. }
  16545. }
  16546. function Qx(e) {
  16547. e.bindPendingEventDelegates(),
  16548. e.initialized = !0,
  16549. function(e) {
  16550. e.fire("Init")
  16551. }(e),
  16552. e.focus(!0),
  16553. function(r) {
  16554. var e = r.dom.getRoot();
  16555. r.inline || Ph(r) && r.selection.getStart(!0) !== e || Ul.firstPositionIn(e).each(function(e) {
  16556. var t = e.getNode()
  16557. , n = Qt.isTable(t) ? Ul.firstPositionIn(t).getOr(e) : e;
  16558. r.selection.setRng(n.toRange())
  16559. })
  16560. }(e),
  16561. e.nodeChanged({
  16562. initial: !0
  16563. }),
  16564. e.execCallback("init_instance_callback", e),
  16565. function(t) {
  16566. t.settings.auto_focus && Pn.setEditorTimeout(t, function() {
  16567. var e;
  16568. (e = !0 === t.settings.auto_focus ? t : t.editorManager.get(t.settings.auto_focus)).destroyed || e.focus()
  16569. }, 100)
  16570. }(e)
  16571. }
  16572. function ez(e, t) {
  16573. var n = e.editorManager.translate("Rich Text Area. Press ALT-0 for help.")
  16574. , r = function(e, t, n, r) {
  16575. var o = it.fromTag("iframe");
  16576. return Ke(o, r),
  16577. Ke(o, {
  16578. id: e + "_ifr",
  16579. frameBorder: "0",
  16580. allowTransparency: "true",
  16581. title: t
  16582. }),
  16583. va(o, "tox-edit-area__iframe"),
  16584. o
  16585. }(e.id, n, t.height, Qc(e)).dom();
  16586. r.onload = function() {
  16587. r.onload = null,
  16588. e.fire("load")
  16589. }
  16590. ;
  16591. var o = function(e, t) {
  16592. if (j.document.domain !== j.window.location.hostname && Wn.browser.isIE()) {
  16593. var n = Gg("mce");
  16594. e[n] = function() {
  16595. Dz(e)
  16596. }
  16597. ;
  16598. var r = 'javascript:(function(){document.open();document.domain="' + j.document.domain + '";var ed = window.parent.tinymce.get("' + e.id + '");document.write(ed.iframeHTML);document.close();ed.' + n + "(true);})()";
  16599. return Oz.setAttrib(t, "src", r),
  16600. !0
  16601. }
  16602. return !1
  16603. }(e, r);
  16604. return e.contentAreaContainer = t.iframeContainer,
  16605. e.iframeElement = r,
  16606. e.iframeHTML = function(e) {
  16607. var t, n, r;
  16608. return r = es(e) + "<html><head>",
  16609. ts(e) !== e.documentBaseUrl && (r += '<base href="' + e.documentBaseURI.getURI() + '" />'),
  16610. r += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',
  16611. t = ns(e),
  16612. n = rs(e),
  16613. os(e) && (r += '<meta http-equiv="Content-Security-Policy" content="' + os(e) + '" />'),
  16614. r += '</head><body id="' + t + '" class="mce-content-body ' + n + '" data-id="' + e.id + '"><br></body></html>'
  16615. }(e),
  16616. Oz.add(t.iframeContainer, r),
  16617. o
  16618. }
  16619. function tz(e) {
  16620. return e.replace(/^\-/, "")
  16621. }
  16622. function nz(e) {
  16623. return {
  16624. editorContainer: e,
  16625. iframeContainer: e
  16626. }
  16627. }
  16628. function rz(e) {
  16629. var t = e.getElement();
  16630. return e.inline ? nz(null) : function(e) {
  16631. var t = Bz.create("div");
  16632. return Bz.insertAfter(t, e),
  16633. nz(t)
  16634. }(t)
  16635. }
  16636. function oz(e) {
  16637. return "-" === e.charAt(0)
  16638. }
  16639. function iz(t, n) {
  16640. (function(e) {
  16641. return R.from(gs(e)).filter(function(e) {
  16642. return 0 < e.length
  16643. }).map(function(e) {
  16644. return {
  16645. url: e,
  16646. name: R.none()
  16647. }
  16648. })
  16649. }
  16650. )(n).orThunk(function() {
  16651. return function(t) {
  16652. return R.from(ms(t)).filter(function(e) {
  16653. return 0 < e.length && !$d.has(e)
  16654. }).map(function(e) {
  16655. return {
  16656. url: t.editorManager.baseURL + "/icons/" + e + "/icons.js",
  16657. name: R.some(e)
  16658. }
  16659. })
  16660. }(n)
  16661. }).each(function(e) {
  16662. t.add(e.url, i, undefined, function() {
  16663. ch.iconsLoadError(n, e.url, e.name.getOrUndefined())
  16664. })
  16665. })
  16666. }
  16667. function az(e, t) {
  16668. var n = ra.ScriptLoader;
  16669. !function(e, t, n, r) {
  16670. var o = t.settings
  16671. , i = o.theme;
  16672. if (K(i)) {
  16673. if (!oz(i) && !eh.urls.hasOwnProperty(i)) {
  16674. var a = o.theme_url;
  16675. a ? eh.load(i, t.documentBaseURI.toAbsolute(a)) : eh.load(i, "themes/" + i + "/theme" + n + ".js")
  16676. }
  16677. e.loadQueue(function() {
  16678. eh.waitFor(i, r)
  16679. })
  16680. } else
  16681. r()
  16682. }(n, e, t, function() {
  16683. !function(e, t) {
  16684. var n = Ss(t)
  16685. , r = ks(t);
  16686. if (!1 === sa.hasCode(n) && "en" !== n) {
  16687. var o = "" !== r ? r : t.editorManager.baseURL + "/langs/" + n + ".js";
  16688. e.add(o, i, undefined, function() {
  16689. ch.languageLoadError(t, o, n)
  16690. })
  16691. }
  16692. }(n, e),
  16693. iz(n, e),
  16694. function(r, n, o) {
  16695. D(n.plugins) && (n.plugins = n.plugins.join(" ")),
  16696. Zn.each(n.external_plugins, function(e, t) {
  16697. Qd.load(t, e, i, undefined, function() {
  16698. ch.pluginLoadError(r, e, t)
  16699. }),
  16700. n.plugins += " " + t
  16701. }),
  16702. Zn.each(n.plugins.split(/[ ,]/), function(e) {
  16703. if ((e = Zn.trim(e)) && !Qd.urls[e])
  16704. if (oz(e)) {
  16705. e = e.substr(1, e.length);
  16706. var t = Qd.dependencies(e);
  16707. Zn.each(t, function(e) {
  16708. var t = {
  16709. prefix: "plugins/",
  16710. resource: e,
  16711. suffix: "/plugin" + o + ".js"
  16712. }
  16713. , n = Qd.createUrl(t, e);
  16714. Qd.load(n.resource, n, i, undefined, function() {
  16715. ch.pluginLoadError(r, n.prefix + n.resource + n.suffix, n.resource)
  16716. })
  16717. })
  16718. } else {
  16719. var n = {
  16720. prefix: "plugins/",
  16721. resource: e,
  16722. suffix: "/plugin" + o + ".js"
  16723. };
  16724. Qd.load(e, n, i, undefined, function() {
  16725. ch.pluginLoadError(r, n.prefix + n.resource + n.suffix, e)
  16726. })
  16727. }
  16728. })
  16729. }(e, e.settings, t),
  16730. n.loadQueue(function() {
  16731. e.removed || Lz(e)
  16732. }, e, function() {
  16733. e.removed || Lz(e)
  16734. })
  16735. })
  16736. }
  16737. function uz(e, t) {
  16738. return e.getBlockElements()[t.name] && function(e) {
  16739. return e.firstChild && e.firstChild === e.lastChild
  16740. }(t) && function(e) {
  16741. return "br" === e.name || e.value === qr
  16742. }(t.firstChild)
  16743. }
  16744. function cz(e) {
  16745. return Zn.grep(e.childNodes, function(e) {
  16746. return "LI" === e.nodeName
  16747. })
  16748. }
  16749. function sz(e) {
  16750. return e && e.firstChild && e.firstChild === e.lastChild && function(e) {
  16751. return e.data === qr || Qt.isBr(e)
  16752. }(e.firstChild)
  16753. }
  16754. function lz(e) {
  16755. return 0 < e.length && function(e) {
  16756. return !e.firstChild || sz(e)
  16757. }(e[e.length - 1]) ? e.slice(0, -1) : e
  16758. }
  16759. function fz(e, t) {
  16760. var n = e.getParent(t, e.isBlock);
  16761. return n && "LI" === n.nodeName ? n : null
  16762. }
  16763. function dz(e, t) {
  16764. var n = Vc.after(e)
  16765. , r = Xs(t).prev(n);
  16766. return r ? r.toRange() : null
  16767. }
  16768. function hz(t, e, n) {
  16769. var r = t.parentNode;
  16770. return Zn.each(e, function(e) {
  16771. r.insertBefore(e, t)
  16772. }),
  16773. function(e, t) {
  16774. var n = Vc.before(e)
  16775. , r = Xs(t).next(n);
  16776. return r ? r.toRange() : null
  16777. }(t, n)
  16778. }
  16779. function mz(e, t) {
  16780. var n = e.selection.getRng()
  16781. , r = n.startContainer
  16782. , o = n.startOffset;
  16783. n.collapsed && function(e, t) {
  16784. return Qt.isText(e) && e.nodeValue[t - 1] === qr
  16785. }(r, o) && Qt.isText(r) && (r.insertData(o - 1, " "),
  16786. r.deleteData(o, 1),
  16787. n.setStart(r, o),
  16788. n.setEnd(r, o),
  16789. e.selection.setRng(n)),
  16790. e.selection.setContent(t)
  16791. }
  16792. function gz(e, t, n) {
  16793. var r, o, i, a, u, c, s, l, f, d, h, m = e.selection, g = e.dom;
  16794. if (/^ | $/.test(t) && (t = function(e, t) {
  16795. var n, r;
  16796. n = e.startContainer,
  16797. r = e.startOffset;
  16798. function o(e) {
  16799. return n[e] && 3 === n[e].nodeType
  16800. }
  16801. return 3 === n.nodeType && (0 < r ? t = t.replace(/^&nbsp;/, " ") : o("previousSibling") || (t = t.replace(/^ /, "&nbsp;")),
  16802. r < n.length ? t = t.replace(/&nbsp;(<br>|)$/, " ") : o("nextSibling") || (t = t.replace(/(&nbsp;| )(<br>|)$/, "&nbsp;"))),
  16803. t
  16804. }(m.getRng(), t)),
  16805. r = e.parser,
  16806. h = n.merge,
  16807. o = wf({
  16808. validate: e.settings.validate
  16809. }, e.schema),
  16810. d = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',
  16811. c = {
  16812. content: t,
  16813. format: "html",
  16814. selection: !0,
  16815. paste: n.paste
  16816. },
  16817. (c = e.fire("BeforeSetContent", c)).isDefaultPrevented())
  16818. e.fire("SetContent", {
  16819. content: c.content,
  16820. format: "html",
  16821. selection: !0,
  16822. paste: n.paste
  16823. });
  16824. else {
  16825. -1 === (t = c.content).indexOf("{$caret}") && (t += "{$caret}"),
  16826. t = t.replace(/\{\$caret\}/, d);
  16827. var p = (l = m.getRng()).startContainer || (l.parentElement ? l.parentElement() : null)
  16828. , v = e.getBody();
  16829. p === v && m.isCollapsed() && g.isBlock(v.firstChild) && function(e, t) {
  16830. return t && !e.schema.getShortEndedElements()[t.nodeName]
  16831. }(e, v.firstChild) && g.isEmpty(v.firstChild) && ((l = g.createRng()).setStart(v.firstChild, 0),
  16832. l.setEnd(v.firstChild, 0),
  16833. m.setRng(l)),
  16834. m.isCollapsed() || (e.selection.setRng(Bp(e.selection.getRng())),
  16835. e.getDoc().execCommand("Delete", !1, null),
  16836. t = function(e, t) {
  16837. var n, r;
  16838. return n = e.startContainer,
  16839. r = e.startOffset,
  16840. 3 === n.nodeType && e.collapsed && (n.data[r] === qr ? (n.deleteData(r, 1),
  16841. /[\u00a0| ]$/.test(t) || (t += " ")) : n.data[r - 1] === qr && (n.deleteData(r - 1, 1),
  16842. /[\u00a0| ]$/.test(t) || (t = " " + t))),
  16843. t
  16844. }(e.selection.getRng(), t));
  16845. var y = {
  16846. context: (i = m.getNode()).nodeName.toLowerCase(),
  16847. data: n.data,
  16848. insert: !0
  16849. };
  16850. if (u = r.parse(t, y),
  16851. !0 === n.paste && Fz(e.schema, u) && jz(g, i))
  16852. return l = Uz(o, g, e.selection.getRng(), u),
  16853. e.selection.setRng(l),
  16854. void e.fire("SetContent", c);
  16855. if (function(e) {
  16856. for (var t = e; t = t.walk(); )
  16857. 1 === t.type && t.attr("data-mce-fragment", "1")
  16858. }(u),
  16859. "mce_marker" === (f = u.lastChild).attr("id"))
  16860. for (f = (s = f).prev; f; f = f.walk(!0))
  16861. if (3 === f.type || !g.isBlock(f.name)) {
  16862. e.schema.isValidChild(f.parent.name, "span") && f.parent.insert(s, f, "br" === f.name);
  16863. break
  16864. }
  16865. if (e._selectionOverrides.showBlockCaretContainer(i),
  16866. y.invalid) {
  16867. for (mz(e, d),
  16868. i = m.getNode(),
  16869. a = e.getBody(),
  16870. 9 === i.nodeType ? i = f = a : f = i; f !== a; )
  16871. f = (i = f).parentNode;
  16872. t = i === a ? a.innerHTML : g.getOuterHTML(i),
  16873. t = o.serialize(r.parse(t.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i, function() {
  16874. return o.serialize(u)
  16875. }))),
  16876. i === a ? g.setHTML(a, t) : g.setOuterHTML(i, t)
  16877. } else
  16878. !function(e, t, n) {
  16879. if ("all" === n.getAttribute("data-mce-bogus"))
  16880. n.parentNode.insertBefore(e.dom.createFragment(t), n);
  16881. else {
  16882. var r = n.firstChild
  16883. , o = n.lastChild;
  16884. !r || r === o && "BR" === r.nodeName ? e.dom.setHTML(n, t) : mz(e, t)
  16885. }
  16886. }(e, t = o.serialize(u), i);
  16887. !function(e, t) {
  16888. var n = e.schema.getTextInlineElements()
  16889. , r = e.dom;
  16890. if (t) {
  16891. var o = e.getBody()
  16892. , i = new dp(r);
  16893. Zn.each(r.select("*[data-mce-fragment]"), function(e) {
  16894. for (var t = e.parentNode; t && t !== o; t = t.parentNode)
  16895. n[e.nodeName.toLowerCase()] && i.compare(t, e) && r.remove(e, !0)
  16896. })
  16897. }
  16898. }(e, h),
  16899. function(n, e) {
  16900. var t, r, o, i, a, u = n.dom, c = n.selection;
  16901. if (e) {
  16902. if (n.selection.scrollIntoView(e),
  16903. t = function(e) {
  16904. for (var t = n.getBody(); e && e !== t; e = e.parentNode)
  16905. if ("false" === n.dom.getContentEditable(e))
  16906. return e;
  16907. return null
  16908. }(e))
  16909. return u.remove(e),
  16910. c.select(t);
  16911. var s = u.createRng();
  16912. (i = e.previousSibling) && 3 === i.nodeType ? (s.setStart(i, i.nodeValue.length),
  16913. Wn.ie || (a = e.nextSibling) && 3 === a.nodeType && (i.appendData(a.data),
  16914. a.parentNode.removeChild(a))) : (s.setStartBefore(e),
  16915. s.setEndBefore(e));
  16916. r = u.getParent(e, u.isBlock),
  16917. u.remove(e),
  16918. r && u.isEmpty(r) && (n.$(r).empty(),
  16919. s.setStart(r, 0),
  16920. s.setEnd(r, 0),
  16921. qz(r) || function(e) {
  16922. return !!e.getAttribute("data-mce-fragment")
  16923. }(r) || !(o = function(e) {
  16924. var t = Vc.fromRangeStart(e);
  16925. if (t = Xs(n.getBody()).next(t))
  16926. return t.toRange()
  16927. }(s)) ? u.add(r, u.create("br", {
  16928. "data-mce-bogus": "1"
  16929. })) : (s = o,
  16930. u.remove(r))),
  16931. c.setRng(s)
  16932. }
  16933. }(e, g.get("mce_marker")),
  16934. function(e) {
  16935. Zn.each(e.getElementsByTagName("*"), function(e) {
  16936. e.removeAttribute("data-mce-fragment")
  16937. })
  16938. }(e.getBody()),
  16939. function(e, t) {
  16940. R.from(e.getParent(t, "td,th")).map(it.fromDom).each(Qg)
  16941. }(e.dom, e.selection.getStart()),
  16942. e.fire("SetContent", c),
  16943. e.addVisual()
  16944. }
  16945. }
  16946. function pz(e, t) {
  16947. e.getDoc().execCommand(t, !1, null)
  16948. }
  16949. function vz(e, t, n) {
  16950. return t(e).orThunk(function() {
  16951. return n(e) ? R.none() : function(e, t, n) {
  16952. for (var r = e.dom(), o = B(n) ? n : $(!1); r.parentNode; ) {
  16953. r = r.parentNode;
  16954. var i = it.fromDom(r)
  16955. , a = t(i);
  16956. if (a.isSome())
  16957. return a;
  16958. if (o(i))
  16959. break
  16960. }
  16961. return R.none()
  16962. }(e, t, n)
  16963. })
  16964. }
  16965. function yz(e, t, n) {
  16966. function r(t) {
  16967. return Ze(t, e).orThunk(function() {
  16968. return "font" === Oe(t) ? A(Xz, e).bind(function(e) {
  16969. return function(e, t) {
  16970. return R.from(Xe(e, t))
  16971. }(t, e)
  16972. }) : R.none()
  16973. })
  16974. }
  16975. return vz(it.fromDom(n), function(e) {
  16976. return r(e)
  16977. }, function(e) {
  16978. return pe(it.fromDom(t), e)
  16979. })
  16980. }
  16981. function bz(n) {
  16982. return function(t, e) {
  16983. return R.from(e).map(it.fromDom).filter(Pt).bind(function(e) {
  16984. return yz(n, t, e.dom()).or(function(e, t) {
  16985. return R.from(Qi.DOM.getStyle(t, e, !0))
  16986. }(n, e.dom()))
  16987. }).getOr("")
  16988. }
  16989. }
  16990. function Cz(e) {
  16991. return Ul.firstPositionIn(e.getBody()).map(function(e) {
  16992. var t = e.container();
  16993. return Qt.isText(t) ? t.parentNode : t
  16994. })
  16995. }
  16996. function wz(t) {
  16997. return R.from(t.selection.getRng()).bind(function(e) {
  16998. return function(e, t) {
  16999. return e.startContainer === t && 0 === e.startOffset
  17000. }(e, t.getBody()) ? R.none() : R.from(t.selection.getStart(!0))
  17001. })
  17002. }
  17003. function xz(e, t) {
  17004. if (/^[0-9\.]+$/.test(t)) {
  17005. var n = parseInt(t, 10);
  17006. if (1 <= n && n <= 7) {
  17007. var r = ds(e)
  17008. , o = hs(e);
  17009. return o ? o[n - 1] || t : r[n - 1] || t
  17010. }
  17011. return t
  17012. }
  17013. return t
  17014. }
  17015. function zz(e, t) {
  17016. var n = xz(e, t);
  17017. e.formatter.toggle("fontname", {
  17018. value: function(e) {
  17019. var t = e.split(/\s*,\s*/);
  17020. return X(t, function(e) {
  17021. return -1 === e.indexOf(" ") || ue(e, '"') || ue(e, "'") ? e : "'" + e + "'"
  17022. }).join(",")
  17023. }(n)
  17024. }),
  17025. e.nodeChanged()
  17026. }
  17027. var Ez = function(e, t) {
  17028. return function(e, t, n) {
  17029. return {
  17030. pageX: n.left - e.left + t.left,
  17031. pageY: n.top - e.top + t.top
  17032. }
  17033. }(function(e) {
  17034. return e.inline ? $x(e.getBody()) : {
  17035. left: 0,
  17036. top: 0
  17037. }
  17038. }(e), function(e) {
  17039. var t = e.getBody();
  17040. return e.inline ? {
  17041. left: t.scrollLeft,
  17042. top: t.scrollTop
  17043. } : {
  17044. left: 0,
  17045. top: 0
  17046. }
  17047. }(e), function(e, t) {
  17048. if (t.target.ownerDocument === e.getDoc())
  17049. return {
  17050. left: t.pageX,
  17051. top: t.pageY
  17052. };
  17053. var n = $x(e.getContentAreaContainer())
  17054. , r = function(e) {
  17055. var t = e.getBody()
  17056. , n = e.getDoc().documentElement
  17057. , r = {
  17058. left: t.scrollLeft,
  17059. top: t.scrollTop
  17060. }
  17061. , o = {
  17062. left: t.scrollLeft || n.scrollLeft,
  17063. top: t.scrollTop || n.scrollTop
  17064. };
  17065. return e.inline ? r : o
  17066. }(e);
  17067. return {
  17068. left: t.pageX - n.left + r.left,
  17069. top: t.pageY - n.top + r.top
  17070. }
  17071. }(e, t))
  17072. }
  17073. , Nz = Qt.isContentEditableFalse
  17074. , Sz = Qt.isContentEditableTrue
  17075. , kz = function(e) {
  17076. e.dragging = !1,
  17077. e.element = null,
  17078. Wx(e.ghost)
  17079. }
  17080. , Tz = function(e) {
  17081. Yx(e),
  17082. function(n) {
  17083. n.on("drop", function(e) {
  17084. var t = "undefined" != typeof e.clientX ? n.getDoc().elementFromPoint(e.clientX, e.clientY) : null;
  17085. (Nz(t) || Nz(n.dom.getContentEditableParent(t))) && e.preventDefault()
  17086. })
  17087. }(e)
  17088. }
  17089. , Az = function(t) {
  17090. var e = fa(function() {
  17091. if (!t.removed && t.getBody().contains(j.document.activeElement) && t.selection.getRng().collapsed) {
  17092. var e = _y(t, t.selection.getRng(), !1);
  17093. t.selection.setRng(e)
  17094. }
  17095. }, 0);
  17096. t.on("focus", function() {
  17097. e.throttle()
  17098. }),
  17099. t.on("blur", function() {
  17100. e.cancel()
  17101. })
  17102. }
  17103. , Mz = Qt.isContentEditableTrue
  17104. , Rz = Qt.isContentEditableFalse
  17105. , _z = Qi.DOM
  17106. , Dz = function(t, e) {
  17107. var n, r, o = t.settings, i = t.getElement(), a = t.getDoc();
  17108. o.inline || (t.getElement().style.visibility = t.orgVisibility),
  17109. e || t.inline || (a.open(),
  17110. a.write(t.iframeHTML),
  17111. a.close()),
  17112. t.inline && (t.on("remove", function() {
  17113. var e = this.getBody();
  17114. _z.removeClass(e, "mce-content-body"),
  17115. _z.removeClass(e, "mce-edit-focus"),
  17116. _z.setAttrib(e, "contentEditable", null)
  17117. }),
  17118. _z.addClass(i, "mce-content-body"),
  17119. t.contentDocument = a = j.document,
  17120. t.contentWindow = j.window,
  17121. t.bodyElement = i,
  17122. t.contentAreaContainer = i,
  17123. o.root_name = i.nodeName.toLowerCase()),
  17124. (n = t.getBody()).disabled = !0,
  17125. t.readonly = o.readonly,
  17126. t.readonly || (t.inline && "static" === _z.getStyle(n, "position", !0) && (n.style.position = "relative"),
  17127. n.contentEditable = t.getParam("content_editable_state", !0)),
  17128. n.disabled = !1,
  17129. t.editorUpload = hg(t),
  17130. t.schema = Pr(o),
  17131. t.dom = Qi(a, {
  17132. keep_values: !0,
  17133. url_converter: t.convertURL,
  17134. url_converter_scope: t,
  17135. hex_colors: o.force_hex_style_colors,
  17136. update_styles: !0,
  17137. root_element: t.inline ? t.getBody() : null,
  17138. collect: function() {
  17139. return t.inline
  17140. },
  17141. schema: t.schema,
  17142. contentCssCors: Es(t),
  17143. referrerPolicy: Ns(t),
  17144. onSetAttrib: function(e) {
  17145. t.fire("SetAttrib", e)
  17146. }
  17147. }),
  17148. t.parser = function(u) {
  17149. var e = $m(u.settings, u.schema);
  17150. return e.addAttributeFilter("src,href,style,tabindex", function(e, t) {
  17151. for (var n, r, o, i = e.length, a = u.dom; i--; )
  17152. if (r = (n = e[i]).attr(t),
  17153. o = "data-mce-" + t,
  17154. !n.attr(o)) {
  17155. if (0 === r.indexOf("data:") || 0 === r.indexOf("blob:"))
  17156. continue;
  17157. "style" === t ? ((r = a.serializeStyle(a.parseStyle(r), n.name)).length || (r = null),
  17158. n.attr(o, r),
  17159. n.attr(t, r)) : "tabindex" === t ? (n.attr(o, r),
  17160. n.attr(t, null)) : n.attr(o, u.convertURL(r, t, n.name))
  17161. }
  17162. }),
  17163. e.addNodeFilter("script", function(e) {
  17164. for (var t, n, r = e.length; r--; )
  17165. 0 !== (n = (t = e[r]).attr("type") || "no/type").indexOf("mce-") && t.attr("type", "mce-" + n)
  17166. }),
  17167. u.settings.preserve_cdata && e.addNodeFilter("#cdata", function(e) {
  17168. for (var t, n = e.length; n--; )
  17169. (t = e[n]).type = 8,
  17170. t.name = "#comment",
  17171. t.value = "[CDATA[" + u.dom.encode(t.value) + "]]"
  17172. }),
  17173. e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div", function(e) {
  17174. for (var t, n = e.length, r = u.schema.getNonEmptyElements(); n--; )
  17175. (t = e[n]).isEmpty(r) && 0 === t.getAll("br").length && (t.append(new hf("br",1)).shortEnded = !0)
  17176. }),
  17177. e
  17178. }(t),
  17179. t.serializer = Ym(o, t),
  17180. t.selection = Im(t.dom, t.getWin(), t.serializer, t),
  17181. t.annotator = uf(t),
  17182. t.formatter = Wp(t),
  17183. t.undoManager = nv(t),
  17184. t._nodeChangeDispatcher = new Ix(t),
  17185. t._selectionOverrides = Zx(t),
  17186. ry(t),
  17187. Ux(t),
  17188. qx(t),
  17189. Vx(t),
  17190. oy(t),
  17191. iv(t),
  17192. function(e) {
  17193. e.fire("PreInit")
  17194. }(t),
  17195. o.browser_spellcheck || o.gecko_spellcheck || (a.body.spellcheck = !1,
  17196. _z.setAttrib(n, "spellcheck", "false")),
  17197. t.quirks = Jx(t),
  17198. function(e) {
  17199. e.fire("PostRender")
  17200. }(t);
  17201. var u = Rs(t);
  17202. u !== undefined && (n.dir = u),
  17203. o.protect && t.on("BeforeSetContent", function(t) {
  17204. Zn.each(o.protect, function(e) {
  17205. t.content = t.content.replace(e, function(e) {
  17206. return "\x3c!--mce:protected " + escape(e) + "--\x3e"
  17207. })
  17208. })
  17209. }),
  17210. t.on("SetContent", function() {
  17211. t.addVisual(t.getBody())
  17212. }),
  17213. t.load({
  17214. initial: !0,
  17215. format: "html"
  17216. }),
  17217. t.startContent = t.getContent({
  17218. format: "raw"
  17219. }),
  17220. t.on("compositionstart compositionend", function(e) {
  17221. t.composing = "compositionstart" === e.type
  17222. }),
  17223. 0 < t.contentStyles.length && (r = "",
  17224. Zn.each(t.contentStyles, function(e) {
  17225. r += e + "\r\n"
  17226. }),
  17227. t.dom.addStyle(r)),
  17228. function(e) {
  17229. return e.inline ? _z.styleSheetLoader : e.dom.styleSheetLoader
  17230. }(t).loadAll(t.contentCSS, function(e) {
  17231. Qx(t)
  17232. }, function(e) {
  17233. Qx(t)
  17234. }),
  17235. o.content_style && function(e, t) {
  17236. var n = it.fromDom(e.getDoc().head)
  17237. , r = it.fromTag("style");
  17238. en(r, "type", "text/css"),
  17239. Ht(r, it.fromText(t)),
  17240. Ht(n, r)
  17241. }(t, o.content_style)
  17242. }
  17243. , Oz = Qi.DOM
  17244. , Hz = function(e, t) {
  17245. var n = ez(e, t);
  17246. t.editorContainer && (Oz.get(t.editorContainer).style.display = e.orgDisplay,
  17247. e.hidden = Oz.isHidden(t.editorContainer)),
  17248. e.getElement().style.display = "none",
  17249. Oz.setAttrib(e.id, "aria-hidden", "true"),
  17250. n || Dz(e)
  17251. }
  17252. , Bz = Qi.DOM
  17253. , Pz = function(t, n, e) {
  17254. var r = Qd.get(e)
  17255. , o = Qd.urls[e] || t.documentBaseUrl.replace(/\/$/, "");
  17256. if (e = Zn.trim(e),
  17257. r && -1 === Zn.inArray(n, e)) {
  17258. if (Zn.each(Qd.dependencies(e), function(e) {
  17259. Pz(t, n, e)
  17260. }),
  17261. t.plugins[e])
  17262. return;
  17263. try {
  17264. var i = new r(t,o,t.$);
  17265. (t.plugins[e] = i).init && (i.init(t, o),
  17266. n.push(e))
  17267. } catch (HN) {
  17268. ch.pluginInitError(t, e, HN)
  17269. }
  17270. }
  17271. }
  17272. , Lz = function(e) {
  17273. e.fire("ScriptsLoaded"),
  17274. function(n) {
  17275. var e = Zn.trim(n.settings.icons)
  17276. , r = n.ui.registry.getAll().icons
  17277. , t = te(te({}, {
  17278. "accessibility-check": '<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',
  17279. "action-next": '<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',
  17280. "action-prev": '<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3z"/></svg>',
  17281. "align-center": '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',
  17282. "align-justify": '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',
  17283. "align-left": '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',
  17284. "align-none": '<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 1 1 0-2h9.2zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h6.8zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 0 1 0-2h4.4zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 0 1 0-2h2zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',
  17285. "align-right": '<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',
  17286. "arrow-left": '<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8z" fill-rule="evenodd"/></svg>',
  17287. "arrow-right": '<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8z" fill-rule="evenodd"/></svg>',
  17288. bold: '<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 0 1-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',
  17289. bookmark: '<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1z" fill-rule="nonzero"/></svg>',
  17290. "border-width": '<svg width="24" height="24"><path d="M5 14.8h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm-.5 3.7h15c.3 0 .5.2.5.5s-.2.5-.5.5h-15a.5.5 0 1 1 0-1zm.5-8.3h14c.6 0 1 .4 1 1v1c0 .5-.4 1-1 1H5a1 1 0 0 1-1-1v-1c0-.6.4-1 1-1zm0-5.7h14c.6 0 1 .4 1 1v2c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-2c0-.6.4-1 1-1z" fill-rule="evenodd"/></svg>',
  17291. brightness: '<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0zm-10-7l-.7-.8a1 1 0 0 1-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.8-.3zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',
  17292. browse: '<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6z" fill-rule="nonzero"/></svg>',
  17293. cancel: '<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8zM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',
  17294. "change-case": '<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 1 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',
  17295. "character-count": '<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',
  17296. "checklist-rtl": '<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',
  17297. checklist: '<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',
  17298. checkmark: '<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',
  17299. "chevron-down": '<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',
  17300. "chevron-left": '<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',
  17301. "chevron-right": '<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 0 1 0-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 0 1 0-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',
  17302. "chevron-up": '<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',
  17303. close: '<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5z" fill-rule="evenodd"/></svg>',
  17304. "code-sample": '<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 0 1-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',
  17305. "color-levels": '<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5z" fill-rule="evenodd"/></svg>',
  17306. "color-picker": '<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z" fill-rule="nonzero"/></svg>',
  17307. "color-swatch-remove-color": '<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',
  17308. "color-swatch": '<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',
  17309. "comment-add": '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2z"/></g></svg>',
  17310. comment: '<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/></svg>',
  17311. contrast: '<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6z" fill-rule="evenodd"/></svg>',
  17312. copy: '<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',
  17313. crop: '<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',
  17314. cut: '<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 0 1-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',
  17315. "document-properties": '<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',
  17316. drag: '<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',
  17317. duplicate: '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1z"/></g></svg>',
  17318. "edit-block": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',
  17319. "edit-image": '<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9zM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',
  17320. "embed-page": '<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2z" fill-rule="nonzero"/></svg>',
  17321. embed: '<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4z" fill-rule="nonzero"/></svg>',
  17322. emoji: '<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13z" fill-rule="nonzero"/></svg>',
  17323. fill: '<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',
  17324. "flip-horizontally": '<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 0 0-2 2zm14-2v2h2a2 2 0 0 0-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 0 0 2-2h-2v2z" fill-rule="nonzero"/></svg>',
  17325. "flip-vertically": '<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2zm2 14h-2v2a2 2 0 0 0 2-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',
  17326. "format-painter": '<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',
  17327. format: '<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10z"/></svg>',
  17328. fullscreen: '<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',
  17329. gallery: '<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1z"/></svg>',
  17330. gamma: '<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0z" fill-rule="nonzero"/></svg>',
  17331. help: '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1zM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',
  17332. "highlight-bg-color": '<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',
  17333. home: '<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',
  17334. "horizontal-rule": '<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',
  17335. "image-options": '<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',
  17336. image: '<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" fill-rule="nonzero"/></svg>',
  17337. indent: '<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',
  17338. info: '<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',
  17339. "insert-character": '<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',
  17340. "insert-time": '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',
  17341. invert: '<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',
  17342. italic: '<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',
  17343. line: '<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',
  17344. link: '<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2.1 2a2 2 0 1 0 2.7 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',
  17345. "list-bull-circle": '<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
  17346. "list-bull-default": '<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
  17347. "list-bull-square": '<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
  17348. "list-num-default-rtl": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',
  17349. "list-num-default": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',
  17350. "list-num-lower-alpha-rtl": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
  17351. "list-num-lower-alpha": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
  17352. "list-num-lower-greek-rtl": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
  17353. "list-num-lower-greek": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
  17354. "list-num-lower-roman-rtl": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',
  17355. "list-num-lower-roman": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',
  17356. "list-num-upper-alpha-rtl": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
  17357. "list-num-upper-alpha": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
  17358. "list-num-upper-roman-rtl": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',
  17359. "list-num-upper-roman": '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',
  17360. lock: '<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7z" fill-rule="evenodd"/></svg>',
  17361. ltr: '<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',
  17362. "more-drawer": '<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2z" fill-rule="nonzero"/></svg>',
  17363. "new-document": '<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',
  17364. "new-tab": '<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',
  17365. "non-breaking": '<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',
  17366. notice: '<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',
  17367. "ordered-list-rtl": '<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19zm-1 8.8l.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',
  17368. "ordered-list": '<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',
  17369. orientation: '<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1z" fill-rule="nonzero"/></svg>',
  17370. outdent: '<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',
  17371. "page-break": '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',
  17372. paragraph: '<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5z"/></svg>',
  17373. "paste-text": '<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',
  17374. paste: '<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',
  17375. "permanent-pen": '<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',
  17376. plus: '<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',
  17377. preferences: '<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" fill-rule="evenodd"/></svg>',
  17378. preview: '<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 0 1-2.8-3.7 1 1 0 0 1 0-1zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6z" fill-rule="nonzero"/></svg>',
  17379. print: '<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',
  17380. quote: '<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3z" fill-rule="nonzero"/></svg>',
  17381. redo: '<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 1 1-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',
  17382. reload: '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1z"/></g></svg>',
  17383. "remove-formatting": '<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8zM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1z" fill-rule="evenodd"/></svg>',
  17384. remove: '<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4z" fill-rule="nonzero"/></svg>',
  17385. "resize-handle": '<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7zM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3z"/></g></svg>',
  17386. resize: '<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5z" fill-rule="evenodd"/></svg>',
  17387. "restore-draft": '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></g></svg>',
  17388. "rotate-left": '<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10z" fill-rule="nonzero"/></svg>',
  17389. "rotate-right": '<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',
  17390. rtl: '<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',
  17391. save: '<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6z" fill-rule="nonzero"/></svg>',
  17392. search: '<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12z" fill-rule="nonzero"/></svg>',
  17393. "select-all": '<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 0 0-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 0 0 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',
  17394. selected: '<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3z"/></svg>',
  17395. settings: '<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V8H5a1 1 0 1 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V13H5a1 1 0 0 1 0-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',
  17396. sharpen: '<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',
  17397. "sort-asc": '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 8h5a1 1 0 1 1 0 2H4a1 1 0 1 1 0-2zm0 8h8a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0-4h7a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"/><path fill-rule="nonzero" d="M16 8.4l-2.3 2.3a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L18 8.4V18a1 1 0 0 1-2 0V8.4z"/></g></svg>',
  17398. "sort-dsc": '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M4 16h5a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2zm0-8h8a1 1 0 0 0 0-2H4a1 1 0 1 0 0 2zm0 4h7a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2z"/><path fill-rule="nonzero" d="M16 15.6l-2.3-2.3a1 1 0 0 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 0 0-1.4-1.4L18 15.6V6a1 1 0 0 0-2 0v9.6z"/></g></svg>',
  17399. sourcecode: '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 0 1 0-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',
  17400. "spell-check": '<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',
  17401. "strike-through": '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 0 1 7 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2z" fill-rule="nonzero"/></g></svg>',
  17402. subscript: '<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 0 0-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 0 1-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',
  17403. superscript: '<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',
  17404. "table-cell-properties": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',
  17405. "table-cell-select-all": '<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',
  17406. "table-cell-select-inner": '<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',
  17407. "table-delete-column": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',
  17408. "table-delete-row": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',
  17409. "table-delete-table": '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',
  17410. "table-insert-column-after": '<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',
  17411. "table-insert-column-before": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',
  17412. "table-insert-row-above": '<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-2h2V4c0-.6.4-1 1-1z"/></svg>',
  17413. "table-insert-row-after": '<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',
  17414. "table-left-header": '<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',
  17415. "table-merge-cells": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',
  17416. "table-row-properties": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',
  17417. "table-split-cells": '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',
  17418. "table-top-header": '<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',
  17419. table: '<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',
  17420. template: '<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',
  17421. "temporary-placeholder": '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',
  17422. "text-color": '<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',
  17423. toc: '<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',
  17424. translate: '<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 1 1 2 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',
  17425. underline: '<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2z" fill-rule="evenodd"/></svg>',
  17426. undo: '<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 0 1-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',
  17427. unlink: '<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2zM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1zM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 1.5H19z" fill-rule="nonzero"/></svg>',
  17428. unlock: '<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',
  17429. "unordered-list": '<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',
  17430. unselected: '<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',
  17431. upload: '<svg width="24" height="24"><path d="M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12zM11 6.4L8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4z" fill-rule="nonzero"/></svg>',
  17432. user: '<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24zm-8.7-5.3a11 11 0 0 0 17.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',
  17433. visualblocks: '<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 0 1-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 0 1-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 0 1 2 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',
  17434. visualchars: '<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5z" fill-rule="evenodd"/></svg>',
  17435. warning: '<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',
  17436. "zoom-in": '<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>',
  17437. "zoom-out": '<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8z" fill-rule="nonzero"/></svg>'
  17438. }), $d.get(e).icons);
  17439. N(t, function(e, t) {
  17440. ee(r, t) || n.ui.registry.addIcon(t, e)
  17441. })
  17442. }(e),
  17443. function(e) {
  17444. var t = e.settings.theme;
  17445. if (K(t)) {
  17446. e.settings.theme = tz(t);
  17447. var n = eh.get(t);
  17448. e.theme = new n(e,eh.urls[t]),
  17449. e.theme.init && e.theme.init(e, eh.urls[t] || e.documentBaseUrl.replace(/\/$/, ""), e.$)
  17450. } else
  17451. e.theme = {}
  17452. }(e),
  17453. function(t) {
  17454. var n = [];
  17455. Zn.each(t.settings.plugins.split(/[ ,]/), function(e) {
  17456. Pz(t, n, tz(e))
  17457. })
  17458. }(e);
  17459. var t = function(e) {
  17460. var t = e.getElement();
  17461. return e.orgDisplay = t.style.display,
  17462. K(e.settings.theme) ? function(e) {
  17463. return e.theme.renderUI()
  17464. }(e) : B(e.settings.theme) ? function(e) {
  17465. var t = e.getElement()
  17466. , n = (0,
  17467. e.settings.theme)(e, t);
  17468. return n.editorContainer.nodeType && (n.editorContainer.id = n.editorContainer.id || e.id + "_parent"),
  17469. n.iframeContainer && n.iframeContainer.nodeType && (n.iframeContainer.id = n.iframeContainer.id || e.id + "_iframecontainer"),
  17470. n.height = n.iframeHeight ? n.iframeHeight : t.offsetHeight,
  17471. n
  17472. }(e) : rz(e)
  17473. }(e);
  17474. return e.editorContainer = t.editorContainer ? t.editorContainer : null,
  17475. ah(e),
  17476. e.inline ? Dz(e) : Hz(e, t)
  17477. }
  17478. , Vz = Qi.DOM
  17479. , Iz = function(t) {
  17480. var e = t.settings
  17481. , n = t.id;
  17482. sa.setCode(Ss(t));
  17483. var r = function() {
  17484. Vz.unbind(j.window, "ready", r),
  17485. t.render()
  17486. };
  17487. if (Gr.Event.domLoaded) {
  17488. if (t.getElement() && Wn.contentEditable) {
  17489. e.inline ? t.inline = !0 : (t.orgVisibility = t.getElement().style.visibility,
  17490. t.getElement().style.visibility = "hidden");
  17491. var o = t.getElement().form || Vz.getParent(n, "form");
  17492. o && (t.formElement = o,
  17493. e.hidden_input && !Qt.isTextareaOrInput(t.getElement()) && (Vz.insertAfter(Vz.create("input", {
  17494. type: "hidden",
  17495. name: n
  17496. }), n),
  17497. t.hasHiddenInput = !0),
  17498. t.formEventDelegate = function(e) {
  17499. t.fire(e.type, e)
  17500. }
  17501. ,
  17502. Vz.bind(o, "submit reset", t.formEventDelegate),
  17503. t.on("reset", function() {
  17504. t.resetContent()
  17505. }),
  17506. !e.submit_patch || o.submit.nodeType || o.submit.length || o._mceOldSubmit || (o._mceOldSubmit = o.submit,
  17507. o.submit = function() {
  17508. return t.editorManager.triggerSave(),
  17509. t.setDirty(!1),
  17510. o._mceOldSubmit(o)
  17511. }
  17512. )),
  17513. t.windowManager = th(t),
  17514. t.notificationManager = Jd(t),
  17515. "xml" === e.encoding && t.on("GetContent", function(e) {
  17516. e.save && (e.content = Vz.encode(e.content))
  17517. }),
  17518. e.add_form_submit_trigger && t.on("submit", function() {
  17519. t.initialized && t.save()
  17520. }),
  17521. e.add_unload_trigger && (t._beforeUnload = function() {
  17522. !t.initialized || t.destroyed || t.isHidden() || t.save({
  17523. format: "raw",
  17524. no_events: !0,
  17525. set_dirty: !1
  17526. })
  17527. }
  17528. ,
  17529. t.editorManager.on("BeforeUnload", t._beforeUnload)),
  17530. t.editorManager.add(t),
  17531. az(t, t.suffix)
  17532. }
  17533. } else
  17534. Vz.bind(j.window, "ready", r)
  17535. }
  17536. , Fz = function(e, t) {
  17537. var n = t.firstChild
  17538. , r = t.lastChild;
  17539. return n && "meta" === n.name && (n = n.next),
  17540. r && "mce_marker" === r.attr("id") && (r = r.prev),
  17541. function(e, t) {
  17542. var n = e.getNonEmptyElements();
  17543. return t && (t.isEmpty(n) || uz(e, t))
  17544. }(e, r) && (r = r.prev),
  17545. !(!n || n !== r) && ("ul" === n.name || "ol" === n.name)
  17546. }
  17547. , Uz = function(e, o, i, t) {
  17548. function n(e) {
  17549. var t = Vc.fromRangeStart(i)
  17550. , n = Xs(o.getRoot())
  17551. , r = 1 === e ? n.prev(t) : n.next(t);
  17552. return !r || fz(o, r.getNode()) !== a
  17553. }
  17554. var r = function(e, t, n) {
  17555. var r = t.serialize(n);
  17556. return function(e) {
  17557. var t = e.firstChild
  17558. , n = e.lastChild;
  17559. return t && "META" === t.nodeName && t.parentNode.removeChild(t),
  17560. n && "mce_marker" === n.id && n.parentNode.removeChild(n),
  17561. e
  17562. }(e.createFragment(r))
  17563. }(o, e, t)
  17564. , a = fz(o, i.startContainer)
  17565. , u = lz(cz(r.firstChild))
  17566. , c = o.getRoot();
  17567. return n(1) ? hz(a, u, c) : n(2) ? function(e, t, n, r) {
  17568. return r.insertAfter(t.reverse(), e),
  17569. dz(t[0], n)
  17570. }(a, u, c, o) : function(t, e, n, r) {
  17571. var o = function(e, t) {
  17572. var n = t.cloneRange()
  17573. , r = t.cloneRange();
  17574. return n.setStartBefore(e),
  17575. r.setEndAfter(e),
  17576. [n.cloneContents(), r.cloneContents()]
  17577. }(t, r)
  17578. , i = t.parentNode;
  17579. return i.insertBefore(o[0], t),
  17580. Zn.each(e, function(e) {
  17581. i.insertBefore(e, t)
  17582. }),
  17583. i.insertBefore(o[1], t),
  17584. i.removeChild(t),
  17585. dz(e[e.length - 1], n)
  17586. }(a, u, c, i)
  17587. }
  17588. , jz = function(e, t) {
  17589. return !!fz(e, t)
  17590. }
  17591. , qz = Qt.matchNodeNames(["td", "th"])
  17592. , $z = function(e, t) {
  17593. var n = function(e) {
  17594. var t;
  17595. return "string" != typeof e ? (t = Zn.extend({
  17596. paste: e.paste,
  17597. data: {
  17598. paste: e.paste
  17599. }
  17600. }, e),
  17601. {
  17602. content: e.content,
  17603. details: t
  17604. }) : {
  17605. content: e,
  17606. details: {}
  17607. }
  17608. }(t);
  17609. gz(e, n.content, n.details)
  17610. }
  17611. , Wz = function(e) {
  17612. px(e, !1) || ex(e, !1) || nx(e, !1) || rx(e, !1) || Xw(e, !1) || sx(e) || Yw(e, !1) || ox(e, !1) || (pz(e, "Delete"),
  17613. qw(e))
  17614. }
  17615. , Kz = function(e) {
  17616. ex(e, !0) || nx(e, !0) || rx(e, !0) || Xw(e, !0) || sx(e) || Yw(e, !0) || ox(e, !0) || pz(e, "ForwardDelete")
  17617. }
  17618. , Xz = {
  17619. "font-size": "size",
  17620. "font-family": "face"
  17621. }
  17622. , Yz = {
  17623. getFontSize: bz("font-size"),
  17624. getFontFamily: q(function(e) {
  17625. return e.replace(/[\'\"\\]/g, "").replace(/,\s+/g, ",")
  17626. }, bz("font-family")),
  17627. toPt: function(e, t) {
  17628. return /[0-9.]+px$/.test(e) ? function(e, t) {
  17629. var n = Math.pow(10, t);
  17630. return Math.round(e * n) / n
  17631. }(72 * parseInt(e, 10) / 96, t || 0) + "pt" : e
  17632. }
  17633. }
  17634. , Gz = Zn.each
  17635. , Zz = Zn.map
  17636. , Jz = Zn.inArray
  17637. , Qz = (eE.prototype.execCommand = function(t, n, r, e) {
  17638. var o, i, a = !1, u = this;
  17639. if (!u.editor.removed) {
  17640. if (/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t) || e && e.skip_focus ? zd(u.editor) : u.editor.focus(),
  17641. (e = u.editor.fire("BeforeExecCommand", {
  17642. command: t,
  17643. ui: n,
  17644. value: r
  17645. })).isDefaultPrevented())
  17646. return !1;
  17647. if (i = t.toLowerCase(),
  17648. o = u.commands.exec[i])
  17649. return o(i, n, r),
  17650. u.editor.fire("ExecCommand", {
  17651. command: t,
  17652. ui: n,
  17653. value: r
  17654. }),
  17655. !0;
  17656. if (Gz(this.editor.plugins, function(e) {
  17657. if (e.execCommand && e.execCommand(t, n, r))
  17658. return u.editor.fire("ExecCommand", {
  17659. command: t,
  17660. ui: n,
  17661. value: r
  17662. }),
  17663. !(a = !0)
  17664. }),
  17665. a)
  17666. return a;
  17667. if (u.editor.theme && u.editor.theme.execCommand && u.editor.theme.execCommand(t, n, r))
  17668. return u.editor.fire("ExecCommand", {
  17669. command: t,
  17670. ui: n,
  17671. value: r
  17672. }),
  17673. !0;
  17674. try {
  17675. a = u.editor.getDoc().execCommand(t, n, r)
  17676. } catch (c) {}
  17677. return !!a && (u.editor.fire("ExecCommand", {
  17678. command: t,
  17679. ui: n,
  17680. value: r
  17681. }),
  17682. !0)
  17683. }
  17684. }
  17685. ,
  17686. eE.prototype.queryCommandState = function(e) {
  17687. var t;
  17688. if (!this.editor.quirks.isHidden() && !this.editor.removed) {
  17689. if (e = e.toLowerCase(),
  17690. t = this.commands.state[e])
  17691. return t(e);
  17692. try {
  17693. return this.editor.getDoc().queryCommandState(e)
  17694. } catch (n) {}
  17695. return !1
  17696. }
  17697. }
  17698. ,
  17699. eE.prototype.queryCommandValue = function(e) {
  17700. var t;
  17701. if (!this.editor.quirks.isHidden() && !this.editor.removed) {
  17702. if (e = e.toLowerCase(),
  17703. t = this.commands.value[e])
  17704. return t(e);
  17705. try {
  17706. return this.editor.getDoc().queryCommandValue(e)
  17707. } catch (n) {}
  17708. }
  17709. }
  17710. ,
  17711. eE.prototype.addCommands = function(e, n) {
  17712. var r = this;
  17713. n = n || "exec",
  17714. Gz(e, function(t, e) {
  17715. Gz(e.toLowerCase().split(","), function(e) {
  17716. r.commands[n][e] = t
  17717. })
  17718. })
  17719. }
  17720. ,
  17721. eE.prototype.addCommand = function(e, o, i) {
  17722. var a = this;
  17723. e = e.toLowerCase(),
  17724. this.commands.exec[e] = function(e, t, n, r) {
  17725. return o.call(i || a.editor, t, n, r)
  17726. }
  17727. }
  17728. ,
  17729. eE.prototype.queryCommandSupported = function(e) {
  17730. if (e = e.toLowerCase(),
  17731. this.commands.exec[e])
  17732. return !0;
  17733. try {
  17734. return this.editor.getDoc().queryCommandSupported(e)
  17735. } catch (t) {}
  17736. return !1
  17737. }
  17738. ,
  17739. eE.prototype.addQueryStateHandler = function(e, t, n) {
  17740. var r = this;
  17741. e = e.toLowerCase(),
  17742. this.commands.state[e] = function() {
  17743. return t.call(n || r.editor)
  17744. }
  17745. }
  17746. ,
  17747. eE.prototype.addQueryValueHandler = function(e, t, n) {
  17748. var r = this;
  17749. e = e.toLowerCase(),
  17750. this.commands.value[e] = function() {
  17751. return t.call(n || r.editor)
  17752. }
  17753. }
  17754. ,
  17755. eE.prototype.hasCustomCommand = function(e) {
  17756. return e = e.toLowerCase(),
  17757. !!this.commands.exec[e]
  17758. }
  17759. ,
  17760. eE.prototype.execNativeCommand = function(e, t, n) {
  17761. return t === undefined && (t = !1),
  17762. n === undefined && (n = null),
  17763. this.editor.getDoc().execCommand(e, t, n)
  17764. }
  17765. ,
  17766. eE.prototype.isFormatMatch = function(e) {
  17767. return this.editor.formatter.match(e)
  17768. }
  17769. ,
  17770. eE.prototype.toggleFormat = function(e, t) {
  17771. this.editor.formatter.toggle(e, t ? {
  17772. value: t
  17773. } : undefined),
  17774. this.editor.nodeChanged()
  17775. }
  17776. ,
  17777. eE.prototype.storeSelection = function(e) {
  17778. this.selectionBookmark = this.editor.selection.getBookmark(e)
  17779. }
  17780. ,
  17781. eE.prototype.restoreSelection = function() {
  17782. this.editor.selection.moveToBookmark(this.selectionBookmark)
  17783. }
  17784. ,
  17785. eE.prototype.setupCommands = function(i) {
  17786. var a = this;
  17787. function e(n) {
  17788. return function() {
  17789. var e = i.selection.isCollapsed() ? [i.dom.getParent(i.selection.getNode(), i.dom.isBlock)] : i.selection.getSelectedBlocks()
  17790. , t = Zz(e, function(e) {
  17791. return !!i.formatter.matchNode(e, n)
  17792. });
  17793. return -1 !== Jz(t, !0)
  17794. }
  17795. }
  17796. this.addCommands({
  17797. "mceResetDesignMode,mceBeginUndoLevel": function() {},
  17798. "mceEndUndoLevel,mceAddUndoLevel": function() {
  17799. i.undoManager.add()
  17800. },
  17801. "Cut,Copy,Paste": function(e) {
  17802. var t, n = i.getDoc();
  17803. try {
  17804. a.execNativeCommand(e)
  17805. } catch (o) {
  17806. t = !0
  17807. }
  17808. if ("paste" !== e || n.queryCommandEnabled(e) || (t = !0),
  17809. t || !n.queryCommandSupported(e)) {
  17810. var r = i.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");
  17811. Wn.mac && (r = r.replace(/Ctrl\+/g, "\u2318+")),
  17812. i.notificationManager.open({
  17813. text: r,
  17814. type: "error"
  17815. })
  17816. }
  17817. },
  17818. unlink: function() {
  17819. if (i.selection.isCollapsed()) {
  17820. var e = i.dom.getParent(i.selection.getStart(), "a");
  17821. e && i.dom.remove(e, !0)
  17822. } else
  17823. i.formatter.remove("link")
  17824. },
  17825. "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone": function(e) {
  17826. var t = e.substring(7);
  17827. "full" === t && (t = "justify"),
  17828. Gz("left,center,right,justify".split(","), function(e) {
  17829. t !== e && i.formatter.remove("align" + e)
  17830. }),
  17831. "none" !== t && a.toggleFormat("align" + t)
  17832. },
  17833. "InsertUnorderedList,InsertOrderedList": function(e) {
  17834. var t, n;
  17835. a.execNativeCommand(e),
  17836. (t = i.dom.getParent(i.selection.getNode(), "ol,ul")) && (n = t.parentNode,
  17837. /^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName) && (a.storeSelection(),
  17838. i.dom.split(n, t),
  17839. a.restoreSelection()))
  17840. },
  17841. "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": function(e) {
  17842. a.toggleFormat(e)
  17843. },
  17844. "ForeColor,HiliteColor": function(e, t, n) {
  17845. a.toggleFormat(e, n)
  17846. },
  17847. FontName: function(e, t, n) {
  17848. zz(i, n)
  17849. },
  17850. FontSize: function(e, t, n) {
  17851. !function(e, t) {
  17852. e.formatter.toggle("fontsize", {
  17853. value: xz(e, t)
  17854. }),
  17855. e.nodeChanged()
  17856. }(i, n)
  17857. },
  17858. RemoveFormat: function(e) {
  17859. i.formatter.remove(e)
  17860. },
  17861. mceBlockQuote: function() {
  17862. a.toggleFormat("blockquote")
  17863. },
  17864. FormatBlock: function(e, t, n) {
  17865. return a.toggleFormat(n || "p")
  17866. },
  17867. mceCleanup: function() {
  17868. var e = i.selection.getBookmark();
  17869. i.setContent(i.getContent()),
  17870. i.selection.moveToBookmark(e)
  17871. },
  17872. mceRemoveNode: function(e, t, n) {
  17873. var r = n || i.selection.getNode();
  17874. r !== i.getBody() && (a.storeSelection(),
  17875. i.dom.remove(r, !0),
  17876. a.restoreSelection())
  17877. },
  17878. mceSelectNodeDepth: function(e, t, n) {
  17879. var r = 0;
  17880. i.dom.getParent(i.selection.getNode(), function(e) {
  17881. if (1 === e.nodeType && r++ === n)
  17882. return i.selection.select(e),
  17883. !1
  17884. }, i.getBody())
  17885. },
  17886. mceSelectNode: function(e, t, n) {
  17887. i.selection.select(n)
  17888. },
  17889. mceInsertContent: function(e, t, n) {
  17890. $z(i, n)
  17891. },
  17892. mceInsertRawHTML: function(e, t, n) {
  17893. i.selection.setContent("tiny_mce_marker");
  17894. var r = i.getContent();
  17895. i.setContent(r.replace(/tiny_mce_marker/g, function() {
  17896. return n
  17897. }))
  17898. },
  17899. mceInsertNewLine: function(e, t, n) {
  17900. Rx(i, n)
  17901. },
  17902. mceToggleFormat: function(e, t, n) {
  17903. a.toggleFormat(n)
  17904. },
  17905. mceSetContent: function(e, t, n) {
  17906. i.setContent(n)
  17907. },
  17908. "Indent,Outdent": function(e) {
  17909. MC(i, e)
  17910. },
  17911. mceRepaint: function() {},
  17912. InsertHorizontalRule: function() {
  17913. i.execCommand("mceInsertContent", !1, "<hr />")
  17914. },
  17915. mceToggleVisualAid: function() {
  17916. i.hasVisual = !i.hasVisual,
  17917. i.addVisual()
  17918. },
  17919. mceReplaceContent: function(e, t, n) {
  17920. i.execCommand("mceInsertContent", !1, n.replace(/\{\$selection\}/g, i.selection.getContent({
  17921. format: "text"
  17922. })))
  17923. },
  17924. mceInsertLink: function(e, t, n) {
  17925. var r;
  17926. "string" == typeof n && (n = {
  17927. href: n
  17928. }),
  17929. r = i.dom.getParent(i.selection.getNode(), "a"),
  17930. n.href = n.href.replace(/ /g, "%20"),
  17931. r && n.href || i.formatter.remove("link"),
  17932. n.href && i.formatter.apply("link", n, r)
  17933. },
  17934. selectAll: function() {
  17935. var e = i.dom.getParent(i.selection.getStart(), Qt.isContentEditableTrue);
  17936. if (e) {
  17937. var t = i.dom.createRng();
  17938. t.selectNodeContents(e),
  17939. i.selection.setRng(t)
  17940. }
  17941. },
  17942. "delete": function() {
  17943. Wz(i)
  17944. },
  17945. forwardDelete: function() {
  17946. Kz(i)
  17947. },
  17948. mceNewDocument: function() {
  17949. i.setContent("")
  17950. },
  17951. InsertLineBreak: function(e, t, n) {
  17952. return Sx(i, n),
  17953. !0
  17954. }
  17955. }),
  17956. a.addCommands({
  17957. JustifyLeft: e("alignleft"),
  17958. JustifyCenter: e("aligncenter"),
  17959. JustifyRight: e("alignright"),
  17960. JustifyFull: e("alignjustify"),
  17961. "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": function(e) {
  17962. return a.isFormatMatch(e)
  17963. },
  17964. mceBlockQuote: function() {
  17965. return a.isFormatMatch("blockquote")
  17966. },
  17967. Outdent: function() {
  17968. return TC(i)
  17969. },
  17970. "InsertUnorderedList,InsertOrderedList": function(e) {
  17971. var t = i.dom.getParent(i.selection.getNode(), "ul,ol");
  17972. return t && ("insertunorderedlist" === e && "UL" === t.tagName || "insertorderedlist" === e && "OL" === t.tagName)
  17973. }
  17974. }, "state"),
  17975. a.addCommands({
  17976. Undo: function() {
  17977. i.undoManager.undo()
  17978. },
  17979. Redo: function() {
  17980. i.undoManager.redo()
  17981. }
  17982. }),
  17983. a.addQueryValueHandler("FontName", function() {
  17984. return function(t) {
  17985. return wz(t).fold(function() {
  17986. return Cz(t).map(function(e) {
  17987. return Yz.getFontFamily(t.getBody(), e)
  17988. }).getOr("")
  17989. }, function(e) {
  17990. return Yz.getFontFamily(t.getBody(), e)
  17991. })
  17992. }(i)
  17993. }, this),
  17994. a.addQueryValueHandler("FontSize", function() {
  17995. return function(t) {
  17996. return wz(t).fold(function() {
  17997. return Cz(t).map(function(e) {
  17998. return Yz.getFontSize(t.getBody(), e)
  17999. }).getOr("")
  18000. }, function(e) {
  18001. return Yz.getFontSize(t.getBody(), e)
  18002. })
  18003. }(i)
  18004. }, this)
  18005. }
  18006. ,
  18007. eE);
  18008. function eE(e) {
  18009. this.commands = {
  18010. state: {},
  18011. exec: {},
  18012. value: {}
  18013. },
  18014. this.editor = e,
  18015. this.setupCommands(e)
  18016. }
  18017. var tE = Zn.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel", " ")
  18018. , nE = (rE.isNative = function(e) {
  18019. return !!tE[e.toLowerCase()]
  18020. }
  18021. ,
  18022. rE.prototype.fire = function(e, t) {
  18023. var n, r, o, i;
  18024. if (e = e.toLowerCase(),
  18025. (t = t || {}).type = e,
  18026. t.target || (t.target = this.scope),
  18027. t.preventDefault || (t.preventDefault = function() {
  18028. t.isDefaultPrevented = a
  18029. }
  18030. ,
  18031. t.stopPropagation = function() {
  18032. t.isPropagationStopped = a
  18033. }
  18034. ,
  18035. t.stopImmediatePropagation = function() {
  18036. t.isImmediatePropagationStopped = a
  18037. }
  18038. ,
  18039. t.isDefaultPrevented = s,
  18040. t.isPropagationStopped = s,
  18041. t.isImmediatePropagationStopped = s),
  18042. this.settings.beforeFire && this.settings.beforeFire(t),
  18043. n = this.bindings[e])
  18044. for (r = 0,
  18045. o = n.length; r < o; r++) {
  18046. if ((i = n[r]).once && this.off(e, i.func),
  18047. t.isImmediatePropagationStopped())
  18048. return t.stopPropagation(),
  18049. t;
  18050. if (!1 === i.func.call(this.scope, t))
  18051. return t.preventDefault(),
  18052. t
  18053. }
  18054. return t
  18055. }
  18056. ,
  18057. rE.prototype.on = function(e, t, n, r) {
  18058. var o, i, a;
  18059. if (!1 === t && (t = s),
  18060. t) {
  18061. var u = {
  18062. func: t
  18063. };
  18064. for (r && Zn.extend(u, r),
  18065. a = (i = e.toLowerCase().split(" ")).length; a--; )
  18066. e = i[a],
  18067. (o = this.bindings[e]) || (o = this.bindings[e] = [],
  18068. this.toggleEvent(e, !0)),
  18069. n ? o.unshift(u) : o.push(u)
  18070. }
  18071. return this
  18072. }
  18073. ,
  18074. rE.prototype.off = function(e, t) {
  18075. var n, r, o, i, a;
  18076. if (e)
  18077. for (n = (i = e.toLowerCase().split(" ")).length; n--; ) {
  18078. if (e = i[n],
  18079. r = this.bindings[e],
  18080. !e) {
  18081. for (o in this.bindings)
  18082. this.toggleEvent(o, !1),
  18083. delete this.bindings[o];
  18084. return this
  18085. }
  18086. if (r) {
  18087. if (t)
  18088. for (a = r.length; a--; )
  18089. r[a].func === t && (r = r.slice(0, a).concat(r.slice(a + 1)),
  18090. this.bindings[e] = r);
  18091. else
  18092. r.length = 0;
  18093. r.length || (this.toggleEvent(e, !1),
  18094. delete this.bindings[e])
  18095. }
  18096. }
  18097. else {
  18098. for (e in this.bindings)
  18099. this.toggleEvent(e, !1);
  18100. this.bindings = {}
  18101. }
  18102. return this
  18103. }
  18104. ,
  18105. rE.prototype.once = function(e, t, n) {
  18106. return this.on(e, t, n, {
  18107. once: !0
  18108. })
  18109. }
  18110. ,
  18111. rE.prototype.has = function(e) {
  18112. return e = e.toLowerCase(),
  18113. !(!this.bindings[e] || 0 === this.bindings[e].length)
  18114. }
  18115. ,
  18116. rE);
  18117. function rE(e) {
  18118. this.bindings = {},
  18119. this.settings = e || {},
  18120. this.scope = this.settings.scope || this,
  18121. this.toggleEvent = this.settings.toggleEvent || s
  18122. }
  18123. function oE(n) {
  18124. return n._eventDispatcher || (n._eventDispatcher = new nE({
  18125. scope: n,
  18126. toggleEvent: function(e, t) {
  18127. nE.isNative(e) && n.toggleNativeEvent && n.toggleNativeEvent(e, t)
  18128. }
  18129. })),
  18130. n._eventDispatcher
  18131. }
  18132. function iE(e, t, n) {
  18133. ba(e, t) && !1 === n ? function(e, t) {
  18134. ma(e) ? e.dom().classList.remove(t) : pa(e, t);
  18135. ya(e)
  18136. }(e, t) : n && va(e, t)
  18137. }
  18138. function aE(e, t, n) {
  18139. try {
  18140. e.getDoc().execCommand(t, !1, n)
  18141. } catch (r) {}
  18142. }
  18143. function uE(e, t) {
  18144. e.dom().contentEditable = t ? "true" : "false"
  18145. }
  18146. function cE(e, t) {
  18147. var n = it.fromDom(e.getBody());
  18148. iE(n, "mce-content-readonly", t),
  18149. t ? (e.selection.controlSelection.hideResizeRect(),
  18150. e._selectionOverrides.hideFakeCaret(),
  18151. function(e) {
  18152. R.from(e.selection.getNode()).each(function(e) {
  18153. e.removeAttribute("data-mce-selected")
  18154. })
  18155. }(e),
  18156. e.readonly = !0,
  18157. uE(n, !1),
  18158. function(e) {
  18159. F(Ca(e, '*[contenteditable="true"]'), function(e) {
  18160. en(e, yE, "true"),
  18161. uE(e, !1)
  18162. })
  18163. }(n)) : (e.readonly = !1,
  18164. uE(n, !0),
  18165. function(e) {
  18166. F(Ca(e, "*[" + yE + '="true"]'), function(e) {
  18167. Ye(e, yE),
  18168. uE(e, !0)
  18169. })
  18170. }(n),
  18171. aE(e, "StyleWithCSS", !1),
  18172. aE(e, "enableInlineTableEditing", !1),
  18173. aE(e, "enableObjectResizing", !1),
  18174. Od(e) && e.focus(),
  18175. function(e) {
  18176. e.selection.setRng(e.selection.getRng())
  18177. }(e),
  18178. e.nodeChanged())
  18179. }
  18180. function sE(e) {
  18181. return !0 === e.readonly
  18182. }
  18183. function lE(t) {
  18184. t.parser.addAttributeFilter("contenteditable", function(e) {
  18185. sE(t) && F(e, function(e) {
  18186. e.attr(yE, e.attr("contenteditable")),
  18187. e.attr("contenteditable", "false")
  18188. })
  18189. }),
  18190. t.serializer.addAttributeFilter(yE, function(e) {
  18191. sE(t) && F(e, function(e) {
  18192. e.attr("contenteditable", e.attr(yE))
  18193. })
  18194. }),
  18195. t.serializer.addTempAttr(yE)
  18196. }
  18197. function fE(e, t) {
  18198. 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 = bE.select(e.settings.event_root)[0]),
  18199. e.eventRoot) : e.getBody()
  18200. }
  18201. function dE(e, t, n) {
  18202. !function(e) {
  18203. return !e.hidden && !sE(e)
  18204. }(e) ? sE(e) && function(e, t) {
  18205. var n = t.target;
  18206. !function(e) {
  18207. return "click" === e.type
  18208. }(t) || hh.metaKeyPressed(t) || !function(e, t) {
  18209. return null !== e.dom.getParent(t, "a")
  18210. }(e, n) || t.preventDefault()
  18211. }(e, n) : e.fire(t, n)
  18212. }
  18213. function hE(i, a) {
  18214. var e, t;
  18215. if (i.delegates || (i.delegates = {}),
  18216. !i.delegates[a] && !i.removed)
  18217. if (e = fE(i, a),
  18218. i.settings.event_root) {
  18219. if (pE || (pE = {},
  18220. i.editorManager.on("removeEditor", function() {
  18221. var e;
  18222. if (!i.editorManager.activeEditor && pE) {
  18223. for (e in pE)
  18224. i.dom.unbind(fE(i, e));
  18225. pE = null
  18226. }
  18227. })),
  18228. pE[a])
  18229. return;
  18230. t = function(e) {
  18231. for (var t = e.target, n = i.editorManager.get(), r = n.length; r--; ) {
  18232. var o = n[r].getBody();
  18233. o !== t && !bE.isChildOf(t, o) || dE(n[r], a, e)
  18234. }
  18235. }
  18236. ,
  18237. pE[a] = t,
  18238. bE.bind(e, a, t)
  18239. } else
  18240. t = function(e) {
  18241. dE(i, a, e)
  18242. }
  18243. ,
  18244. bE.bind(e, a, t),
  18245. i.delegates[a] = t
  18246. }
  18247. function mE(e, t, n, r) {
  18248. var o = n[t.get()]
  18249. , i = n[r];
  18250. try {
  18251. i.activate()
  18252. } catch (HN) {
  18253. return void j.console.error("problem while activating editor mode " + r + ":", HN)
  18254. }
  18255. o.deactivate(),
  18256. o.editorReadOnly !== i.editorReadOnly && cE(e, i.editorReadOnly),
  18257. t.set(r),
  18258. function(e, t) {
  18259. e.fire("SwitchMode", {
  18260. mode: t
  18261. })
  18262. }(e, r)
  18263. }
  18264. function gE(t) {
  18265. var n = at("design")
  18266. , r = at({
  18267. design: {
  18268. activate: i,
  18269. deactivate: i,
  18270. editorReadOnly: !1
  18271. },
  18272. readonly: {
  18273. activate: i,
  18274. deactivate: i,
  18275. editorReadOnly: !0
  18276. }
  18277. });
  18278. return function(e) {
  18279. e.serializer ? lE(e) : e.on("PreInit", function() {
  18280. lE(e)
  18281. })
  18282. }(t),
  18283. function(t) {
  18284. t.on("ShowCaret", function(e) {
  18285. sE(t) && e.preventDefault()
  18286. }),
  18287. t.on("ObjectSelected", function(e) {
  18288. sE(t) && e.preventDefault()
  18289. })
  18290. }(t),
  18291. {
  18292. isReadOnly: function() {
  18293. return sE(t)
  18294. },
  18295. set: function(e) {
  18296. return function(e, t, n, r) {
  18297. if (r !== n.get()) {
  18298. if (!ee(t, r))
  18299. throw new Error("Editor mode '" + r + "' is invalid");
  18300. e.initialized ? mE(e, n, t, r) : e.on("init", function() {
  18301. return mE(e, n, t, r)
  18302. })
  18303. }
  18304. }(t, r.get(), n, e)
  18305. },
  18306. get: function() {
  18307. return n.get()
  18308. },
  18309. register: function(e, t) {
  18310. r.set(function(e, t, n) {
  18311. var r;
  18312. if (h(wE, t))
  18313. throw new Error("Cannot override default mode " + t);
  18314. return te(te({}, e), ((r = {})[t] = te(te({}, n), {
  18315. deactivate: function() {
  18316. try {
  18317. n.deactivate()
  18318. } catch (HN) {
  18319. j.console.error("problem while deactivating editor mode " + t + ":", HN)
  18320. }
  18321. }
  18322. }),
  18323. r))
  18324. }(r.get(), e, t))
  18325. }
  18326. }
  18327. }
  18328. var pE, vE = {
  18329. fire: function(e, t, n) {
  18330. if (this.removed && "remove" !== e && "detach" !== e)
  18331. return t;
  18332. var r = oE(this).fire(e, t);
  18333. if (!1 !== n && this.parent)
  18334. for (var o = this.parent(); o && !r.isPropagationStopped(); )
  18335. o.fire(e, r, !1),
  18336. o = o.parent();
  18337. return r
  18338. },
  18339. on: function(e, t, n) {
  18340. return oE(this).on(e, t, n)
  18341. },
  18342. off: function(e, t) {
  18343. return oE(this).off(e, t)
  18344. },
  18345. once: function(e, t) {
  18346. return oE(this).once(e, t)
  18347. },
  18348. hasEventListeners: function(e) {
  18349. return oE(this).has(e)
  18350. }
  18351. }, yE = "data-mce-contenteditable", bE = Qi.DOM, CE = te(te({}, vE), {
  18352. bindPendingEventDelegates: function() {
  18353. var t = this;
  18354. Zn.each(t._pendingNativeEvents, function(e) {
  18355. hE(t, e)
  18356. })
  18357. },
  18358. toggleNativeEvent: function(e, t) {
  18359. var n = this;
  18360. "focus" !== e && "blur" !== e && (t ? n.initialized ? hE(n, e) : n._pendingNativeEvents ? n._pendingNativeEvents.push(e) : n._pendingNativeEvents = [e] : n.initialized && (n.dom.unbind(fE(n, e), e, n.delegates[e]),
  18361. delete n.delegates[e]))
  18362. },
  18363. unbindAllNativeEvents: function() {
  18364. var e, t = this, n = t.getBody(), r = t.dom;
  18365. if (t.delegates) {
  18366. for (e in t.delegates)
  18367. t.dom.unbind(fE(t, e), e, t.delegates[e]);
  18368. delete t.delegates
  18369. }
  18370. !t.inline && n && r && (n.onload = null,
  18371. r.unbind(t.getWin()),
  18372. r.unbind(t.getDoc())),
  18373. r && (r.unbind(n),
  18374. r.unbind(t.getContainer()))
  18375. }
  18376. }), wE = ["design", "readonly"], xE = Zn.each, zE = Zn.explode, EE = {
  18377. f1: 112,
  18378. f2: 113,
  18379. f3: 114,
  18380. f4: 115,
  18381. f5: 116,
  18382. f6: 117,
  18383. f7: 118,
  18384. f8: 119,
  18385. f9: 120,
  18386. f10: 121,
  18387. f11: 122,
  18388. f12: 123
  18389. }, NE = Zn.makeMap("alt,ctrl,shift,meta,access"), SE = (kE.prototype.add = function(e, n, r, o) {
  18390. var t, i = this;
  18391. return "string" == typeof (t = r) ? r = function() {
  18392. i.editor.execCommand(t, !1, null)
  18393. }
  18394. : Zn.isArray(t) && (r = function() {
  18395. i.editor.execCommand(t[0], t[1], t[2])
  18396. }
  18397. ),
  18398. xE(zE(Zn.trim(e)), function(e) {
  18399. var t = i.createShortcut(e, n, r, o);
  18400. i.shortcuts[t.id] = t
  18401. }),
  18402. !0
  18403. }
  18404. ,
  18405. kE.prototype.remove = function(e) {
  18406. var t = this.createShortcut(e);
  18407. return !!this.shortcuts[t.id] && (delete this.shortcuts[t.id],
  18408. !0)
  18409. }
  18410. ,
  18411. kE.prototype.parseShortcut = function(e) {
  18412. var t, n, r = {};
  18413. for (n in xE(zE(e.toLowerCase(), "+"), function(e) {
  18414. e in NE ? r[e] = !0 : /^[0-9]{2,}$/.test(e) ? r.keyCode = parseInt(e, 10) : (r.charCode = e.charCodeAt(0),
  18415. r.keyCode = EE[e] || e.toUpperCase().charCodeAt(0))
  18416. }),
  18417. t = [r.keyCode],
  18418. NE)
  18419. r[n] ? t.push(n) : r[n] = !1;
  18420. return r.id = t.join(","),
  18421. r.access && (r.alt = !0,
  18422. Wn.mac ? r.ctrl = !0 : r.shift = !0),
  18423. r.meta && (Wn.mac ? r.meta = !0 : (r.ctrl = !0,
  18424. r.meta = !1)),
  18425. r
  18426. }
  18427. ,
  18428. kE.prototype.createShortcut = function(e, t, n, r) {
  18429. var o;
  18430. return (o = Zn.map(zE(e, ">"), this.parseShortcut))[o.length - 1] = Zn.extend(o[o.length - 1], {
  18431. func: n,
  18432. scope: r || this.editor
  18433. }),
  18434. Zn.extend(o[0], {
  18435. desc: this.editor.translate(t),
  18436. subpatterns: o.slice(1)
  18437. })
  18438. }
  18439. ,
  18440. kE.prototype.hasModifier = function(e) {
  18441. return e.altKey || e.ctrlKey || e.metaKey
  18442. }
  18443. ,
  18444. kE.prototype.isFunctionKey = function(e) {
  18445. return "keydown" === e.type && 112 <= e.keyCode && e.keyCode <= 123
  18446. }
  18447. ,
  18448. kE.prototype.matchShortcut = function(e, t) {
  18449. 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(),
  18450. !0)
  18451. }
  18452. ,
  18453. kE.prototype.executeShortcutAction = function(e) {
  18454. return e.func ? e.func.call(e.scope) : null
  18455. }
  18456. ,
  18457. kE);
  18458. function kE(e) {
  18459. this.shortcuts = {},
  18460. this.pendingPatterns = [],
  18461. this.editor = e;
  18462. var n = this;
  18463. e.on("keyup keypress keydown", function(t) {
  18464. !n.hasModifier(t) && !n.isFunctionKey(t) || t.isDefaultPrevented() || (xE(n.shortcuts, function(e) {
  18465. if (n.matchShortcut(t, e))
  18466. return n.pendingPatterns = e.subpatterns.slice(0),
  18467. "keydown" === t.type && n.executeShortcutAction(e),
  18468. !0
  18469. }),
  18470. n.matchShortcut(t, n.pendingPatterns[0]) && (1 === n.pendingPatterns.length && "keydown" === t.type && n.executeShortcutAction(n.pendingPatterns[0]),
  18471. n.pendingPatterns.shift()))
  18472. })
  18473. }
  18474. function TE() {
  18475. var e = function() {
  18476. function e(n, r) {
  18477. return function(e, t) {
  18478. return n[e.toLowerCase()] = te(te({}, t), {
  18479. type: r
  18480. })
  18481. }
  18482. }
  18483. var t = {}
  18484. , n = {}
  18485. , r = {}
  18486. , o = {}
  18487. , i = {}
  18488. , a = {}
  18489. , u = {};
  18490. return {
  18491. addButton: e(t, "button"),
  18492. addGroupToolbarButton: e(t, "grouptoolbarbutton"),
  18493. addToggleButton: e(t, "togglebutton"),
  18494. addMenuButton: e(t, "menubutton"),
  18495. addSplitButton: e(t, "splitbutton"),
  18496. addMenuItem: e(n, "menuitem"),
  18497. addNestedMenuItem: e(n, "nestedmenuitem"),
  18498. addToggleMenuItem: e(n, "togglemenuitem"),
  18499. addAutocompleter: e(r, "autocompleter"),
  18500. addContextMenu: e(i, "contextmenu"),
  18501. addContextToolbar: e(a, "contexttoolbar"),
  18502. addContextForm: e(a, "contextform"),
  18503. addSidebar: e(u, "sidebar"),
  18504. addIcon: function(e, t) {
  18505. return o[e.toLowerCase()] = t
  18506. },
  18507. getAll: function() {
  18508. return {
  18509. buttons: t,
  18510. menuItems: n,
  18511. icons: o,
  18512. popups: r,
  18513. contextMenus: i,
  18514. contextToolbars: a,
  18515. sidebars: u
  18516. }
  18517. }
  18518. }
  18519. }();
  18520. return {
  18521. addAutocompleter: e.addAutocompleter,
  18522. addButton: e.addButton,
  18523. addContextForm: e.addContextForm,
  18524. addContextMenu: e.addContextMenu,
  18525. addContextToolbar: e.addContextToolbar,
  18526. addIcon: e.addIcon,
  18527. addMenuButton: e.addMenuButton,
  18528. addMenuItem: e.addMenuItem,
  18529. addNestedMenuItem: e.addNestedMenuItem,
  18530. addSidebar: e.addSidebar,
  18531. addSplitButton: e.addSplitButton,
  18532. addToggleButton: e.addToggleButton,
  18533. addGroupToolbarButton: e.addGroupToolbarButton,
  18534. addToggleMenuItem: e.addToggleMenuItem,
  18535. getAll: e.getAll
  18536. }
  18537. }
  18538. var AE = Zn.each
  18539. , ME = Zn.trim
  18540. , RE = "source protocol authority userInfo user password host port relative path directory file query anchor".split(" ")
  18541. , _E = {
  18542. ftp: 21,
  18543. http: 80,
  18544. https: 443,
  18545. mailto: 25
  18546. }
  18547. , DE = (OE.parseDataUri = function(e) {
  18548. var t, n = decodeURIComponent(e).split(","), r = /data:([^;]+)/.exec(n[0]);
  18549. return r && (t = r[1]),
  18550. {
  18551. type: t,
  18552. data: n[1]
  18553. }
  18554. }
  18555. ,
  18556. OE.getDocumentBaseUrl = function(e) {
  18557. var t;
  18558. return t = 0 !== e.protocol.indexOf("http") && "file:" !== e.protocol ? e.href : e.protocol + "//" + e.host + e.pathname,
  18559. /^[^:]+:\/\/\/?[^\/]+\//.test(t) && (t = t.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, ""),
  18560. /[\/\\]$/.test(t) || (t += "/")),
  18561. t
  18562. }
  18563. ,
  18564. OE.prototype.setPath = function(e) {
  18565. var t = /^(.*?)\/?(\w+)?$/.exec(e);
  18566. this.path = t[0],
  18567. this.directory = t[1],
  18568. this.file = t[2],
  18569. this.source = "",
  18570. this.getURI()
  18571. }
  18572. ,
  18573. OE.prototype.toRelative = function(e) {
  18574. var t;
  18575. if ("./" === e)
  18576. return e;
  18577. var n = new OE(e,{
  18578. base_uri: this
  18579. });
  18580. if ("mce_host" !== n.host && this.host !== n.host && n.host || this.port !== n.port || this.protocol !== n.protocol && "" !== n.protocol)
  18581. return n.getURI();
  18582. var r = this.getURI()
  18583. , o = n.getURI();
  18584. return r === o || "/" === r.charAt(r.length - 1) && r.substr(0, r.length - 1) === o ? r : (t = this.toRelPath(this.path, n.path),
  18585. n.query && (t += "?" + n.query),
  18586. n.anchor && (t += "#" + n.anchor),
  18587. t)
  18588. }
  18589. ,
  18590. OE.prototype.toAbsolute = function(e, t) {
  18591. var n = new OE(e,{
  18592. base_uri: this
  18593. });
  18594. return n.getURI(t && this.isSameOrigin(n))
  18595. }
  18596. ,
  18597. OE.prototype.isSameOrigin = function(e) {
  18598. if (this.host == e.host && this.protocol == e.protocol) {
  18599. if (this.port == e.port)
  18600. return !0;
  18601. var t = _E[this.protocol];
  18602. if (t && (this.port || t) == (e.port || t))
  18603. return !0
  18604. }
  18605. return !1
  18606. }
  18607. ,
  18608. OE.prototype.toRelPath = function(e, t) {
  18609. var n, r, o, i = 0, a = "", u = e.substring(0, e.lastIndexOf("/")).split("/");
  18610. if (n = t.split("/"),
  18611. u.length >= n.length)
  18612. for (r = 0,
  18613. o = u.length; r < o; r++)
  18614. if (r >= n.length || u[r] !== n[r]) {
  18615. i = r + 1;
  18616. break
  18617. }
  18618. if (u.length < n.length)
  18619. for (r = 0,
  18620. o = n.length; r < o; r++)
  18621. if (r >= u.length || u[r] !== n[r]) {
  18622. i = r + 1;
  18623. break
  18624. }
  18625. if (1 === i)
  18626. return t;
  18627. for (r = 0,
  18628. o = u.length - (i - 1); r < o; r++)
  18629. a += "../";
  18630. for (r = i - 1,
  18631. o = n.length; r < o; r++)
  18632. a += r !== i - 1 ? "/" + n[r] : n[r];
  18633. return a
  18634. }
  18635. ,
  18636. OE.prototype.toAbsPath = function(e, t) {
  18637. var n, r, o, i = 0, a = [];
  18638. r = /\/$/.test(t) ? "/" : "";
  18639. var u = e.split("/")
  18640. , c = t.split("/");
  18641. for (AE(u, function(e) {
  18642. e && a.push(e)
  18643. }),
  18644. u = a,
  18645. n = c.length - 1,
  18646. a = []; 0 <= n; n--)
  18647. 0 !== c[n].length && "." !== c[n] && (".." !== c[n] ? 0 < i ? i-- : a.push(c[n]) : i++);
  18648. return 0 !== (o = (n = u.length - i) <= 0 ? w(a).join("/") : u.slice(0, n).join("/") + "/" + w(a).join("/")).indexOf("/") && (o = "/" + o),
  18649. r && o.lastIndexOf("/") !== o.length - 1 && (o += r),
  18650. o
  18651. }
  18652. ,
  18653. OE.prototype.getURI = function(e) {
  18654. var t;
  18655. return void 0 === e && (e = !1),
  18656. this.source && !e || (t = "",
  18657. e || (this.protocol ? t += this.protocol + "://" : t += "//",
  18658. this.userInfo && (t += this.userInfo + "@"),
  18659. this.host && (t += this.host),
  18660. this.port && (t += ":" + this.port)),
  18661. this.path && (t += this.path),
  18662. this.query && (t += "?" + this.query),
  18663. this.anchor && (t += "#" + this.anchor),
  18664. this.source = t),
  18665. this.source
  18666. }
  18667. ,
  18668. OE);
  18669. function OE(e, t) {
  18670. e = ME(e),
  18671. this.settings = t || {};
  18672. var n = this.settings.base_uri
  18673. , r = this;
  18674. if (/^([\w\-]+):([^\/]{2})/i.test(e) || /^\s*#/.test(e))
  18675. r.source = e;
  18676. else {
  18677. var o = 0 === e.indexOf("//");
  18678. if (0 !== e.indexOf("/") || o || (e = (n && n.protocol || "http") + "://mce_host" + e),
  18679. !/^[\w\-]*:?\/\//.test(e)) {
  18680. var i = this.settings.base_uri ? this.settings.base_uri.path : new OE(j.document.location.href).directory;
  18681. if (this.settings.base_uri && "" == this.settings.base_uri.protocol)
  18682. e = "//mce_host" + r.toAbsPath(i, e);
  18683. else {
  18684. var a = /([^#?]*)([#?]?.*)/.exec(e);
  18685. e = (n && n.protocol || "http") + "://mce_host" + r.toAbsPath(i, a[1]) + a[2]
  18686. }
  18687. }
  18688. e = e.replace(/@@/g, "(mce_at)");
  18689. var u = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);
  18690. AE(RE, function(e, t) {
  18691. var n = u[t];
  18692. n = n && n.replace(/\(mce_at\)/g, "@@"),
  18693. r[e] = n
  18694. }),
  18695. n && (r.protocol || (r.protocol = n.protocol),
  18696. r.userInfo || (r.userInfo = n.userInfo),
  18697. r.port || "mce_host" !== r.host || (r.port = n.port),
  18698. r.host && "mce_host" !== r.host || (r.host = n.host),
  18699. r.source = ""),
  18700. o && (r.protocol = "")
  18701. }
  18702. }
  18703. var HE = Qi.DOM
  18704. , BE = Zn.extend
  18705. , PE = Zn.each
  18706. , LE = Zn.resolve
  18707. , VE = Wn.ie
  18708. , IE = (FE.prototype.render = function() {
  18709. Iz(this)
  18710. }
  18711. ,
  18712. FE.prototype.focus = function(e) {
  18713. _d(this, e)
  18714. }
  18715. ,
  18716. FE.prototype.hasFocus = function() {
  18717. return Dd(this)
  18718. }
  18719. ,
  18720. FE.prototype.execCallback = function(e) {
  18721. for (var t = [], n = 1; n < arguments.length; n++)
  18722. t[n - 1] = arguments[n];
  18723. var r, o = this.settings[e];
  18724. if (o)
  18725. return this.callbackLookup && (r = this.callbackLookup[e]) && (o = r.func,
  18726. r = r.scope),
  18727. "string" == typeof o && (r = (r = o.replace(/\.\w+$/, "")) ? LE(r) : 0,
  18728. o = LE(o),
  18729. this.callbackLookup = this.callbackLookup || {},
  18730. this.callbackLookup[e] = {
  18731. func: o,
  18732. scope: r
  18733. }),
  18734. o.apply(r || this, Array.prototype.slice.call(arguments, 1))
  18735. }
  18736. ,
  18737. FE.prototype.translate = function(e) {
  18738. return sa.translate(e)
  18739. }
  18740. ,
  18741. FE.prototype.getParam = function(e, t, n) {
  18742. return id(this, e, t, n)
  18743. }
  18744. ,
  18745. FE.prototype.nodeChanged = function(e) {
  18746. this._nodeChangeDispatcher.nodeChanged(e)
  18747. }
  18748. ,
  18749. FE.prototype.addCommand = function(e, t, n) {
  18750. this.editorCommands.addCommand(e, t, n)
  18751. }
  18752. ,
  18753. FE.prototype.addQueryStateHandler = function(e, t, n) {
  18754. this.editorCommands.addQueryStateHandler(e, t, n)
  18755. }
  18756. ,
  18757. FE.prototype.addQueryValueHandler = function(e, t, n) {
  18758. this.editorCommands.addQueryValueHandler(e, t, n)
  18759. }
  18760. ,
  18761. FE.prototype.addShortcut = function(e, t, n, r) {
  18762. this.shortcuts.add(e, t, n, r)
  18763. }
  18764. ,
  18765. FE.prototype.execCommand = function(e, t, n, r) {
  18766. return this.editorCommands.execCommand(e, t, n, r)
  18767. }
  18768. ,
  18769. FE.prototype.queryCommandState = function(e) {
  18770. return this.editorCommands.queryCommandState(e)
  18771. }
  18772. ,
  18773. FE.prototype.queryCommandValue = function(e) {
  18774. return this.editorCommands.queryCommandValue(e)
  18775. }
  18776. ,
  18777. FE.prototype.queryCommandSupported = function(e) {
  18778. return this.editorCommands.queryCommandSupported(e)
  18779. }
  18780. ,
  18781. FE.prototype.show = function() {
  18782. this.hidden && (this.hidden = !1,
  18783. this.inline ? this.getBody().contentEditable = "true" : (HE.show(this.getContainer()),
  18784. HE.hide(this.id)),
  18785. this.load(),
  18786. this.fire("show"))
  18787. }
  18788. ,
  18789. FE.prototype.hide = function() {
  18790. var e = this
  18791. , t = e.getDoc();
  18792. e.hidden || (VE && t && !e.inline && t.execCommand("SelectAll"),
  18793. e.save(),
  18794. e.inline ? (e.getBody().contentEditable = "false",
  18795. e === e.editorManager.focusedEditor && (e.editorManager.focusedEditor = null)) : (HE.hide(e.getContainer()),
  18796. HE.setStyle(e.id, "display", e.orgDisplay)),
  18797. e.hidden = !0,
  18798. e.fire("hide"))
  18799. }
  18800. ,
  18801. FE.prototype.isHidden = function() {
  18802. return !!this.hidden
  18803. }
  18804. ,
  18805. FE.prototype.setProgressState = function(e, t) {
  18806. this.fire("ProgressState", {
  18807. state: e,
  18808. time: t
  18809. })
  18810. }
  18811. ,
  18812. FE.prototype.load = function(e) {
  18813. var t, n = this.getElement();
  18814. if (this.removed)
  18815. return "";
  18816. if (n) {
  18817. (e = e || {}).load = !0;
  18818. var r = Qt.isTextareaOrInput(n) ? n.value : n.innerHTML;
  18819. return t = this.setContent(r, e),
  18820. e.element = n,
  18821. e.no_events || this.fire("LoadContent", e),
  18822. e.element = n = null,
  18823. t
  18824. }
  18825. }
  18826. ,
  18827. FE.prototype.save = function(e) {
  18828. var t, n, r = this, o = r.getElement();
  18829. if (o && r.initialized && !r.removed)
  18830. return (e = e || {}).save = !0,
  18831. e.element = o,
  18832. e.content = r.getContent(e),
  18833. e.no_events || r.fire("SaveContent", e),
  18834. "raw" === e.format && r.fire("RawSaveContent", e),
  18835. t = e.content,
  18836. Qt.isTextareaOrInput(o) ? o.value = t : (!e.is_removing && r.inline || (o.innerHTML = t),
  18837. (n = HE.getParent(r.id, "form")) && PE(n.elements, function(e) {
  18838. if (e.name === r.id)
  18839. return e.value = t,
  18840. !1
  18841. })),
  18842. e.element = o = null,
  18843. !1 !== e.set_dirty && r.setDirty(!1),
  18844. t
  18845. }
  18846. ,
  18847. FE.prototype.setContent = function(e, t) {
  18848. return Xf(this, e, t)
  18849. }
  18850. ,
  18851. FE.prototype.getContent = function(e) {
  18852. return function(t, n) {
  18853. return void 0 === n && (n = {}),
  18854. R.from(t.getBody()).fold($("tree" === n.format ? new hf("body",11) : ""), function(e) {
  18855. return bf(t, n, e)
  18856. })
  18857. }(this, e)
  18858. }
  18859. ,
  18860. FE.prototype.insertContent = function(e, t) {
  18861. t && (e = BE({
  18862. content: e
  18863. }, t)),
  18864. this.execCommand("mceInsertContent", !1, e)
  18865. }
  18866. ,
  18867. FE.prototype.resetContent = function(e) {
  18868. e === undefined ? Xf(this, this.startContent, {
  18869. format: "raw"
  18870. }) : Xf(this, e),
  18871. this.undoManager.reset(),
  18872. this.setDirty(!1),
  18873. this.nodeChanged()
  18874. }
  18875. ,
  18876. FE.prototype.isDirty = function() {
  18877. return !this.isNotDirty
  18878. }
  18879. ,
  18880. FE.prototype.setDirty = function(e) {
  18881. var t = !this.isNotDirty;
  18882. this.isNotDirty = !e,
  18883. e && e !== t && this.fire("dirty")
  18884. }
  18885. ,
  18886. FE.prototype.getContainer = function() {
  18887. return this.container || (this.container = HE.get(this.editorContainer || this.id + "_parent")),
  18888. this.container
  18889. }
  18890. ,
  18891. FE.prototype.getContentAreaContainer = function() {
  18892. return this.contentAreaContainer
  18893. }
  18894. ,
  18895. FE.prototype.getElement = function() {
  18896. return this.targetElm || (this.targetElm = HE.get(this.id)),
  18897. this.targetElm
  18898. }
  18899. ,
  18900. FE.prototype.getWin = function() {
  18901. var e;
  18902. return this.contentWindow || (e = this.iframeElement) && (this.contentWindow = e.contentWindow),
  18903. this.contentWindow
  18904. }
  18905. ,
  18906. FE.prototype.getDoc = function() {
  18907. var e;
  18908. return this.contentDocument || (e = this.getWin()) && (this.contentDocument = e.document),
  18909. this.contentDocument
  18910. }
  18911. ,
  18912. FE.prototype.getBody = function() {
  18913. var e = this.getDoc();
  18914. return this.bodyElement || (e ? e.body : null)
  18915. }
  18916. ,
  18917. FE.prototype.convertURL = function(e, t, n) {
  18918. var r = this.settings;
  18919. return r.urlconverter_callback ? this.execCallback("urlconverter_callback", e, n, !0, t) : !r.convert_urls || n && "LINK" === n.nodeName || 0 === e.indexOf("file:") || 0 === e.length ? e : r.relative_urls ? this.documentBaseURI.toRelative(e) : e = this.documentBaseURI.toAbsolute(e, r.remove_script_host)
  18920. }
  18921. ,
  18922. FE.prototype.addVisual = function(e) {
  18923. var n, r = this, o = r.settings, i = r.dom;
  18924. e = e || r.getBody(),
  18925. r.hasVisual === undefined && (r.hasVisual = o.visual),
  18926. PE(i.select("table,a", e), function(e) {
  18927. var t;
  18928. switch (e.nodeName) {
  18929. case "TABLE":
  18930. return n = o.visual_table_class || "mce-item-table",
  18931. void ((t = i.getAttrib(e, "border")) && "0" !== t || !r.hasVisual ? i.removeClass(e, n) : i.addClass(e, n));
  18932. case "A":
  18933. return void (i.getAttrib(e, "href") || (t = i.getAttrib(e, "name") || e.id,
  18934. n = o.visual_anchor_class || "mce-item-anchor",
  18935. t && r.hasVisual ? i.addClass(e, n) : i.removeClass(e, n)))
  18936. }
  18937. }),
  18938. r.fire("VisualAid", {
  18939. element: e,
  18940. hasVisual: r.hasVisual
  18941. })
  18942. }
  18943. ,
  18944. FE.prototype.remove = function() {
  18945. Gf(this)
  18946. }
  18947. ,
  18948. FE.prototype.destroy = function(e) {
  18949. Zf(this, e)
  18950. }
  18951. ,
  18952. FE.prototype.uploadImages = function(e) {
  18953. return this.editorUpload.uploadImages(e)
  18954. }
  18955. ,
  18956. FE.prototype._scanForImages = function() {
  18957. return this.editorUpload.scanForImages()
  18958. }
  18959. ,
  18960. FE.prototype.addButton = function() {
  18961. throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")
  18962. }
  18963. ,
  18964. FE.prototype.addSidebar = function() {
  18965. throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")
  18966. }
  18967. ,
  18968. FE.prototype.addMenuItem = function() {
  18969. throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")
  18970. }
  18971. ,
  18972. FE.prototype.addContextToolbar = function() {
  18973. throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")
  18974. }
  18975. ,
  18976. FE);
  18977. function FE(e, t, n) {
  18978. var r = this;
  18979. this.plugins = {},
  18980. this.contentCSS = [],
  18981. this.contentStyles = [],
  18982. this.loadedCSS = {},
  18983. this.isNotDirty = !1,
  18984. this.editorManager = n,
  18985. this.documentBaseUrl = n.documentBaseURL,
  18986. BE(this, CE),
  18987. this.settings = rd(this, e, this.documentBaseUrl, n.defaultSettings, t),
  18988. this.settings.suffix && (n.suffix = this.settings.suffix),
  18989. this.suffix = n.suffix,
  18990. this.settings.base_url && n._setBaseUrl(this.settings.base_url),
  18991. this.baseUri = n.baseURI,
  18992. this.settings.referrer_policy && (ra.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),
  18993. Qi.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),
  18994. wa.languageLoad = this.settings.language_load,
  18995. wa.baseURL = n.baseURL,
  18996. this.id = e,
  18997. this.setDirty(!1),
  18998. this.documentBaseURI = new DE(this.settings.document_base_url,{
  18999. base_uri: this.baseUri
  19000. }),
  19001. this.baseURI = this.baseUri,
  19002. this.inline = !!this.settings.inline,
  19003. this.shortcuts = new SE(this),
  19004. this.editorCommands = new Qz(this),
  19005. this.settings.cache_suffix && (Wn.cacheSuffix = this.settings.cache_suffix.replace(/^[\?\&]+/, "")),
  19006. this.ui = {
  19007. registry: TE()
  19008. };
  19009. var o = gE(this);
  19010. this.mode = o,
  19011. this.setMode = o.set,
  19012. n.fire("SetupEditor", {
  19013. editor: this
  19014. }),
  19015. this.execCallback("setup", this),
  19016. this.$ = Ii.overrideDefaults(function() {
  19017. return {
  19018. context: r.inline ? r.getBody() : r.getDoc(),
  19019. element: r.getBody()
  19020. }
  19021. })
  19022. }
  19023. function UE(t) {
  19024. var n = t.type;
  19025. YE(nN.get(), function(e) {
  19026. switch (n) {
  19027. case "scroll":
  19028. e.fire("ScrollWindow", t);
  19029. break;
  19030. case "resize":
  19031. e.fire("ResizeWindow", t)
  19032. }
  19033. })
  19034. }
  19035. function jE(e) {
  19036. e !== JE && (e ? Ii(window).on("resize scroll", UE) : Ii(window).off("resize scroll", UE),
  19037. JE = e)
  19038. }
  19039. function qE(t) {
  19040. var e = eN;
  19041. delete QE[t.id];
  19042. for (var n = 0; n < QE.length; n++)
  19043. if (QE[n] === t) {
  19044. QE.splice(n, 1);
  19045. break
  19046. }
  19047. return eN = U(eN, function(e) {
  19048. return t !== e
  19049. }),
  19050. nN.activeEditor === t && (nN.activeEditor = 0 < eN.length ? eN[0] : null),
  19051. nN.focusedEditor === t && (nN.focusedEditor = null),
  19052. e.length !== eN.length
  19053. }
  19054. var $E, WE, KE = Qi.DOM, XE = Zn.explode, YE = Zn.each, GE = Zn.extend, ZE = 0, JE = !1, QE = [], eN = [], tN = "CSS1Compat" !== j.document.compatMode, nN = te(te({}, vE), {
  19055. baseURI: null,
  19056. baseURL: null,
  19057. defaultSettings: {},
  19058. documentBaseURL: null,
  19059. suffix: null,
  19060. $: Ii,
  19061. majorVersion: "5",
  19062. minorVersion: "2.0",
  19063. releaseDate: "2020-02-13",
  19064. editors: QE,
  19065. i18n: sa,
  19066. activeEditor: null,
  19067. focusedEditor: null,
  19068. settings: {},
  19069. setup: function() {
  19070. var e, t, n = "";
  19071. t = DE.getDocumentBaseUrl(j.document.location),
  19072. /^[^:]+:\/\/\/?[^\/]+\//.test(t) && (t = t.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, ""),
  19073. /[\/\\]$/.test(t) || (t += "/"));
  19074. var r = window.tinymce || window.tinyMCEPreInit;
  19075. if (r)
  19076. e = r.base || r.baseURL,
  19077. n = r.suffix;
  19078. else {
  19079. for (var o = j.document.getElementsByTagName("script"), i = 0; i < o.length; i++) {
  19080. var a;
  19081. if ("" !== (a = o[i].src || "")) {
  19082. var u = a.substring(a.lastIndexOf("/"));
  19083. if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(a)) {
  19084. -1 !== u.indexOf(".min") && (n = ".min"),
  19085. e = a.substring(0, a.lastIndexOf("/"));
  19086. break
  19087. }
  19088. }
  19089. }
  19090. if (!e && j.document.currentScript)
  19091. -1 !== (a = j.document.currentScript.src).indexOf(".min") && (n = ".min"),
  19092. e = a.substring(0, a.lastIndexOf("/"))
  19093. }
  19094. this.baseURL = new DE(t).toAbsolute(e),
  19095. this.documentBaseURL = t,
  19096. this.baseURI = new DE(this.baseURL),
  19097. this.suffix = n,
  19098. Td(this)
  19099. },
  19100. overrideDefaults: function(e) {
  19101. var t, n;
  19102. (t = e.base_url) && this._setBaseUrl(t),
  19103. n = e.suffix,
  19104. e.suffix && (this.suffix = n);
  19105. var r = (this.defaultSettings = e).plugin_base_urls;
  19106. for (var o in r)
  19107. wa.PluginManager.urls[o] = r[o]
  19108. },
  19109. init: function(r) {
  19110. var n, u, c = this;
  19111. u = Zn.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu", " ");
  19112. function s(e) {
  19113. var t = e.id;
  19114. return t || (t = (t = e.name) && !KE.get(t) ? e.name : KE.uniqueId(),
  19115. e.setAttribute("id", t)),
  19116. t
  19117. }
  19118. function l(e, t) {
  19119. return t.constructor === RegExp ? t.test(e.className) : KE.hasClass(e, t)
  19120. }
  19121. var f = function(e) {
  19122. n = e
  19123. }
  19124. , e = function() {
  19125. function n(e, t, n) {
  19126. var r = new IE(e,t,c);
  19127. a.push(r),
  19128. r.on("init", function() {
  19129. ++i === o.length && f(a)
  19130. }),
  19131. r.targetElm = r.targetElm || n,
  19132. r.render()
  19133. }
  19134. var o, i = 0, a = [];
  19135. KE.unbind(window, "ready", e),
  19136. function(e) {
  19137. var t = r[e];
  19138. if (t)
  19139. t.apply(c, Array.prototype.slice.call(arguments, 2))
  19140. }("onpageload"),
  19141. o = Ii.unique(function(t) {
  19142. var e, n = [];
  19143. if (Wn.browser.isIE() && Wn.browser.version.major < 11)
  19144. return ch.initError("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),
  19145. [];
  19146. if (tN)
  19147. return ch.initError("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),
  19148. [];
  19149. if (t.types)
  19150. return YE(t.types, function(e) {
  19151. n = n.concat(KE.select(e.selector))
  19152. }),
  19153. n;
  19154. if (t.selector)
  19155. return KE.select(t.selector);
  19156. if (t.target)
  19157. return [t.target];
  19158. switch (t.mode) {
  19159. case "exact":
  19160. 0 < (e = t.elements || "").length && YE(XE(e), function(t) {
  19161. var e;
  19162. (e = KE.get(t)) ? n.push(e) : YE(j.document.forms, function(e) {
  19163. YE(e.elements, function(e) {
  19164. e.name === t && (t = "mce_editor_" + ZE++,
  19165. KE.setAttrib(e, "id", t),
  19166. n.push(e))
  19167. })
  19168. })
  19169. });
  19170. break;
  19171. case "textareas":
  19172. case "specific_textareas":
  19173. YE(KE.select("textarea"), function(e) {
  19174. t.editor_deselector && l(e, t.editor_deselector) || t.editor_selector && !l(e, t.editor_selector) || n.push(e)
  19175. })
  19176. }
  19177. return n
  19178. }(r)),
  19179. r.types ? YE(r.types, function(t) {
  19180. Zn.each(o, function(e) {
  19181. return !KE.is(e, t.selector) || (n(s(e), GE({}, r, t), e),
  19182. !1)
  19183. })
  19184. }) : (Zn.each(o, function(e) {
  19185. !function(e) {
  19186. e && e.initialized && !(e.getContainer() || e.getBody()).parentNode && (qE(e),
  19187. e.unbindAllNativeEvents(),
  19188. e.destroy(!0),
  19189. e.removed = !0,
  19190. e = null)
  19191. }(c.get(e.id))
  19192. }),
  19193. 0 === (o = Zn.grep(o, function(e) {
  19194. return !c.get(e.id)
  19195. })).length ? f([]) : YE(o, function(e) {
  19196. !function(e, t) {
  19197. return e.inline && t.tagName.toLowerCase()in u
  19198. }(r, e) ? n(s(e), r, e) : ch.initError("Could not initialize inline editor on invalid inline target element", e)
  19199. }))
  19200. };
  19201. return c.settings = r,
  19202. KE.bind(window, "ready", e),
  19203. new wn(function(t) {
  19204. n ? t(n) : f = function(e) {
  19205. t(e)
  19206. }
  19207. }
  19208. )
  19209. },
  19210. get: function(t) {
  19211. return 0 === arguments.length ? eN.slice(0) : K(t) ? g(eN, function(e) {
  19212. return e.id === t
  19213. }).getOr(null) : P(t) && eN[t] ? eN[t] : null
  19214. },
  19215. add: function(e) {
  19216. var n = this;
  19217. return QE[e.id] === e || (null === n.get(e.id) && (function(e) {
  19218. return "length" !== e
  19219. }(e.id) && (QE[e.id] = e),
  19220. QE.push(e),
  19221. eN.push(e)),
  19222. jE(!0),
  19223. n.activeEditor = e,
  19224. n.fire("AddEditor", {
  19225. editor: e
  19226. }),
  19227. $E || ($E = function(e) {
  19228. var t = n.fire("BeforeUnload");
  19229. if (t.returnValue)
  19230. return e.preventDefault(),
  19231. e.returnValue = t.returnValue,
  19232. t.returnValue
  19233. }
  19234. ,
  19235. window.addEventListener("beforeunload", $E))),
  19236. e
  19237. },
  19238. createEditor: function(e, t) {
  19239. return this.add(new IE(e,t,this))
  19240. },
  19241. remove: function(e) {
  19242. var t, n, r = this;
  19243. if (e) {
  19244. if (!K(e))
  19245. return n = e,
  19246. O(r.get(n.id)) ? null : (qE(n) && r.fire("RemoveEditor", {
  19247. editor: n
  19248. }),
  19249. 0 === eN.length && window.removeEventListener("beforeunload", $E),
  19250. n.remove(),
  19251. jE(0 < eN.length),
  19252. n);
  19253. YE(KE.select(e), function(e) {
  19254. (n = r.get(e.id)) && r.remove(n)
  19255. })
  19256. } else
  19257. for (t = eN.length - 1; 0 <= t; t--)
  19258. r.remove(eN[t])
  19259. },
  19260. execCommand: function(e, t, n) {
  19261. var r = this.get(n);
  19262. switch (e) {
  19263. case "mceAddEditor":
  19264. return this.get(n) || new IE(n,this.settings,this).render(),
  19265. !0;
  19266. case "mceRemoveEditor":
  19267. return r && r.remove(),
  19268. !0;
  19269. case "mceToggleEditor":
  19270. return r ? r.isHidden() ? r.show() : r.hide() : this.execCommand("mceAddEditor", 0, n),
  19271. !0
  19272. }
  19273. return !!this.activeEditor && this.activeEditor.execCommand(e, t, n)
  19274. },
  19275. triggerSave: function() {
  19276. YE(eN, function(e) {
  19277. e.save()
  19278. })
  19279. },
  19280. addI18n: function(e, t) {
  19281. sa.add(e, t)
  19282. },
  19283. translate: function(e) {
  19284. return sa.translate(e)
  19285. },
  19286. setActive: function(e) {
  19287. var t = this.activeEditor;
  19288. this.activeEditor !== e && (t && t.fire("deactivate", {
  19289. relatedTarget: e
  19290. }),
  19291. e.fire("activate", {
  19292. relatedTarget: t
  19293. })),
  19294. this.activeEditor = e
  19295. },
  19296. _setBaseUrl: function(e) {
  19297. this.baseURL = new DE(this.documentBaseURL).toAbsolute(e.replace(/\/+$/, "")),
  19298. this.baseURI = new DE(this.baseURL)
  19299. }
  19300. });
  19301. function rN(n) {
  19302. return {
  19303. walk: function(e, t) {
  19304. return ef(n, e, t)
  19305. },
  19306. split: xg,
  19307. normalize: function(t) {
  19308. return Bm(n, t).fold($(!1), function(e) {
  19309. return t.setStart(e.startContainer, e.startOffset),
  19310. t.setEnd(e.endContainer, e.endOffset),
  19311. !0
  19312. })
  19313. }
  19314. }
  19315. }
  19316. nN.setup(),
  19317. (WE = rN = rN || {}).compareRanges = Hm,
  19318. WE.getCaretRangeFromPoint = pm,
  19319. WE.getSelectedNode = Ja,
  19320. WE.getNode = Qa;
  19321. function oN(e, t, n) {
  19322. var r, o, i, a, u, c;
  19323. return r = t.x,
  19324. o = t.y,
  19325. i = e.w,
  19326. a = e.h,
  19327. u = t.w,
  19328. c = t.h,
  19329. "b" === (n = (n || "").split(""))[0] && (o += c),
  19330. "r" === n[1] && (r += u),
  19331. "c" === n[0] && (o += mN(c / 2)),
  19332. "c" === n[1] && (r += mN(u / 2)),
  19333. "b" === n[3] && (o -= a),
  19334. "r" === n[4] && (r -= i),
  19335. "c" === n[3] && (o -= mN(a / 2)),
  19336. "c" === n[4] && (r -= mN(i / 2)),
  19337. gN(r, o, i, a)
  19338. }
  19339. function iN() {}
  19340. var aN, uN, cN, sN, lN = rN, fN = (aN = {},
  19341. uN = {},
  19342. {
  19343. load: function(r, o) {
  19344. var i = 'Script at URL "' + o + '" failed to load'
  19345. , a = 'Script at URL "' + o + "\" did not call `tinymce.Resource.add('" + r + "', data)` within 1 second";
  19346. if (aN[r] !== undefined)
  19347. return aN[r];
  19348. var e = new wn(function(e, t) {
  19349. var n = function(e, t, n) {
  19350. function r(n) {
  19351. return function() {
  19352. for (var e = [], t = 0; t < arguments.length; t++)
  19353. e[t] = arguments[t];
  19354. o || (o = !0,
  19355. null !== i && (j.clearTimeout(i),
  19356. i = null),
  19357. n.apply(null, e))
  19358. }
  19359. }
  19360. void 0 === n && (n = 1e3);
  19361. var o = !1
  19362. , i = null
  19363. , a = r(e)
  19364. , u = r(t);
  19365. return {
  19366. start: function() {
  19367. for (var e = [], t = 0; t < arguments.length; t++)
  19368. e[t] = arguments[t];
  19369. o || null !== i || (i = j.setTimeout(function() {
  19370. return u.apply(null, e)
  19371. }, n))
  19372. },
  19373. resolve: a,
  19374. reject: u
  19375. }
  19376. }(e, t);
  19377. uN[r] = n.resolve,
  19378. ra.ScriptLoader.loadScript(o, function() {
  19379. return n.start(a)
  19380. }, function() {
  19381. return n.reject(i)
  19382. })
  19383. }
  19384. );
  19385. return aN[r] = e
  19386. },
  19387. add: function(e, t) {
  19388. uN[e] !== undefined && (uN[e](t),
  19389. delete uN[e]),
  19390. aN[e] = wn.resolve(t)
  19391. }
  19392. }), dN = Math.min, hN = Math.max, mN = Math.round, gN = function(e, t, n, r) {
  19393. return {
  19394. x: e,
  19395. y: t,
  19396. w: n,
  19397. h: r
  19398. }
  19399. }, pN = {
  19400. inflate: function(e, t, n) {
  19401. return gN(e.x - t, e.y - n, e.w + 2 * t, e.h + 2 * n)
  19402. },
  19403. relativePosition: oN,
  19404. findBestRelativePosition: function(e, t, n, r) {
  19405. var o, i;
  19406. for (i = 0; i < r.length; i++)
  19407. if ((o = oN(e, t, r[i])).x >= n.x && o.x + o.w <= n.w + n.x && o.y >= n.y && o.y + o.h <= n.h + n.y)
  19408. return r[i];
  19409. return null
  19410. },
  19411. intersect: function(e, t) {
  19412. var n, r, o, i;
  19413. return n = hN(e.x, t.x),
  19414. r = hN(e.y, t.y),
  19415. o = dN(e.x + e.w, t.x + t.w),
  19416. i = dN(e.y + e.h, t.y + t.h),
  19417. o - n < 0 || i - r < 0 ? null : gN(n, r, o - n, i - r)
  19418. },
  19419. clamp: function(e, t, n) {
  19420. var r, o, i, a, u, c, s, l, f, d;
  19421. return u = e.x,
  19422. c = e.y,
  19423. s = e.x + e.w,
  19424. l = e.y + e.h,
  19425. f = t.x + t.w,
  19426. d = t.y + t.h,
  19427. r = hN(0, t.x - u),
  19428. o = hN(0, t.y - c),
  19429. i = hN(0, s - f),
  19430. a = hN(0, l - d),
  19431. u += r,
  19432. c += o,
  19433. n && (s += r,
  19434. l += o,
  19435. u -= i,
  19436. c -= a),
  19437. gN(u, c, (s -= i) - u, (l -= a) - c)
  19438. },
  19439. create: gN,
  19440. fromClientRect: function(e) {
  19441. return gN(e.left, e.top, e.width, e.height)
  19442. }
  19443. }, vN = Zn.each, yN = Zn.extend;
  19444. iN.extend = cN = function(n) {
  19445. function r() {
  19446. var e, t, n;
  19447. if (!sN && (this.init && this.init.apply(this, arguments),
  19448. t = this.Mixins))
  19449. for (e = t.length; e--; )
  19450. (n = t[e]).init && n.init.apply(this, arguments)
  19451. }
  19452. function t() {
  19453. return this
  19454. }
  19455. function e(n, r) {
  19456. return function() {
  19457. var e, t = this._super;
  19458. return this._super = u[n],
  19459. e = r.apply(this, arguments),
  19460. this._super = t,
  19461. e
  19462. }
  19463. }
  19464. var o, i, a, u = this.prototype;
  19465. for (i in sN = !0,
  19466. o = new this,
  19467. sN = !1,
  19468. n.Mixins && (vN(n.Mixins, function(e) {
  19469. for (var t in e)
  19470. "init" !== t && (n[t] = e[t])
  19471. }),
  19472. u.Mixins && (n.Mixins = u.Mixins.concat(n.Mixins))),
  19473. n.Methods && vN(n.Methods.split(","), function(e) {
  19474. n[e] = t
  19475. }),
  19476. n.Properties && vN(n.Properties.split(","), function(e) {
  19477. var t = "_" + e;
  19478. n[e] = function(e) {
  19479. return e !== undefined ? (this[t] = e,
  19480. this) : this[t]
  19481. }
  19482. }),
  19483. n.Statics && vN(n.Statics, function(e, t) {
  19484. r[t] = e
  19485. }),
  19486. n.Defaults && u.Defaults && (n.Defaults = yN({}, u.Defaults, n.Defaults)),
  19487. n)
  19488. "function" == typeof (a = n[i]) && u[i] ? o[i] = e(i, a) : o[i] = a;
  19489. return r.prototype = o,
  19490. (r.constructor = r).extend = cN,
  19491. r
  19492. }
  19493. ;
  19494. var bN = Math.min
  19495. , CN = Math.max
  19496. , wN = Math.round
  19497. , xN = {
  19498. serialize: function(e) {
  19499. var t = JSON.stringify(e);
  19500. return K(t) ? t.replace(/[\u0080-\uFFFF]/g, function(e) {
  19501. var t = e.charCodeAt(0).toString(16);
  19502. return "\\u" + "0000".substring(t.length) + t
  19503. }) : t
  19504. },
  19505. parse: function(e) {
  19506. try {
  19507. return JSON.parse(e)
  19508. } catch (t) {}
  19509. }
  19510. }
  19511. , zN = {
  19512. callbacks: {},
  19513. count: 0,
  19514. send: function(t) {
  19515. var n = this
  19516. , r = Qi.DOM
  19517. , o = t.count !== undefined ? t.count : n.count
  19518. , i = "tinymce_jsonp_" + o;
  19519. n.callbacks[o] = function(e) {
  19520. r.remove(i),
  19521. delete n.callbacks[o],
  19522. t.callback(e)
  19523. }
  19524. ,
  19525. r.add(r.doc.body, "script", {
  19526. id: i,
  19527. src: t.url,
  19528. type: "text/javascript"
  19529. }),
  19530. n.count++
  19531. }
  19532. }
  19533. , EN = te(te({}, vE), {
  19534. send: function(e) {
  19535. var t, n = 0, r = function() {
  19536. !e.async || 4 === t.readyState || 1e4 < n++ ? (e.success && n < 1e4 && 200 === t.status ? e.success.call(e.success_scope, "" + t.responseText, t, e) : e.error && e.error.call(e.error_scope, 1e4 < n ? "TIMED_OUT" : "GENERAL", t, e),
  19537. t = null) : Pn.setTimeout(r, 10)
  19538. };
  19539. if (e.scope = e.scope || this,
  19540. e.success_scope = e.success_scope || e.scope,
  19541. e.error_scope = e.error_scope || e.scope,
  19542. e.async = !1 !== e.async,
  19543. e.data = e.data || "",
  19544. EN.fire("beforeInitialize", {
  19545. settings: e
  19546. }),
  19547. t = new j.XMLHttpRequest) {
  19548. if (t.overrideMimeType && t.overrideMimeType(e.content_type),
  19549. t.open(e.type || (e.data ? "POST" : "GET"), e.url, e.async),
  19550. e.crossDomain && (t.withCredentials = !0),
  19551. e.content_type && t.setRequestHeader("Content-Type", e.content_type),
  19552. e.requestheaders && Zn.each(e.requestheaders, function(e) {
  19553. t.setRequestHeader(e.key, e.value)
  19554. }),
  19555. t.setRequestHeader("X-Requested-With", "XMLHttpRequest"),
  19556. (t = EN.fire("beforeSend", {
  19557. xhr: t,
  19558. settings: e
  19559. }).xhr).send(e.data),
  19560. !e.async)
  19561. return r();
  19562. Pn.setTimeout(r, 10)
  19563. }
  19564. }
  19565. })
  19566. , NN = Zn.extend
  19567. , SN = (kN.sendRPC = function(e) {
  19568. return (new kN).send(e)
  19569. }
  19570. ,
  19571. kN.prototype.send = function(e) {
  19572. var n = e.error
  19573. , r = e.success
  19574. , o = NN(this.settings, e);
  19575. o.success = function(e, t) {
  19576. void 0 === (e = xN.parse(e)) && (e = {
  19577. error: "JSON Parse error."
  19578. }),
  19579. e.error ? n.call(o.error_scope || o.scope, e.error, t) : r.call(o.success_scope || o.scope, e.result)
  19580. }
  19581. ,
  19582. o.error = function(e, t) {
  19583. n && n.call(o.error_scope || o.scope, e, t)
  19584. }
  19585. ,
  19586. o.data = xN.serialize({
  19587. id: e.id || "c" + this.count++,
  19588. method: e.method,
  19589. params: e.params
  19590. }),
  19591. o.content_type = "application/json",
  19592. EN.send(o)
  19593. }
  19594. ,
  19595. kN);
  19596. function kN(e) {
  19597. this.settings = NN({}, e),
  19598. this.count = 0
  19599. }
  19600. var TN, AN, MN, RN;
  19601. try {
  19602. TN = j.window.localStorage
  19603. } catch (HN) {
  19604. AN = {},
  19605. MN = [],
  19606. RN = {
  19607. getItem: function(e) {
  19608. var t = AN[e];
  19609. return t || null
  19610. },
  19611. setItem: function(e, t) {
  19612. MN.push(e),
  19613. AN[e] = String(t)
  19614. },
  19615. key: function(e) {
  19616. return MN[e]
  19617. },
  19618. removeItem: function(t) {
  19619. MN = MN.filter(function(e) {
  19620. return e === t
  19621. }),
  19622. delete AN[t]
  19623. },
  19624. clear: function() {
  19625. MN = [],
  19626. AN = {}
  19627. },
  19628. length: 0
  19629. },
  19630. Object.defineProperty(RN, "length", {
  19631. get: function() {
  19632. return MN.length
  19633. },
  19634. configurable: !1,
  19635. enumerable: !1
  19636. }),
  19637. TN = RN
  19638. }
  19639. var _N, DN = {
  19640. geom: {
  19641. Rect: pN
  19642. },
  19643. util: {
  19644. Promise: wn,
  19645. Delay: Pn,
  19646. Tools: Zn,
  19647. VK: hh,
  19648. URI: DE,
  19649. Class: iN,
  19650. EventDispatcher: nE,
  19651. Observable: vE,
  19652. I18n: sa,
  19653. XHR: EN,
  19654. JSON: xN,
  19655. JSONRequest: SN,
  19656. JSONP: zN,
  19657. LocalStorage: TN,
  19658. Color: function(e) {
  19659. function t(e) {
  19660. var t;
  19661. return "object" == typeof e ? "r"in e ? (u = e.r,
  19662. c = e.g,
  19663. s = e.b) : "v"in e && function(e, t, n) {
  19664. var r, o, i, a;
  19665. if (e = (parseInt(e, 10) || 0) % 360,
  19666. t = parseInt(t, 10) / 100,
  19667. n = parseInt(n, 10) / 100,
  19668. t = CN(0, bN(t, 1)),
  19669. n = CN(0, bN(n, 1)),
  19670. 0 !== t) {
  19671. switch (r = e / 60,
  19672. i = (o = n * t) * (1 - Math.abs(r % 2 - 1)),
  19673. a = n - o,
  19674. Math.floor(r)) {
  19675. case 0:
  19676. u = o,
  19677. c = i,
  19678. s = 0;
  19679. break;
  19680. case 1:
  19681. u = i,
  19682. c = o,
  19683. s = 0;
  19684. break;
  19685. case 2:
  19686. u = 0,
  19687. c = o,
  19688. s = i;
  19689. break;
  19690. case 3:
  19691. u = 0,
  19692. c = i,
  19693. s = o;
  19694. break;
  19695. case 4:
  19696. u = i,
  19697. c = 0,
  19698. s = o;
  19699. break;
  19700. case 5:
  19701. u = o,
  19702. c = 0,
  19703. s = i;
  19704. break;
  19705. default:
  19706. u = c = s = 0
  19707. }
  19708. u = wN(255 * (u + a)),
  19709. c = wN(255 * (c + a)),
  19710. s = wN(255 * (s + a))
  19711. } else
  19712. u = c = s = wN(255 * n)
  19713. }(e.h, e.s, e.v) : (t = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e)) ? (u = parseInt(t[1], 10),
  19714. c = parseInt(t[2], 10),
  19715. s = parseInt(t[3], 10)) : (t = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e)) ? (u = parseInt(t[1], 16),
  19716. c = parseInt(t[2], 16),
  19717. s = parseInt(t[3], 16)) : (t = /#([0-F])([0-F])([0-F])/gi.exec(e)) && (u = parseInt(t[1] + t[1], 16),
  19718. c = parseInt(t[2] + t[2], 16),
  19719. s = parseInt(t[3] + t[3], 16)),
  19720. u = u < 0 ? 0 : 255 < u ? 255 : u,
  19721. c = c < 0 ? 0 : 255 < c ? 255 : c,
  19722. s = s < 0 ? 0 : 255 < s ? 255 : s,
  19723. n
  19724. }
  19725. var n = {}
  19726. , u = 0
  19727. , c = 0
  19728. , s = 0;
  19729. return e && t(e),
  19730. n.toRgb = function() {
  19731. return {
  19732. r: u,
  19733. g: c,
  19734. b: s
  19735. }
  19736. }
  19737. ,
  19738. n.toHsv = function() {
  19739. return function(e, t, n) {
  19740. var r, o, i, a;
  19741. return o = 0,
  19742. (i = bN(e /= 255, bN(t /= 255, n /= 255))) === (a = CN(e, CN(t, n))) ? {
  19743. h: 0,
  19744. s: 0,
  19745. v: 100 * (o = i)
  19746. } : (r = (a - i) / a,
  19747. {
  19748. h: wN(60 * ((e === i ? 3 : n === i ? 1 : 5) - (e === i ? t - n : n === i ? e - t : n - e) / ((o = a) - i))),
  19749. s: wN(100 * r),
  19750. v: wN(100 * o)
  19751. })
  19752. }(u, c, s)
  19753. }
  19754. ,
  19755. n.toHex = function() {
  19756. function e(e) {
  19757. return 1 < (e = parseInt(e, 10).toString(16)).length ? e : "0" + e
  19758. }
  19759. return "#" + e(u) + e(c) + e(s)
  19760. }
  19761. ,
  19762. n.parse = t,
  19763. n
  19764. }
  19765. },
  19766. dom: {
  19767. EventUtils: Gr,
  19768. Sizzle: Jo,
  19769. DomQuery: Ii,
  19770. TreeWalker: Fi,
  19771. TextSeeker: cc,
  19772. DOMUtils: Qi,
  19773. ScriptLoader: ra,
  19774. RangeUtils: lN,
  19775. Serializer: Ym,
  19776. ControlSelection: lh,
  19777. BookmarkManager: fh,
  19778. Selection: Im,
  19779. Event: Gr.Event
  19780. },
  19781. html: {
  19782. Styles: $r,
  19783. Entities: Sr,
  19784. Node: hf,
  19785. Schema: Pr,
  19786. SaxParser: fd,
  19787. DomParser: $m,
  19788. Writer: Cf,
  19789. Serializer: wf
  19790. },
  19791. Env: Wn,
  19792. AddOnManager: wa,
  19793. Annotator: uf,
  19794. Formatter: Wp,
  19795. UndoManager: nv,
  19796. EditorCommands: Qz,
  19797. WindowManager: th,
  19798. NotificationManager: Jd,
  19799. EditorObservable: CE,
  19800. Shortcuts: SE,
  19801. Editor: IE,
  19802. FocusManager: Nd,
  19803. EditorManager: nN,
  19804. DOM: Qi.DOM,
  19805. ScriptLoader: ra.ScriptLoader,
  19806. PluginManager: wa.PluginManager,
  19807. ThemeManager: wa.ThemeManager,
  19808. IconManager: $d,
  19809. Resource: fN,
  19810. trim: Zn.trim,
  19811. isArray: Zn.isArray,
  19812. is: Zn.is,
  19813. toArray: Zn.toArray,
  19814. makeMap: Zn.makeMap,
  19815. each: Zn.each,
  19816. map: Zn.map,
  19817. grep: Zn.grep,
  19818. inArray: Zn.inArray,
  19819. extend: Zn.extend,
  19820. create: Zn.create,
  19821. walk: Zn.walk,
  19822. createNS: Zn.createNS,
  19823. resolve: Zn.resolve,
  19824. explode: Zn.explode,
  19825. _addCacheSuffix: Zn._addCacheSuffix,
  19826. isOpera: Wn.opera,
  19827. isWebKit: Wn.webkit,
  19828. isIE: Wn.ie,
  19829. isGecko: Wn.gecko,
  19830. isMac: Wn.mac
  19831. }, ON = Zn.extend(nN, DN);
  19832. _N = ON,
  19833. window.tinymce = _N,
  19834. window.tinyMCE = _N,
  19835. function(e) {
  19836. if ("object" == typeof module)
  19837. try {
  19838. module.exports = e
  19839. } catch (t) {}
  19840. }(ON)
  19841. }(window);