gp-designer 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- (function(He,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(He=typeof globalThis<"u"?globalThis:He||self,c(He.GpWebModule={},He.Vue))})(this,function(He,c){"use strict";var X;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(X||(X={}));function Er(e){return e.type===X.Tag||e.type===X.Script||e.type===X.Style}const Tr=X.Root,pr=X.Text,br=X.Directive,gr=X.Comment,_r=X.Script,Ar=X.Style,Nr=X.Tag,Cr=X.CDATA,Ir=X.Doctype;let vi=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return At(this,t)}};class Oa extends vi{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class _t extends Oa{constructor(){super(...arguments),this.type=X.Text}get nodeType(){return 3}}class Da extends Oa{constructor(){super(...arguments),this.type=X.Comment}get nodeType(){return 8}}class La extends Oa{constructor(t,a){super(a),this.name=t,this.type=X.Directive}get nodeType(){return 1}}class Ra extends vi{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Ui extends Ra{constructor(){super(...arguments),this.type=X.CDATA}get nodeType(){return 4}}class ze extends Ra{constructor(){super(...arguments),this.type=X.Root}get nodeType(){return 9}}class ya extends Ra{constructor(t,a,i=[],n=t==="script"?X.Script:t==="style"?X.Style:X.Tag){super(i),this.name=t,this.attribs=a,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var a,i;return{name:t,value:this.attribs[t],namespace:(a=this["x-attribsNamespace"])===null||a===void 0?void 0:a[t],prefix:(i=this["x-attribsPrefix"])===null||i===void 0?void 0:i[t]}})}}function w(e){return Er(e)}function Xt(e){return e.type===X.CDATA}function ye(e){return e.type===X.Text}function Qt(e){return e.type===X.Comment}function Ma(e){return e.type===X.Directive}function Ve(e){return e.type===X.Root}function re(e){return Object.prototype.hasOwnProperty.call(e,"children")}function At(e,t=!1){let a;if(ye(e))a=new _t(e.data);else if(Qt(e))a=new Da(e.data);else if(w(e)){const i=t?Pa(e.children):[],n=new ya(e.name,{...e.attribs},i);i.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),a=n}else if(Xt(e)){const i=t?Pa(e.children):[],n=new Ui(i);i.forEach(r=>r.parent=n),a=n}else if(Ve(e)){const i=t?Pa(e.children):[],n=new ze(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(Ma(e)){const i=new La(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),a=i}else throw new Error(`Not implemented yet: ${e.type}`);return a.startIndex=e.startIndex,a.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(a.sourceCodeLocation=e.sourceCodeLocation),a}function Pa(e){const t=e.map(a=>At(a,!0));for(let a=1;a<t.length;a++)t[a].prev=t[a-1],t[a-1].next=t[a];return t}const Fi={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Sr{constructor(t,a,i){this.dom=[],this.root=new ze(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=Fi),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??Fi,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new ze(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,a){const i=this.options.xmlMode?X.Tag:void 0,n=new ya(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===X.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new _t(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===X.Comment){this.lastNode.data+=t;return}const a=new Da(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new _t(""),a=new Ui([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new La(t,a);this.addNode(i)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const a=this.tagStack[this.tagStack.length-1],i=a.children[a.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),a.children.push(t),i&&(t.prev=i,i.next=t),t.parent=a,this.lastNode=null}}const ka=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Hi=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var wa;const xr=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Ba=(wa=String.fromCodePoint)!==null&&wa!==void 0?wa:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Or(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=xr.get(e))!==null&&t!==void 0?t:e}var ue;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ue||(ue={}));const Dr=32;var Ye;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ye||(Ye={}));function va(e){return e>=ue.ZERO&&e<=ue.NINE}function Lr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_F||e>=ue.LOWER_A&&e<=ue.LOWER_F}function Rr(e){return e>=ue.UPPER_A&&e<=ue.UPPER_Z||e>=ue.LOWER_A&&e<=ue.LOWER_Z||va(e)}function yr(e){return e===ue.EQUALS||Rr(e)}var oe;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(oe||(oe={}));var Ie;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ie||(Ie={}));class Ua{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=oe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ie.Strict}startEntity(t){this.decodeMode=t,this.state=oe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case oe.EntityStart:return t.charCodeAt(a)===ue.NUM?(this.state=oe.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=oe.NamedEntity,this.stateNamedEntity(t,a));case oe.NumericStart:return this.stateNumericStart(t,a);case oe.NumericDecimal:return this.stateNumericDecimal(t,a);case oe.NumericHex:return this.stateNumericHex(t,a);case oe.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Dr)===ue.LOWER_X?(this.state=oe.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=oe.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,i,n){if(a!==i){const r=i-a;this.result=this.result*Math.pow(n,r)+parseInt(t.substr(a,r),n),this.consumed+=r}}stateNumericHex(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(va(n)||Lr(n))a+=1;else return this.addToNumericResult(t,i,a,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,a,16),-1}stateNumericDecimal(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(va(n))a+=1;else return this.addToNumericResult(t,i,a,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,a,10),-1}emitNumericEntity(t,a){var i;if(this.consumed<=a)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ue.SEMI)this.consumed+=1;else if(this.decodeMode===Ie.Strict)return 0;return this.emitCodePoint(Or(this.result),this.consumed),this.errors&&(t!==ue.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:i}=this;let n=i[this.treeIndex],r=(n&Ye.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=Mr(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ie.Attribute&&(r===0||yr(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Ye.VALUE_LENGTH)>>14,r!==0){if(u===ue.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Ie.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:i}=this,n=(i[a]&Ye.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,i){const{decodeTree:n}=this;return this.emitCodePoint(a===1?n[t]&~Ye.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case oe.NamedEntity:return this.result!==0&&(this.decodeMode!==Ie.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case oe.NumericDecimal:return this.emitNumericEntity(0,2);case oe.NumericHex:return this.emitNumericEntity(0,3);case oe.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case oe.EntityStart:return 0}}}function Vi(e){let t="";const a=new Ua(e,i=>t+=Ba(i));return function(n,r){let u=0,o=0;for(;(o=n.indexOf("&",o))>=0;){t+=n.slice(u,o),a.startEntity(r);const h=a.write(n,o+1);if(h<0){u=o+a.end();break}u=o+h,o=h===0?u+1:u}const l=t+n.slice(u);return t="",l}}function Mr(e,t,a,i){const n=(t&Ye.BRANCH_LENGTH)>>7,r=t&Ye.JUMP_TABLE;if(n===0)return r!==0&&i===r?a:-1;if(r){const l=i-r;return l<0||l>=n?-1:e[a+l]-1}let u=a,o=u+n-1;for(;u<=o;){const l=u+o>>>1,h=e[l];if(h<i)u=l+1;else if(h>i)o=l-1;else return e[l+n]}return-1}Vi(ka),Vi(Hi);const Yi=/["&'<>$\x80-\uFFFF]/g,Pr=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),kr=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function qi(e){let t="",a=0,i;for(;(i=Yi.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=Pr.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${kr(e,n).toString(16)};`,a=Yi.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function Wi(e,t){return function(i){let n,r=0,u="";for(;n=e.exec(i);)r!==n.index&&(u+=i.substring(r,n.index)),u+=t.get(n[0].charCodeAt(0)),r=n.index+1;return u+i.substring(r)}}const $i=Wi(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Gi=Wi(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),wr=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Br=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),vr=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function Ur(e){return e.replace(/"/g,"&quot;")}function Fr(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?Ur:t.xmlMode||t.encodeEntities!=="utf8"?qi:$i;return Object.keys(e).map(n=>{var r,u;const o=(r=e[n])!==null&&r!==void 0?r:"";return t.xmlMode==="foreign"&&(n=(u=Br.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Xi=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function jt(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Hr(a[n],t);return i}function Hr(e,t){switch(e.type){case Tr:return jt(e.children,t);case Ir:case br:return Wr(e);case gr:return Xr(e);case Cr:return Gr(e);case _r:case Ar:case Nr:return qr(e,t);case pr:return $r(e,t)}}const Vr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Yr=new Set(["svg","math"]);function qr(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=wr.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&Vr.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&Yr.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=Fr(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Xi.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=jt(e.children,t)),(t.xmlMode||!Xi.has(e.name))&&(i+=`</${e.name}>`)),i}function Wr(e){return`<${e.data}>`}function $r(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&vr.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?qi(i):Gi(i)),i}function Gr(e){return`<![CDATA[${e.children[0].data}]]>`}function Xr(e){return`<!--${e.data}-->`}function Qi(e,t){return jt(e,t)}function Qr(e,t){return re(e)?e.children.map(a=>Qi(a,t)).join(""):""}function zt(e){return Array.isArray(e)?e.map(zt).join(""):w(e)?e.name==="br"?`
2
- `:zt(e.children):Xt(e)?zt(e.children):ye(e)?e.data:""}function rt(e){return Array.isArray(e)?e.map(rt).join(""):re(e)&&!Qt(e)?rt(e.children):ye(e)?e.data:""}function Kt(e){return Array.isArray(e)?e.map(Kt).join(""):re(e)&&(e.type===X.Tag||Xt(e))?Kt(e.children):ye(e)?e.data:""}function Zt(e){return re(e)?e.children:[]}function ji(e){return e.parent||null}function zi(e){const t=ji(e);if(t!=null)return Zt(t);const a=[e];let{prev:i,next:n}=e;for(;i!=null;)a.unshift(i),{prev:i}=i;for(;n!=null;)a.push(n),{next:n}=n;return a}function jr(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function zr(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Kr(e){return e.name}function Fa(e){let{next:t}=e;for(;t!==null&&!w(t);)({next:t}=t);return t}function Ha(e){let{prev:t}=e;for(;t!==null&&!w(t);)({prev:t}=t);return t}function Ke(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,a=t.lastIndexOf(e);a>=0&&t.splice(a,1)}e.next=null,e.prev=null,e.parent=null}function Zr(e,t){const a=t.prev=e.prev;a&&(a.next=t);const i=t.next=e.next;i&&(i.prev=t);const n=t.parent=e.parent;if(n){const r=n.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function Jr(e,t){if(Ke(t),t.next=null,t.parent=e,e.children.push(t)>1){const a=e.children[e.children.length-2];a.next=t,t.prev=a}else t.prev=null}function eu(e,t){Ke(t);const{parent:a}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=a,i){if(i.prev=t,a){const n=a.children;n.splice(n.lastIndexOf(i),0,t)}}else a&&a.children.push(t)}function tu(e,t){if(Ke(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const a=e.children[1];a.prev=t,t.next=a}else t.next=null}function au(e,t){Ke(t);const{parent:a}=e;if(a){const i=a.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=a,t.prev=e.prev,t.next=e,e.prev=t}function Jt(e,t,a=!0,i=1/0){return Va(e,Array.isArray(t)?t:[t],a,i)}function Va(e,t,a,i){const n=[],r=[t],u=[0];for(;;){if(u[0]>=r[0].length){if(u.length===1)return n;r.shift(),u.shift();continue}const o=r[0][u[0]++];if(e(o)&&(n.push(o),--i<=0))return n;a&&re(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function iu(e,t){return t.find(e)}function Ya(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(w(r))e(r)?i=r:a&&r.children.length>0&&(i=Ya(e,r.children,!0));else continue}return i}function Ki(e,t){return t.some(a=>w(a)&&(e(a)||Ki(e,a.children)))}function nu(e,t){const a=[],i=[t],n=[0];for(;;){if(n[0]>=i[0].length){if(i.length===1)return a;i.shift(),n.shift();continue}const r=i[0][n[0]++];w(r)&&(e(r)&&a.push(r),r.children.length>0&&(n.unshift(0),i.unshift(r.children)))}}const ea={tag_name(e){return typeof e=="function"?t=>w(t)&&e(t.name):e==="*"?w:t=>w(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>ye(t)&&e(t.data):t=>ye(t)&&t.data===e}};function Zi(e,t){return typeof t=="function"?a=>w(a)&&t(a.attribs[e]):a=>w(a)&&a.attribs[e]===t}function su(e,t){return a=>e(a)||t(a)}function Ji(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(ea,a)?ea[a](i):Zi(a,i)});return t.length===0?null:t.reduce(su)}function ru(e,t){const a=Ji(e);return a?a(t):!0}function uu(e,t,a,i=1/0){const n=Ji(e);return n?Jt(n,t,a,i):[]}function ou(e,t,a=!0){return Array.isArray(t)||(t=[t]),Ya(Zi("id",e),t,a)}function ut(e,t,a=!0,i=1/0){return Jt(ea.tag_name(e),t,a,i)}function cu(e,t,a=!0,i=1/0){return Jt(ea.tag_type(e),t,a,i)}function lu(e){let t=e.length;for(;--t>=0;){const a=e[t];if(t>0&&e.lastIndexOf(a,t-1)>=0){e.splice(t,1);continue}for(let i=a.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}var Se;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(Se||(Se={}));function en(e,t){const a=[],i=[];if(e===t)return 0;let n=re(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=re(t)?t:t.parent;n;)i.unshift(n),n=n.parent;const r=Math.min(a.length,i.length);let u=0;for(;u<r&&a[u]===i[u];)u++;if(u===0)return Se.DISCONNECTED;const o=a[u-1],l=o.children,h=a[u],m=i[u];return l.indexOf(h)>l.indexOf(m)?o===t?Se.FOLLOWING|Se.CONTAINED_BY:Se.FOLLOWING:o===e?Se.PRECEDING|Se.CONTAINS:Se.PRECEDING}function ot(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=en(t,a);return i&Se.PRECEDING?-1:i&Se.FOLLOWING?1:0}),e}function du(e){const t=ta(Tu,e);return t?t.name==="feed"?hu(t):fu(t):null}function hu(e){var t;const a=e.children,i={type:"atom",items:ut("entry",a).map(u=>{var o;const{children:l}=u,h={media:tn(l)};Te(h,"id","id",l),Te(h,"title","title",l);const m=(o=ta("link",l))===null||o===void 0?void 0:o.attribs.href;m&&(h.link=m);const T=qe("summary",l)||qe("content",l);T&&(h.description=T);const b=qe("updated",l);return b&&(h.pubDate=new Date(b)),h})};Te(i,"id","id",a),Te(i,"title","title",a);const n=(t=ta("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),Te(i,"description","subtitle",a);const r=qe("updated",a);return r&&(i.updated=new Date(r)),Te(i,"author","email",a,!0),i}function fu(e){var t,a;const i=(a=(t=ta("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&a!==void 0?a:[],n={type:e.name.substr(0,3),id:"",items:ut("item",e.children).map(u=>{const{children:o}=u,l={media:tn(o)};Te(l,"id","guid",o),Te(l,"title","title",o),Te(l,"link","link",o),Te(l,"description","description",o);const h=qe("pubDate",o)||qe("dc:date",o);return h&&(l.pubDate=new Date(h)),l})};Te(n,"title","title",i),Te(n,"link","link",i),Te(n,"description","description",i);const r=qe("lastBuildDate",i);return r&&(n.updated=new Date(r)),Te(n,"author","managingEditor",i,!0),n}const mu=["url","type","lang"],Eu=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function tn(e){return ut("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of mu)a[n]&&(i[n]=a[n]);for(const n of Eu)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function ta(e,t){return ut(e,t,!0,1)[0]}function qe(e,t,a=!1){return rt(ut(e,t,a,1)).trim()}function Te(e,t,a,i,n=!1){const r=qe(a,i,n);r&&(e[t]=r)}function Tu(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const aa=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Se},append:eu,appendChild:Jr,compareDocumentPosition:en,existsOne:Ki,filter:Jt,find:Va,findAll:nu,findOne:Ya,findOneChild:iu,getAttributeValue:jr,getChildren:Zt,getElementById:ou,getElements:uu,getElementsByTagName:ut,getElementsByTagType:cu,getFeed:du,getInnerHTML:Qr,getName:Kr,getOuterHTML:Qi,getParent:ji,getSiblings:zi,getText:zt,hasAttrib:zr,hasChildren:re,innerText:Kt,isCDATA:Xt,isComment:Qt,isDocument:Ve,isTag:w,isText:ye,nextElementSibling:Fa,prepend:au,prependChild:tu,prevElementSibling:Ha,removeElement:Ke,removeSubsets:lu,replaceElement:Zr,testElement:ru,textContent:rt,uniqueSort:ot},Symbol.toStringTag,{value:"Module"})),pu={_useHtmlParser2:!1};function qa(e,t){if(!e)return t??pu;const a={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(a._useHtmlParser2=!0,a.xmlMode=!0,e.xml!==!0&&Object.assign(a,e.xml)):e.xmlMode&&(a._useHtmlParser2=!0),a}function an(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function bu(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function gu(e,t){const a=bu(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...qa(t)};return an(this,a,i)}function _u(e){const t={...this._options,xmlMode:!0};return an(this,e,t)}function Nt(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=rt(t[i]);return a}function Au(e,t,a=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(a=t);const i=this.load(e,this._options,!1);return a||i("script").remove(),[...i.root()[0].children]}function Nu(){return this(this._root)}function nn(e,t){if(t===e)return!1;let a=t;for(;a&&a!==a.parent;)if(a=a.parent,a===e)return!0;return!1}function Cu(e){return this.root().extract(e)}function Iu(e,t){if(!sn(e)||!sn(t))return;let a=e.length;const i=+t.length;for(let n=0;n<i;n++)e[a++]=t[n];return e.length=a,e}function sn(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const Su=Object.freeze(Object.defineProperty({__proto__:null,contains:nn,extract:Cu,html:gu,merge:Iu,parseHTML:Au,root:Nu,text:Nt,xml:_u},Symbol.toStringTag,{value:"Module"}));function Be(e){return e.cheerio!=null}function xu(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function Ou(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function J(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var Ze;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Ze||(Ze={}));function Wa(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=Ze.LowerA&&a<=Ze.LowerZ||a>=Ze.UpperA&&a<=Ze.UpperZ||a===Ze.Exclamation)&&e.includes(">",t+2)}const Ct=Object.prototype.hasOwnProperty,It=/\s+/,$a="data-",Ga=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Du=/^{[^]*}$|^\[[^]*]$/;function ia(e,t,a){var i;if(!(!e||!w(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(Ct.call(e.attribs,t))return!a&&Ga.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Nt(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ct(e,t,a){a===null?cn(e,t):e.attribs[t]=`${a}`}function Lu(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return J(this,(a,i)=>{w(a)&&ct(a,e,t.call(a,i,a.attribs[e]))})}return J(this,a=>{if(w(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];ct(a,i,n)}else ct(a,e,t)})}return arguments.length>1?this:ia(this[0],e,this.options.xmlMode)}function rn(e,t,a){return t in e?e[t]:!a&&Ga.test(t)?ia(e,t,!1)!==void 0:ia(e,t,a)}function Xa(e,t,a,i){t in e?e[t]=a:ct(e,t,!i&&Ga.test(t)?a?"":null:`${a}`)}function Ru(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!w(i))return;switch(e){case"style":{const n=this.css(),r=Object.keys(n);for(let u=0;u<r.length;u++)n[u]=r[u];return n.length=r.length,n}case"tagName":case"nodeName":return i.name.toUpperCase();case"href":case"src":{const n=(a=i.attribs)===null||a===void 0?void 0:a[e];return typeof URL<"u"&&(e==="href"&&(i.tagName==="a"||i.tagName==="link")||e==="src"&&(i.tagName==="img"||i.tagName==="iframe"||i.tagName==="audio"||i.tagName==="video"||i.tagName==="source"))&&n!==void 0&&this.options.baseURI?new URL(n,this.options.baseURI).href:n}case"innerText":return Kt(i);case"textContent":return rt(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return rn(i,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return J(this,(i,n)=>{w(i)&&Xa(i,e,t.call(i,n,rn(i,e,this.options.xmlMode)),this.options.xmlMode)})}return J(this,i=>{if(w(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];Xa(i,n,r,this.options.xmlMode)}else Xa(i,e,t,this.options.xmlMode)})}}function un(e,t,a){var i;(i=e.data)!==null&&i!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&a!==void 0&&(e.data[t]=a)}function yu(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith($a))continue;const a=xu(t.slice($a.length));Ct.call(e.data,a)||(e.data[a]=on(e.attribs[t]))}return e.data}function Mu(e,t){const a=$a+Ou(t),i=e.data;if(Ct.call(i,t))return i[t];if(Ct.call(e.attribs,a))return i[t]=on(e.attribs[a])}function on(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(Du.test(e))try{return JSON.parse(e)}catch{}return e}function Pu(e,t){var a;const i=this[0];if(!i||!w(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?yu(n):typeof e=="object"||t!==void 0?(J(this,r=>{w(r)&&(typeof e=="object"?un(r,e):un(r,e,t))}),this):Mu(n,e)}function ku(e){const t=arguments.length===0,a=this[0];if(!a||!w(a))return t?void 0:this;switch(a.name){case"textarea":return this.text(e);case"select":{const i=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const n=typeof e=="object"?e:[e];for(const r of n)this.find(`option[value="${r}"]`).attr("selected","");return this}return this.attr("multiple")?i.toArray().map(n=>Nt(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function cn(e,t){!e.attribs||!Ct.call(e.attribs,t)||delete e.attribs[t]}function na(e){return e?e.trim().split(It):[]}function wu(e){const t=na(e);for(const a of t)J(this,i=>{w(i)&&cn(i,a)});return this}function Bu(e){return this.toArray().some(t=>{const a=w(t)&&t.attribs.class;let i=-1;if(a&&e.length>0)for(;(i=a.indexOf(e,i+1))>-1;){const n=i+e.length;if((i===0||It.test(a[i-1]))&&(n===a.length||It.test(a[n])))return!0}return!1})}function ln(e){if(typeof e=="function")return J(this,(i,n)=>{if(w(i)){const r=i.attribs.class||"";ln.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(It),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!w(n))continue;const r=ia(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const l=`${o} `;u.includes(` ${l}`)||(u+=l)}ct(n,"class",u.trim())}else ct(n,"class",t.join(" ").trim())}return this}function dn(e){if(typeof e=="function")return J(this,(n,r)=>{w(n)&&dn.call([n],e.call(n,r,n.attribs.class||""))});const t=na(e),a=t.length,i=arguments.length===0;return J(this,n=>{if(w(n))if(i)n.attribs.class="";else{const r=na(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const l=r.indexOf(t[o]);l>=0&&(r.splice(l,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function hn(e,t){if(typeof e=="function")return J(this,(u,o)=>{w(u)&&hn.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(It),i=a.length,n=typeof t=="boolean"?t?1:-1:0,r=this.length;for(let u=0;u<r;u++){const o=this[u];if(!w(o))continue;const l=na(o.attribs.class);for(let h=0;h<i;h++){const m=l.indexOf(a[h]);n>=0&&m<0?l.push(a[h]):n<=0&&m>=0&&l.splice(m,1)}o.attribs.class=l.join(" ")}return this}const vu=Object.freeze(Object.defineProperty({__proto__:null,addClass:ln,attr:Lu,data:Pu,hasClass:Bu,prop:Ru,removeAttr:wu,removeClass:dn,toggleClass:hn,val:ku},Symbol.toStringTag,{value:"Module"}));var L;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(L||(L={}));var ne;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(ne||(ne={}));const fn=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Uu=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Fu=new Map([[126,ne.Element],[94,ne.Start],[36,ne.End],[42,ne.Any],[33,ne.Not],[124,ne.Hyphen]]),Hu=new Set(["has","not","matches","is","where","host","host-context"]);function St(e){switch(e.type){case L.Adjacent:case L.Child:case L.Descendant:case L.Parent:case L.Sibling:case L.ColumnCombinator:return!0;default:return!1}}const Vu=new Set(["contains","icontains"]);function Yu(e,t,a){const i=parseInt(t,16)-65536;return i!==i||a?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function xt(e){return e.replace(Uu,Yu)}function Qa(e){return e===39||e===34}function mn(e){return e===32||e===9||e===10||e===12||e===13}function sa(e){const t=[],a=En(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function En(e,t,a){let i=[];function n(b){const N=t.slice(a+b).match(fn);if(!N)throw new Error(`Expected name, found ${t.slice(a)}`);const[I]=N;return a+=b+I.length,xt(I)}function r(b){for(a+=b;a<t.length&&mn(t.charCodeAt(a));)a++}function u(){a+=1;const b=a;let N=1;for(;N>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?N++:t.charCodeAt(a)===41&&!o(a)&&N--;if(N)throw new Error("Parenthesis not matched");return xt(t.slice(b,a-1))}function o(b){let N=0;for(;t.charCodeAt(--b)===92;)N++;return(N&1)===1}function l(){if(i.length>0&&St(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function h(b){if(i.length>0&&i[i.length-1].type===L.Descendant){i[i.length-1].type=b;return}l(),i.push({type:b})}function m(b,N){i.push({type:L.Attribute,name:b,action:N,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===L.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");e.push(i)}if(r(0),t.length===a)return a;e:for(;a<t.length;){const b=t.charCodeAt(a);switch(b){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==L.Descendant)&&(l(),i.push({type:L.Descendant})),r(1);break}case 62:{h(L.Child),r(1);break}case 60:{h(L.Parent),r(1);break}case 126:{h(L.Sibling),r(1);break}case 43:{h(L.Adjacent),r(1);break}case 46:{m("class",ne.Element);break}case 35:{m("id",ne.Equals);break}case 91:{r(1);let N,I=null;t.charCodeAt(a)===124?N=n(1):t.startsWith("*|",a)?(I="*",N=n(2)):(N=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(I=N,N=n(1))),r(0);let R=ne.Exists;const P=Fu.get(t.charCodeAt(a));if(P){if(R=P,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(R=ne.Equals,r(1));let $="",v=null;if(R!=="exists"){if(Qa(t.charCodeAt(a))){const k=t.charCodeAt(a);let _=a+1;for(;_<t.length&&(t.charCodeAt(_)!==k||o(_));)_+=1;if(t.charCodeAt(_)!==k)throw new Error("Attribute value didn't end");$=xt(t.slice(a+1,_)),a=_+1}else{const k=a;for(;a<t.length&&(!mn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;$=xt(t.slice(k,a))}r(0);const F=t.charCodeAt(a)|32;F===115?(v=!1,r(1)):F===105&&(v=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const q={type:L.Attribute,name:N,action:R,value:$,namespace:I,ignoreCase:v};i.push(q);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:L.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const N=n(1).toLowerCase();let I=null;if(t.charCodeAt(a)===40)if(Hu.has(N)){if(Qa(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${N} cannot be quoted`);if(I=[],a=En(I,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${N} (${t})`);a+=1}else{if(I=u(),Vu.has(N)){const R=I.charCodeAt(0);R===I.charCodeAt(I.length-1)&&Qa(R)&&(I=I.slice(1,-1))}I=xt(I)}i.push({type:L.Pseudo,name:N,data:I});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const R=t.indexOf("*/",a+2);if(R<0)throw new Error("Comment was not terminated");a=R+2,i.length===0&&r(0);break}let N=null,I;if(b===42)a+=1,I="*";else if(b===124){if(I="",t.charCodeAt(a+1)===124){h(L.ColumnCombinator),r(2);break}}else if(fn.test(t.slice(a)))I=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(N=I,t.charCodeAt(a+1)===42?(I="*",a+=2):I=n(1)),i.push(I==="*"?{type:L.Universal,namespace:N}:{type:L.Tag,name:I,namespace:N})}}}return T(),a}function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ra={trueFunc:function(){return!0},falseFunc:function(){return!1}};const U=qu(ra),Tn=new Map([[L.Universal,50],[L.Tag,30],[L.Attribute,1],[L.Pseudo,0]]);function ja(e){return!Tn.has(e.type)}const Wu=new Map([[ne.Exists,10],[ne.Equals,8],[ne.Not,7],[ne.Start,6],[ne.End,6],[ne.Any,5]]);function $u(e){const t=e.map(pn);for(let a=1;a<e.length;a++){const i=t[a];if(!(i<0))for(let n=a-1;n>=0&&i<t[n];n--){const r=e[n+1];e[n+1]=e[n],e[n]=r,t[n+1]=t[n],t[n]=i}}}function pn(e){var t,a;let i=(t=Tn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===L.Attribute?(i=(a=Wu.get(e.action))!==null&&a!==void 0?a:4,e.action===ne.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===L.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?i=0:Array.isArray(e.data)?(i=Math.min(...e.data.map(n=>Math.min(...n.map(pn)))),i<0&&(i=0)):i=2:i=3),i}const Gu=/[-[\]{}()*+?.,\\^$|#\s]/g;function bn(e){return e.replace(Gu,"\\$&")}const Xu=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function Je(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Xu.has(e.name)}const Qu={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return Je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return o!=null&&o.length===r.length&&o.toLowerCase()===r&&e(u)}):u=>i.getAttributeValue(u,n)===r&&e(u)},hyphen(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return Je(t,a)?(r=r.toLowerCase(),function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u).toLowerCase()===r&&e(l)}):function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u)===r&&e(l)}},element(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(/\s/.test(r))return U.falseFunc;const u=new RegExp(`(?:^|\\s)${bn(r)}(?:$|\\s)`,Je(t,a)?"i":"");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}},exists(e,{name:t},{adapter:a}){return i=>a.hasAttrib(i,t)&&e(i)},start(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return u===0?U.falseFunc:Je(t,a)?(r=r.toLowerCase(),o=>{const l=i.getAttributeValue(o,n);return l!=null&&l.length>=u&&l.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.startsWith(r))&&e(o)}},end(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=-r.length;return u===0?U.falseFunc:Je(t,a)?(r=r.toLowerCase(),o=>{var l;return((l=i.getAttributeValue(o,n))===null||l===void 0?void 0:l.substr(u).toLowerCase())===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return U.falseFunc;if(Je(t,a)){const u=new RegExp(bn(r),"i");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}}return u=>{var o;return!!(!((o=i.getAttributeValue(u,n))===null||o===void 0)&&o.includes(r))&&e(u)}},not(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return r===""?u=>!!i.getAttributeValue(u,n)&&e(u):Je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return(o==null||o.length!==r.length||o.toLowerCase()!==r)&&e(u)}):u=>i.getAttributeValue(u,n)!==r&&e(u)}},ju=new Set([9,10,12,13,32]),gn=48,zu=57;function Ku(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,a=0,i=r(),n=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,a=i*(n??1),o(),t<e.length?(i=r(),o(),n=u()):i=n=0),n===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[a,i*n];function r(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){const l=t;let h=0;for(;t<e.length&&e.charCodeAt(t)>=gn&&e.charCodeAt(t)<=zu;)h=h*10+(e.charCodeAt(t)-gn),t++;return t===l?null:h}function o(){for(;t<e.length&&ju.has(e.charCodeAt(t));)t++}}function Zu(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return U.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?U.trueFunc:r=>r>=a;const i=Math.abs(t),n=(a%i+i)%i;return t>1?r=>r>=a&&r%i===n:r=>r<=a&&r%i===n}function ua(e){return Zu(Ku(e))}function oa(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const za={contains(e,t,{adapter:a}){return function(n){return e(n)&&a.getText(n).includes(t)}},icontains(e,t,{adapter:a}){const i=t.toLowerCase();return function(r){return e(r)&&a.getText(r).toLowerCase().includes(i)}},"nth-child"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length&&!i(u,o[h]);h++)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0&&!i(u,o[h]);h--)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length;h++){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return n(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0;h--){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return n(l)&&e(u)}},root(e,t,{adapter:a}){return i=>{const n=a.getParent(i);return(n==null||!a.isTag(n))&&e(i)}},scope(e,t,a,i){const{equals:n}=a;return!i||i.length===0?za.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:Ka("isHovered"),visited:Ka("isVisited"),active:Ka("isActive")};function Ka(e){return function(a,i,{adapter:n}){const r=n[e];return typeof r!="function"?U.falseFunc:function(o){return r(o)&&a(o)}}}const _n={empty(e,{adapter:t}){return!t.getChildren(e).some(a=>t.isTag(a)||t.getText(a)!=="")},"first-child"(e,{adapter:t,equals:a}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const i=t.getSiblings(e).find(n=>t.isTag(n));return i!=null&&a(e,i)},"last-child"(e,{adapter:t,equals:a}){const i=t.getSiblings(e);for(let n=i.length-1;n>=0;n--){if(a(e,i[n]))return!0;if(t.isTag(i[n]))break}return!1},"first-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=0;r<i.length;r++){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"last-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=i.length-1;r>=0;r--){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"only-of-type"(e,{adapter:t,equals:a}){const i=t.getName(e);return t.getSiblings(e).every(n=>a(e,n)||!t.isTag(n)||t.getName(n)!==i)},"only-child"(e,{adapter:t,equals:a}){return t.getSiblings(e).every(i=>a(e,i)||!t.isTag(i))}};function An(e,t,a,i){if(a===null){if(e.length>i)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===i)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Ju={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
1
+ (function(He,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(He=typeof globalThis<"u"?globalThis:He||self,c(He.GpWebModule={},He.Vue))})(this,function(He,c){"use strict";var X;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(X||(X={}));function Er(e){return e.type===X.Tag||e.type===X.Script||e.type===X.Style}const Tr=X.Root,pr=X.Text,br=X.Directive,gr=X.Comment,_r=X.Script,Ar=X.Style,Nr=X.Tag,Cr=X.CDATA,Ir=X.Doctype;let Bi=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return At(this,t)}};class Oa extends Bi{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class _t extends Oa{constructor(){super(...arguments),this.type=X.Text}get nodeType(){return 3}}class Da extends Oa{constructor(){super(...arguments),this.type=X.Comment}get nodeType(){return 8}}class La extends Oa{constructor(t,a){super(a),this.name=t,this.type=X.Directive}get nodeType(){return 1}}class ya extends Bi{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Ui extends ya{constructor(){super(...arguments),this.type=X.CDATA}get nodeType(){return 4}}class ze extends ya{constructor(){super(...arguments),this.type=X.Root}get nodeType(){return 9}}class Ra extends ya{constructor(t,a,i=[],n=t==="script"?X.Script:t==="style"?X.Style:X.Tag){super(i),this.name=t,this.attribs=a,this.type=n}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var a,i;return{name:t,value:this.attribs[t],namespace:(a=this["x-attribsNamespace"])===null||a===void 0?void 0:a[t],prefix:(i=this["x-attribsPrefix"])===null||i===void 0?void 0:i[t]}})}}function k(e){return Er(e)}function Xt(e){return e.type===X.CDATA}function Re(e){return e.type===X.Text}function Qt(e){return e.type===X.Comment}function Ma(e){return e.type===X.Directive}function Ve(e){return e.type===X.Root}function oe(e){return Object.prototype.hasOwnProperty.call(e,"children")}function At(e,t=!1){let a;if(Re(e))a=new _t(e.data);else if(Qt(e))a=new Da(e.data);else if(k(e)){const i=t?Pa(e.children):[],n=new Ra(e.name,{...e.attribs},i);i.forEach(r=>r.parent=n),e.namespace!=null&&(n.namespace=e.namespace),e["x-attribsNamespace"]&&(n["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(n["x-attribsPrefix"]={...e["x-attribsPrefix"]}),a=n}else if(Xt(e)){const i=t?Pa(e.children):[],n=new Ui(i);i.forEach(r=>r.parent=n),a=n}else if(Ve(e)){const i=t?Pa(e.children):[],n=new ze(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(Ma(e)){const i=new La(e.name,e.data);e["x-name"]!=null&&(i["x-name"]=e["x-name"],i["x-publicId"]=e["x-publicId"],i["x-systemId"]=e["x-systemId"]),a=i}else throw new Error(`Not implemented yet: ${e.type}`);return a.startIndex=e.startIndex,a.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(a.sourceCodeLocation=e.sourceCodeLocation),a}function Pa(e){const t=e.map(a=>At(a,!0));for(let a=1;a<t.length;a++)t[a].prev=t[a-1],t[a-1].next=t[a];return t}const Fi={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Sr{constructor(t,a,i){this.dom=[],this.root=new ze(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=Fi),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??Fi,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new ze(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,a){const i=this.options.xmlMode?X.Tag:void 0,n=new Ra(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===X.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new _t(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===X.Comment){this.lastNode.data+=t;return}const a=new Da(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new _t(""),a=new Ui([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new La(t,a);this.addNode(i)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const a=this.tagStack[this.tagStack.length-1],i=a.children[a.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),a.children.push(t),i&&(t.prev=i,i.next=t),t.parent=a,this.lastNode=null}}const ka=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Hi=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var va;const xr=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),wa=(va=String.fromCodePoint)!==null&&va!==void 0?va:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Or(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=xr.get(e))!==null&&t!==void 0?t:e}var ce;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ce||(ce={}));const Dr=32;var Ye;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ye||(Ye={}));function Ba(e){return e>=ce.ZERO&&e<=ce.NINE}function Lr(e){return e>=ce.UPPER_A&&e<=ce.UPPER_F||e>=ce.LOWER_A&&e<=ce.LOWER_F}function yr(e){return e>=ce.UPPER_A&&e<=ce.UPPER_Z||e>=ce.LOWER_A&&e<=ce.LOWER_Z||Ba(e)}function Rr(e){return e===ce.EQUALS||yr(e)}var le;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(le||(le={}));var Ie;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ie||(Ie={}));class Ua{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=le.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ie.Strict}startEntity(t){this.decodeMode=t,this.state=le.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case le.EntityStart:return t.charCodeAt(a)===ce.NUM?(this.state=le.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=le.NamedEntity,this.stateNamedEntity(t,a));case le.NumericStart:return this.stateNumericStart(t,a);case le.NumericDecimal:return this.stateNumericDecimal(t,a);case le.NumericHex:return this.stateNumericHex(t,a);case le.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|Dr)===ce.LOWER_X?(this.state=le.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=le.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,i,n){if(a!==i){const r=i-a;this.result=this.result*Math.pow(n,r)+parseInt(t.substr(a,r),n),this.consumed+=r}}stateNumericHex(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Ba(n)||Lr(n))a+=1;else return this.addToNumericResult(t,i,a,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,a,16),-1}stateNumericDecimal(t,a){const i=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Ba(n))a+=1;else return this.addToNumericResult(t,i,a,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,a,10),-1}emitNumericEntity(t,a){var i;if(this.consumed<=a)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ce.SEMI)this.consumed+=1;else if(this.decodeMode===Ie.Strict)return 0;return this.emitCodePoint(Or(this.result),this.consumed),this.errors&&(t!==ce.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:i}=this;let n=i[this.treeIndex],r=(n&Ye.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=Mr(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ie.Attribute&&(r===0||Rr(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Ye.VALUE_LENGTH)>>14,r!==0){if(u===ce.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Ie.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:i}=this,n=(i[a]&Ye.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,i){const{decodeTree:n}=this;return this.emitCodePoint(a===1?n[t]&~Ye.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case le.NamedEntity:return this.result!==0&&(this.decodeMode!==Ie.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case le.NumericDecimal:return this.emitNumericEntity(0,2);case le.NumericHex:return this.emitNumericEntity(0,3);case le.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case le.EntityStart:return 0}}}function Vi(e){let t="";const a=new Ua(e,i=>t+=wa(i));return function(n,r){let u=0,o=0;for(;(o=n.indexOf("&",o))>=0;){t+=n.slice(u,o),a.startEntity(r);const h=a.write(n,o+1);if(h<0){u=o+a.end();break}u=o+h,o=h===0?u+1:u}const l=t+n.slice(u);return t="",l}}function Mr(e,t,a,i){const n=(t&Ye.BRANCH_LENGTH)>>7,r=t&Ye.JUMP_TABLE;if(n===0)return r!==0&&i===r?a:-1;if(r){const l=i-r;return l<0||l>=n?-1:e[a+l]-1}let u=a,o=u+n-1;for(;u<=o;){const l=u+o>>>1,h=e[l];if(h<i)u=l+1;else if(h>i)o=l-1;else return e[l+n]}return-1}Vi(ka),Vi(Hi);const Yi=/["&'<>$\x80-\uFFFF]/g,Pr=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),kr=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function qi(e){let t="",a=0,i;for(;(i=Yi.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=Pr.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${kr(e,n).toString(16)};`,a=Yi.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function Wi(e,t){return function(i){let n,r=0,u="";for(;n=e.exec(i);)r!==n.index&&(u+=i.substring(r,n.index)),u+=t.get(n[0].charCodeAt(0)),r=n.index+1;return u+i.substring(r)}}const $i=Wi(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Gi=Wi(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),vr=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),wr=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Br=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function Ur(e){return e.replace(/"/g,"&quot;")}function Fr(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?Ur:t.xmlMode||t.encodeEntities!=="utf8"?qi:$i;return Object.keys(e).map(n=>{var r,u;const o=(r=e[n])!==null&&r!==void 0?r:"";return t.xmlMode==="foreign"&&(n=(u=wr.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Xi=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function jt(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Hr(a[n],t);return i}function Hr(e,t){switch(e.type){case Tr:return jt(e.children,t);case Ir:case br:return Wr(e);case gr:return Xr(e);case Cr:return Gr(e);case _r:case Ar:case Nr:return qr(e,t);case pr:return $r(e,t)}}const Vr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Yr=new Set(["svg","math"]);function qr(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=vr.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&Vr.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&Yr.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=Fr(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Xi.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=jt(e.children,t)),(t.xmlMode||!Xi.has(e.name))&&(i+=`</${e.name}>`)),i}function Wr(e){return`<${e.data}>`}function $r(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&Br.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?qi(i):Gi(i)),i}function Gr(e){return`<![CDATA[${e.children[0].data}]]>`}function Xr(e){return`<!--${e.data}-->`}function Qi(e,t){return jt(e,t)}function Qr(e,t){return oe(e)?e.children.map(a=>Qi(a,t)).join(""):""}function zt(e){return Array.isArray(e)?e.map(zt).join(""):k(e)?e.name==="br"?`
2
+ `:zt(e.children):Xt(e)?zt(e.children):Re(e)?e.data:""}function rt(e){return Array.isArray(e)?e.map(rt).join(""):oe(e)&&!Qt(e)?rt(e.children):Re(e)?e.data:""}function Kt(e){return Array.isArray(e)?e.map(Kt).join(""):oe(e)&&(e.type===X.Tag||Xt(e))?Kt(e.children):Re(e)?e.data:""}function Zt(e){return oe(e)?e.children:[]}function ji(e){return e.parent||null}function zi(e){const t=ji(e);if(t!=null)return Zt(t);const a=[e];let{prev:i,next:n}=e;for(;i!=null;)a.unshift(i),{prev:i}=i;for(;n!=null;)a.push(n),{next:n}=n;return a}function jr(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function zr(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function Kr(e){return e.name}function Fa(e){let{next:t}=e;for(;t!==null&&!k(t);)({next:t}=t);return t}function Ha(e){let{prev:t}=e;for(;t!==null&&!k(t);)({prev:t}=t);return t}function Ke(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,a=t.lastIndexOf(e);a>=0&&t.splice(a,1)}e.next=null,e.prev=null,e.parent=null}function Zr(e,t){const a=t.prev=e.prev;a&&(a.next=t);const i=t.next=e.next;i&&(i.prev=t);const n=t.parent=e.parent;if(n){const r=n.children;r[r.lastIndexOf(e)]=t,e.parent=null}}function Jr(e,t){if(Ke(t),t.next=null,t.parent=e,e.children.push(t)>1){const a=e.children[e.children.length-2];a.next=t,t.prev=a}else t.prev=null}function eu(e,t){Ke(t);const{parent:a}=e,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=a,i){if(i.prev=t,a){const n=a.children;n.splice(n.lastIndexOf(i),0,t)}}else a&&a.children.push(t)}function tu(e,t){if(Ke(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const a=e.children[1];a.prev=t,t.next=a}else t.next=null}function au(e,t){Ke(t);const{parent:a}=e;if(a){const i=a.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=a,t.prev=e.prev,t.next=e,e.prev=t}function Jt(e,t,a=!0,i=1/0){return Va(e,Array.isArray(t)?t:[t],a,i)}function Va(e,t,a,i){const n=[],r=[t],u=[0];for(;;){if(u[0]>=r[0].length){if(u.length===1)return n;r.shift(),u.shift();continue}const o=r[0][u[0]++];if(e(o)&&(n.push(o),--i<=0))return n;a&&oe(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function iu(e,t){return t.find(e)}function Ya(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(k(r))e(r)?i=r:a&&r.children.length>0&&(i=Ya(e,r.children,!0));else continue}return i}function Ki(e,t){return t.some(a=>k(a)&&(e(a)||Ki(e,a.children)))}function nu(e,t){const a=[],i=[t],n=[0];for(;;){if(n[0]>=i[0].length){if(i.length===1)return a;i.shift(),n.shift();continue}const r=i[0][n[0]++];k(r)&&(e(r)&&a.push(r),r.children.length>0&&(n.unshift(0),i.unshift(r.children)))}}const ea={tag_name(e){return typeof e=="function"?t=>k(t)&&e(t.name):e==="*"?k:t=>k(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>Re(t)&&e(t.data):t=>Re(t)&&t.data===e}};function Zi(e,t){return typeof t=="function"?a=>k(a)&&t(a.attribs[e]):a=>k(a)&&a.attribs[e]===t}function su(e,t){return a=>e(a)||t(a)}function Ji(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(ea,a)?ea[a](i):Zi(a,i)});return t.length===0?null:t.reduce(su)}function ru(e,t){const a=Ji(e);return a?a(t):!0}function uu(e,t,a,i=1/0){const n=Ji(e);return n?Jt(n,t,a,i):[]}function ou(e,t,a=!0){return Array.isArray(t)||(t=[t]),Ya(Zi("id",e),t,a)}function ut(e,t,a=!0,i=1/0){return Jt(ea.tag_name(e),t,a,i)}function cu(e,t,a=!0,i=1/0){return Jt(ea.tag_type(e),t,a,i)}function lu(e){let t=e.length;for(;--t>=0;){const a=e[t];if(t>0&&e.lastIndexOf(a,t-1)>=0){e.splice(t,1);continue}for(let i=a.parent;i;i=i.parent)if(e.includes(i)){e.splice(t,1);break}}return e}var Se;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(Se||(Se={}));function en(e,t){const a=[],i=[];if(e===t)return 0;let n=oe(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=oe(t)?t:t.parent;n;)i.unshift(n),n=n.parent;const r=Math.min(a.length,i.length);let u=0;for(;u<r&&a[u]===i[u];)u++;if(u===0)return Se.DISCONNECTED;const o=a[u-1],l=o.children,h=a[u],m=i[u];return l.indexOf(h)>l.indexOf(m)?o===t?Se.FOLLOWING|Se.CONTAINED_BY:Se.FOLLOWING:o===e?Se.PRECEDING|Se.CONTAINS:Se.PRECEDING}function ot(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=en(t,a);return i&Se.PRECEDING?-1:i&Se.FOLLOWING?1:0}),e}function du(e){const t=ta(Tu,e);return t?t.name==="feed"?hu(t):fu(t):null}function hu(e){var t;const a=e.children,i={type:"atom",items:ut("entry",a).map(u=>{var o;const{children:l}=u,h={media:tn(l)};pe(h,"id","id",l),pe(h,"title","title",l);const m=(o=ta("link",l))===null||o===void 0?void 0:o.attribs.href;m&&(h.link=m);const T=qe("summary",l)||qe("content",l);T&&(h.description=T);const b=qe("updated",l);return b&&(h.pubDate=new Date(b)),h})};pe(i,"id","id",a),pe(i,"title","title",a);const n=(t=ta("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),pe(i,"description","subtitle",a);const r=qe("updated",a);return r&&(i.updated=new Date(r)),pe(i,"author","email",a,!0),i}function fu(e){var t,a;const i=(a=(t=ta("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&a!==void 0?a:[],n={type:e.name.substr(0,3),id:"",items:ut("item",e.children).map(u=>{const{children:o}=u,l={media:tn(o)};pe(l,"id","guid",o),pe(l,"title","title",o),pe(l,"link","link",o),pe(l,"description","description",o);const h=qe("pubDate",o)||qe("dc:date",o);return h&&(l.pubDate=new Date(h)),l})};pe(n,"title","title",i),pe(n,"link","link",i),pe(n,"description","description",i);const r=qe("lastBuildDate",i);return r&&(n.updated=new Date(r)),pe(n,"author","managingEditor",i,!0),n}const mu=["url","type","lang"],Eu=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function tn(e){return ut("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of mu)a[n]&&(i[n]=a[n]);for(const n of Eu)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function ta(e,t){return ut(e,t,!0,1)[0]}function qe(e,t,a=!1){return rt(ut(e,t,a,1)).trim()}function pe(e,t,a,i,n=!1){const r=qe(a,i,n);r&&(e[t]=r)}function Tu(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const aa=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Se},append:eu,appendChild:Jr,compareDocumentPosition:en,existsOne:Ki,filter:Jt,find:Va,findAll:nu,findOne:Ya,findOneChild:iu,getAttributeValue:jr,getChildren:Zt,getElementById:ou,getElements:uu,getElementsByTagName:ut,getElementsByTagType:cu,getFeed:du,getInnerHTML:Qr,getName:Kr,getOuterHTML:Qi,getParent:ji,getSiblings:zi,getText:zt,hasAttrib:zr,hasChildren:oe,innerText:Kt,isCDATA:Xt,isComment:Qt,isDocument:Ve,isTag:k,isText:Re,nextElementSibling:Fa,prepend:au,prependChild:tu,prevElementSibling:Ha,removeElement:Ke,removeSubsets:lu,replaceElement:Zr,testElement:ru,textContent:rt,uniqueSort:ot},Symbol.toStringTag,{value:"Module"})),pu={_useHtmlParser2:!1};function qa(e,t){if(!e)return t??pu;const a={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(a._useHtmlParser2=!0,a.xmlMode=!0,e.xml!==!0&&Object.assign(a,e.xml)):e.xmlMode&&(a._useHtmlParser2=!0),a}function an(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function bu(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function gu(e,t){const a=bu(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...qa(t)};return an(this,a,i)}function _u(e){const t={...this._options,xmlMode:!0};return an(this,e,t)}function Nt(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=rt(t[i]);return a}function Au(e,t,a=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(a=t);const i=this.load(e,this._options,!1);return a||i("script").remove(),[...i.root()[0].children]}function Nu(){return this(this._root)}function nn(e,t){if(t===e)return!1;let a=t;for(;a&&a!==a.parent;)if(a=a.parent,a===e)return!0;return!1}function Cu(e){return this.root().extract(e)}function Iu(e,t){if(!sn(e)||!sn(t))return;let a=e.length;const i=+t.length;for(let n=0;n<i;n++)e[a++]=t[n];return e.length=a,e}function sn(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const Su=Object.freeze(Object.defineProperty({__proto__:null,contains:nn,extract:Cu,html:gu,merge:Iu,parseHTML:Au,root:Nu,text:Nt,xml:_u},Symbol.toStringTag,{value:"Module"}));function we(e){return e.cheerio!=null}function xu(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function Ou(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function ee(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var Ze;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Ze||(Ze={}));function Wa(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=Ze.LowerA&&a<=Ze.LowerZ||a>=Ze.UpperA&&a<=Ze.UpperZ||a===Ze.Exclamation)&&e.includes(">",t+2)}const Ct=Object.prototype.hasOwnProperty,It=/\s+/,$a="data-",Ga=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Du=/^{[^]*}$|^\[[^]*]$/;function ia(e,t,a){var i;if(!(!e||!k(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(Ct.call(e.attribs,t))return!a&&Ga.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Nt(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function ct(e,t,a){a===null?cn(e,t):e.attribs[t]=`${a}`}function Lu(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return ee(this,(a,i)=>{k(a)&&ct(a,e,t.call(a,i,a.attribs[e]))})}return ee(this,a=>{if(k(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];ct(a,i,n)}else ct(a,e,t)})}return arguments.length>1?this:ia(this[0],e,this.options.xmlMode)}function rn(e,t,a){return t in e?e[t]:!a&&Ga.test(t)?ia(e,t,!1)!==void 0:ia(e,t,a)}function Xa(e,t,a,i){t in e?e[t]=a:ct(e,t,!i&&Ga.test(t)?a?"":null:`${a}`)}function yu(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!k(i))return;switch(e){case"style":{const n=this.css(),r=Object.keys(n);for(let u=0;u<r.length;u++)n[u]=r[u];return n.length=r.length,n}case"tagName":case"nodeName":return i.name.toUpperCase();case"href":case"src":{const n=(a=i.attribs)===null||a===void 0?void 0:a[e];return typeof URL<"u"&&(e==="href"&&(i.tagName==="a"||i.tagName==="link")||e==="src"&&(i.tagName==="img"||i.tagName==="iframe"||i.tagName==="audio"||i.tagName==="video"||i.tagName==="source"))&&n!==void 0&&this.options.baseURI?new URL(n,this.options.baseURI).href:n}case"innerText":return Kt(i);case"textContent":return rt(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return rn(i,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return ee(this,(i,n)=>{k(i)&&Xa(i,e,t.call(i,n,rn(i,e,this.options.xmlMode)),this.options.xmlMode)})}return ee(this,i=>{if(k(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];Xa(i,n,r,this.options.xmlMode)}else Xa(i,e,t,this.options.xmlMode)})}}function un(e,t,a){var i;(i=e.data)!==null&&i!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&a!==void 0&&(e.data[t]=a)}function Ru(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith($a))continue;const a=xu(t.slice($a.length));Ct.call(e.data,a)||(e.data[a]=on(e.attribs[t]))}return e.data}function Mu(e,t){const a=$a+Ou(t),i=e.data;if(Ct.call(i,t))return i[t];if(Ct.call(e.attribs,a))return i[t]=on(e.attribs[a])}function on(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(Du.test(e))try{return JSON.parse(e)}catch{}return e}function Pu(e,t){var a;const i=this[0];if(!i||!k(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?Ru(n):typeof e=="object"||t!==void 0?(ee(this,r=>{k(r)&&(typeof e=="object"?un(r,e):un(r,e,t))}),this):Mu(n,e)}function ku(e){const t=arguments.length===0,a=this[0];if(!a||!k(a))return t?void 0:this;switch(a.name){case"textarea":return this.text(e);case"select":{const i=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const n=typeof e=="object"?e:[e];for(const r of n)this.find(`option[value="${r}"]`).attr("selected","");return this}return this.attr("multiple")?i.toArray().map(n=>Nt(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function cn(e,t){!e.attribs||!Ct.call(e.attribs,t)||delete e.attribs[t]}function na(e){return e?e.trim().split(It):[]}function vu(e){const t=na(e);for(const a of t)ee(this,i=>{k(i)&&cn(i,a)});return this}function wu(e){return this.toArray().some(t=>{const a=k(t)&&t.attribs.class;let i=-1;if(a&&e.length>0)for(;(i=a.indexOf(e,i+1))>-1;){const n=i+e.length;if((i===0||It.test(a[i-1]))&&(n===a.length||It.test(a[n])))return!0}return!1})}function ln(e){if(typeof e=="function")return ee(this,(i,n)=>{if(k(i)){const r=i.attribs.class||"";ln.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(It),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!k(n))continue;const r=ia(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const l=`${o} `;u.includes(` ${l}`)||(u+=l)}ct(n,"class",u.trim())}else ct(n,"class",t.join(" ").trim())}return this}function dn(e){if(typeof e=="function")return ee(this,(n,r)=>{k(n)&&dn.call([n],e.call(n,r,n.attribs.class||""))});const t=na(e),a=t.length,i=arguments.length===0;return ee(this,n=>{if(k(n))if(i)n.attribs.class="";else{const r=na(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const l=r.indexOf(t[o]);l>=0&&(r.splice(l,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function hn(e,t){if(typeof e=="function")return ee(this,(u,o)=>{k(u)&&hn.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(It),i=a.length,n=typeof t=="boolean"?t?1:-1:0,r=this.length;for(let u=0;u<r;u++){const o=this[u];if(!k(o))continue;const l=na(o.attribs.class);for(let h=0;h<i;h++){const m=l.indexOf(a[h]);n>=0&&m<0?l.push(a[h]):n<=0&&m>=0&&l.splice(m,1)}o.attribs.class=l.join(" ")}return this}const Bu=Object.freeze(Object.defineProperty({__proto__:null,addClass:ln,attr:Lu,data:Pu,hasClass:wu,prop:yu,removeAttr:vu,removeClass:dn,toggleClass:hn,val:ku},Symbol.toStringTag,{value:"Module"}));var L;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(L||(L={}));var re;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(re||(re={}));const fn=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Uu=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Fu=new Map([[126,re.Element],[94,re.Start],[36,re.End],[42,re.Any],[33,re.Not],[124,re.Hyphen]]),Hu=new Set(["has","not","matches","is","where","host","host-context"]);function St(e){switch(e.type){case L.Adjacent:case L.Child:case L.Descendant:case L.Parent:case L.Sibling:case L.ColumnCombinator:return!0;default:return!1}}const Vu=new Set(["contains","icontains"]);function Yu(e,t,a){const i=parseInt(t,16)-65536;return i!==i||a?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)}function xt(e){return e.replace(Uu,Yu)}function Qa(e){return e===39||e===34}function mn(e){return e===32||e===9||e===10||e===12||e===13}function sa(e){const t=[],a=En(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function En(e,t,a){let i=[];function n(b){const N=t.slice(a+b).match(fn);if(!N)throw new Error(`Expected name, found ${t.slice(a)}`);const[I]=N;return a+=b+I.length,xt(I)}function r(b){for(a+=b;a<t.length&&mn(t.charCodeAt(a));)a++}function u(){a+=1;const b=a;let N=1;for(;N>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?N++:t.charCodeAt(a)===41&&!o(a)&&N--;if(N)throw new Error("Parenthesis not matched");return xt(t.slice(b,a-1))}function o(b){let N=0;for(;t.charCodeAt(--b)===92;)N++;return(N&1)===1}function l(){if(i.length>0&&St(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function h(b){if(i.length>0&&i[i.length-1].type===L.Descendant){i[i.length-1].type=b;return}l(),i.push({type:b})}function m(b,N){i.push({type:L.Attribute,name:b,action:N,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===L.Descendant&&i.pop(),i.length===0)throw new Error("Empty sub-selector");e.push(i)}if(r(0),t.length===a)return a;e:for(;a<t.length;){const b=t.charCodeAt(a);switch(b){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==L.Descendant)&&(l(),i.push({type:L.Descendant})),r(1);break}case 62:{h(L.Child),r(1);break}case 60:{h(L.Parent),r(1);break}case 126:{h(L.Sibling),r(1);break}case 43:{h(L.Adjacent),r(1);break}case 46:{m("class",re.Element);break}case 35:{m("id",re.Equals);break}case 91:{r(1);let N,I=null;t.charCodeAt(a)===124?N=n(1):t.startsWith("*|",a)?(I="*",N=n(2)):(N=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(I=N,N=n(1))),r(0);let y=re.Exists;const P=Fu.get(t.charCodeAt(a));if(P){if(y=P,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(y=re.Equals,r(1));let $="",B=null;if(y!=="exists"){if(Qa(t.charCodeAt(a))){const v=t.charCodeAt(a);let _=a+1;for(;_<t.length&&(t.charCodeAt(_)!==v||o(_));)_+=1;if(t.charCodeAt(_)!==v)throw new Error("Attribute value didn't end");$=xt(t.slice(a+1,_)),a=_+1}else{const v=a;for(;a<t.length&&(!mn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;$=xt(t.slice(v,a))}r(0);const F=t.charCodeAt(a)|32;F===115?(B=!1,r(1)):F===105&&(B=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const q={type:L.Attribute,name:N,action:y,value:$,namespace:I,ignoreCase:B};i.push(q);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:L.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const N=n(1).toLowerCase();let I=null;if(t.charCodeAt(a)===40)if(Hu.has(N)){if(Qa(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${N} cannot be quoted`);if(I=[],a=En(I,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${N} (${t})`);a+=1}else{if(I=u(),Vu.has(N)){const y=I.charCodeAt(0);y===I.charCodeAt(I.length-1)&&Qa(y)&&(I=I.slice(1,-1))}I=xt(I)}i.push({type:L.Pseudo,name:N,data:I});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const y=t.indexOf("*/",a+2);if(y<0)throw new Error("Comment was not terminated");a=y+2,i.length===0&&r(0);break}let N=null,I;if(b===42)a+=1,I="*";else if(b===124){if(I="",t.charCodeAt(a+1)===124){h(L.ColumnCombinator),r(2);break}}else if(fn.test(t.slice(a)))I=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(N=I,t.charCodeAt(a+1)===42?(I="*",a+=2):I=n(1)),i.push(I==="*"?{type:L.Universal,namespace:N}:{type:L.Tag,name:I,namespace:N})}}}return T(),a}function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ra={trueFunc:function(){return!0},falseFunc:function(){return!1}};const U=qu(ra),Tn=new Map([[L.Universal,50],[L.Tag,30],[L.Attribute,1],[L.Pseudo,0]]);function ja(e){return!Tn.has(e.type)}const Wu=new Map([[re.Exists,10],[re.Equals,8],[re.Not,7],[re.Start,6],[re.End,6],[re.Any,5]]);function $u(e){const t=e.map(pn);for(let a=1;a<e.length;a++){const i=t[a];if(!(i<0))for(let n=a-1;n>=0&&i<t[n];n--){const r=e[n+1];e[n+1]=e[n],e[n]=r,t[n+1]=t[n],t[n]=i}}}function pn(e){var t,a;let i=(t=Tn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===L.Attribute?(i=(a=Wu.get(e.action))!==null&&a!==void 0?a:4,e.action===re.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===L.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?i=0:Array.isArray(e.data)?(i=Math.min(...e.data.map(n=>Math.min(...n.map(pn)))),i<0&&(i=0)):i=2:i=3),i}const Gu=/[-[\]{}()*+?.,\\^$|#\s]/g;function bn(e){return e.replace(Gu,"\\$&")}const Xu=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function Je(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Xu.has(e.name)}const Qu={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return Je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return o!=null&&o.length===r.length&&o.toLowerCase()===r&&e(u)}):u=>i.getAttributeValue(u,n)===r&&e(u)},hyphen(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return Je(t,a)?(r=r.toLowerCase(),function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u).toLowerCase()===r&&e(l)}):function(l){const h=i.getAttributeValue(l,n);return h!=null&&(h.length===u||h.charAt(u)==="-")&&h.substr(0,u)===r&&e(l)}},element(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(/\s/.test(r))return U.falseFunc;const u=new RegExp(`(?:^|\\s)${bn(r)}(?:$|\\s)`,Je(t,a)?"i":"");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}},exists(e,{name:t},{adapter:a}){return i=>a.hasAttrib(i,t)&&e(i)},start(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=r.length;return u===0?U.falseFunc:Je(t,a)?(r=r.toLowerCase(),o=>{const l=i.getAttributeValue(o,n);return l!=null&&l.length>=u&&l.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.startsWith(r))&&e(o)}},end(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;const u=-r.length;return u===0?U.falseFunc:Je(t,a)?(r=r.toLowerCase(),o=>{var l;return((l=i.getAttributeValue(o,n))===null||l===void 0?void 0:l.substr(u).toLowerCase())===r&&e(o)}):o=>{var l;return!!(!((l=i.getAttributeValue(o,n))===null||l===void 0)&&l.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return U.falseFunc;if(Je(t,a)){const u=new RegExp(bn(r),"i");return function(l){const h=i.getAttributeValue(l,n);return h!=null&&h.length>=r.length&&u.test(h)&&e(l)}}return u=>{var o;return!!(!((o=i.getAttributeValue(u,n))===null||o===void 0)&&o.includes(r))&&e(u)}},not(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return r===""?u=>!!i.getAttributeValue(u,n)&&e(u):Je(t,a)?(r=r.toLowerCase(),u=>{const o=i.getAttributeValue(u,n);return(o==null||o.length!==r.length||o.toLowerCase()!==r)&&e(u)}):u=>i.getAttributeValue(u,n)!==r&&e(u)}},ju=new Set([9,10,12,13,32]),gn=48,zu=57;function Ku(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,a=0,i=r(),n=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,a=i*(n??1),o(),t<e.length?(i=r(),o(),n=u()):i=n=0),n===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[a,i*n];function r(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){const l=t;let h=0;for(;t<e.length&&e.charCodeAt(t)>=gn&&e.charCodeAt(t)<=zu;)h=h*10+(e.charCodeAt(t)-gn),t++;return t===l?null:h}function o(){for(;t<e.length&&ju.has(e.charCodeAt(t));)t++}}function Zu(e){const t=e[0],a=e[1]-1;if(a<0&&t<=0)return U.falseFunc;if(t===-1)return r=>r<=a;if(t===0)return r=>r===a;if(t===1)return a<0?U.trueFunc:r=>r>=a;const i=Math.abs(t),n=(a%i+i)%i;return t>1?r=>r>=a&&r%i===n:r=>r<=a&&r%i===n}function ua(e){return Zu(Ku(e))}function oa(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const za={contains(e,t,{adapter:a}){return function(n){return e(n)&&a.getText(n).includes(t)}},icontains(e,t,{adapter:a}){const i=t.toLowerCase();return function(r){return e(r)&&a.getText(r).toLowerCase().includes(i)}},"nth-child"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length&&!i(u,o[h]);h++)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0&&!i(u,o[h]);h--)a.isTag(o[h])&&l++;return n(l)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=0;h<o.length;h++){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return n(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ua(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?oa(e,a):function(u){const o=a.getSiblings(u);let l=0;for(let h=o.length-1;h>=0;h--){const m=o[h];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&l++}return n(l)&&e(u)}},root(e,t,{adapter:a}){return i=>{const n=a.getParent(i);return(n==null||!a.isTag(n))&&e(i)}},scope(e,t,a,i){const{equals:n}=a;return!i||i.length===0?za.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:Ka("isHovered"),visited:Ka("isVisited"),active:Ka("isActive")};function Ka(e){return function(a,i,{adapter:n}){const r=n[e];return typeof r!="function"?U.falseFunc:function(o){return r(o)&&a(o)}}}const _n={empty(e,{adapter:t}){return!t.getChildren(e).some(a=>t.isTag(a)||t.getText(a)!=="")},"first-child"(e,{adapter:t,equals:a}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const i=t.getSiblings(e).find(n=>t.isTag(n));return i!=null&&a(e,i)},"last-child"(e,{adapter:t,equals:a}){const i=t.getSiblings(e);for(let n=i.length-1;n>=0;n--){if(a(e,i[n]))return!0;if(t.isTag(i[n]))break}return!1},"first-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=0;r<i.length;r++){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"last-of-type"(e,{adapter:t,equals:a}){const i=t.getSiblings(e),n=t.getName(e);for(let r=i.length-1;r>=0;r--){const u=i[r];if(a(e,u))return!0;if(t.isTag(u)&&t.getName(u)===n)break}return!1},"only-of-type"(e,{adapter:t,equals:a}){const i=t.getName(e);return t.getSiblings(e).every(n=>a(e,n)||!t.isTag(n)||t.getName(n)!==i)},"only-child"(e,{adapter:t,equals:a}){return t.getSiblings(e).every(i=>a(e,i)||!t.isTag(i))}};function An(e,t,a,i){if(a===null){if(e.length>i)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===i)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const Ju={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
3
3
  :is(button, input, select, textarea, optgroup, option)[disabled],
4
4
  optgroup[disabled] > option,
5
5
  fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
6
- )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Nn={};function eo(e,t){return e===U.falseFunc?U.falseFunc:a=>t.isTag(a)&&e(a)}function Cn(e,t){const a=t.getSiblings(e);if(a.length<=1)return[];const i=a.indexOf(e);return i<0||i===a.length-1?[]:a.slice(i+1).filter(t.isTag)}function Za(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const Ja=(e,t,a,i,n)=>{const r=n(t,Za(a),i);return r===U.trueFunc?e:r===U.falseFunc?U.falseFunc:u=>r(u)&&e(u)},ei={is:Ja,matches:Ja,where:Ja,not(e,t,a,i,n){const r=n(t,Za(a),i);return r===U.falseFunc?e:r===U.trueFunc?U.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,i,n){const{adapter:r}=a,u=Za(a);u.relativeSelector=!0;const o=t.some(m=>m.some(ja))?[Nn]:void 0,l=n(t,u,o);if(l===U.falseFunc)return U.falseFunc;const h=eo(l,r);if(o&&l!==U.trueFunc){const{shouldTestNextSiblings:m=!1}=l;return T=>{if(!e(T))return!1;o[0]=T;const b=r.getChildren(T),N=m?[...b,...Cn(T,r)]:b;return r.existsOne(h,N)}}return m=>e(m)&&r.existsOne(h,r.getChildren(m))}};function to(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in ei))throw new Error(`Unknown pseudo-class :${u}(${o})`);return ei[u](e,o,a,i,n)}const l=(r=a.pseudos)===null||r===void 0?void 0:r[u],h=typeof l=="string"?l:Ju[u];if(typeof h=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const m=sa(h);return ei.is(e,m,a,i,n)}if(typeof l=="function")return An(l,u,o,1),m=>l(m,o)&&e(m);if(u in za)return za[u](e,o,a,i);if(u in _n){const m=_n[u];return An(m,u,o,2),T=>m(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function ti(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function ao(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case L.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case L.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case L.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!a.xmlMode||a.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Qu[t.action](e,t,a)}case L.Pseudo:return to(e,t,a,i,n);case L.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!a.xmlMode||a.lowerCaseTags)&&(o=o.toLowerCase()),function(h){return r.getName(h)===o&&e(h)}}case L.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(h){let m=h;for(;m=ti(m,r);)if(e(m))return!0;return!1};const o=new WeakSet;return function(h){let m=h;for(;m=ti(m,r);)if(!o.has(m)){if(r.isTag(m)&&e(m))return!0;o.add(m)}return!1}}case"_flexibleDescendant":return function(l){let h=l;do if(e(h))return!0;while(h=ti(h,r));return!1};case L.Parent:return function(l){return r.getChildren(l).some(h=>r.isTag(h)&&e(h))};case L.Child:return function(l){const h=r.getParent(l);return h!=null&&r.isTag(h)&&e(h)};case L.Sibling:return function(l){const h=r.getSiblings(l);for(let m=0;m<h.length;m++){const T=h[m];if(u(l,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case L.Adjacent:return r.prevElementSibling?function(l){const h=r.prevElementSibling(l);return h!=null&&e(h)}:function(l){const h=r.getSiblings(l);let m;for(let T=0;T<h.length;T++){const b=h[T];if(u(l,b))break;r.isTag(b)&&(m=b)}return!!m&&e(m)};case L.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function In(e){return e.type===L.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(In)))}const io={type:L.Descendant},no={type:"_flexibleDescendant"},so={type:L.Pseudo,name:"scope",data:null};function ro(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===Nn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&ja(n[0])&&n[0].type!==L.Descendant))if(i&&!n.some(In))n.unshift(io);else continue;n.unshift(so)}}function Sn(e,t,a){var i;e.forEach($u),a=(i=t.context)!==null&&i!==void 0?i:a;const n=Array.isArray(a),r=a&&(Array.isArray(a)?a:[a]);if(t.relativeSelector!==!1)ro(e,t,r);else if(e.some(l=>l.length>0&&ja(l[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(l=>{if(l.length>=2){const[h,m]=l;h.type!==L.Pseudo||h.name!=="scope"||(n&&m.type===L.Descendant?l[1]=no:(m.type===L.Adjacent||m.type===L.Sibling)&&(u=!0))}return uo(l,t,r)}).reduce(oo,U.falseFunc);return o.shouldTestNextSiblings=u,o}function uo(e,t,a){var i;return e.reduce((n,r)=>n===U.falseFunc?U.falseFunc:ao(n,r,t,a,Sn),(i=t.rootFunc)!==null&&i!==void 0?i:U.trueFunc)}function oo(e,t){return t===U.falseFunc||e===U.trueFunc?e:e===U.falseFunc||t===U.trueFunc?t:function(i){return e(i)||t(i)}}const xn=(e,t)=>e===t,co={adapter:aa,equals:xn};function lo(e){var t,a,i,n;const r=e??co;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=aa),(a=r.equals)!==null&&a!==void 0||(r.equals=(n=(i=r.adapter)===null||i===void 0?void 0:i.equals)!==null&&n!==void 0?n:xn),r}function ho(e){return function(a,i,n){const r=lo(i);return e(a,r,n)}}const ai=ho(Sn);function On(e,t,a=!1){return a&&(e=fo(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function fo(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=Cn(a[n],t);a.push(...r)}return a}const mo=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function ca(e){return e.type!=="pseudo"?!1:mo.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(ca)):!1}function Eo(e,t,a){const i=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(i)?i>=0?i+1:1/0:0;case"lt":return isFinite(i)?i>=0?Math.min(i,a):1/0:0;case"gt":return isFinite(i)?1/0:0;case"odd":return 2*a;case"even":return 2*a-1;case"last":case"not":return 1/0}}function To(e){for(;e.parent;)e=e.parent;return e}function ii(e){const t=[],a=[];for(const i of e)i.some(ca)?t.push(i):a.push(i);return[a,t]}const po={type:L.Universal,namespace:null},bo={type:L.Pseudo,name:"scope",data:null};function Dn(e,t,a={}){return Ln([e],t,a)}function Ln(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=ii(sa(t));return i.length>0&&e.some(ai(i,a))||n.some(r=>Mn(r,e,a).length>0)}function go(e,t,a,i){const n=typeof a=="string"?parseInt(a,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(n)&&Math.abs(n)<t.length?[n<0?t[t.length+n]:t[n]]:[];case"gt":return isFinite(n)?t.slice(n+1):[];case"even":return t.filter((r,u)=>u%2===0);case"odd":return t.filter((r,u)=>u%2===1);case"not":{const r=new Set(yn(a,t,i));return t.filter(u=>!r.has(u))}}}function Rn(e,t,a={}){return yn(sa(e),t,a)}function yn(e,t,a){if(t.length===0)return[];const[i,n]=ii(e);let r;if(i.length){const u=si(t,i,a);if(n.length===0)return u;u.length&&(r=new Set(u))}for(let u=0;u<n.length&&(r==null?void 0:r.size)!==t.length;u++){const o=n[u];if((r?t.filter(m=>w(m)&&!r.has(m)):t).length===0)break;const h=Mn(o,t,a);if(h.length)if(r)h.forEach(m=>r.add(m));else{if(u===n.length-1)return h;r=new Set(h)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function Mn(e,t,a){var i;if(e.some(St)){const n=(i=a.root)!==null&&i!==void 0?i:To(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(bo),la(n,e,r,!0,t.length)}return la(t,e,a,!1,t.length)}function _o(e,t,a={},i=1/0){if(typeof e=="function")return Pn(t,e);const[n,r]=ii(sa(e)),u=r.map(o=>la(t,o,a,!0,i));return n.length&&u.push(ni(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:ot(u.reduce((o,l)=>[...o,...l]))}function la(e,t,a,i,n){const r=t.findIndex(ca),u=t.slice(0,r),o=t[r],l=t.length-1===r?n:1/0,h=Eo(o.name,o.data,l);if(h===0)return[];const T=(u.length===0&&!Array.isArray(e)?Zt(e).filter(w):u.length===0?(Array.isArray(e)?e:[e]).filter(w):i||u.some(St)?ni(e,[u],a,h):si(e,[u],a)).slice(0,h);let b=go(o.name,T,o.data,a);if(b.length===0||t.length===r+1)return b;const N=t.slice(r+1),I=N.some(St);if(I){if(St(N[0])){const{type:R}=N[0];(R===L.Sibling||R===L.Adjacent)&&(b=On(b,aa,!0)),N.unshift(po)}a={...a,relativeSelector:!1,rootFunc:R=>b.includes(R)}}else a.rootFunc&&a.rootFunc!==ra.trueFunc&&(a={...a,rootFunc:ra.trueFunc});return N.some(ca)?la(b,N,a,!1,n):I?ni(b,[N],a,n):si(b,[N],a)}function ni(e,t,a,i){const n=ai(t,a,e);return Pn(e,n,i)}function Pn(e,t,a=1/0){const i=On(e,aa,t.shouldTestNextSiblings);return Va(n=>w(n)&&t(n),i,!0,a)}function si(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(w);if(i.length===0)return i;const n=ai(t,a);return n===ra.trueFunc?i:i.filter(n)}const Ao=/^\s*[+~]/;function No(e){if(!e)return this._make([]);if(typeof e!="string"){const t=Be(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>nn(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function Co(e,t){var a;const i=this.toArray(),n=Ao.test(e)?i:this.children().toArray(),r={context:i,root:(a=this._root)===null||a===void 0?void 0:a[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(_o(e,n,r,t))}function ri(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=ci(r,i,this.options.xmlMode,(n=this._root)===null||n===void 0?void 0:n[0])),this._make(this.length>1&&r.length>1?a.reduce((u,o)=>o(u),r):r)}}}const Ot=ri((e,t)=>{let a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n.length>0&&(a=a.concat(n))}return a}),ui=ri((e,t)=>{const a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n!==null&&a.push(n)}return a});function oi(e,...t){let a=null;const i=ri((n,r)=>{const u=[];return J(r,o=>{for(let l;(l=n(o))&&!(a!=null&&a(l,u.length));o=l)u.push(l)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>Dn(o,n,this.options):n?Dt(n):null;const u=i.call(this,r);return a=null,u}}function lt(e){return e.length>1?Array.from(new Set(e)):e}const Io=ui(({parent:e})=>e&&!Ve(e)?e:null,lt),So=Ot(e=>{const t=[];for(;e.parent&&!Ve(e.parent);)t.push(e.parent),e=e.parent;return t},ot,e=>e.reverse()),xo=oi(({parent:e})=>e&&!Ve(e)?e:null,ot,e=>e.reverse());function Oo(e){var t;const a=[];if(!e)return this._make(a);const i={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},n=typeof e=="string"?r=>Dn(r,e,i):Dt(e);return J(this,r=>{for(r&&!Ve(r)&&!w(r)&&(r=r.parent);r&&w(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const Do=ui(e=>Fa(e)),Lo=Ot(e=>{const t=[];for(;e.next;)e=e.next,w(e)&&t.push(e);return t},lt),Ro=oi(e=>Fa(e),lt),yo=ui(e=>Ha(e)),Mo=Ot(e=>{const t=[];for(;e.prev;)e=e.prev,w(e)&&t.push(e);return t},lt),Po=oi(e=>Ha(e),lt),ko=Ot(e=>zi(e).filter(t=>w(t)&&t!==e),ot),wo=Ot(e=>Zt(e).filter(w),lt);function Bo(){const e=this.toArray().reduce((t,a)=>re(a)?t.concat(a.children):t,[]);return this._make(e)}function vo(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function Uo(e){let t=[];for(let a=0;a<this.length;a++){const i=this[a],n=e.call(i,a,i);n!=null&&(t=t.concat(n))}return this._make(t)}function Dt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):Be(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Fo(e){var t;return this._make(ci(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function ci(e,t,a,i){return typeof t=="string"?Rn(t,e,{xmlMode:a,root:i}):e.filter(Dt(t))}function Ho(e){const t=this.toArray();return typeof e=="string"?Ln(t.filter(w),e,this.options):e?t.some(Dt(e)):!1}function Vo(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(Rn(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=Dt(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function Yo(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function qo(){return this.length>1?this._make(this[0]):this}function Wo(){return this.length>0?this._make(this[this.length-1]):this}function $o(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function Go(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function Xo(){return Array.prototype.slice.call(this)}function Qo(e){let t,a;return e==null?(t=this.parent().children(),a=this[0]):typeof e=="string"?(t=this._make(e),a=this[0]):(t=this,a=Be(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function jo(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function zo(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Ko(e,t){const a=this._make(e,t),i=ot([...this.get(),...a.get()]);return this._make(i)}function Zo(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const Jo=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:Co,add:Ko,addBack:Zo,children:wo,closest:Oo,contents:Bo,each:vo,end:zo,eq:$o,filter:Fo,filterArray:ci,find:No,first:qo,get:Go,has:Yo,index:Qo,is:Ho,last:Wo,map:Uo,next:Do,nextAll:Lo,nextUntil:Ro,not:Vo,parent:Io,parents:So,parentsUntil:xo,prev:yo,prevAll:Mo,prevUntil:Po,siblings:ko,slice:jo,toArray:Xo},Symbol.toStringTag,{value:"Module"}));function ec(e){return function(a,i,n,r){if(typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=a.toString()),typeof a=="string")return e(a,i,n,r);const u=a;if(!Array.isArray(u)&&Ve(u))return u;const o=new ze([]);return et(u,o),o}}function et(e,t){const a=Array.isArray(e)?e:[e];t?t.children=a:t=null;for(let i=0;i<a.length;i++){const n=a[i];n.parent&&n.parent.children!==a&&Ke(n),t?(n.prev=a[i-1]||null,n.next=a[i+1]||null):n.prev=n.next=null,n.parent=t}return t}function tc(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const a=[];for(let i=0;i<e.length;i++){const n=e[i];if(typeof n=="object"){if(n==null)continue;if(!("length"in n)){a.push(t?At(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?At(e,!0):e]}function kn(e){return function(...t){const a=this.length-1;return J(this,(i,n)=>{if(!re(i))return;const r=typeof t[0]=="function"?t[0].call(i,n,this._render(i.children)):t,u=this._makeDomArray(r,n<a);e(u,i.children,i)})}}function We(e,t,a,i,n){var r,u;const o=[t,a,...i],l=t===0?null:e[t-1],h=t+a>=e.length?null:e[t+a];for(let m=0;m<i.length;++m){const T=i[m],b=T.parent;if(b){const I=b.children.indexOf(T);I>-1&&(b.children.splice(I,1),n===b&&t>I&&o[0]--)}T.parent=n,T.prev&&(T.prev.next=(r=T.next)!==null&&r!==void 0?r:null),T.next&&(T.next.prev=(u=T.prev)!==null&&u!==void 0?u:null),T.prev=m===0?l:i[m-1],T.next=m===i.length-1?h:i[m+1]}return l&&(l.next=i[0]),h&&(h.prev=i[i.length-1]),e.splice(...o)}function ac(e){return(Be(e)?e:this._make(e)).append(this),this}function ic(e){return(Be(e)?e:this._make(e)).prepend(this),this}const nc=kn((e,t,a)=>{We(t,t.length,0,e,a)}),sc=kn((e,t,a)=>{We(t,0,0,e,a)});function wn(e){return function(t){const a=this.length-1,i=this.parents().last();for(let n=0;n<this.length;n++){const r=this[n],u=typeof t=="function"?t.call(r,n,r):typeof t=="string"&&!Wa(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!re(o))continue;let l=o,h=0;for(;h<l.children.length;){const m=l.children[h];w(m)?(l=m,h=0):h++}e(r,l,[o])}return this}}const rc=wn((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);et([e],t),We(n,r,0,a,i)}),uc=wn((e,t,a)=>{re(e)&&(et(e.children,t),et(a,e))});function oc(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function cc(e){const t=this[0];if(t){const a=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let i;for(let r=0;r<a.length;r++)a[r].type==="tag"&&(i=a[r]);let n=0;for(;i&&n<i.children.length;){const r=i.children[n];r.type==="tag"?(i=r,n=0):n++}i&&this._make(i).append(this)}return this}function lc(...e){const t=this.length-1;return J(this,(a,i)=>{if(!re(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);We(n,r+1,0,o,a.parent)})}function dc(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const a of this._makeDomArray(e)){const i=this.clone().toArray(),{parent:n}=a;if(!n)continue;const r=n.children,u=r.indexOf(a);u<0||(We(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function hc(...e){const t=this.length-1;return J(this,(a,i)=>{if(!re(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);We(n,r,0,o,a.parent)})}function fc(e){const t=this._make(e);this.remove();const a=[];return J(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(We(u,o,0,n,r),a.push(...n))}),this._make(a)}function mc(e){const t=e?this.filter(e):this;return J(t,a=>{Ke(a),a.prev=a.next=a.parent=null}),this}function Ec(e){return J(this,(t,a)=>{const{parent:i}=t;if(!i)return;const n=i.children,r=typeof e=="function"?e.call(t,a,t):e,u=this._makeDomArray(r);et(u,null);const o=n.indexOf(t);We(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function Tc(){return J(this,e=>{if(re(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function pc(e){if(e===void 0){const t=this[0];return!t||!re(t)?null:this._render(t.children)}return J(this,t=>{if(!re(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=Be(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;et(a,t)})}function bc(){return this._render(this)}function gc(e){return e===void 0?Nt(this):typeof e=="function"?J(this,(t,a)=>this._make(t).text(e.call(t,a,Nt([t])))):J(this,t=>{if(!re(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new _t(`${e}`);et(a,t)})}function _c(){const e=Array.prototype.map.call(this.get(),a=>At(a,!0)),t=new ze(e);for(const a of e)a.parent=t;return this._make(e)}const Ac=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:tc,after:lc,append:nc,appendTo:ac,before:hc,clone:_c,empty:Tc,html:pc,insertAfter:dc,insertBefore:fc,prepend:sc,prependTo:ic,remove:mc,replaceWith:Ec,text:gc,toString:bc,unwrap:oc,wrap:rc,wrapAll:cc,wrapInner:uc},Symbol.toStringTag,{value:"Module"}));function Nc(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return J(this,(a,i)=>{w(a)&&Bn(a,e,t,i)});if(this.length!==0)return vn(this[0],e)}function Bn(e,t,a,i){if(typeof t=="string"){const n=vn(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=Cc(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];Bn(e,u,t[u],r)}}}function vn(e,t){if(!e||!w(e))return;const a=Ic(e.attribs.style);if(typeof t=="string")return a[t];if(Array.isArray(t)){const i={};for(const n of t)a[n]!=null&&(i[n]=a[n]);return i}return a}function Cc(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function Ic(e){if(e=(e||"").trim(),!e)return{};const t={};let a;for(const i of e.split(";")){const n=i.indexOf(":");if(n<1||n===i.length-1){const r=i.trimEnd();r.length>0&&a!==void 0&&(t[a]+=`;${r}`)}else a=i.slice(0,n).trim(),t[a]=i.slice(n+1).trim()}return t}const Sc=Object.freeze(Object.defineProperty({__proto__:null,css:Nc},Symbol.toStringTag,{value:"Module"})),Un="input,select,textarea,keygen",xc=/%20/g,Fn=/\r?\n/g;function Oc(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(xc,"+")}function Dc(){return this.map((e,t)=>{const a=this._make(t);return w(t)&&t.name==="form"?a.find(Un).toArray():a.filter(Un).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var a;const i=this._make(t),n=i.attr("name"),r=(a=i.val())!==null&&a!==void 0?a:"";return Array.isArray(r)?r.map(u=>({name:n,value:u.replace(Fn,`\r
6
+ )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Nn={};function eo(e,t){return e===U.falseFunc?U.falseFunc:a=>t.isTag(a)&&e(a)}function Cn(e,t){const a=t.getSiblings(e);if(a.length<=1)return[];const i=a.indexOf(e);return i<0||i===a.length-1?[]:a.slice(i+1).filter(t.isTag)}function Za(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const Ja=(e,t,a,i,n)=>{const r=n(t,Za(a),i);return r===U.trueFunc?e:r===U.falseFunc?U.falseFunc:u=>r(u)&&e(u)},ei={is:Ja,matches:Ja,where:Ja,not(e,t,a,i,n){const r=n(t,Za(a),i);return r===U.falseFunc?e:r===U.trueFunc?U.falseFunc:u=>!r(u)&&e(u)},has(e,t,a,i,n){const{adapter:r}=a,u=Za(a);u.relativeSelector=!0;const o=t.some(m=>m.some(ja))?[Nn]:void 0,l=n(t,u,o);if(l===U.falseFunc)return U.falseFunc;const h=eo(l,r);if(o&&l!==U.trueFunc){const{shouldTestNextSiblings:m=!1}=l;return T=>{if(!e(T))return!1;o[0]=T;const b=r.getChildren(T),N=m?[...b,...Cn(T,r)]:b;return r.existsOne(h,N)}}return m=>e(m)&&r.existsOne(h,r.getChildren(m))}};function to(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in ei))throw new Error(`Unknown pseudo-class :${u}(${o})`);return ei[u](e,o,a,i,n)}const l=(r=a.pseudos)===null||r===void 0?void 0:r[u],h=typeof l=="string"?l:Ju[u];if(typeof h=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const m=sa(h);return ei.is(e,m,a,i,n)}if(typeof l=="function")return An(l,u,o,1),m=>l(m,o)&&e(m);if(u in za)return za[u](e,o,a,i);if(u in _n){const m=_n[u];return An(m,u,o,2),T=>m(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function ti(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function ao(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case L.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case L.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case L.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!a.xmlMode||a.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Qu[t.action](e,t,a)}case L.Pseudo:return to(e,t,a,i,n);case L.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!a.xmlMode||a.lowerCaseTags)&&(o=o.toLowerCase()),function(h){return r.getName(h)===o&&e(h)}}case L.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(h){let m=h;for(;m=ti(m,r);)if(e(m))return!0;return!1};const o=new WeakSet;return function(h){let m=h;for(;m=ti(m,r);)if(!o.has(m)){if(r.isTag(m)&&e(m))return!0;o.add(m)}return!1}}case"_flexibleDescendant":return function(l){let h=l;do if(e(h))return!0;while(h=ti(h,r));return!1};case L.Parent:return function(l){return r.getChildren(l).some(h=>r.isTag(h)&&e(h))};case L.Child:return function(l){const h=r.getParent(l);return h!=null&&r.isTag(h)&&e(h)};case L.Sibling:return function(l){const h=r.getSiblings(l);for(let m=0;m<h.length;m++){const T=h[m];if(u(l,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case L.Adjacent:return r.prevElementSibling?function(l){const h=r.prevElementSibling(l);return h!=null&&e(h)}:function(l){const h=r.getSiblings(l);let m;for(let T=0;T<h.length;T++){const b=h[T];if(u(l,b))break;r.isTag(b)&&(m=b)}return!!m&&e(m)};case L.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function In(e){return e.type===L.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(In)))}const io={type:L.Descendant},no={type:"_flexibleDescendant"},so={type:L.Pseudo,name:"scope",data:null};function ro(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===Nn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&ja(n[0])&&n[0].type!==L.Descendant))if(i&&!n.some(In))n.unshift(io);else continue;n.unshift(so)}}function Sn(e,t,a){var i;e.forEach($u),a=(i=t.context)!==null&&i!==void 0?i:a;const n=Array.isArray(a),r=a&&(Array.isArray(a)?a:[a]);if(t.relativeSelector!==!1)ro(e,t,r);else if(e.some(l=>l.length>0&&ja(l[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(l=>{if(l.length>=2){const[h,m]=l;h.type!==L.Pseudo||h.name!=="scope"||(n&&m.type===L.Descendant?l[1]=no:(m.type===L.Adjacent||m.type===L.Sibling)&&(u=!0))}return uo(l,t,r)}).reduce(oo,U.falseFunc);return o.shouldTestNextSiblings=u,o}function uo(e,t,a){var i;return e.reduce((n,r)=>n===U.falseFunc?U.falseFunc:ao(n,r,t,a,Sn),(i=t.rootFunc)!==null&&i!==void 0?i:U.trueFunc)}function oo(e,t){return t===U.falseFunc||e===U.trueFunc?e:e===U.falseFunc||t===U.trueFunc?t:function(i){return e(i)||t(i)}}const xn=(e,t)=>e===t,co={adapter:aa,equals:xn};function lo(e){var t,a,i,n;const r=e??co;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=aa),(a=r.equals)!==null&&a!==void 0||(r.equals=(n=(i=r.adapter)===null||i===void 0?void 0:i.equals)!==null&&n!==void 0?n:xn),r}function ho(e){return function(a,i,n){const r=lo(i);return e(a,r,n)}}const ai=ho(Sn);function On(e,t,a=!1){return a&&(e=fo(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function fo(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=Cn(a[n],t);a.push(...r)}return a}const mo=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function ca(e){return e.type!=="pseudo"?!1:mo.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(ca)):!1}function Eo(e,t,a){const i=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(i)?i>=0?i+1:1/0:0;case"lt":return isFinite(i)?i>=0?Math.min(i,a):1/0:0;case"gt":return isFinite(i)?1/0:0;case"odd":return 2*a;case"even":return 2*a-1;case"last":case"not":return 1/0}}function To(e){for(;e.parent;)e=e.parent;return e}function ii(e){const t=[],a=[];for(const i of e)i.some(ca)?t.push(i):a.push(i);return[a,t]}const po={type:L.Universal,namespace:null},bo={type:L.Pseudo,name:"scope",data:null};function Dn(e,t,a={}){return Ln([e],t,a)}function Ln(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=ii(sa(t));return i.length>0&&e.some(ai(i,a))||n.some(r=>Mn(r,e,a).length>0)}function go(e,t,a,i){const n=typeof a=="string"?parseInt(a,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(n)&&Math.abs(n)<t.length?[n<0?t[t.length+n]:t[n]]:[];case"gt":return isFinite(n)?t.slice(n+1):[];case"even":return t.filter((r,u)=>u%2===0);case"odd":return t.filter((r,u)=>u%2===1);case"not":{const r=new Set(Rn(a,t,i));return t.filter(u=>!r.has(u))}}}function yn(e,t,a={}){return Rn(sa(e),t,a)}function Rn(e,t,a){if(t.length===0)return[];const[i,n]=ii(e);let r;if(i.length){const u=si(t,i,a);if(n.length===0)return u;u.length&&(r=new Set(u))}for(let u=0;u<n.length&&(r==null?void 0:r.size)!==t.length;u++){const o=n[u];if((r?t.filter(m=>k(m)&&!r.has(m)):t).length===0)break;const h=Mn(o,t,a);if(h.length)if(r)h.forEach(m=>r.add(m));else{if(u===n.length-1)return h;r=new Set(h)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function Mn(e,t,a){var i;if(e.some(St)){const n=(i=a.root)!==null&&i!==void 0?i:To(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(bo),la(n,e,r,!0,t.length)}return la(t,e,a,!1,t.length)}function _o(e,t,a={},i=1/0){if(typeof e=="function")return Pn(t,e);const[n,r]=ii(sa(e)),u=r.map(o=>la(t,o,a,!0,i));return n.length&&u.push(ni(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:ot(u.reduce((o,l)=>[...o,...l]))}function la(e,t,a,i,n){const r=t.findIndex(ca),u=t.slice(0,r),o=t[r],l=t.length-1===r?n:1/0,h=Eo(o.name,o.data,l);if(h===0)return[];const T=(u.length===0&&!Array.isArray(e)?Zt(e).filter(k):u.length===0?(Array.isArray(e)?e:[e]).filter(k):i||u.some(St)?ni(e,[u],a,h):si(e,[u],a)).slice(0,h);let b=go(o.name,T,o.data,a);if(b.length===0||t.length===r+1)return b;const N=t.slice(r+1),I=N.some(St);if(I){if(St(N[0])){const{type:y}=N[0];(y===L.Sibling||y===L.Adjacent)&&(b=On(b,aa,!0)),N.unshift(po)}a={...a,relativeSelector:!1,rootFunc:y=>b.includes(y)}}else a.rootFunc&&a.rootFunc!==ra.trueFunc&&(a={...a,rootFunc:ra.trueFunc});return N.some(ca)?la(b,N,a,!1,n):I?ni(b,[N],a,n):si(b,[N],a)}function ni(e,t,a,i){const n=ai(t,a,e);return Pn(e,n,i)}function Pn(e,t,a=1/0){const i=On(e,aa,t.shouldTestNextSiblings);return Va(n=>k(n)&&t(n),i,!0,a)}function si(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(k);if(i.length===0)return i;const n=ai(t,a);return n===ra.trueFunc?i:i.filter(n)}const Ao=/^\s*[+~]/;function No(e){if(!e)return this._make([]);if(typeof e!="string"){const t=we(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>nn(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function Co(e,t){var a;const i=this.toArray(),n=Ao.test(e)?i:this.children().toArray(),r={context:i,root:(a=this._root)===null||a===void 0?void 0:a[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(_o(e,n,r,t))}function ri(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=ci(r,i,this.options.xmlMode,(n=this._root)===null||n===void 0?void 0:n[0])),this._make(this.length>1&&r.length>1?a.reduce((u,o)=>o(u),r):r)}}}const Ot=ri((e,t)=>{let a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n.length>0&&(a=a.concat(n))}return a}),ui=ri((e,t)=>{const a=[];for(let i=0;i<t.length;i++){const n=e(t[i]);n!==null&&a.push(n)}return a});function oi(e,...t){let a=null;const i=ri((n,r)=>{const u=[];return ee(r,o=>{for(let l;(l=n(o))&&!(a!=null&&a(l,u.length));o=l)u.push(l)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>Dn(o,n,this.options):n?Dt(n):null;const u=i.call(this,r);return a=null,u}}function lt(e){return e.length>1?Array.from(new Set(e)):e}const Io=ui(({parent:e})=>e&&!Ve(e)?e:null,lt),So=Ot(e=>{const t=[];for(;e.parent&&!Ve(e.parent);)t.push(e.parent),e=e.parent;return t},ot,e=>e.reverse()),xo=oi(({parent:e})=>e&&!Ve(e)?e:null,ot,e=>e.reverse());function Oo(e){var t;const a=[];if(!e)return this._make(a);const i={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},n=typeof e=="string"?r=>Dn(r,e,i):Dt(e);return ee(this,r=>{for(r&&!Ve(r)&&!k(r)&&(r=r.parent);r&&k(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const Do=ui(e=>Fa(e)),Lo=Ot(e=>{const t=[];for(;e.next;)e=e.next,k(e)&&t.push(e);return t},lt),yo=oi(e=>Fa(e),lt),Ro=ui(e=>Ha(e)),Mo=Ot(e=>{const t=[];for(;e.prev;)e=e.prev,k(e)&&t.push(e);return t},lt),Po=oi(e=>Ha(e),lt),ko=Ot(e=>zi(e).filter(t=>k(t)&&t!==e),ot),vo=Ot(e=>Zt(e).filter(k),lt);function wo(){const e=this.toArray().reduce((t,a)=>oe(a)?t.concat(a.children):t,[]);return this._make(e)}function Bo(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function Uo(e){let t=[];for(let a=0;a<this.length;a++){const i=this[a],n=e.call(i,a,i);n!=null&&(t=t.concat(n))}return this._make(t)}function Dt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):we(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Fo(e){var t;return this._make(ci(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function ci(e,t,a,i){return typeof t=="string"?yn(t,e,{xmlMode:a,root:i}):e.filter(Dt(t))}function Ho(e){const t=this.toArray();return typeof e=="string"?Ln(t.filter(k),e,this.options):e?t.some(Dt(e)):!1}function Vo(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(yn(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=Dt(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function Yo(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function qo(){return this.length>1?this._make(this[0]):this}function Wo(){return this.length>0?this._make(this[this.length-1]):this}function $o(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function Go(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function Xo(){return Array.prototype.slice.call(this)}function Qo(e){let t,a;return e==null?(t=this.parent().children(),a=this[0]):typeof e=="string"?(t=this._make(e),a=this[0]):(t=this,a=we(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function jo(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function zo(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Ko(e,t){const a=this._make(e,t),i=ot([...this.get(),...a.get()]);return this._make(i)}function Zo(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const Jo=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:Co,add:Ko,addBack:Zo,children:vo,closest:Oo,contents:wo,each:Bo,end:zo,eq:$o,filter:Fo,filterArray:ci,find:No,first:qo,get:Go,has:Yo,index:Qo,is:Ho,last:Wo,map:Uo,next:Do,nextAll:Lo,nextUntil:yo,not:Vo,parent:Io,parents:So,parentsUntil:xo,prev:Ro,prevAll:Mo,prevUntil:Po,siblings:ko,slice:jo,toArray:Xo},Symbol.toStringTag,{value:"Module"}));function ec(e){return function(a,i,n,r){if(typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=a.toString()),typeof a=="string")return e(a,i,n,r);const u=a;if(!Array.isArray(u)&&Ve(u))return u;const o=new ze([]);return et(u,o),o}}function et(e,t){const a=Array.isArray(e)?e:[e];t?t.children=a:t=null;for(let i=0;i<a.length;i++){const n=a[i];n.parent&&n.parent.children!==a&&Ke(n),t?(n.prev=a[i-1]||null,n.next=a[i+1]||null):n.prev=n.next=null,n.parent=t}return t}function tc(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const a=[];for(let i=0;i<e.length;i++){const n=e[i];if(typeof n=="object"){if(n==null)continue;if(!("length"in n)){a.push(t?At(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?At(e,!0):e]}function kn(e){return function(...t){const a=this.length-1;return ee(this,(i,n)=>{if(!oe(i))return;const r=typeof t[0]=="function"?t[0].call(i,n,this._render(i.children)):t,u=this._makeDomArray(r,n<a);e(u,i.children,i)})}}function We(e,t,a,i,n){var r,u;const o=[t,a,...i],l=t===0?null:e[t-1],h=t+a>=e.length?null:e[t+a];for(let m=0;m<i.length;++m){const T=i[m],b=T.parent;if(b){const I=b.children.indexOf(T);I>-1&&(b.children.splice(I,1),n===b&&t>I&&o[0]--)}T.parent=n,T.prev&&(T.prev.next=(r=T.next)!==null&&r!==void 0?r:null),T.next&&(T.next.prev=(u=T.prev)!==null&&u!==void 0?u:null),T.prev=m===0?l:i[m-1],T.next=m===i.length-1?h:i[m+1]}return l&&(l.next=i[0]),h&&(h.prev=i[i.length-1]),e.splice(...o)}function ac(e){return(we(e)?e:this._make(e)).append(this),this}function ic(e){return(we(e)?e:this._make(e)).prepend(this),this}const nc=kn((e,t,a)=>{We(t,t.length,0,e,a)}),sc=kn((e,t,a)=>{We(t,0,0,e,a)});function vn(e){return function(t){const a=this.length-1,i=this.parents().last();for(let n=0;n<this.length;n++){const r=this[n],u=typeof t=="function"?t.call(r,n,r):typeof t=="string"&&!Wa(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!oe(o))continue;let l=o,h=0;for(;h<l.children.length;){const m=l.children[h];k(m)?(l=m,h=0):h++}e(r,l,[o])}return this}}const rc=vn((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);et([e],t),We(n,r,0,a,i)}),uc=vn((e,t,a)=>{oe(e)&&(et(e.children,t),et(a,e))});function oc(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function cc(e){const t=this[0];if(t){const a=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let i;for(let r=0;r<a.length;r++)a[r].type==="tag"&&(i=a[r]);let n=0;for(;i&&n<i.children.length;){const r=i.children[n];r.type==="tag"?(i=r,n=0):n++}i&&this._make(i).append(this)}return this}function lc(...e){const t=this.length-1;return ee(this,(a,i)=>{if(!oe(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);We(n,r+1,0,o,a.parent)})}function dc(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const a of this._makeDomArray(e)){const i=this.clone().toArray(),{parent:n}=a;if(!n)continue;const r=n.children,u=r.indexOf(a);u<0||(We(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function hc(...e){const t=this.length-1;return ee(this,(a,i)=>{if(!oe(a)||!a.parent)return;const n=a.parent.children,r=n.indexOf(a);if(r<0)return;const u=typeof e[0]=="function"?e[0].call(a,i,this._render(a.children)):e,o=this._makeDomArray(u,i<t);We(n,r,0,o,a.parent)})}function fc(e){const t=this._make(e);this.remove();const a=[];return ee(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(We(u,o,0,n,r),a.push(...n))}),this._make(a)}function mc(e){const t=e?this.filter(e):this;return ee(t,a=>{Ke(a),a.prev=a.next=a.parent=null}),this}function Ec(e){return ee(this,(t,a)=>{const{parent:i}=t;if(!i)return;const n=i.children,r=typeof e=="function"?e.call(t,a,t):e,u=this._makeDomArray(r);et(u,null);const o=n.indexOf(t);We(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function Tc(){return ee(this,e=>{if(oe(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function pc(e){if(e===void 0){const t=this[0];return!t||!oe(t)?null:this._render(t.children)}return ee(this,t=>{if(!oe(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=we(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;et(a,t)})}function bc(){return this._render(this)}function gc(e){return e===void 0?Nt(this):typeof e=="function"?ee(this,(t,a)=>this._make(t).text(e.call(t,a,Nt([t])))):ee(this,t=>{if(!oe(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new _t(`${e}`);et(a,t)})}function _c(){const e=Array.prototype.map.call(this.get(),a=>At(a,!0)),t=new ze(e);for(const a of e)a.parent=t;return this._make(e)}const Ac=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:tc,after:lc,append:nc,appendTo:ac,before:hc,clone:_c,empty:Tc,html:pc,insertAfter:dc,insertBefore:fc,prepend:sc,prependTo:ic,remove:mc,replaceWith:Ec,text:gc,toString:bc,unwrap:oc,wrap:rc,wrapAll:cc,wrapInner:uc},Symbol.toStringTag,{value:"Module"}));function Nc(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return ee(this,(a,i)=>{k(a)&&wn(a,e,t,i)});if(this.length!==0)return Bn(this[0],e)}function wn(e,t,a,i){if(typeof t=="string"){const n=Bn(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=Cc(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];wn(e,u,t[u],r)}}}function Bn(e,t){if(!e||!k(e))return;const a=Ic(e.attribs.style);if(typeof t=="string")return a[t];if(Array.isArray(t)){const i={};for(const n of t)a[n]!=null&&(i[n]=a[n]);return i}return a}function Cc(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function Ic(e){if(e=(e||"").trim(),!e)return{};const t={};let a;for(const i of e.split(";")){const n=i.indexOf(":");if(n<1||n===i.length-1){const r=i.trimEnd();r.length>0&&a!==void 0&&(t[a]+=`;${r}`)}else a=i.slice(0,n).trim(),t[a]=i.slice(n+1).trim()}return t}const Sc=Object.freeze(Object.defineProperty({__proto__:null,css:Nc},Symbol.toStringTag,{value:"Module"})),Un="input,select,textarea,keygen",xc=/%20/g,Fn=/\r?\n/g;function Oc(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(xc,"+")}function Dc(){return this.map((e,t)=>{const a=this._make(t);return k(t)&&t.name==="form"?a.find(Un).toArray():a.filter(Un).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var a;const i=this._make(t),n=i.attr("name"),r=(a=i.val())!==null&&a!==void 0?a:"";return Array.isArray(r)?r.map(u=>({name:n,value:u.replace(Fn,`\r
7
7
  `)})):{name:n,value:r.replace(Fn,`\r
8
- `)}}).toArray()}const Lc=Object.freeze(Object.defineProperty({__proto__:null,serialize:Oc,serializeArray:Dc},Symbol.toStringTag,{value:"Module"}));function Rc(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function yc(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=Rc(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?l=>this._make(l).prop(u):l=>this._make(l).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((l,h)=>o(h,a,t)).get();else{const l=this._findBySelector(r,1);t[a]=l.length>0?o(l[0],a,t):void 0}}return t}const Mc=Object.freeze(Object.defineProperty({__proto__:null,extract:yc},Symbol.toStringTag,{value:"Module"}));class Lt{constructor(t,a,i){if(this.length=0,this.options=i,this._root=a,t){for(let n=0;n<t.length;n++)this[n]=t[n];this.length=t.length}}}Lt.prototype.cheerio="[cheerio object]",Lt.prototype.splice=Array.prototype.splice,Lt.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Lt.prototype,vu,Jo,Ac,Sc,Lc,Mc);function Pc(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=qa(n),o=e(i,u,r,null);class l extends Lt{_make(T,b){const N=h(T,b);return N.prevObject=this,N}_parse(T,b,N,I){return e(T,b,N,I)}_render(T){return t(T,this.options)}}function h(m,T,b=o,N){if(m&&Be(m))return m;const I=qa(N,u),R=typeof b=="string"?[e(b,I,!1,null)]:"length"in b?b:[b],P=Be(R)?R:new l(R,null,I);if(P._root=P,!m)return new l(void 0,P,I);const $=typeof m=="string"&&Wa(m)?e(m,I,!1,null).children:kc(m)?[m]:Array.isArray(m)?m:void 0,v=new l($,P,I);if($)return v;if(typeof m!="string")throw new TypeError("Unexpected type of selector");let q=m;const F=T?typeof T=="string"?Wa(T)?new l([e(T,I,!1,null)],P,I):(q=`${T} ${q}`,P):Be(T)?T:new l(Array.isArray(T)?T:[T],P,I):P;return F?F.find(q):v}return Object.assign(h,Su,{load:a,_root:o,_options:u,fn:l.prototype,prototype:l.prototype}),h}}function kc(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const wc=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),z="�";var d;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(d||(d={}));const pe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Hn(e){return e>=55296&&e<=57343}function Bc(e){return e>=56320&&e<=57343}function vc(e,t){return(e-55296)*1024+9216+t}function Vn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Yn(e){return e>=64976&&e<=65007||wc.has(e)}var g;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(g||(g={}));const Uc=65536;class Fc{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Uc,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:i,col:n,offset:r}=this,u=n+a,o=r+a;return{code:t,startLine:i,endLine:i,startCol:u,endCol:u,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(Bc(a))return this.pos++,this._addGap(),vc(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,d.EOF;return this._err(g.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;const i=this.html.charCodeAt(a);return i===d.CARRIAGE_RETURN?d.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;let t=this.html.charCodeAt(this.pos);return t===d.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,d.LINE_FEED):t===d.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Hn(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===d.LINE_FEED||t===d.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Vn(t)?this._err(g.controlCharacterInInputStream):Yn(t)&&this._err(g.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var W;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(W||(W={}));function qn(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var A;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(A||(A={}));var tt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(tt||(tt={}));var Ne;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ne||(Ne={}));var p;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(p||(p={}));var s;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));const Hc=new Map([[p.A,s.A],[p.ADDRESS,s.ADDRESS],[p.ANNOTATION_XML,s.ANNOTATION_XML],[p.APPLET,s.APPLET],[p.AREA,s.AREA],[p.ARTICLE,s.ARTICLE],[p.ASIDE,s.ASIDE],[p.B,s.B],[p.BASE,s.BASE],[p.BASEFONT,s.BASEFONT],[p.BGSOUND,s.BGSOUND],[p.BIG,s.BIG],[p.BLOCKQUOTE,s.BLOCKQUOTE],[p.BODY,s.BODY],[p.BR,s.BR],[p.BUTTON,s.BUTTON],[p.CAPTION,s.CAPTION],[p.CENTER,s.CENTER],[p.CODE,s.CODE],[p.COL,s.COL],[p.COLGROUP,s.COLGROUP],[p.DD,s.DD],[p.DESC,s.DESC],[p.DETAILS,s.DETAILS],[p.DIALOG,s.DIALOG],[p.DIR,s.DIR],[p.DIV,s.DIV],[p.DL,s.DL],[p.DT,s.DT],[p.EM,s.EM],[p.EMBED,s.EMBED],[p.FIELDSET,s.FIELDSET],[p.FIGCAPTION,s.FIGCAPTION],[p.FIGURE,s.FIGURE],[p.FONT,s.FONT],[p.FOOTER,s.FOOTER],[p.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[p.FORM,s.FORM],[p.FRAME,s.FRAME],[p.FRAMESET,s.FRAMESET],[p.H1,s.H1],[p.H2,s.H2],[p.H3,s.H3],[p.H4,s.H4],[p.H5,s.H5],[p.H6,s.H6],[p.HEAD,s.HEAD],[p.HEADER,s.HEADER],[p.HGROUP,s.HGROUP],[p.HR,s.HR],[p.HTML,s.HTML],[p.I,s.I],[p.IMG,s.IMG],[p.IMAGE,s.IMAGE],[p.INPUT,s.INPUT],[p.IFRAME,s.IFRAME],[p.KEYGEN,s.KEYGEN],[p.LABEL,s.LABEL],[p.LI,s.LI],[p.LINK,s.LINK],[p.LISTING,s.LISTING],[p.MAIN,s.MAIN],[p.MALIGNMARK,s.MALIGNMARK],[p.MARQUEE,s.MARQUEE],[p.MATH,s.MATH],[p.MENU,s.MENU],[p.META,s.META],[p.MGLYPH,s.MGLYPH],[p.MI,s.MI],[p.MO,s.MO],[p.MN,s.MN],[p.MS,s.MS],[p.MTEXT,s.MTEXT],[p.NAV,s.NAV],[p.NOBR,s.NOBR],[p.NOFRAMES,s.NOFRAMES],[p.NOEMBED,s.NOEMBED],[p.NOSCRIPT,s.NOSCRIPT],[p.OBJECT,s.OBJECT],[p.OL,s.OL],[p.OPTGROUP,s.OPTGROUP],[p.OPTION,s.OPTION],[p.P,s.P],[p.PARAM,s.PARAM],[p.PLAINTEXT,s.PLAINTEXT],[p.PRE,s.PRE],[p.RB,s.RB],[p.RP,s.RP],[p.RT,s.RT],[p.RTC,s.RTC],[p.RUBY,s.RUBY],[p.S,s.S],[p.SCRIPT,s.SCRIPT],[p.SEARCH,s.SEARCH],[p.SECTION,s.SECTION],[p.SELECT,s.SELECT],[p.SOURCE,s.SOURCE],[p.SMALL,s.SMALL],[p.SPAN,s.SPAN],[p.STRIKE,s.STRIKE],[p.STRONG,s.STRONG],[p.STYLE,s.STYLE],[p.SUB,s.SUB],[p.SUMMARY,s.SUMMARY],[p.SUP,s.SUP],[p.TABLE,s.TABLE],[p.TBODY,s.TBODY],[p.TEMPLATE,s.TEMPLATE],[p.TEXTAREA,s.TEXTAREA],[p.TFOOT,s.TFOOT],[p.TD,s.TD],[p.TH,s.TH],[p.THEAD,s.THEAD],[p.TITLE,s.TITLE],[p.TR,s.TR],[p.TRACK,s.TRACK],[p.TT,s.TT],[p.U,s.U],[p.UL,s.UL],[p.SVG,s.SVG],[p.VAR,s.VAR],[p.WBR,s.WBR],[p.XMP,s.XMP]]);function da(e){var t;return(t=Hc.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const S=s,Vc={[A.HTML]:new Set([S.ADDRESS,S.APPLET,S.AREA,S.ARTICLE,S.ASIDE,S.BASE,S.BASEFONT,S.BGSOUND,S.BLOCKQUOTE,S.BODY,S.BR,S.BUTTON,S.CAPTION,S.CENTER,S.COL,S.COLGROUP,S.DD,S.DETAILS,S.DIR,S.DIV,S.DL,S.DT,S.EMBED,S.FIELDSET,S.FIGCAPTION,S.FIGURE,S.FOOTER,S.FORM,S.FRAME,S.FRAMESET,S.H1,S.H2,S.H3,S.H4,S.H5,S.H6,S.HEAD,S.HEADER,S.HGROUP,S.HR,S.HTML,S.IFRAME,S.IMG,S.INPUT,S.LI,S.LINK,S.LISTING,S.MAIN,S.MARQUEE,S.MENU,S.META,S.NAV,S.NOEMBED,S.NOFRAMES,S.NOSCRIPT,S.OBJECT,S.OL,S.P,S.PARAM,S.PLAINTEXT,S.PRE,S.SCRIPT,S.SECTION,S.SELECT,S.SOURCE,S.STYLE,S.SUMMARY,S.TABLE,S.TBODY,S.TD,S.TEMPLATE,S.TEXTAREA,S.TFOOT,S.TH,S.THEAD,S.TITLE,S.TR,S.TRACK,S.UL,S.WBR,S.XMP]),[A.MATHML]:new Set([S.MI,S.MO,S.MN,S.MS,S.MTEXT,S.ANNOTATION_XML]),[A.SVG]:new Set([S.TITLE,S.FOREIGN_OBJECT,S.DESC]),[A.XLINK]:new Set,[A.XML]:new Set,[A.XMLNS]:new Set},li=new Set([S.H1,S.H2,S.H3,S.H4,S.H5,S.H6]),Yc=new Set([p.STYLE,p.SCRIPT,p.XMP,p.IFRAME,p.NOEMBED,p.NOFRAMES,p.PLAINTEXT]);function qc(e,t){return Yc.has(e)||t&&e===p.NOSCRIPT}var f;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(f||(f={}));const be={DATA:f.DATA,RCDATA:f.RCDATA,RAWTEXT:f.RAWTEXT,SCRIPT_DATA:f.SCRIPT_DATA,PLAINTEXT:f.PLAINTEXT,CDATA_SECTION:f.CDATA_SECTION};function Wc(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function Rt(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function $c(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function $e(e){return $c(e)||Rt(e)}function Wn(e){return $e(e)||Wc(e)}function ha(e){return e+32}function $n(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function Gn(e){return $n(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function Gc(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:Hn(e)?g.surrogateCharacterReference:Yn(e)?g.noncharacterCharacterReference:Vn(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let Xc=class{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=f.DATA,this.returnState=f.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Fc(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ua(ka,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(g.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(g.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=Gc(i);n&&this._err(n,1)}}:void 0)}_err(t,a=0){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,i){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:W.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:W.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:W.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:W.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const i=this.currentToken;if(qn(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const n=(t=(a=i.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(g.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=da(t.tagName),t.type===W.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(g.endTagWithAttributes),t.selfClosing&&this._err(g.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case W.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case W.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case W.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:W.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=$n(t)?W.WHITESPACE_CHARACTER:t===d.NULL?W.NULL_CHARACTER:W.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(W.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=f.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ie.Attribute:Ie.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===f.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case f.DATA:{this._stateData(t);break}case f.RCDATA:{this._stateRcdata(t);break}case f.RAWTEXT:{this._stateRawtext(t);break}case f.SCRIPT_DATA:{this._stateScriptData(t);break}case f.PLAINTEXT:{this._statePlaintext(t);break}case f.TAG_OPEN:{this._stateTagOpen(t);break}case f.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case f.TAG_NAME:{this._stateTagName(t);break}case f.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case f.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case f.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case f.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case f.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case f.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case f.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case f.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case f.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case f.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case f.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case f.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case f.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case f.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case f.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case f.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case f.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case f.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case f.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case f.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case f.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case f.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case f.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case f.BOGUS_COMMENT:{this._stateBogusComment(t);break}case f.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case f.COMMENT_START:{this._stateCommentStart(t);break}case f.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case f.COMMENT:{this._stateComment(t);break}case f.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case f.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case f.COMMENT_END:{this._stateCommentEnd(t);break}case f.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case f.DOCTYPE:{this._stateDoctype(t);break}case f.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case f.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case f.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case f.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case f.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case f.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case f.CDATA_SECTION:{this._stateCdataSection(t);break}case f.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case f.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case f.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case f.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.TAG_OPEN;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitCodePoint(t);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case d.AMPERSAND:{this._startCharacterReference();break}case d.LESS_THAN_SIGN:{this.state=f.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if($e(t))this._createStartTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=f.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=f.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t);break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=f.DATA,this._stateData(t)}}_stateEndTagOpen(t){if($e(t))this._createEndTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=f.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(Rt(t)?ha(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=f.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){$e(t)?(this.state=f.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=f.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=f.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=f.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=f.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){$e(t)?(this.state=f.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=f.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=f.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=f.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){$e(t)?(this.state=f.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$e(t)?(this._emitChars("<"),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){$e(t)?(this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pe.SCRIPT,!1)&&Gn(this.preprocessor.peek(pe.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<pe.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pe.SCRIPT,!1)&&Gn(this.preprocessor.peek(pe.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<pe.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this.state=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=f.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=f.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this._leaveAttrName(),this.state=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:{this._err(g.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.name+=z;break}default:this.currentAttr.name+=String.fromCodePoint(Rt(t)?ha(t):t)}}_stateAfterAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=f.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{this.state=f.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=f.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=f.DATA,this.emitCurrentTagToken();break}default:this.state=f.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case d.APOSTROPHE:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=z;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:case d.EQUALS_SIGN:case d.GRAVE_ACCENT:{this._err(g.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=z;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pe.DASH_DASH,!0)?(this._createCommentToken(pe.DASH_DASH.length+1),this.state=f.COMMENT_START):this._consumeSequenceIfMatch(pe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pe.DOCTYPE.length+1),this.state=f.DOCTYPE):this._consumeSequenceIfMatch(pe.CDATA_START,!0)?this.inForeignNode?this.state=f.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(pe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=f.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=f.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=z;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case d.EXCLAMATION_MARK:{a.data+="!",this.state=f.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=f.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=f.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=f.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=f.COMMENT_END_BANG;break}case d.HYPHEN_MINUS:{a.data+="-";break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=f.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=f.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBeforeDoctypeName),this.state=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Rt(t))this._createDoctypeToken(String.fromCharCode(ha(t))),this.state=f.DOCTYPE_NAME;else switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.NULL:{this._err(g.unexpectedNullCharacter),this._createDoctypeToken(z),this.state=f.DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=f.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=z;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(Rt(t)?ha(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pe.PUBLIC,!1)?this.state=f.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pe.SYSTEM,!1)?this.state=f.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.NULL:{this._err(g.unexpectedNullCharacter);break}case d.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case d.RIGHT_SQUARE_BRACKET:{this.state=f.CDATA_SECTION_BRACKET;break}case d.EOF:{this._err(g.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===d.RIGHT_SQUARE_BRACKET?this.state=f.CDATA_SECTION_END:(this._emitChars("]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(d.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Wn(this.preprocessor.peek(1))?f.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Wn(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const Xn=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),Qn=new Set([...Xn,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),fa=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),Qc=new Set([...fa,s.OL,s.UL]),jc=new Set([...fa,s.BUTTON]),jn=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),zn=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),zc=new Set([s.TR,s.TEMPLATE,s.HTML]),Kc=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),Zc=new Set([s.TABLE,s.TEMPLATE,s.HTML]),Jc=new Set([s.TD,s.TH]);class el{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,i){this.treeAdapter=a,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===A.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const i=this._indexOf(t);this.items[i]=a,i===this.stackTop&&(this.current=a)}insertAfter(t,a,i){const n=this._indexOf(t)+1;this.items.splice(n,0,a),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==A.HTML);this.shortenToLength(a<0?0:a)}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(a<0?0:a)}popUntilPopped(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i<0?0:i)}popUntilNumberedHeaderPopped(){this.popUntilPopped(li,A.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Jc,A.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===a)return i;return-1}clearBackTo(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(Zc,A.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Kc,A.HTML)}clearBackToTableRowContext(){this.clearBackTo(zc,A.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let i=this.stackTop;i>=0;i--){const n=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case A.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case A.SVG:{if(zn.has(n))return!1;break}case A.MATHML:{if(jn.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,fa)}hasInListItemScope(t){return this.hasInDynamicScope(t,Qc)}hasInButtonScope(t){return this.hasInDynamicScope(t,jc)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case A.HTML:{if(li.has(a))return!0;if(fa.has(a))return!1;break}case A.SVG:{if(zn.has(a))return!1;break}case A.MATHML:{if(jn.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===A.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Xn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Qn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Qn.has(this.currentTagId);)this.pop()}}const di=3;var Me;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Me||(Me={}));const Kn={type:Me.Marker};class tl{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const i=[],n=a.length,r=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Me.Marker)break;const{element:h}=l;if(this.treeAdapter.getTagName(h)===r&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===n&&i.push({idx:o,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<di)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<di)return;const n=new Map(a.map(u=>[u.name,u.value]));let r=0;for(let u=0;u<i.length;u++){const o=i[u];o.attrs.every(l=>n.get(l.name)===l.value)&&(r+=1,r>=di&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Kn)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Me.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Me.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a>=0&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(Kn);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===Me.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===Me.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Me.Element&&a.element===t)}}const ve={createDocument(){return{nodeName:"#document",mode:Ne.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const i=e.childNodes.indexOf(a);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,i){const n=e.childNodes.find(r=>r.nodeName==="#documentType");if(n)n.name=t,n.publicId=a,n.systemId=i;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:i,parentNode:null};ve.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(ve.isTextNode(a)){a.value+=t;return}}ve.appendChild(e,ve.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&ve.isTextNode(i)?i.value+=t:ve.insertBefore(e,ve.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)a.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Zn="html",al="about:legacy-compat",il="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Jn=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],nl=[...Jn,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sl=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),es=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],rl=[...es,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ts(e,t){return t.some(a=>e.startsWith(a))}function ul(e){return e.name===Zn&&e.publicId===null&&(e.systemId===null||e.systemId===al)}function ol(e){if(e.name!==Zn)return Ne.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===il)return Ne.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),sl.has(a))return Ne.QUIRKS;let i=t===null?nl:Jn;if(ts(a,i))return Ne.QUIRKS;if(i=t===null?es:rl,ts(a,i))return Ne.LIMITED_QUIRKS}return Ne.NO_QUIRKS}const as={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},cl="definitionurl",ll="definitionURL",dl=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),hl=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:A.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:A.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:A.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:A.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:A.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:A.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:A.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:A.XML}],["xml:space",{prefix:"xml",name:"space",namespace:A.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:A.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:A.XMLNS}]]),fl=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),ml=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function El(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===tt.COLOR||i===tt.SIZE||i===tt.FACE)||ml.has(t)}function is(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===cl){e.attrs[t].name=ll;break}}function ns(e){for(let t=0;t<e.attrs.length;t++){const a=dl.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function hi(e){for(let t=0;t<e.attrs.length;t++){const a=hl.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function Tl(e){const t=fl.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=da(e.tagName))}function pl(e,t){return t===A.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function bl(e,t,a){if(t===A.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===tt.ENCODING){const n=a[i].value.toLowerCase();return n===as.TEXT_HTML||n===as.APPLICATION_XML}}return t===A.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function gl(e,t,a,i){return(!i||i===A.HTML)&&bl(e,t,a)||(!i||i===A.MATHML)&&pl(e,t)}const _l="hidden",Al=8,Nl=3;var E;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(E||(E={}));const Cl={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ss=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),rs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ve,onParseError:null};let us=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=E.INITIAL,this.originalInsertionMode=E.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...rs,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new Xc(this.options,this),this.activeFormattingElements=new tl(this.treeAdapter),this.fragmentContextID=i?da(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new el(this.document,this.treeAdapter,this)}static parse(t,a){const i=new this(a);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,a){const i={...rs,...a};t??(t=i.treeAdapter.createElement(p.TEMPLATE,A.HTML,[]));const n=i.treeAdapter.createElement("documentmock",A.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(E.IN_TEMPLATE),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),r}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,i){var n;if(!this.onParseError)return;const r=(n=t.location)!==null&&n!==void 0?n:Cl,u={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:i?r.startLine:r.endLine,endCol:i?r.startCol:r.endCol,endOffset:i?r.startOffset:r.endOffset};this.onParseError(u)}onItemPush(t,a,i){var n,r;(r=(n=this.treeAdapter).onItemPush)===null||r===void 0||r.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),a){let r,u;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,u=this.fragmentContextID):{current:r,currentTagId:u}=this.openElements,this._setContextModes(r,u)}}_setContextModes(t,a){const i=t===this.document||this.treeAdapter.getNamespaceURI(t)===A.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,A.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=E.TEXT}switchToPlaintextParsing(){this.insertionMode=E.TEXT,this.originalInsertionMode=E.IN_BODY,this.tokenizer.state=be.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===p.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==A.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=be.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=be.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=be.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=be.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,i,n),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const i=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,t)}}_appendElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,a){const i=this.treeAdapter.createElement(t,A.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,A.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,i),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(p.HTML,A.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let a,i;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(a,t.chars,i):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(a),r=i?n.lastIndexOf(i):n.length,u=n[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:l,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(a,i)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const i=a.location,n=this.treeAdapter.getTagName(t),r=a.type===W.END_TAG&&n===a.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,i;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===p.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===A.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,A.HTML)}_processToken(t){switch(t.type){case W.CHARACTER:{this.onCharacter(t);break}case W.NULL_CHARACTER:{this.onNullCharacter(t);break}case W.COMMENT:{this.onComment(t);break}case W.DOCTYPE:{this.onDoctype(t);break}case W.START_TAG:{this._processStartTag(t);break}case W.END_TAG:{this.onEndTag(t);break}case W.EOF:{this.onEof(t);break}case W.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,i){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return gl(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===Me.Marker||this.openElements.contains(n.element)),i=a<0?t-1:a-1;for(let n=i;n>=0;n--){const r=this.activeFormattingElements.entries[n];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=E.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=E.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=E.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=E.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=E.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=E.IN_TABLE;return}case s.BODY:{this.insertionMode=E.IN_BODY;return}case s.FRAMESET:{this.insertionMode=E.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?E.AFTER_HEAD:E.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=E.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=E.IN_HEAD;return}break}}this.insertionMode=E.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const i=this.openElements.tagIDs[a];if(i===s.TEMPLATE)break;if(i===s.TABLE){this.insertionMode=E.IN_SELECT_IN_TABLE;return}}this.insertionMode=E.IN_SELECT}_isElementCausesFosterParenting(t){return ss.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===A.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{const i=this.treeAdapter.getParentNode(a);return i?{parent:i,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const i=this.treeAdapter.getNamespaceURI(t);return Vc[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){J0(this,t);return}switch(this.insertionMode){case E.INITIAL:{yt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case E.AFTER_HEAD:{Bt(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{cs(this,t);break}case E.TEXT:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_TABLE_TEXT:{ps(this,t);break}case E.IN_COLUMN_GROUP:{Ta(this,t);break}case E.AFTER_BODY:{ga(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Z0(this,t);return}switch(this.insertionMode){case E.INITIAL:{yt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case E.AFTER_HEAD:{Bt(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_COLUMN_GROUP:{Ta(this,t);break}case E.AFTER_BODY:{ga(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){mi(this,t);return}switch(this.insertionMode){case E.INITIAL:case E.BEFORE_HTML:case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_TEMPLATE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{mi(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.AFTER_BODY:{Rl(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{yl(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{Ml(this,t);break}case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:{this._err(t,g.misplacedDoctype);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,g.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ed(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{yt(this,t);break}case E.BEFORE_HTML:{Pl(this,t);break}case E.BEFORE_HEAD:{wl(this,t);break}case E.IN_HEAD:{Le(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case E.AFTER_HEAD:{Hl(this,t);break}case E.IN_BODY:{he(this,t);break}case E.IN_TABLE:{dt(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_CAPTION:{B0(this,t);break}case E.IN_COLUMN_GROUP:{pi(this,t);break}case E.IN_TABLE_BODY:{pa(this,t);break}case E.IN_ROW:{ba(this,t);break}case E.IN_CELL:{F0(this,t);break}case E.IN_SELECT:{_s(this,t);break}case E.IN_SELECT_IN_TABLE:{V0(this,t);break}case E.IN_TEMPLATE:{q0(this,t);break}case E.AFTER_BODY:{$0(this,t);break}case E.IN_FRAMESET:{G0(this,t);break}case E.AFTER_FRAMESET:{Q0(this,t);break}case E.AFTER_AFTER_BODY:{z0(this,t);break}case E.AFTER_AFTER_FRAMESET:{K0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?td(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{yt(this,t);break}case E.BEFORE_HTML:{kl(this,t);break}case E.BEFORE_HEAD:{Bl(this,t);break}case E.IN_HEAD:{vl(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Fl(this,t);break}case E.AFTER_HEAD:{Vl(this,t);break}case E.IN_BODY:{Ea(this,t);break}case E.TEXT:{x0(this,t);break}case E.IN_TABLE:{vt(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_CAPTION:{v0(this,t);break}case E.IN_COLUMN_GROUP:{U0(this,t);break}case E.IN_TABLE_BODY:{bi(this,t);break}case E.IN_ROW:{gs(this,t);break}case E.IN_CELL:{H0(this,t);break}case E.IN_SELECT:{As(this,t);break}case E.IN_SELECT_IN_TABLE:{Y0(this,t);break}case E.IN_TEMPLATE:{W0(this,t);break}case E.AFTER_BODY:{Cs(this,t);break}case E.IN_FRAMESET:{X0(this,t);break}case E.AFTER_FRAMESET:{j0(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{yt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case E.AFTER_HEAD:{Bt(this,t);break}case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{Es(this,t);break}case E.TEXT:{O0(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_TEMPLATE:{Ns(this,t);break}case E.AFTER_BODY:case E.IN_FRAMESET:case E.AFTER_FRAMESET:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Ei(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===d.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.TEXT:case E.IN_COLUMN_GROUP:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{this._insertCharacters(t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:case E.AFTER_BODY:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{os(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_TABLE_TEXT:{Ts(this,t);break}}}};function Il(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):ms(e,t),a}function Sl(e,t){let a=null,i=e.openElements.stackTop;for(;i>=0;i--){const n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(a=n)}return a||(e.openElements.shortenToLength(i<0?0:i),e.activeFormattingElements.removeEntry(t)),a}function xl(e,t,a){let i=t,n=e.openElements.getCommonAncestor(t);for(let r=0,u=n;u!==a;r++,u=n){n=e.openElements.getCommonAncestor(u);const o=e.activeFormattingElements.getElementEntry(u),l=o&&r>=Nl;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=Ol(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function Ol(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function Dl(e,t,a){const i=e.treeAdapter.getTagName(t),n=da(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===A.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function Ll(e,t,a){const i=e.treeAdapter.getNamespaceURI(a.element),{token:n}=a,r=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,n),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,n.tagID)}function fi(e,t){for(let a=0;a<Al;a++){const i=Il(e,t);if(!i)break;const n=Sl(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=xl(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&Dl(e,u,r),Ll(e,n,i)}}function mi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Rl(e,t){e._appendCommentNode(t,e.openElements.items[0])}function yl(e,t){e._appendCommentNode(t,e.document)}function Ei(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=a;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(r);u&&!u.endTag&&e._setEndLocation(r,t)}}}}function Ml(e,t){e._setDocumentType(t);const a=t.forceQuirks?Ne.QUIRKS:ol(t);ul(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=E.BEFORE_HTML}function yt(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ne.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function Pl(e,t){t.tagID===s.HTML?(e._insertElement(t,A.HTML),e.insertionMode=E.BEFORE_HEAD):Mt(e,t)}function kl(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Mt(e,t)}function Mt(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function wl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.HEAD:{e._insertElement(t,A.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:Pt(e,t)}}function Bl(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?Pt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function Pt(e,t){e._insertFakeElement(p.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function Le(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,be.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,A.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,be.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,be.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=E.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(E.IN_TEMPLATE);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:kt(e,t)}}function vl(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=E.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{kt(e,t);break}case s.TEMPLATE:{at(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function at(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,g.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,g.endTagWithoutMatchingOpenElement)}function kt(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function Ul(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Le(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:wt(e,t)}}function Fl(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case s.BR:{wt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function wt(e,t){const a=t.type===W.EOF?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=E.IN_HEAD,e._processToken(t)}function Hl(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.BODY:{e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,A.HTML),e.insertionMode=E.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,g.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Le(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:Bt(e,t)}}function Vl(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Bt(e,t);break}case s.TEMPLATE:{at(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Bt(e,t){e._insertFakeElement(p.BODY,s.BODY),e.insertionMode=E.IN_BODY,ma(e,t)}function ma(e,t){switch(t.type){case W.CHARACTER:{cs(e,t);break}case W.WHITESPACE_CHARACTER:{os(e,t);break}case W.COMMENT:{mi(e,t);break}case W.START_TAG:{he(e,t);break}case W.END_TAG:{Ea(e,t);break}case W.EOF:{Es(e,t);break}}}function os(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Yl(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ql(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function Wl(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_FRAMESET)}function $l(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function Gl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),li.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,A.HTML)}function Xl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ql(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),a||(e.formElement=e.openElements.current))}function jl(e,t){e.framesetOk=!1;const a=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const n=e.openElements.tagIDs[i];if(a===s.LI&&n===s.LI||(a===s.DD||a===s.DT)&&(n===s.DD||n===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==s.ADDRESS&&n!==s.DIV&&n!==s.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function zl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.tokenizer.state=be.PLAINTEXT}function Kl(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1}function Zl(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(p.A);a&&(fi(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Jl(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function e0(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(fi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function a0(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ne.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function ls(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ds(e){const t=qn(e,tt.TYPE);return t!=null&&t.toLowerCase()===_l}function i0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),ds(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function n0(e,t){e._appendElement(t,A.HTML),t.ackSelfClosing=!0}function s0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function r0(e,t){t.tagName=p.IMG,t.tagID=s.IMG,ls(e,t)}function u0(e,t){e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function o0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function c0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function hs(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function l0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===E.IN_TABLE||e.insertionMode===E.IN_CAPTION||e.insertionMode===E.IN_TABLE_BODY||e.insertionMode===E.IN_ROW||e.insertionMode===E.IN_CELL?E.IN_SELECT_IN_TABLE:E.IN_SELECT}function d0(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function h0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,A.HTML)}function f0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,A.HTML)}function m0(e,t){e._reconstructActiveFormattingElements(),is(t),hi(t),t.selfClosing?e._appendElement(t,A.MATHML):e._insertElement(t,A.MATHML),t.ackSelfClosing=!0}function E0(e,t){e._reconstructActiveFormattingElements(),ns(t),hi(t),t.selfClosing?e._appendElement(t,A.SVG):e._insertElement(t,A.SVG),t.ackSelfClosing=!0}function fs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function he(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{Jl(e,t);break}case s.A:{Zl(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Gl(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{$l(e,t);break}case s.LI:case s.DD:case s.DT:{jl(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{ls(e,t);break}case s.HR:{s0(e,t);break}case s.RB:case s.RTC:{h0(e,t);break}case s.RT:case s.RP:{f0(e,t);break}case s.PRE:case s.LISTING:{Xl(e,t);break}case s.XMP:{o0(e,t);break}case s.SVG:{E0(e,t);break}case s.HTML:{Yl(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{Le(e,t);break}case s.BODY:{ql(e,t);break}case s.FORM:{Ql(e,t);break}case s.NOBR:{e0(e,t);break}case s.MATH:{m0(e,t);break}case s.TABLE:{a0(e,t);break}case s.INPUT:{i0(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{n0(e,t);break}case s.IMAGE:{r0(e,t);break}case s.BUTTON:{Kl(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{t0(e,t);break}case s.IFRAME:{c0(e,t);break}case s.SELECT:{l0(e,t);break}case s.OPTION:case s.OPTGROUP:{d0(e,t);break}case s.NOEMBED:case s.NOFRAMES:{hs(e,t);break}case s.FRAMESET:{Wl(e,t);break}case s.TEXTAREA:{u0(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?hs(e,t):fs(e,t);break}case s.PLAINTEXT:{zl(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:fs(e,t)}}function T0(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function p0(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.AFTER_BODY,Cs(e,t))}function b0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function g0(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function _0(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(p.P,s.P),e._closePElement()}function A0(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function N0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function C0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function I0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function S0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(p.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function ms(e,t){const a=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n],u=e.openElements.tagIDs[n];if(i===u&&(i!==s.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(r,u))break}}function Ea(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{fi(e,t);break}case s.P:{_0(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{b0(e,t);break}case s.LI:{A0(e);break}case s.DD:case s.DT:{N0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{C0(e);break}case s.BR:{S0(e);break}case s.BODY:{T0(e,t);break}case s.HTML:{p0(e,t);break}case s.FORM:{g0(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{I0(e,t);break}case s.TEMPLATE:{at(e,t);break}default:ms(e,t)}}function Es(e,t){e.tmplInsertionModeStack.length>0?Ns(e,t):Ei(e,t)}function x0(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function O0(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ti(e,t){if(ss.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=E.IN_TABLE_TEXT,t.type){case W.CHARACTER:{ps(e,t);break}case W.WHITESPACE_CHARACTER:{Ts(e,t);break}}else Ut(e,t)}function D0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_CAPTION}function L0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function R0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.COLGROUP,s.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,pi(e,t)}function y0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_TABLE_BODY}function M0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.TBODY,s.TBODY),e.insertionMode=E.IN_TABLE_BODY,pa(e,t)}function P0(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function k0(e,t){ds(t)?e._appendElement(t,A.HTML):Ut(e,t),t.ackSelfClosing=!0}function w0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,A.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function dt(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{M0(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}case s.COL:{R0(e,t);break}case s.FORM:{w0(e,t);break}case s.TABLE:{P0(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{y0(e,t);break}case s.INPUT:{k0(e,t);break}case s.CAPTION:{D0(e,t);break}case s.COLGROUP:{L0(e,t);break}default:Ut(e,t)}}function vt(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{at(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ut(e,t)}}function Ut(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ma(e,t),e.fosterParentingEnabled=a}function Ts(e,t){e.pendingCharacterTokens.push(t)}function ps(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ft(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Ut(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const bs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function B0(e,t){const a=t.tagID;bs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,dt(e,t)):he(e,t)}function v0(e,t){const a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,a===s.TABLE&&vt(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ea(e,t)}}function pi(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.COL:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Le(e,t);break}default:Ta(e,t)}}function U0(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TEMPLATE:{at(e,t);break}case s.COL:break;default:Ta(e,t)}}function Ta(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE,e._processToken(t))}function pa(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(p.TR,s.TR),e.insertionMode=E.IN_ROW,ba(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,dt(e,t));break}default:dt(e,t)}}function bi(e,t){const a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,vt(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:vt(e,t)}}function ba(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,pa(e,t));break}default:dt(e,t)}}function gs(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,bi(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,bi(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:vt(e,t)}}function F0(e,t){const a=t.tagID;bs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),ba(e,t)):he(e,t)}function H0(e,t){const a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),gs(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:Ea(e,t)}}function _s(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}}}function As(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{at(e,t);break}}}function V0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_s(e,t)}function Y0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):As(e,t)}function q0(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{Le(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=E.IN_TABLE,e.insertionMode=E.IN_TABLE,dt(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,pi(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=E.IN_TABLE_BODY,e.insertionMode=E.IN_TABLE_BODY,pa(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=E.IN_ROW,e.insertionMode=E.IN_ROW,ba(e,t);break}default:e.tmplInsertionModeStack[0]=E.IN_BODY,e.insertionMode=E.IN_BODY,he(e,t)}}function W0(e,t){t.tagID===s.TEMPLATE&&at(e,t)}function Ns(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ei(e,t)}function $0(e,t){t.tagID===s.HTML?he(e,t):ga(e,t)}function Cs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=E.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(i))===null||a===void 0)&&a.endTag)&&e._setEndLocation(i,t)}}else ga(e,t)}function ga(e,t){e.insertionMode=E.IN_BODY,ma(e,t)}function G0(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.FRAMESET:{e._insertElement(t,A.HTML);break}case s.FRAME:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Le(e,t);break}}}function X0(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=E.AFTER_FRAMESET))}function Q0(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function j0(e,t){t.tagID===s.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function z0(e,t){t.tagID===s.HTML?he(e,t):_a(e,t)}function _a(e,t){e.insertionMode=E.IN_BODY,ma(e,t)}function K0(e,t){switch(t.tagID){case s.HTML:{he(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function Z0(e,t){t.chars=z,e._insertCharacters(t)}function J0(e,t){e._insertCharacters(t),e.framesetOk=!1}function Is(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==A.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ed(e,t){if(El(t))Is(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===A.MATHML?is(t):i===A.SVG&&(Tl(t),ns(t)),hi(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function td(e,t){if(t.tagID===s.P||t.tagID===s.BR){Is(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(i)===A.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(a);break}}}const ad=new Set([p.AREA,p.BASE,p.BASEFONT,p.BGSOUND,p.BR,p.COL,p.EMBED,p.FRAME,p.HR,p.IMG,p.INPUT,p.KEYGEN,p.LINK,p.META,p.PARAM,p.SOURCE,p.TRACK,p.WBR]);function id(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===A.HTML&&ad.has(t.treeAdapter.getTagName(e))}const nd={treeAdapter:ve,scriptingEnabled:!0};function sd(e,t){const a={...nd,...t};return Ss(e,a)}function rd(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===p.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===A.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=Ss(r,t);return a}function Ss(e,t){return t.treeAdapter.isElementNode(e)?ud(e,t):t.treeAdapter.isTextNode(e)?cd(e,t):t.treeAdapter.isCommentNode(e)?ld(e,t):t.treeAdapter.isDocumentTypeNode(e)?dd(e,t):""}function ud(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${od(e,t)}>${id(e,t)?"":`${rd(e,t)}</${a}>`}`}function od(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case A.XML:{a+=`xml:${i.name}`;break}case A.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case A.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${$i(i.value)}"`}return a}function cd(e,t){const{treeAdapter:a}=t,i=a.getTextNodeContent(e),n=a.getParentNode(e),r=n&&a.isElementNode(n)&&a.getTagName(n);return r&&a.getNamespaceURI(n)===A.HTML&&qc(r,t.scriptingEnabled)?i:Gi(i)}function ld(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function dd(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function hd(e,t){return us.parse(e,t)}function fd(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=us.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function xs(e){const t=e.includes('"')?"'":'"';return t+e+t}function md(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${xs(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${xs(a)}`),i}const Ge={isCommentNode:Qt,isElementNode:w,isTextNode:ye,createDocument(){const e=new ze([]);return e["x-mode"]=Ne.NO_QUIRKS,e},createDocumentFragment(){return new ze([])},createElement(e,t,a){const i=Object.create(null),n=Object.create(null),r=Object.create(null);for(let o=0;o<a.length;o++){const l=a[o].name;i[l]=a[o].value,n[l]=a[o].namespace,r[l]=a[o].prefix}const u=new ya(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Da(e)},createTextNode(e){return new _t(e)},appendChild(e,t){const a=e.children[e.children.length-1];a&&(a.next=t,t.prev=a),e.children.push(t),t.parent=e},insertBefore(e,t,a){const i=e.children.indexOf(a),{prev:n}=a;n&&(n.next=t,t.prev=n),a.prev=t,t.next=a,e.children.splice(i,0,t),t.parent=e},setTemplateContent(e,t){Ge.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=md(t,a,i);let r=e.children.find(u=>Ma(u)&&u.name==="!doctype");r?r.data=n??null:(r=new La("!doctype",n),Ge.appendChild(e,r)),r["x-name"]=t,r["x-publicId"]=a,r["x-systemId"]=i},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:a,next:i}=e;e.prev=null,e.next=null,a&&(a.next=i),i&&(i.prev=a),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const a=e.children[e.children.length-1];a&&ye(a)?a.data+=t:Ge.appendChild(e,Ge.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&ye(i)?i.data+=t:Ge.insertBefore(e,Ge.createTextNode(t),a)},adoptAttributes(e,t){for(let a=0;a<t.length;a++){const i=t[a].name;e.attribs[i]===void 0&&(e.attribs[i]=t[a].value,e["x-attribsNamespace"][i]=t[a].namespace,e["x-attribsPrefix"][i]=t[a].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return Ma(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function Ed(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=Ge),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?hd(e,t):fd(i,e,t)}const Td={treeAdapter:Ge};function pd(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Ve(n)&&Array.prototype.splice.call(t,i,1,...n.children)}let a="";for(let i=0;i<t.length;i+=1){const n=t[i];a+=sd(n,Td)}return a}var y;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(y||(y={}));var C;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(C||(C={}));function Ue(e){return e===y.Space||e===y.NewLine||e===y.Tab||e===y.FormFeed||e===y.CarriageReturn}function Aa(e){return e===y.Slash||e===y.Gt||Ue(e)}function bd(e){return e>=y.LowerA&&e<=y.LowerZ||e>=y.UpperA&&e<=y.UpperZ}var Pe;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Pe||(Pe={}));const de={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class gd{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=C.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=a,this.entityDecoder=new Ua(t?Hi:ka,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=C.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===y.Lt||!this.decodeEntities&&this.fastForwardTo(y.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=C.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?Aa(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=C.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===y.Gt||Ue(t)){const a=this.index-this.currentSequence.length;if(this.sectionStart<a){const i=this.index;this.index=a,this.cbs.ontext(this.sectionStart,a),this.index=i}this.isSpecial=!1,this.sectionStart=a+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===de.TitleEnd?this.decodeEntities&&t===y.Amp&&this.startEntity():this.fastForwardTo(y.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===y.Lt)}stateCDATASequence(t){t===de.Cdata[this.sequenceIndex]?++this.sequenceIndex===de.Cdata.length&&(this.state=C.InCommentLike,this.currentSequence=de.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=C.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===de.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=C.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!Aa(t):bd(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=C.SpecialStartSequence}stateBeforeTagName(t){if(t===y.ExclamationMark)this.state=C.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===y.Questionmark)this.state=C.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=C.InTagName:a===de.ScriptEnd[2]?this.state=C.BeforeSpecialS:a===de.TitleEnd[2]?this.state=C.BeforeSpecialT:this.state=C.InTagName}else t===y.Slash?this.state=C.BeforeClosingTagName:(this.state=C.Text,this.stateText(t))}stateInTagName(t){Aa(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Ue(t)||(t===y.Gt?this.state=C.Text:(this.state=this.isTagStartChar(t)?C.InClosingTagName:C.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===y.Gt||Ue(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===y.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=C.InSpecialTag,this.sequenceIndex=0):this.state=C.Text,this.sectionStart=this.index+1):t===y.Slash?this.state=C.InSelfClosingTag:Ue(t)||(this.state=C.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===y.Gt?(this.cbs.onselfclosingtag(this.index),this.state=C.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Ue(t)||(this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===y.Eq||Aa(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=C.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===y.Eq?this.state=C.BeforeAttributeValue:t===y.Slash||t===y.Gt?(this.cbs.onattribend(Pe.NoValue,this.sectionStart),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):Ue(t)||(this.cbs.onattribend(Pe.NoValue,this.sectionStart),this.state=C.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===y.DoubleQuote?(this.state=C.InAttributeValueDq,this.sectionStart=this.index+1):t===y.SingleQuote?(this.state=C.InAttributeValueSq,this.sectionStart=this.index+1):Ue(t)||(this.sectionStart=this.index,this.state=C.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,a){t===a||!this.decodeEntities&&this.fastForwardTo(a)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a===y.DoubleQuote?Pe.Double:Pe.Single,this.index+1),this.state=C.BeforeAttributeName):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,y.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,y.SingleQuote)}stateInAttributeValueNoQuotes(t){Ue(t)||t===y.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Pe.Unquoted,this.index),this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===y.OpeningSquareBracket?(this.state=C.CDATASequence,this.sequenceIndex=0):this.state=t===y.Dash?C.BeforeComment:C.InDeclaration}stateInDeclaration(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===y.Dash?(this.state=C.InCommentLike,this.currentSequence=de.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=C.InDeclaration}stateInSpecialComment(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===de.ScriptEnd[3]?this.startSpecial(de.ScriptEnd,4):a===de.StyleEnd[3]?this.startSpecial(de.StyleEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===de.TitleEnd[3]?this.startSpecial(de.TitleEnd,4):a===de.TextareaEnd[3]?this.startSpecial(de.TextareaEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=C.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Ie.Strict:this.baseState===C.Text||this.baseState===C.InSpecialTag?Ie.Legacy:Ie.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===C.Text||this.state===C.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===C.InAttributeValueDq||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case C.Text:{this.stateText(t);break}case C.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case C.InSpecialTag:{this.stateInSpecialTag(t);break}case C.CDATASequence:{this.stateCDATASequence(t);break}case C.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case C.InAttributeName:{this.stateInAttributeName(t);break}case C.InCommentLike:{this.stateInCommentLike(t);break}case C.InSpecialComment:{this.stateInSpecialComment(t);break}case C.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case C.InTagName:{this.stateInTagName(t);break}case C.InClosingTagName:{this.stateInClosingTagName(t);break}case C.BeforeTagName:{this.stateBeforeTagName(t);break}case C.AfterAttributeName:{this.stateAfterAttributeName(t);break}case C.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case C.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case C.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case C.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case C.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case C.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case C.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case C.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case C.InDeclaration:{this.stateInDeclaration(t);break}case C.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case C.BeforeComment:{this.stateBeforeComment(t);break}case C.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case C.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===C.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===C.InCommentLike?this.currentSequence===de.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===C.InTagName||this.state===C.BeforeAttributeName||this.state===C.BeforeAttributeValue||this.state===C.AfterAttributeName||this.state===C.InAttributeName||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueDq||this.state===C.InAttributeValueNq||this.state===C.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==C.Text&&this.baseState!==C.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const ht=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Q=new Set(["p"]),Os=new Set(["thead","tbody"]),Ds=new Set(["dd","dt"]),Ls=new Set(["rt","rp"]),_d=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Q],["h1",Q],["h2",Q],["h3",Q],["h4",Q],["h5",Q],["h6",Q],["select",ht],["input",ht],["output",ht],["button",ht],["datalist",ht],["textarea",ht],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Ds],["dt",Ds],["address",Q],["article",Q],["aside",Q],["blockquote",Q],["details",Q],["div",Q],["dl",Q],["fieldset",Q],["figcaption",Q],["figure",Q],["footer",Q],["form",Q],["header",Q],["hr",Q],["main",Q],["nav",Q],["ol",Q],["pre",Q],["section",Q],["table",Q],["ul",Q],["rt",Ls],["rp",Ls],["tbody",Os],["tfoot",Os]]),Ad=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),Rs=new Set(["math","svg"]),ys=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),Nd=/\s|\//;class Cd{constructor(t,a={}){var i,n,r,u,o,l;this.options=a,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(i=a.lowerCaseTags)!==null&&i!==void 0?i:this.htmlMode,this.lowerCaseAttributeNames=(n=a.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=a.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((u=a.Tokenizer)!==null&&u!==void 0?u:gd)(this.options,this),this.foreignContext=[!this.htmlMode],(l=(o=this.cbs).onparserinit)===null||l===void 0||l.call(o,this)}ontext(t,a){var i,n;const r=this.getSlice(t,a);this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,r),this.startIndex=a}ontextentity(t,a){var i,n;this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,Ba(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Ad.has(t)}onopentagname(t,a){this.endIndex=a;let i=this.getSlice(t,a);this.lowerCaseTagNames&&(i=i.toLowerCase()),this.emitOpenTag(i)}emitOpenTag(t){var a,i,n,r;this.openTagStart=this.startIndex,this.tagname=t;const u=this.htmlMode&&_d.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[0]);){const o=this.stack.shift();(i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,o,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(Rs.has(t)?this.foreignContext.unshift(!0):ys.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var a,i;this.startIndex=this.openTagStart,this.attribs&&((i=(a=this.cbs).onopentag)===null||i===void 0||i.call(a,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,a){var i,n,r,u,o,l,h,m;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(Rs.has(T)||ys.has(T))&&this.foreignContext.shift(),this.isVoidElement(T))this.htmlMode&&T==="br"&&((u=(r=this.cbs).onopentagname)===null||u===void 0||u.call(r,"br"),(l=(o=this.cbs).onopentag)===null||l===void 0||l.call(o,"br",{},!0),(m=(h=this.cbs).onclosetag)===null||m===void 0||m.call(h,"br",!1));else{const b=this.stack.indexOf(T);if(b!==-1)for(let N=0;N<=b;N++){const I=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,I,N!==b)}else this.htmlMode&&T==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=a+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var a,i;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,n,!t),this.stack.shift())}onattribname(t,a){this.startIndex=t;const i=this.getSlice(t,a);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i}onattribdata(t,a){this.attribvalue+=this.getSlice(t,a)}onattribentity(t){this.attribvalue+=Ba(t)}onattribend(t,a){var i,n;this.endIndex=a,(n=(i=this.cbs).onattribute)===null||n===void 0||n.call(i,this.attribname,this.attribvalue,t===Pe.Double?'"':t===Pe.Single?"'":t===Pe.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const a=t.search(Nd);let i=a<0?t:t.substr(0,a);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i}ondeclaration(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`!${n}`,`!${i}`)}this.startIndex=a+1}onprocessinginstruction(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`?${n}`,`?${i}`)}this.startIndex=a+1}oncomment(t,a,i){var n,r,u,o;this.endIndex=a,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,a-i)),(o=(u=this.cbs).oncommentend)===null||o===void 0||o.call(u),this.startIndex=a+1}oncdata(t,a,i){var n,r,u,o,l,h,m,T,b,N;this.endIndex=a;const I=this.getSlice(t,a-i);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(o=(u=this.cbs).ontext)===null||o===void 0||o.call(u,I),(h=(l=this.cbs).oncdataend)===null||h===void 0||h.call(l)):((T=(m=this.cbs).oncomment)===null||T===void 0||T.call(m,`[CDATA[${I}]]`),(N=(b=this.cbs).oncommentend)===null||N===void 0||N.call(b)),this.startIndex=a+1}onend(){var t,a;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let i=0;i<this.stack.length;i++)this.cbs.onclosetag(this.stack[i],!0)}(a=(t=this.cbs).onend)===null||a===void 0||a.call(t)}reset(){var t,a,i,n;(a=(t=this.cbs).onreset)===null||a===void 0||a.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,a){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(t-this.bufferOffset,a-this.bufferOffset);for(;a-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,a-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function Id(e,t){const a=new Sr(void 0,t);return new Cd(a,t).end(e),a.root}const Sd=ec((e,t,a,i)=>t._useHtmlParser2?Id(e,t):Ed(e,t,a,i)),Ms=Pc(Sd,(e,t)=>t._useHtmlParser2?jt(e,t):pd(e));var ce=(e=>(e[e.None=0]="None",e[e.Text=1]="Text",e[e.Image=2]="Image",e[e.Video=3]="Video",e[e.Icon=4]="Icon",e[e.Link=5]="Link",e[e.Block=10]="Block",e))(ce||{});const xd=c.defineComponent({name:"CustomIcon",props:{iconName:{type:String,required:!0}},setup(e){return{iconClass:c.computed(()=>`${e.iconName}`)}}}),ft=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a};function Od(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)},null,2)}const Dd=ft(xd,[["render",Od]]),Ld={key:0,contenteditable:"false",class:c.normalizeClass(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])},Rd={class:"flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden"},yd={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Md={class:"p-8 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]"},Pd=c.defineComponent({__name:"IconModal",props:{icons:{type:Array,default:()=>[]}},emits:["ok"],setup(e,{expose:t,emit:a}){const i=e,n=c.ref(i.icons||[]);c.watch(()=>i.icons,m=>{n.value=m||[]},{immediate:!0});const r=a,u=c.ref(!1);function o(){console.log(666),u.value=!0}function l(m){h(),r("ok",m)}function h(){u.value=!1}return t({openModal:o,closeModal:h}),(m,T)=>u.value?(c.openBlock(),c.createElementBlock("div",Ld,[c.createElementVNode("div",Rd,[c.createElementVNode("div",yd,[T[1]||(T[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"选择图标",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:T[0]||(T[0]=c.withModifiers(b=>h(),["stop"]))})]),c.createElementVNode("div",Md,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,b=>(c.openBlock(),c.createBlock(Dd,{key:b,class:"w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",iconName:b,onClick:c.withModifiers(N=>l(b),["stop"]),title:b},null,8,["iconName","onClick","title"]))),128))])])])):c.createCommentVNode("",!0)}});function Ps(e){return typeof e=="number"&&Number.isFinite(e)}const kd=c.defineComponent({name:"ImgUploader",inheritAttrs:!1,__name:"UploadImage",props:{alt:{},beforeUpload:{},customUpload:{},getExtraData:{},height:{default:100},multiple:{type:Boolean,default:!1},src:{},tip:{default:"点击上传"},width:{default:100},uploadByImage:{}},setup(e){const t=e,a=c.ref(),i=c.computed(()=>{const u={width:t.width,height:t.height};return Ps(t.width)&&(u.width+="px"),Ps(t.height)&&(u.height+="px"),u});async function n(u){console.log(u,u.target);const o=u.target.files[0];console.log(o),typeof t.customUpload=="function"&&t.customUpload(o),!(typeof t.beforeUpload=="function"&&!await t.beforeUpload(o))&&(typeof t.getExtraData=="function"&&await t.getExtraData(o),o&&(r(o),a.value.value=""))}async function r(u){if(t.uploadByImage){await t.uploadByImage(u);return}return{success:0}}return(u,o)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps({style:i.value,contenteditable:"false",class:"bg-background-deep box-border cursor-pointer absolute left-0 top-0",title:"点击上传"},u.$attrs,{onClick:o[2]||(o[2]=c.withModifiers(()=>{},["stop"]))}),[c.createElementVNode("input",{onClick:o[0]||(o[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",class:"cursor-pointer w-16 opacity-0",type:"file",ref_key:"fileInput",ref:a,onChange:o[1]||(o[1]=l=>n(l)),accept:"image/*"},null,544)],16))}});/*!
8
+ `)}}).toArray()}const Lc=Object.freeze(Object.defineProperty({__proto__:null,serialize:Oc,serializeArray:Dc},Symbol.toStringTag,{value:"Module"}));function yc(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function Rc(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=yc(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?l=>this._make(l).prop(u):l=>this._make(l).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((l,h)=>o(h,a,t)).get();else{const l=this._findBySelector(r,1);t[a]=l.length>0?o(l[0],a,t):void 0}}return t}const Mc=Object.freeze(Object.defineProperty({__proto__:null,extract:Rc},Symbol.toStringTag,{value:"Module"}));class Lt{constructor(t,a,i){if(this.length=0,this.options=i,this._root=a,t){for(let n=0;n<t.length;n++)this[n]=t[n];this.length=t.length}}}Lt.prototype.cheerio="[cheerio object]",Lt.prototype.splice=Array.prototype.splice,Lt.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Lt.prototype,Bu,Jo,Ac,Sc,Lc,Mc);function Pc(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=qa(n),o=e(i,u,r,null);class l extends Lt{_make(T,b){const N=h(T,b);return N.prevObject=this,N}_parse(T,b,N,I){return e(T,b,N,I)}_render(T){return t(T,this.options)}}function h(m,T,b=o,N){if(m&&we(m))return m;const I=qa(N,u),y=typeof b=="string"?[e(b,I,!1,null)]:"length"in b?b:[b],P=we(y)?y:new l(y,null,I);if(P._root=P,!m)return new l(void 0,P,I);const $=typeof m=="string"&&Wa(m)?e(m,I,!1,null).children:kc(m)?[m]:Array.isArray(m)?m:void 0,B=new l($,P,I);if($)return B;if(typeof m!="string")throw new TypeError("Unexpected type of selector");let q=m;const F=T?typeof T=="string"?Wa(T)?new l([e(T,I,!1,null)],P,I):(q=`${T} ${q}`,P):we(T)?T:new l(Array.isArray(T)?T:[T],P,I):P;return F?F.find(q):B}return Object.assign(h,Su,{load:a,_root:o,_options:u,fn:l.prototype,prototype:l.prototype}),h}}function kc(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const vc=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),z="�";var d;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(d||(d={}));const be={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Hn(e){return e>=55296&&e<=57343}function wc(e){return e>=56320&&e<=57343}function Bc(e,t){return(e-55296)*1024+9216+t}function Vn(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Yn(e){return e>=64976&&e<=65007||vc.has(e)}var g;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(g||(g={}));const Uc=65536;class Fc{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Uc,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:i,col:n,offset:r}=this,u=n+a,o=r+a;return{code:t,startLine:i,endLine:i,startCol:u,endCol:u,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(wc(a))return this.pos++,this._addGap(),Bc(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,d.EOF;return this._err(g.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;const i=this.html.charCodeAt(a);return i===d.CARRIAGE_RETURN?d.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,d.EOF;let t=this.html.charCodeAt(this.pos);return t===d.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,d.LINE_FEED):t===d.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Hn(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===d.LINE_FEED||t===d.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Vn(t)?this._err(g.controlCharacterInInputStream):Yn(t)&&this._err(g.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var W;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(W||(W={}));function qn(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}var A;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(A||(A={}));var tt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(tt||(tt={}));var Ce;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ce||(Ce={}));var p;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(p||(p={}));var s;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));const Hc=new Map([[p.A,s.A],[p.ADDRESS,s.ADDRESS],[p.ANNOTATION_XML,s.ANNOTATION_XML],[p.APPLET,s.APPLET],[p.AREA,s.AREA],[p.ARTICLE,s.ARTICLE],[p.ASIDE,s.ASIDE],[p.B,s.B],[p.BASE,s.BASE],[p.BASEFONT,s.BASEFONT],[p.BGSOUND,s.BGSOUND],[p.BIG,s.BIG],[p.BLOCKQUOTE,s.BLOCKQUOTE],[p.BODY,s.BODY],[p.BR,s.BR],[p.BUTTON,s.BUTTON],[p.CAPTION,s.CAPTION],[p.CENTER,s.CENTER],[p.CODE,s.CODE],[p.COL,s.COL],[p.COLGROUP,s.COLGROUP],[p.DD,s.DD],[p.DESC,s.DESC],[p.DETAILS,s.DETAILS],[p.DIALOG,s.DIALOG],[p.DIR,s.DIR],[p.DIV,s.DIV],[p.DL,s.DL],[p.DT,s.DT],[p.EM,s.EM],[p.EMBED,s.EMBED],[p.FIELDSET,s.FIELDSET],[p.FIGCAPTION,s.FIGCAPTION],[p.FIGURE,s.FIGURE],[p.FONT,s.FONT],[p.FOOTER,s.FOOTER],[p.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[p.FORM,s.FORM],[p.FRAME,s.FRAME],[p.FRAMESET,s.FRAMESET],[p.H1,s.H1],[p.H2,s.H2],[p.H3,s.H3],[p.H4,s.H4],[p.H5,s.H5],[p.H6,s.H6],[p.HEAD,s.HEAD],[p.HEADER,s.HEADER],[p.HGROUP,s.HGROUP],[p.HR,s.HR],[p.HTML,s.HTML],[p.I,s.I],[p.IMG,s.IMG],[p.IMAGE,s.IMAGE],[p.INPUT,s.INPUT],[p.IFRAME,s.IFRAME],[p.KEYGEN,s.KEYGEN],[p.LABEL,s.LABEL],[p.LI,s.LI],[p.LINK,s.LINK],[p.LISTING,s.LISTING],[p.MAIN,s.MAIN],[p.MALIGNMARK,s.MALIGNMARK],[p.MARQUEE,s.MARQUEE],[p.MATH,s.MATH],[p.MENU,s.MENU],[p.META,s.META],[p.MGLYPH,s.MGLYPH],[p.MI,s.MI],[p.MO,s.MO],[p.MN,s.MN],[p.MS,s.MS],[p.MTEXT,s.MTEXT],[p.NAV,s.NAV],[p.NOBR,s.NOBR],[p.NOFRAMES,s.NOFRAMES],[p.NOEMBED,s.NOEMBED],[p.NOSCRIPT,s.NOSCRIPT],[p.OBJECT,s.OBJECT],[p.OL,s.OL],[p.OPTGROUP,s.OPTGROUP],[p.OPTION,s.OPTION],[p.P,s.P],[p.PARAM,s.PARAM],[p.PLAINTEXT,s.PLAINTEXT],[p.PRE,s.PRE],[p.RB,s.RB],[p.RP,s.RP],[p.RT,s.RT],[p.RTC,s.RTC],[p.RUBY,s.RUBY],[p.S,s.S],[p.SCRIPT,s.SCRIPT],[p.SEARCH,s.SEARCH],[p.SECTION,s.SECTION],[p.SELECT,s.SELECT],[p.SOURCE,s.SOURCE],[p.SMALL,s.SMALL],[p.SPAN,s.SPAN],[p.STRIKE,s.STRIKE],[p.STRONG,s.STRONG],[p.STYLE,s.STYLE],[p.SUB,s.SUB],[p.SUMMARY,s.SUMMARY],[p.SUP,s.SUP],[p.TABLE,s.TABLE],[p.TBODY,s.TBODY],[p.TEMPLATE,s.TEMPLATE],[p.TEXTAREA,s.TEXTAREA],[p.TFOOT,s.TFOOT],[p.TD,s.TD],[p.TH,s.TH],[p.THEAD,s.THEAD],[p.TITLE,s.TITLE],[p.TR,s.TR],[p.TRACK,s.TRACK],[p.TT,s.TT],[p.U,s.U],[p.UL,s.UL],[p.SVG,s.SVG],[p.VAR,s.VAR],[p.WBR,s.WBR],[p.XMP,s.XMP]]);function da(e){var t;return(t=Hc.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const S=s,Vc={[A.HTML]:new Set([S.ADDRESS,S.APPLET,S.AREA,S.ARTICLE,S.ASIDE,S.BASE,S.BASEFONT,S.BGSOUND,S.BLOCKQUOTE,S.BODY,S.BR,S.BUTTON,S.CAPTION,S.CENTER,S.COL,S.COLGROUP,S.DD,S.DETAILS,S.DIR,S.DIV,S.DL,S.DT,S.EMBED,S.FIELDSET,S.FIGCAPTION,S.FIGURE,S.FOOTER,S.FORM,S.FRAME,S.FRAMESET,S.H1,S.H2,S.H3,S.H4,S.H5,S.H6,S.HEAD,S.HEADER,S.HGROUP,S.HR,S.HTML,S.IFRAME,S.IMG,S.INPUT,S.LI,S.LINK,S.LISTING,S.MAIN,S.MARQUEE,S.MENU,S.META,S.NAV,S.NOEMBED,S.NOFRAMES,S.NOSCRIPT,S.OBJECT,S.OL,S.P,S.PARAM,S.PLAINTEXT,S.PRE,S.SCRIPT,S.SECTION,S.SELECT,S.SOURCE,S.STYLE,S.SUMMARY,S.TABLE,S.TBODY,S.TD,S.TEMPLATE,S.TEXTAREA,S.TFOOT,S.TH,S.THEAD,S.TITLE,S.TR,S.TRACK,S.UL,S.WBR,S.XMP]),[A.MATHML]:new Set([S.MI,S.MO,S.MN,S.MS,S.MTEXT,S.ANNOTATION_XML]),[A.SVG]:new Set([S.TITLE,S.FOREIGN_OBJECT,S.DESC]),[A.XLINK]:new Set,[A.XML]:new Set,[A.XMLNS]:new Set},li=new Set([S.H1,S.H2,S.H3,S.H4,S.H5,S.H6]),Yc=new Set([p.STYLE,p.SCRIPT,p.XMP,p.IFRAME,p.NOEMBED,p.NOFRAMES,p.PLAINTEXT]);function qc(e,t){return Yc.has(e)||t&&e===p.NOSCRIPT}var f;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(f||(f={}));const ge={DATA:f.DATA,RCDATA:f.RCDATA,RAWTEXT:f.RAWTEXT,SCRIPT_DATA:f.SCRIPT_DATA,PLAINTEXT:f.PLAINTEXT,CDATA_SECTION:f.CDATA_SECTION};function Wc(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function yt(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function $c(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function $e(e){return $c(e)||yt(e)}function Wn(e){return $e(e)||Wc(e)}function ha(e){return e+32}function $n(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function Gn(e){return $n(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function Gc(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:Hn(e)?g.surrogateCharacterReference:Yn(e)?g.noncharacterCharacterReference:Vn(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let Xc=class{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=f.DATA,this.returnState=f.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Fc(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ua(ka,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(g.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(g.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=Gc(i);n&&this._err(n,1)}}:void 0)}_err(t,a=0){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,a,i){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:W.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:W.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:W.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:W.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const i=this.currentToken;if(qn(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const n=(t=(a=i.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(g.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=da(t.tagName),t.type===W.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(g.endTagWithAttributes),t.selfClosing&&this._err(g.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case W.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case W.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case W.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:W.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=$n(t)?W.WHITESPACE_CHARACTER:t===d.NULL?W.NULL_CHARACTER:W.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(W.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=f.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ie.Attribute:Ie.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===f.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===f.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case f.DATA:{this._stateData(t);break}case f.RCDATA:{this._stateRcdata(t);break}case f.RAWTEXT:{this._stateRawtext(t);break}case f.SCRIPT_DATA:{this._stateScriptData(t);break}case f.PLAINTEXT:{this._statePlaintext(t);break}case f.TAG_OPEN:{this._stateTagOpen(t);break}case f.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case f.TAG_NAME:{this._stateTagName(t);break}case f.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case f.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case f.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case f.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case f.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case f.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case f.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case f.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case f.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case f.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case f.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case f.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case f.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case f.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case f.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case f.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case f.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case f.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case f.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case f.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case f.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case f.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case f.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case f.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case f.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case f.BOGUS_COMMENT:{this._stateBogusComment(t);break}case f.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case f.COMMENT_START:{this._stateCommentStart(t);break}case f.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case f.COMMENT:{this._stateComment(t);break}case f.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case f.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case f.COMMENT_END:{this._stateCommentEnd(t);break}case f.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case f.DOCTYPE:{this._stateDoctype(t);break}case f.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case f.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case f.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case f.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case f.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case f.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case f.CDATA_SECTION:{this._stateCdataSection(t);break}case f.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case f.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case f.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case f.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.TAG_OPEN;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitCodePoint(t);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case d.AMPERSAND:{this._startCharacterReference();break}case d.LESS_THAN_SIGN:{this.state=f.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if($e(t))this._createStartTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=f.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=f.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t);break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=f.DATA,this._stateData(t)}}_stateEndTagOpen(t){if($e(t))this._createEndTagToken(),this.state=f.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=f.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(yt(t)?ha(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=f.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){$e(t)?(this.state=f.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=f.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=f.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=f.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=f.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){$e(t)?(this.state=f.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=f.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=f.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=f.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){$e(t)?(this.state=f.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=f.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$e(t)?(this._emitChars("<"),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){$e(t)?(this.state=f.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(be.SCRIPT,!1)&&Gn(this.preprocessor.peek(be.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<be.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=f.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(z);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(be.SCRIPT,!1)&&Gn(this.preprocessor.peek(be.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<be.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=f.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=f.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this.state=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=f.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=f.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:case d.SOLIDUS:case d.GREATER_THAN_SIGN:case d.EOF:{this._leaveAttrName(),this.state=f.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:{this._err(g.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.name+=z;break}default:this.currentAttr.name+=String.fromCodePoint(yt(t)?ha(t):t)}}_stateAfterAttributeName(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.SOLIDUS:{this.state=f.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=f.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=f.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{this.state=f.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=f.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=f.DATA,this.emitCurrentTagToken();break}default:this.state=f.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case d.APOSTROPHE:{this.state=f.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=z;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=z;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:case d.EQUALS_SIGN:case d.GRAVE_ACCENT:{this._err(g.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this._leaveAttrValue(),this.state=f.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=f.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=f.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=f.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=z;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(be.DASH_DASH,!0)?(this._createCommentToken(be.DASH_DASH.length+1),this.state=f.COMMENT_START):this._consumeSequenceIfMatch(be.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(be.DOCTYPE.length+1),this.state=f.DOCTYPE):this._consumeSequenceIfMatch(be.CDATA_START,!0)?this.inForeignNode?this.state=f.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(be.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=f.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=f.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=f.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=z;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case d.EXCLAMATION_MARK:{a.data+="!",this.state=f.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=f.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=f.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=f.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=f.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=f.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=f.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=f.COMMENT_END_BANG;break}case d.HYPHEN_MINUS:{a.data+="-";break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=f.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=f.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=f.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=f.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBeforeDoctypeName),this.state=f.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(yt(t))this._createDoctypeToken(String.fromCharCode(ha(t))),this.state=f.DOCTYPE_NAME;else switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.NULL:{this._err(g.unexpectedNullCharacter),this._createDoctypeToken(z),this.state=f.DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=f.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=z;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(yt(t)?ha(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(be.PUBLIC,!1)?this.state=f.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(be.SYSTEM,!1)?this.state=f.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=f.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=f.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=f.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.QUOTATION_MARK:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=f.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case d.APOSTROPHE:{this.state=f.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=z;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:break;case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(g.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=f.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=f.DATA;break}case d.NULL:{this._err(g.unexpectedNullCharacter);break}case d.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case d.RIGHT_SQUARE_BRACKET:{this.state=f.CDATA_SECTION_BRACKET;break}case d.EOF:{this._err(g.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===d.RIGHT_SQUARE_BRACKET?this.state=f.CDATA_SECTION_END:(this._emitChars("]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=f.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=f.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(d.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Wn(this.preprocessor.peek(1))?f.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Wn(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const Xn=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),Qn=new Set([...Xn,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),fa=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),Qc=new Set([...fa,s.OL,s.UL]),jc=new Set([...fa,s.BUTTON]),jn=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),zn=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),zc=new Set([s.TR,s.TEMPLATE,s.HTML]),Kc=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),Zc=new Set([s.TABLE,s.TEMPLATE,s.HTML]),Jc=new Set([s.TD,s.TH]);class el{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,i){this.treeAdapter=a,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===A.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const i=this._indexOf(t);this.items[i]=a,i===this.stackTop&&(this.current=a)}insertAfter(t,a,i){const n=this._indexOf(t)+1;this.items.splice(n,0,a),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==A.HTML);this.shortenToLength(a<0?0:a)}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(a<0?0:a)}popUntilPopped(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i<0?0:i)}popUntilNumberedHeaderPopped(){this.popUntilPopped(li,A.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Jc,A.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===a)return i;return-1}clearBackTo(t,a){const i=this._indexOfTagNames(t,a);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(Zc,A.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Kc,A.HTML)}clearBackToTableRowContext(){this.clearBackTo(zc,A.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,a){for(let i=this.stackTop;i>=0;i--){const n=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case A.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case A.SVG:{if(zn.has(n))return!1;break}case A.MATHML:{if(jn.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,fa)}hasInListItemScope(t){return this.hasInDynamicScope(t,Qc)}hasInButtonScope(t){return this.hasInDynamicScope(t,jc)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case A.HTML:{if(li.has(a))return!0;if(fa.has(a))return!1;break}case A.SVG:{if(zn.has(a))return!1;break}case A.MATHML:{if(jn.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===A.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===A.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Xn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Qn.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Qn.has(this.currentTagId);)this.pop()}}const di=3;var Me;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Me||(Me={}));const Kn={type:Me.Marker};class tl{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const i=[],n=a.length,r=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Me.Marker)break;const{element:h}=l;if(this.treeAdapter.getTagName(h)===r&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===n&&i.push({idx:o,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<di)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<di)return;const n=new Map(a.map(u=>[u.name,u.value]));let r=0;for(let u=0;u<i.length;u++){const o=i[u];o.attrs.every(l=>n.get(l.name)===l.value)&&(r+=1,r>=di&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Kn)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Me.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Me.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a>=0&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(Kn);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===Me.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===Me.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Me.Element&&a.element===t)}}const Be={createDocument(){return{nodeName:"#document",mode:Ce.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const i=e.childNodes.indexOf(a);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,i){const n=e.childNodes.find(r=>r.nodeName==="#documentType");if(n)n.name=t,n.publicId=a,n.systemId=i;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:i,parentNode:null};Be.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(Be.isTextNode(a)){a.value+=t;return}}Be.appendChild(e,Be.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&Be.isTextNode(i)?i.value+=t:Be.insertBefore(e,Be.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)a.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Zn="html",al="about:legacy-compat",il="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Jn=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],nl=[...Jn,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sl=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),es=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],rl=[...es,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ts(e,t){return t.some(a=>e.startsWith(a))}function ul(e){return e.name===Zn&&e.publicId===null&&(e.systemId===null||e.systemId===al)}function ol(e){if(e.name!==Zn)return Ce.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===il)return Ce.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),sl.has(a))return Ce.QUIRKS;let i=t===null?nl:Jn;if(ts(a,i))return Ce.QUIRKS;if(i=t===null?es:rl,ts(a,i))return Ce.LIMITED_QUIRKS}return Ce.NO_QUIRKS}const as={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},cl="definitionurl",ll="definitionURL",dl=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),hl=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:A.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:A.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:A.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:A.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:A.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:A.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:A.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:A.XML}],["xml:space",{prefix:"xml",name:"space",namespace:A.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:A.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:A.XMLNS}]]),fl=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),ml=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function El(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===tt.COLOR||i===tt.SIZE||i===tt.FACE)||ml.has(t)}function is(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===cl){e.attrs[t].name=ll;break}}function ns(e){for(let t=0;t<e.attrs.length;t++){const a=dl.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function hi(e){for(let t=0;t<e.attrs.length;t++){const a=hl.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function Tl(e){const t=fl.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=da(e.tagName))}function pl(e,t){return t===A.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function bl(e,t,a){if(t===A.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===tt.ENCODING){const n=a[i].value.toLowerCase();return n===as.TEXT_HTML||n===as.APPLICATION_XML}}return t===A.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function gl(e,t,a,i){return(!i||i===A.HTML)&&bl(e,t,a)||(!i||i===A.MATHML)&&pl(e,t)}const _l="hidden",Al=8,Nl=3;var E;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(E||(E={}));const Cl={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ss=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),rs={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Be,onParseError:null};let us=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=E.INITIAL,this.originalInsertionMode=E.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...rs,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new Xc(this.options,this),this.activeFormattingElements=new tl(this.treeAdapter),this.fragmentContextID=i?da(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new el(this.document,this.treeAdapter,this)}static parse(t,a){const i=new this(a);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,a){const i={...rs,...a};t??(t=i.treeAdapter.createElement(p.TEMPLATE,A.HTML,[]));const n=i.treeAdapter.createElement("documentmock",A.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(E.IN_TEMPLATE),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),r}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,i){var n;if(!this.onParseError)return;const r=(n=t.location)!==null&&n!==void 0?n:Cl,u={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:i?r.startLine:r.endLine,endCol:i?r.startCol:r.endCol,endOffset:i?r.startOffset:r.endOffset};this.onParseError(u)}onItemPush(t,a,i){var n,r;(r=(n=this.treeAdapter).onItemPush)===null||r===void 0||r.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),a){let r,u;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,u=this.fragmentContextID):{current:r,currentTagId:u}=this.openElements,this._setContextModes(r,u)}}_setContextModes(t,a){const i=t===this.document||this.treeAdapter.getNamespaceURI(t)===A.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,A.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=E.TEXT}switchToPlaintextParsing(){this.insertionMode=E.TEXT,this.originalInsertionMode=E.IN_BODY,this.tokenizer.state=ge.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===p.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==A.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=ge.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=ge.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=ge.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=ge.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,i,n),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const i=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i,t)}}_appendElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,a){const i=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,a){const i=this.treeAdapter.createElement(t,A.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,A.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,i),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(p.HTML,A.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,a){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let a,i;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(a,t.chars,i):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(a),r=i?n.lastIndexOf(i):n.length,u=n[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:l,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,a){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(a,i)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const i=a.location,n=this.treeAdapter.getTagName(t),r=a.type===W.END_TAG&&n===a.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,i;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,i=this.fragmentContextID):{current:a,currentTagId:i}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(a)===p.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===A.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,A.HTML)}_processToken(t){switch(t.type){case W.CHARACTER:{this.onCharacter(t);break}case W.NULL_CHARACTER:{this.onNullCharacter(t);break}case W.COMMENT:{this.onComment(t);break}case W.DOCTYPE:{this.onDoctype(t);break}case W.START_TAG:{this._processStartTag(t);break}case W.END_TAG:{this.onEndTag(t);break}case W.EOF:{this.onEof(t);break}case W.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,i){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return gl(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===Me.Marker||this.openElements.contains(n.element)),i=a<0?t-1:a-1;for(let n=i;n>=0;n--){const r=this.activeFormattingElements.entries[n];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=E.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=E.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=E.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=E.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=E.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=E.IN_TABLE;return}case s.BODY:{this.insertionMode=E.IN_BODY;return}case s.FRAMESET:{this.insertionMode=E.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?E.AFTER_HEAD:E.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=E.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=E.IN_HEAD;return}break}}this.insertionMode=E.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const i=this.openElements.tagIDs[a];if(i===s.TEMPLATE)break;if(i===s.TABLE){this.insertionMode=E.IN_SELECT_IN_TABLE;return}}this.insertionMode=E.IN_SELECT}_isElementCausesFosterParenting(t){return ss.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===A.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case s.TABLE:{const i=this.treeAdapter.getParentNode(a);return i?{parent:i,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const i=this.treeAdapter.getNamespaceURI(t);return Vc[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){J0(this,t);return}switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{vt(this,t);break}case E.AFTER_HEAD:{wt(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{cs(this,t);break}case E.TEXT:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_TABLE_TEXT:{ps(this,t);break}case E.IN_COLUMN_GROUP:{Ta(this,t);break}case E.AFTER_BODY:{ga(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Z0(this,t);return}switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{vt(this,t);break}case E.AFTER_HEAD:{wt(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_COLUMN_GROUP:{Ta(this,t);break}case E.AFTER_BODY:{ga(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){mi(this,t);return}switch(this.insertionMode){case E.INITIAL:case E.BEFORE_HTML:case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_TEMPLATE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{mi(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.AFTER_BODY:{yl(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Rl(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{Ml(this,t);break}case E.BEFORE_HEAD:case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:{this._err(t,g.misplacedDoctype);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,g.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ed(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Pl(this,t);break}case E.BEFORE_HEAD:{vl(this,t);break}case E.IN_HEAD:{Le(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case E.AFTER_HEAD:{Hl(this,t);break}case E.IN_BODY:{fe(this,t);break}case E.IN_TABLE:{dt(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_CAPTION:{w0(this,t);break}case E.IN_COLUMN_GROUP:{pi(this,t);break}case E.IN_TABLE_BODY:{pa(this,t);break}case E.IN_ROW:{ba(this,t);break}case E.IN_CELL:{F0(this,t);break}case E.IN_SELECT:{_s(this,t);break}case E.IN_SELECT_IN_TABLE:{V0(this,t);break}case E.IN_TEMPLATE:{q0(this,t);break}case E.AFTER_BODY:{$0(this,t);break}case E.IN_FRAMESET:{G0(this,t);break}case E.AFTER_FRAMESET:{Q0(this,t);break}case E.AFTER_AFTER_BODY:{z0(this,t);break}case E.AFTER_AFTER_FRAMESET:{K0(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?td(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{kl(this,t);break}case E.BEFORE_HEAD:{wl(this,t);break}case E.IN_HEAD:{Bl(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Fl(this,t);break}case E.AFTER_HEAD:{Vl(this,t);break}case E.IN_BODY:{Ea(this,t);break}case E.TEXT:{x0(this,t);break}case E.IN_TABLE:{Bt(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_CAPTION:{B0(this,t);break}case E.IN_COLUMN_GROUP:{U0(this,t);break}case E.IN_TABLE_BODY:{bi(this,t);break}case E.IN_ROW:{gs(this,t);break}case E.IN_CELL:{H0(this,t);break}case E.IN_SELECT:{As(this,t);break}case E.IN_SELECT_IN_TABLE:{Y0(this,t);break}case E.IN_TEMPLATE:{W0(this,t);break}case E.AFTER_BODY:{Cs(this,t);break}case E.IN_FRAMESET:{X0(this,t);break}case E.AFTER_FRAMESET:{j0(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{Rt(this,t);break}case E.BEFORE_HTML:{Mt(this,t);break}case E.BEFORE_HEAD:{Pt(this,t);break}case E.IN_HEAD:{kt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{vt(this,t);break}case E.AFTER_HEAD:{wt(this,t);break}case E.IN_BODY:case E.IN_TABLE:case E.IN_CAPTION:case E.IN_COLUMN_GROUP:case E.IN_TABLE_BODY:case E.IN_ROW:case E.IN_CELL:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:{Es(this,t);break}case E.TEXT:{O0(this,t);break}case E.IN_TABLE_TEXT:{Ft(this,t);break}case E.IN_TEMPLATE:{Ns(this,t);break}case E.AFTER_BODY:case E.IN_FRAMESET:case E.AFTER_FRAMESET:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{Ei(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===d.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case E.IN_HEAD:case E.IN_HEAD_NO_SCRIPT:case E.AFTER_HEAD:case E.TEXT:case E.IN_COLUMN_GROUP:case E.IN_SELECT:case E.IN_SELECT_IN_TABLE:case E.IN_FRAMESET:case E.AFTER_FRAMESET:{this._insertCharacters(t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:case E.AFTER_BODY:case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{os(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Ti(this,t);break}case E.IN_TABLE_TEXT:{Ts(this,t);break}}}};function Il(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):ms(e,t),a}function Sl(e,t){let a=null,i=e.openElements.stackTop;for(;i>=0;i--){const n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(a=n)}return a||(e.openElements.shortenToLength(i<0?0:i),e.activeFormattingElements.removeEntry(t)),a}function xl(e,t,a){let i=t,n=e.openElements.getCommonAncestor(t);for(let r=0,u=n;u!==a;r++,u=n){n=e.openElements.getCommonAncestor(u);const o=e.activeFormattingElements.getElementEntry(u),l=o&&r>=Nl;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=Ol(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function Ol(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function Dl(e,t,a){const i=e.treeAdapter.getTagName(t),n=da(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===A.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function Ll(e,t,a){const i=e.treeAdapter.getNamespaceURI(a.element),{token:n}=a,r=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,n),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,n.tagID)}function fi(e,t){for(let a=0;a<Al;a++){const i=Il(e,t);if(!i)break;const n=Sl(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=xl(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&Dl(e,u,r),Ll(e,n,i)}}function mi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function yl(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Rl(e,t){e._appendCommentNode(t,e.document)}function Ei(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=a;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(r);u&&!u.endTag&&e._setEndLocation(r,t)}}}}function Ml(e,t){e._setDocumentType(t);const a=t.forceQuirks?Ce.QUIRKS:ol(t);ul(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=E.BEFORE_HTML}function Rt(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ce.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function Pl(e,t){t.tagID===s.HTML?(e._insertElement(t,A.HTML),e.insertionMode=E.BEFORE_HEAD):Mt(e,t)}function kl(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Mt(e,t)}function Mt(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function vl(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.HEAD:{e._insertElement(t,A.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:Pt(e,t)}}function wl(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?Pt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function Pt(e,t){e._insertFakeElement(p.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function Le(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,ge.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ge.RAWTEXT):(e._insertElement(t,A.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,ge.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,ge.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=E.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(E.IN_TEMPLATE);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:kt(e,t)}}function Bl(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=E.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{kt(e,t);break}case s.TEMPLATE:{at(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function at(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,g.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,g.endTagWithoutMatchingOpenElement)}function kt(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function Ul(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Le(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:vt(e,t)}}function Fl(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case s.BR:{vt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function vt(e,t){const a=t.type===W.EOF?g.openElementsLeftAfterEof:g.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=E.IN_HEAD,e._processToken(t)}function Hl(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.BODY:{e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,A.HTML),e.insertionMode=E.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,g.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Le(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:wt(e,t)}}function Vl(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{wt(e,t);break}case s.TEMPLATE:{at(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function wt(e,t){e._insertFakeElement(p.BODY,s.BODY),e.insertionMode=E.IN_BODY,ma(e,t)}function ma(e,t){switch(t.type){case W.CHARACTER:{cs(e,t);break}case W.WHITESPACE_CHARACTER:{os(e,t);break}case W.COMMENT:{mi(e,t);break}case W.START_TAG:{fe(e,t);break}case W.END_TAG:{Ea(e,t);break}case W.EOF:{Es(e,t);break}}}function os(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Yl(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ql(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function Wl(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_FRAMESET)}function $l(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function Gl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),li.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,A.HTML)}function Xl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ql(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),a||(e.formElement=e.openElements.current))}function jl(e,t){e.framesetOk=!1;const a=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const n=e.openElements.tagIDs[i];if(a===s.LI&&n===s.LI||(a===s.DD||a===s.DT)&&(n===s.DD||n===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==s.ADDRESS&&n!==s.DIV&&n!==s.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML)}function zl(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.tokenizer.state=ge.PLAINTEXT}function Kl(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1}function Zl(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(p.A);a&&(fi(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Jl(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function e0(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(fi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,A.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function a0(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ce.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function ls(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ds(e){const t=qn(e,tt.TYPE);return t!=null&&t.toLowerCase()===_l}function i0(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,A.HTML),ds(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function n0(e,t){e._appendElement(t,A.HTML),t.ackSelfClosing=!0}function s0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,A.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function r0(e,t){t.tagName=p.IMG,t.tagID=s.IMG,ls(e,t)}function u0(e,t){e._insertElement(t,A.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ge.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function o0(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ge.RAWTEXT)}function c0(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ge.RAWTEXT)}function hs(e,t){e._switchToTextParsing(t,ge.RAWTEXT)}function l0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===E.IN_TABLE||e.insertionMode===E.IN_CAPTION||e.insertionMode===E.IN_TABLE_BODY||e.insertionMode===E.IN_ROW||e.insertionMode===E.IN_CELL?E.IN_SELECT_IN_TABLE:E.IN_SELECT}function d0(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function h0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,A.HTML)}function f0(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,A.HTML)}function m0(e,t){e._reconstructActiveFormattingElements(),is(t),hi(t),t.selfClosing?e._appendElement(t,A.MATHML):e._insertElement(t,A.MATHML),t.ackSelfClosing=!0}function E0(e,t){e._reconstructActiveFormattingElements(),ns(t),hi(t),t.selfClosing?e._appendElement(t,A.SVG):e._insertElement(t,A.SVG),t.ackSelfClosing=!0}function fs(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,A.HTML)}function fe(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{Jl(e,t);break}case s.A:{Zl(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Gl(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{$l(e,t);break}case s.LI:case s.DD:case s.DT:{jl(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{ls(e,t);break}case s.HR:{s0(e,t);break}case s.RB:case s.RTC:{h0(e,t);break}case s.RT:case s.RP:{f0(e,t);break}case s.PRE:case s.LISTING:{Xl(e,t);break}case s.XMP:{o0(e,t);break}case s.SVG:{E0(e,t);break}case s.HTML:{Yl(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{Le(e,t);break}case s.BODY:{ql(e,t);break}case s.FORM:{Ql(e,t);break}case s.NOBR:{e0(e,t);break}case s.MATH:{m0(e,t);break}case s.TABLE:{a0(e,t);break}case s.INPUT:{i0(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{n0(e,t);break}case s.IMAGE:{r0(e,t);break}case s.BUTTON:{Kl(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{t0(e,t);break}case s.IFRAME:{c0(e,t);break}case s.SELECT:{l0(e,t);break}case s.OPTION:case s.OPTGROUP:{d0(e,t);break}case s.NOEMBED:case s.NOFRAMES:{hs(e,t);break}case s.FRAMESET:{Wl(e,t);break}case s.TEXTAREA:{u0(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?hs(e,t):fs(e,t);break}case s.PLAINTEXT:{zl(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:fs(e,t)}}function T0(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function p0(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.AFTER_BODY,Cs(e,t))}function b0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function g0(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):a&&e.openElements.remove(a))}function _0(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(p.P,s.P),e._closePElement()}function A0(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function N0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function C0(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function I0(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function S0(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(p.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function ms(e,t){const a=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n],u=e.openElements.tagIDs[n];if(i===u&&(i!==s.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(r,u))break}}function Ea(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{fi(e,t);break}case s.P:{_0(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{b0(e,t);break}case s.LI:{A0(e);break}case s.DD:case s.DT:{N0(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{C0(e);break}case s.BR:{S0(e);break}case s.BODY:{T0(e,t);break}case s.HTML:{p0(e,t);break}case s.FORM:{g0(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{I0(e,t);break}case s.TEMPLATE:{at(e,t);break}default:ms(e,t)}}function Es(e,t){e.tmplInsertionModeStack.length>0?Ns(e,t):Ei(e,t)}function x0(e,t){var a;t.tagID===s.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function O0(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ti(e,t){if(ss.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=E.IN_TABLE_TEXT,t.type){case W.CHARACTER:{ps(e,t);break}case W.WHITESPACE_CHARACTER:{Ts(e,t);break}}else Ut(e,t)}function D0(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_CAPTION}function L0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function y0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.COLGROUP,s.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,pi(e,t)}function R0(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_TABLE_BODY}function M0(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(p.TBODY,s.TBODY),e.insertionMode=E.IN_TABLE_BODY,pa(e,t)}function P0(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function k0(e,t){ds(t)?e._appendElement(t,A.HTML):Ut(e,t),t.ackSelfClosing=!0}function v0(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,A.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function dt(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{M0(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}case s.COL:{y0(e,t);break}case s.FORM:{v0(e,t);break}case s.TABLE:{P0(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{R0(e,t);break}case s.INPUT:{k0(e,t);break}case s.CAPTION:{D0(e,t);break}case s.COLGROUP:{L0(e,t);break}default:Ut(e,t)}}function Bt(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{at(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ut(e,t)}}function Ut(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ma(e,t),e.fosterParentingEnabled=a}function Ts(e,t){e.pendingCharacterTokens.push(t)}function ps(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ft(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Ut(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const bs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function w0(e,t){const a=t.tagID;bs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,dt(e,t)):fe(e,t)}function B0(e,t){const a=t.tagID;switch(a){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,a===s.TABLE&&Bt(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:Ea(e,t)}}function pi(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.COL:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Le(e,t);break}default:Ta(e,t)}}function U0(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TEMPLATE:{at(e,t);break}case s.COL:break;default:Ta(e,t)}}function Ta(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=E.IN_TABLE,e._processToken(t))}function pa(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(p.TR,s.TR),e.insertionMode=E.IN_ROW,ba(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,dt(e,t));break}default:dt(e,t)}}function bi(e,t){const a=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE,Bt(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:Bt(e,t)}}function ba(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,A.HTML),e.insertionMode=E.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,pa(e,t));break}default:dt(e,t)}}function gs(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,bi(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=E.IN_TABLE_BODY,bi(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:Bt(e,t)}}function F0(e,t){const a=t.tagID;bs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),ba(e,t)):fe(e,t)}function H0(e,t){const a=t.tagID;switch(a){case s.TD:case s.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),gs(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:Ea(e,t)}}function _s(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,A.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{Le(e,t);break}}}function As(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{at(e,t);break}}}function V0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):_s(e,t)}function Y0(e,t){const a=t.tagID;a===s.CAPTION||a===s.TABLE||a===s.TBODY||a===s.TFOOT||a===s.THEAD||a===s.TR||a===s.TD||a===s.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):As(e,t)}function q0(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{Le(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=E.IN_TABLE,e.insertionMode=E.IN_TABLE,dt(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,pi(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=E.IN_TABLE_BODY,e.insertionMode=E.IN_TABLE_BODY,pa(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=E.IN_ROW,e.insertionMode=E.IN_ROW,ba(e,t);break}default:e.tmplInsertionModeStack[0]=E.IN_BODY,e.insertionMode=E.IN_BODY,fe(e,t)}}function W0(e,t){t.tagID===s.TEMPLATE&&at(e,t)}function Ns(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ei(e,t)}function $0(e,t){t.tagID===s.HTML?fe(e,t):ga(e,t)}function Cs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=E.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(i))===null||a===void 0)&&a.endTag)&&e._setEndLocation(i,t)}}else ga(e,t)}function ga(e,t){e.insertionMode=E.IN_BODY,ma(e,t)}function G0(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.FRAMESET:{e._insertElement(t,A.HTML);break}case s.FRAME:{e._appendElement(t,A.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Le(e,t);break}}}function X0(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=E.AFTER_FRAMESET))}function Q0(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function j0(e,t){t.tagID===s.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function z0(e,t){t.tagID===s.HTML?fe(e,t):_a(e,t)}function _a(e,t){e.insertionMode=E.IN_BODY,ma(e,t)}function K0(e,t){switch(t.tagID){case s.HTML:{fe(e,t);break}case s.NOFRAMES:{Le(e,t);break}}}function Z0(e,t){t.chars=z,e._insertCharacters(t)}function J0(e,t){e._insertCharacters(t),e.framesetOk=!1}function Is(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==A.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ed(e,t){if(El(t))Is(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===A.MATHML?is(t):i===A.SVG&&(Tl(t),ns(t)),hi(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function td(e,t){if(t.tagID===s.P||t.tagID===s.BR){Is(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(i)===A.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(a);break}}}const ad=new Set([p.AREA,p.BASE,p.BASEFONT,p.BGSOUND,p.BR,p.COL,p.EMBED,p.FRAME,p.HR,p.IMG,p.INPUT,p.KEYGEN,p.LINK,p.META,p.PARAM,p.SOURCE,p.TRACK,p.WBR]);function id(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===A.HTML&&ad.has(t.treeAdapter.getTagName(e))}const nd={treeAdapter:Be,scriptingEnabled:!0};function sd(e,t){const a={...nd,...t};return Ss(e,a)}function rd(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===p.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===A.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=Ss(r,t);return a}function Ss(e,t){return t.treeAdapter.isElementNode(e)?ud(e,t):t.treeAdapter.isTextNode(e)?cd(e,t):t.treeAdapter.isCommentNode(e)?ld(e,t):t.treeAdapter.isDocumentTypeNode(e)?dd(e,t):""}function ud(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${od(e,t)}>${id(e,t)?"":`${rd(e,t)}</${a}>`}`}function od(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case A.XML:{a+=`xml:${i.name}`;break}case A.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case A.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${$i(i.value)}"`}return a}function cd(e,t){const{treeAdapter:a}=t,i=a.getTextNodeContent(e),n=a.getParentNode(e),r=n&&a.isElementNode(n)&&a.getTagName(n);return r&&a.getNamespaceURI(n)===A.HTML&&qc(r,t.scriptingEnabled)?i:Gi(i)}function ld(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function dd(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function hd(e,t){return us.parse(e,t)}function fd(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=us.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function xs(e){const t=e.includes('"')?"'":'"';return t+e+t}function md(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${xs(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${xs(a)}`),i}const Ge={isCommentNode:Qt,isElementNode:k,isTextNode:Re,createDocument(){const e=new ze([]);return e["x-mode"]=Ce.NO_QUIRKS,e},createDocumentFragment(){return new ze([])},createElement(e,t,a){const i=Object.create(null),n=Object.create(null),r=Object.create(null);for(let o=0;o<a.length;o++){const l=a[o].name;i[l]=a[o].value,n[l]=a[o].namespace,r[l]=a[o].prefix}const u=new Ra(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Da(e)},createTextNode(e){return new _t(e)},appendChild(e,t){const a=e.children[e.children.length-1];a&&(a.next=t,t.prev=a),e.children.push(t),t.parent=e},insertBefore(e,t,a){const i=e.children.indexOf(a),{prev:n}=a;n&&(n.next=t,t.prev=n),a.prev=t,t.next=a,e.children.splice(i,0,t),t.parent=e},setTemplateContent(e,t){Ge.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=md(t,a,i);let r=e.children.find(u=>Ma(u)&&u.name==="!doctype");r?r.data=n??null:(r=new La("!doctype",n),Ge.appendChild(e,r)),r["x-name"]=t,r["x-publicId"]=a,r["x-systemId"]=i},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:a,next:i}=e;e.prev=null,e.next=null,a&&(a.next=i),i&&(i.prev=a),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const a=e.children[e.children.length-1];a&&Re(a)?a.data+=t:Ge.appendChild(e,Ge.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&Re(i)?i.data+=t:Ge.insertBefore(e,Ge.createTextNode(t),a)},adoptAttributes(e,t){for(let a=0;a<t.length;a++){const i=t[a].name;e.attribs[i]===void 0&&(e.attribs[i]=t[a].value,e["x-attribsNamespace"][i]=t[a].namespace,e["x-attribsPrefix"][i]=t[a].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return Ma(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function Ed(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=Ge),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?hd(e,t):fd(i,e,t)}const Td={treeAdapter:Ge};function pd(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Ve(n)&&Array.prototype.splice.call(t,i,1,...n.children)}let a="";for(let i=0;i<t.length;i+=1){const n=t[i];a+=sd(n,Td)}return a}var R;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(R||(R={}));var C;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(C||(C={}));function Ue(e){return e===R.Space||e===R.NewLine||e===R.Tab||e===R.FormFeed||e===R.CarriageReturn}function Aa(e){return e===R.Slash||e===R.Gt||Ue(e)}function bd(e){return e>=R.LowerA&&e<=R.LowerZ||e>=R.UpperA&&e<=R.UpperZ}var Pe;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Pe||(Pe={}));const he={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class gd{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=C.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=a,this.entityDecoder=new Ua(t?Hi:ka,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=C.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=C.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===R.Lt||!this.decodeEntities&&this.fastForwardTo(R.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=C.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===R.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?Aa(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=C.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===R.Gt||Ue(t)){const a=this.index-this.currentSequence.length;if(this.sectionStart<a){const i=this.index;this.index=a,this.cbs.ontext(this.sectionStart,a),this.index=i}this.isSpecial=!1,this.sectionStart=a+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===he.TitleEnd?this.decodeEntities&&t===R.Amp&&this.startEntity():this.fastForwardTo(R.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===R.Lt)}stateCDATASequence(t){t===he.Cdata[this.sequenceIndex]?++this.sequenceIndex===he.Cdata.length&&(this.state=C.InCommentLike,this.currentSequence=he.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=C.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===he.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=C.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!Aa(t):bd(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=C.SpecialStartSequence}stateBeforeTagName(t){if(t===R.ExclamationMark)this.state=C.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===R.Questionmark)this.state=C.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=C.InTagName:a===he.ScriptEnd[2]?this.state=C.BeforeSpecialS:a===he.TitleEnd[2]?this.state=C.BeforeSpecialT:this.state=C.InTagName}else t===R.Slash?this.state=C.BeforeClosingTagName:(this.state=C.Text,this.stateText(t))}stateInTagName(t){Aa(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Ue(t)||(t===R.Gt?this.state=C.Text:(this.state=this.isTagStartChar(t)?C.InClosingTagName:C.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===R.Gt||Ue(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=C.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===R.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=C.InSpecialTag,this.sequenceIndex=0):this.state=C.Text,this.sectionStart=this.index+1):t===R.Slash?this.state=C.InSelfClosingTag:Ue(t)||(this.state=C.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===R.Gt?(this.cbs.onselfclosingtag(this.index),this.state=C.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Ue(t)||(this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===R.Eq||Aa(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=C.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===R.Eq?this.state=C.BeforeAttributeValue:t===R.Slash||t===R.Gt?(this.cbs.onattribend(Pe.NoValue,this.sectionStart),this.sectionStart=-1,this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):Ue(t)||(this.cbs.onattribend(Pe.NoValue,this.sectionStart),this.state=C.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===R.DoubleQuote?(this.state=C.InAttributeValueDq,this.sectionStart=this.index+1):t===R.SingleQuote?(this.state=C.InAttributeValueSq,this.sectionStart=this.index+1):Ue(t)||(this.sectionStart=this.index,this.state=C.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,a){t===a||!this.decodeEntities&&this.fastForwardTo(a)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a===R.DoubleQuote?Pe.Double:Pe.Single,this.index+1),this.state=C.BeforeAttributeName):this.decodeEntities&&t===R.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,R.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,R.SingleQuote)}stateInAttributeValueNoQuotes(t){Ue(t)||t===R.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Pe.Unquoted,this.index),this.state=C.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===R.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===R.OpeningSquareBracket?(this.state=C.CDATASequence,this.sequenceIndex=0):this.state=t===R.Dash?C.BeforeComment:C.InDeclaration}stateInDeclaration(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===R.Dash?(this.state=C.InCommentLike,this.currentSequence=he.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=C.InDeclaration}stateInSpecialComment(t){(t===R.Gt||this.fastForwardTo(R.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=C.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===he.ScriptEnd[3]?this.startSpecial(he.ScriptEnd,4):a===he.StyleEnd[3]?this.startSpecial(he.StyleEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===he.TitleEnd[3]?this.startSpecial(he.TitleEnd,4):a===he.TextareaEnd[3]?this.startSpecial(he.TextareaEnd,4):(this.state=C.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=C.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Ie.Strict:this.baseState===C.Text||this.baseState===C.InSpecialTag?Ie.Legacy:Ie.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===C.Text||this.state===C.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===C.InAttributeValueDq||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case C.Text:{this.stateText(t);break}case C.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case C.InSpecialTag:{this.stateInSpecialTag(t);break}case C.CDATASequence:{this.stateCDATASequence(t);break}case C.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case C.InAttributeName:{this.stateInAttributeName(t);break}case C.InCommentLike:{this.stateInCommentLike(t);break}case C.InSpecialComment:{this.stateInSpecialComment(t);break}case C.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case C.InTagName:{this.stateInTagName(t);break}case C.InClosingTagName:{this.stateInClosingTagName(t);break}case C.BeforeTagName:{this.stateBeforeTagName(t);break}case C.AfterAttributeName:{this.stateAfterAttributeName(t);break}case C.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case C.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case C.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case C.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case C.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case C.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case C.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case C.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case C.InDeclaration:{this.stateInDeclaration(t);break}case C.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case C.BeforeComment:{this.stateBeforeComment(t);break}case C.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case C.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===C.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===C.InCommentLike?this.currentSequence===he.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===C.InTagName||this.state===C.BeforeAttributeName||this.state===C.BeforeAttributeValue||this.state===C.AfterAttributeName||this.state===C.InAttributeName||this.state===C.InAttributeValueSq||this.state===C.InAttributeValueDq||this.state===C.InAttributeValueNq||this.state===C.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==C.Text&&this.baseState!==C.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+a,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}}const ht=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Q=new Set(["p"]),Os=new Set(["thead","tbody"]),Ds=new Set(["dd","dt"]),Ls=new Set(["rt","rp"]),_d=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Q],["h1",Q],["h2",Q],["h3",Q],["h4",Q],["h5",Q],["h6",Q],["select",ht],["input",ht],["output",ht],["button",ht],["datalist",ht],["textarea",ht],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",Ds],["dt",Ds],["address",Q],["article",Q],["aside",Q],["blockquote",Q],["details",Q],["div",Q],["dl",Q],["fieldset",Q],["figcaption",Q],["figure",Q],["footer",Q],["form",Q],["header",Q],["hr",Q],["main",Q],["nav",Q],["ol",Q],["pre",Q],["section",Q],["table",Q],["ul",Q],["rt",Ls],["rp",Ls],["tbody",Os],["tfoot",Os]]),Ad=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),ys=new Set(["math","svg"]),Rs=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),Nd=/\s|\//;class Cd{constructor(t,a={}){var i,n,r,u,o,l;this.options=a,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(i=a.lowerCaseTags)!==null&&i!==void 0?i:this.htmlMode,this.lowerCaseAttributeNames=(n=a.lowerCaseAttributeNames)!==null&&n!==void 0?n:this.htmlMode,this.recognizeSelfClosing=(r=a.recognizeSelfClosing)!==null&&r!==void 0?r:!this.htmlMode,this.tokenizer=new((u=a.Tokenizer)!==null&&u!==void 0?u:gd)(this.options,this),this.foreignContext=[!this.htmlMode],(l=(o=this.cbs).onparserinit)===null||l===void 0||l.call(o,this)}ontext(t,a){var i,n;const r=this.getSlice(t,a);this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,r),this.startIndex=a}ontextentity(t,a){var i,n;this.endIndex=a-1,(n=(i=this.cbs).ontext)===null||n===void 0||n.call(i,wa(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Ad.has(t)}onopentagname(t,a){this.endIndex=a;let i=this.getSlice(t,a);this.lowerCaseTagNames&&(i=i.toLowerCase()),this.emitOpenTag(i)}emitOpenTag(t){var a,i,n,r;this.openTagStart=this.startIndex,this.tagname=t;const u=this.htmlMode&&_d.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[0]);){const o=this.stack.shift();(i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,o,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(ys.has(t)?this.foreignContext.unshift(!0):Rs.has(t)&&this.foreignContext.unshift(!1))),(r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var a,i;this.startIndex=this.openTagStart,this.attribs&&((i=(a=this.cbs).onopentag)===null||i===void 0||i.call(a,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,a){var i,n,r,u,o,l,h,m;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(ys.has(T)||Rs.has(T))&&this.foreignContext.shift(),this.isVoidElement(T))this.htmlMode&&T==="br"&&((u=(r=this.cbs).onopentagname)===null||u===void 0||u.call(r,"br"),(l=(o=this.cbs).onopentag)===null||l===void 0||l.call(o,"br",{},!0),(m=(h=this.cbs).onclosetag)===null||m===void 0||m.call(h,"br",!1));else{const b=this.stack.indexOf(T);if(b!==-1)for(let N=0;N<=b;N++){const I=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,I,N!==b)}else this.htmlMode&&T==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=a+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var a,i;const n=this.tagname;this.endOpenTag(t),this.stack[0]===n&&((i=(a=this.cbs).onclosetag)===null||i===void 0||i.call(a,n,!t),this.stack.shift())}onattribname(t,a){this.startIndex=t;const i=this.getSlice(t,a);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i}onattribdata(t,a){this.attribvalue+=this.getSlice(t,a)}onattribentity(t){this.attribvalue+=wa(t)}onattribend(t,a){var i,n;this.endIndex=a,(n=(i=this.cbs).onattribute)===null||n===void 0||n.call(i,this.attribname,this.attribvalue,t===Pe.Double?'"':t===Pe.Single?"'":t===Pe.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const a=t.search(Nd);let i=a<0?t:t.substr(0,a);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i}ondeclaration(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`!${n}`,`!${i}`)}this.startIndex=a+1}onprocessinginstruction(t,a){this.endIndex=a;const i=this.getSlice(t,a);if(this.cbs.onprocessinginstruction){const n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`?${n}`,`?${i}`)}this.startIndex=a+1}oncomment(t,a,i){var n,r,u,o;this.endIndex=a,(r=(n=this.cbs).oncomment)===null||r===void 0||r.call(n,this.getSlice(t,a-i)),(o=(u=this.cbs).oncommentend)===null||o===void 0||o.call(u),this.startIndex=a+1}oncdata(t,a,i){var n,r,u,o,l,h,m,T,b,N;this.endIndex=a;const I=this.getSlice(t,a-i);!this.htmlMode||this.options.recognizeCDATA?((r=(n=this.cbs).oncdatastart)===null||r===void 0||r.call(n),(o=(u=this.cbs).ontext)===null||o===void 0||o.call(u,I),(h=(l=this.cbs).oncdataend)===null||h===void 0||h.call(l)):((T=(m=this.cbs).oncomment)===null||T===void 0||T.call(m,`[CDATA[${I}]]`),(N=(b=this.cbs).oncommentend)===null||N===void 0||N.call(b)),this.startIndex=a+1}onend(){var t,a;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let i=0;i<this.stack.length;i++)this.cbs.onclosetag(this.stack[i],!0)}(a=(t=this.cbs).onend)===null||a===void 0||a.call(t)}reset(){var t,a,i,n;(a=(t=this.cbs).onreset)===null||a===void 0||a.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(n=(i=this.cbs).onparserinit)===null||n===void 0||n.call(i,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,a){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(t-this.bufferOffset,a-this.bufferOffset);for(;a-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,a-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var a,i;if(this.ended){(i=(a=this.cbs).onerror)===null||i===void 0||i.call(a,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}}function Id(e,t){const a=new Sr(void 0,t);return new Cd(a,t).end(e),a.root}const Sd=ec((e,t,a,i)=>t._useHtmlParser2?Id(e,t):Ed(e,t,a,i)),Ms=Pc(Sd,(e,t)=>t._useHtmlParser2?jt(e,t):pd(e));var K=(e=>(e[e.None=0]="None",e[e.Text=1]="Text",e[e.Image=2]="Image",e[e.Video=3]="Video",e[e.Icon=4]="Icon",e[e.Link=5]="Link",e[e.Block=10]="Block",e))(K||{});const xd=c.defineComponent({name:"CustomIcon",props:{iconName:{type:String,required:!0}},setup(e){return{iconClass:c.computed(()=>`${e.iconName}`)}}}),ft=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a};function Od(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)},null,2)}const Dd=ft(xd,[["render",Od]]),Ld={key:0,contenteditable:"false",class:c.normalizeClass(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])},yd={class:"flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden"},Rd={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Md={class:"p-8 flex flex-wrap max-h-[500px] overflow-y-auto w-[640px]"},Pd=c.defineComponent({__name:"IconModal",props:{icons:{type:Array,default:()=>[]}},emits:["ok"],setup(e,{expose:t,emit:a}){const i=e,n=c.ref(i.icons||[]);c.watch(()=>i.icons,m=>{n.value=m||[]},{immediate:!0});const r=a,u=c.ref(!1);function o(){console.log(666),u.value=!0}function l(m){h(),r("ok",m)}function h(){u.value=!1}return t({openModal:o,closeModal:h}),(m,T)=>u.value?(c.openBlock(),c.createElementBlock("div",Ld,[c.createElementVNode("div",yd,[c.createElementVNode("div",Rd,[T[1]||(T[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"选择图标",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:T[0]||(T[0]=c.withModifiers(b=>h(),["stop"]))})]),c.createElementVNode("div",Md,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.value,b=>(c.openBlock(),c.createBlock(Dd,{key:b,class:"w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",iconName:b,onClick:c.withModifiers(N=>l(b),["stop"]),title:b},null,8,["iconName","onClick","title"]))),128))])])])):c.createCommentVNode("",!0)}});function Ps(e){return typeof e=="number"&&Number.isFinite(e)}const kd=c.defineComponent({name:"ImgUploader",inheritAttrs:!1,__name:"UploadImage",props:{alt:{},beforeUpload:{},customUpload:{},getExtraData:{},height:{default:100},multiple:{type:Boolean,default:!1},src:{},tip:{default:"点击上传"},width:{default:100},uploadByImage:{}},setup(e){const t=e,a=c.ref(),i=c.computed(()=>{const u={width:t.width,height:t.height};return Ps(t.width)&&(u.width+="px"),Ps(t.height)&&(u.height+="px"),u});async function n(u){console.log(u,u.target);const o=u.target.files[0];console.log(o),typeof t.customUpload=="function"&&t.customUpload(o),!(typeof t.beforeUpload=="function"&&!await t.beforeUpload(o))&&(typeof t.getExtraData=="function"&&await t.getExtraData(o),o&&(r(o),a.value.value=""))}async function r(u){if(t.uploadByImage){await t.uploadByImage(u);return}return{success:0}}return(u,o)=>(c.openBlock(),c.createElementBlock("div",c.mergeProps({style:i.value,contenteditable:"false",class:"bg-background-deep box-border cursor-pointer absolute left-0 top-0",title:"点击上传"},u.$attrs,{onClick:o[2]||(o[2]=c.withModifiers(()=>{},["stop"]))}),[c.createElementVNode("input",{onClick:o[0]||(o[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",class:"cursor-pointer w-16 opacity-0",type:"file",ref_key:"fileInput",ref:a,onChange:o[1]||(o[1]=l=>n(l)),accept:"image/*"},null,544)],16))}});/*!
9
9
  * Cropper.js v1.6.2
10
10
  * https://fengyuanchen.github.io/cropperjs
11
11
  *
@@ -13,5 +13,5 @@
13
13
  * Released under the MIT license
14
14
  *
15
15
  * Date: 2024-04-21T07:43:05.335Z
16
- */function ks(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,i)}return a}function ws(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ks(Object(a),!0).forEach(function(i){Ud(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ks(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}function wd(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var i=a.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bs(e){var t=wd(e,"string");return typeof t=="symbol"?t:t+""}function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function Bd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vs(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Bs(i.key),i)}}function vd(e,t,a){return t&&vs(e.prototype,t),a&&vs(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ud(e,t,a){return t=Bs(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Us(e){return Fd(e)||Hd(e)||Vd(e)||Yd()}function Fd(e){if(Array.isArray(e))return _i(e)}function Hd(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vd(e,t){if(e){if(typeof e=="string")return _i(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _i(e,t)}}function _i(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Yd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Na=typeof window<"u"&&typeof window.document<"u",ke=Na?window:{},Ai=Na&&ke.document.documentElement?"ontouchstart"in ke.document.documentElement:!1,Ni=Na?"PointerEvent"in ke:!1,K="cropper",Ci="all",Fs="crop",Hs="move",Vs="zoom",it="e",nt="w",mt="s",Xe="n",Ht="ne",Vt="nw",Yt="se",qt="sw",Ii="".concat(K,"-crop"),Ys="".concat(K,"-disabled"),ge="".concat(K,"-hidden"),qs="".concat(K,"-hide"),qd="".concat(K,"-invisible"),Ca="".concat(K,"-modal"),Si="".concat(K,"-move"),Wt="".concat(K,"Action"),Ia="".concat(K,"Preview"),xi="crop",Ws="move",$s="none",Oi="crop",Di="cropend",Li="cropmove",Ri="cropstart",Gs="dblclick",Wd=Ai?"touchstart":"mousedown",$d=Ai?"touchmove":"mousemove",Gd=Ai?"touchend touchcancel":"mouseup",Xs=Ni?"pointerdown":Wd,Qs=Ni?"pointermove":$d,js=Ni?"pointerup pointercancel":Gd,zs="ready",Ks="resize",Zs="wheel",yi="zoom",Js="image/jpeg",Xd=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Qd=/^data:/,jd=/^data:image\/jpeg;base64,/,zd=/^img|canvas$/i,er=200,tr=100,ar={viewMode:0,dragMode:xi,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:er,minContainerHeight:tr,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Kd='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',Zd=Number.isNaN||ke.isNaN;function Y(e){return typeof e=="number"&&!Zd(e)}var ir=function(t){return t>0&&t<1/0};function Mi(e){return typeof e>"u"}function st(e){return gi(e)==="object"&&e!==null}var Jd=Object.prototype.hasOwnProperty;function Et(e){if(!st(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&Jd.call(a,"isPrototypeOf")}catch{return!1}}function _e(e){return typeof e=="function"}var eh=Array.prototype.slice;function nr(e){return Array.from?Array.from(e):eh.call(e)}function ae(e,t){return e&&_e(t)&&(Array.isArray(e)||Y(e.length)?nr(e).forEach(function(a,i){t.call(e,a,i,e)}):st(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var Z=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return st(t)&&i.length>0&&i.forEach(function(r){st(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},th=/\.\d*(?:0|9){12}\d*$/;function Tt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return th.test(e)?Math.round(e*t)/t:e}var ah=/^width|height|left|top|marginLeft|marginTop$/;function Qe(e,t){var a=e.style;ae(t,function(i,n){ah.test(n)&&Y(i)&&(i="".concat(i,"px")),a[n]=i})}function ih(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function le(e,t){if(t){if(Y(e.length)){ae(e,function(i){le(i,t)});return}if(e.classList){e.classList.add(t);return}var a=e.className.trim();a?a.indexOf(t)<0&&(e.className="".concat(a," ").concat(t)):e.className=t}}function we(e,t){if(t){if(Y(e.length)){ae(e,function(a){we(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function pt(e,t,a){if(t){if(Y(e.length)){ae(e,function(i){pt(i,t,a)});return}a?le(e,t):we(e,t)}}var nh=/([a-z\d])([A-Z])/g;function Pi(e){return e.replace(nh,"$1-$2").toLowerCase()}function ki(e,t){return st(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Pi(t)))}function $t(e,t,a){st(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Pi(t)),a)}function sh(e,t){if(st(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Pi(t)))}var sr=/\s\s*/,rr=function(){var e=!1;if(Na){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});ke.addEventListener("test",a,i),ke.removeEventListener("test",a,i)}return e}();function Re(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sr).forEach(function(r){if(!rr){var u=e.listeners;u&&u[r]&&u[r][a]&&(n=u[r][a],delete u[r][a],Object.keys(u[r]).length===0&&delete u[r],Object.keys(u).length===0&&delete e.listeners)}e.removeEventListener(r,n,i)})}function xe(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sr).forEach(function(r){if(i.once&&!rr){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var h=arguments.length,m=new Array(h),T=0;T<h;T++)m[T]=arguments[T];a.apply(e,m)},o[r]||(o[r]={}),o[r][a]&&e.removeEventListener(r,o[r][a],i),o[r][a]=n,e.listeners=o}e.addEventListener(r,n,i)})}function bt(e,t,a){var i;return _e(Event)&&_e(CustomEvent)?i=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,a)),e.dispatchEvent(i)}function ur(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var wi=ke.location,rh=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function or(e){var t=e.match(rh);return t!==null&&(t[1]!==wi.protocol||t[2]!==wi.hostname||t[3]!==wi.port)}function cr(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function Gt(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];Y(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),Y(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),Y(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),Y(a)&&a!==1&&u.push("scaleX(".concat(a,")")),Y(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function uh(e){var t=ws({},e),a=0;return ae(e,function(i,n){delete t[n],ae(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),l=Math.abs(i.endX-r.endX),h=Math.abs(i.endY-r.endY),m=Math.sqrt(u*u+o*o),T=Math.sqrt(l*l+h*h),b=(T-m)/m;Math.abs(b)>Math.abs(a)&&(a=b)})}),a}function Sa(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:ws({startX:a,startY:i},n)}function oh(e){var t=0,a=0,i=0;return ae(e,function(n){var r=n.startX,u=n.startY;t+=r,a+=u,i+=1}),t/=i,a/=i,{pageX:t,pageY:a}}function je(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=ir(i),u=ir(a);if(r&&u){var o=a*t;n==="contain"&&o>i||n==="cover"&&o<i?a=i/t:i=a*t}else r?a=i/t:u&&(i=a*t);return{width:i,height:a}}function ch(e){var t=e.width,a=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:a,height:t};var n=i%90*Math.PI/180,r=Math.sin(n),u=Math.cos(n),o=t*u+a*r,l=t*r+a*u;return i>90?{width:l,height:o}:{width:o,height:l}}function lh(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,l=o===void 0?0:o,h=t.scaleX,m=h===void 0?1:h,T=t.scaleY,b=T===void 0?1:T,N=a.aspectRatio,I=a.naturalWidth,R=a.naturalHeight,P=i.fillColor,$=P===void 0?"transparent":P,v=i.imageSmoothingEnabled,q=v===void 0?!0:v,F=i.imageSmoothingQuality,k=F===void 0?"low":F,_=i.maxWidth,B=_===void 0?1/0:_,G=i.maxHeight,se=G===void 0?1/0:G,fe=i.minWidth,Ae=fe===void 0?0:fe,Oe=i.minHeight,me=Oe===void 0?0:Oe,Ee=document.createElement("canvas"),ee=Ee.getContext("2d"),De=je({aspectRatio:N,width:B,height:se}),x=je({aspectRatio:N,width:Ae,height:me},"cover"),M=Math.min(De.width,Math.max(x.width,I)),O=Math.min(De.height,Math.max(x.height,R)),D=je({aspectRatio:n,width:B,height:se}),H=je({aspectRatio:n,width:Ae,height:me},"cover"),V=Math.min(D.width,Math.max(H.width,r)),j=Math.min(D.height,Math.max(H.height,u)),te=[-V/2,-j/2,V,j];return Ee.width=Tt(M),Ee.height=Tt(O),ee.fillStyle=$,ee.fillRect(0,0,M,O),ee.save(),ee.translate(M/2,O/2),ee.rotate(l*Math.PI/180),ee.scale(m,b),ee.imageSmoothingEnabled=q,ee.imageSmoothingQuality=k,ee.drawImage.apply(ee,[e].concat(Us(te.map(function(ie){return Math.floor(Tt(ie))})))),ee.restore(),Ee}var lr=String.fromCharCode;function dh(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=lr(e.getUint8(n));return i}var hh=/^data:.*,/;function fh(e){var t=e.replace(hh,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return ae(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function mh(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(lr.apply(null,nr(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function Eh(e){var t=new DataView(e),a;try{var i,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var u=t.byteLength,o=2;o+1<u;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){n=o;break}o+=1}if(n){var l=n+4,h=n+10;if(dh(t,l,4)==="Exif"){var m=t.getUint16(h);if(i=m===18761,(i||m===19789)&&t.getUint16(h+2,i)===42){var T=t.getUint32(h+4,i);T>=8&&(r=h+T)}}}if(r){var b=t.getUint16(r,i),N,I;for(I=0;I<b;I+=1)if(N=r+I*12+2,t.getUint16(N,i)===274){N+=8,a=t.getUint16(N,i),t.setUint16(N,1,i);break}}}catch{a=1}return a}function Th(e){var t=0,a=1,i=1;switch(e){case 2:a=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,a=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:a,scaleY:i}}var ph={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,i=this.container,n=this.cropper,r=Number(a.minContainerWidth),u=Number(a.minContainerHeight);le(n,ge),we(t,ge);var o={width:Math.max(i.offsetWidth,r>=0?r:er),height:Math.max(i.offsetHeight,u>=0?u:tr)};this.containerData=o,Qe(n,{width:o.width,height:o.height}),le(t,ge),we(n,ge)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,n=Math.abs(a.rotate)%180===90,r=n?a.naturalHeight:a.naturalWidth,u=n?a.naturalWidth:a.naturalHeight,o=r/u,l=t.width,h=t.height;t.height*o>t.width?i===3?l=t.height*o:h=t.width/o:i===3?h=t.width/o:l=t.height*o;var m={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:l,height:h};this.canvasData=m,this.limited=i===1||i===2,this.limitCanvas(!0,!0),m.width=Math.min(Math.max(m.width,m.minWidth),m.maxWidth),m.height=Math.min(Math.max(m.height,m.minHeight),m.maxHeight),m.left=(t.width-m.width)/2,m.top=(t.height-m.height)/2,m.oldLeft=m.left,m.oldTop=m.top,this.initialCanvasData=Z({},m)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,l=r.aspectRatio,h=this.cropped&&u;if(t){var m=Number(i.minCanvasWidth)||0,T=Number(i.minCanvasHeight)||0;o>1?(m=Math.max(m,n.width),T=Math.max(T,n.height),o===3&&(T*l>m?m=T*l:T=m/l)):o>0&&(m?m=Math.max(m,h?u.width:0):T?T=Math.max(T,h?u.height:0):h&&(m=u.width,T=u.height,T*l>m?m=T*l:T=m/l));var b=je({aspectRatio:l,width:m,height:T});m=b.width,T=b.height,r.minWidth=m,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(h?0:1)){var N=n.width-r.width,I=n.height-r.height;r.minLeft=Math.min(0,N),r.minTop=Math.min(0,I),r.maxLeft=Math.max(0,N),r.maxTop=Math.max(0,I),h&&this.limited&&(r.minLeft=Math.min(u.left,u.left+(u.width-r.width)),r.minTop=Math.min(u.top,u.top+(u.height-r.height)),r.maxLeft=u.left,r.maxTop=u.top,o===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,N),r.maxLeft=Math.max(0,N)),r.height>=n.height&&(r.minTop=Math.min(0,I),r.maxTop=Math.max(0,I))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,a){var i=this.canvasData,n=this.imageData;if(a){var r=ch({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),u=r.width,o=r.height,l=i.width*(u/i.naturalWidth),h=i.height*(o/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(h-i.height)/2,i.width=l,i.height=h,i.aspectRatio=u/o,i.naturalWidth=u,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,Qe(this.canvas,Z({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,i=this.imageData,n=i.naturalWidth*(a.width/a.naturalWidth),r=i.naturalHeight*(a.height/a.naturalHeight);Z(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),Qe(this.image,Z({width:i.width,height:i.height},Gt(Z({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};i&&(a.height*i>a.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=a.left+(a.width-r.width)/2,r.top=a.top+(a.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=Z({},r)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=this.limited,l=i.aspectRatio;if(t){var h=Number(i.minCropBoxWidth)||0,m=Number(i.minCropBoxHeight)||0,T=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,b=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;h=Math.min(h,n.width),m=Math.min(m,n.height),l&&(h&&m?m*l>h?m=h/l:h=m*l:h?m=h/l:m&&(h=m*l),b*l>T?b=T/l:T=b*l),u.minWidth=Math.min(h,T),u.minHeight=Math.min(m,b),u.maxWidth=T,u.maxHeight=b}a&&(o?(u.minLeft=Math.max(0,r.left),u.minTop=Math.max(0,r.top),u.maxLeft=Math.min(n.width,r.left+r.width)-u.width,u.maxTop=Math.min(n.height,r.top+r.height)-u.height):(u.minLeft=0,u.minTop=0,u.maxLeft=n.width-u.width,u.maxTop=n.height-u.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&$t(this.face,Wt,i.width>=a.width&&i.height>=a.height?Hs:Ci),Qe(this.cropBox,Z({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),bt(this.element,Oi,this.getData())}},bh={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,n=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",u=document.createElement("img");if(a&&(u.crossOrigin=a),u.src=n,u.alt=r,this.viewBox.appendChild(u),this.viewBoxImage=u,!!i){var o=i;typeof i=="string"?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,ae(o,function(l){var h=document.createElement("img");$t(l,Ia,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(h.crossOrigin=a),h.src=n,h.alt=r,h.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(h)})}},resetPreview:function(){ae(this.previews,function(t){var a=ki(t,Ia);Qe(t,{width:a.width,height:a.height}),t.innerHTML=a.html,sh(t,Ia)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,l=i.left-a.left-t.left,h=i.top-a.top-t.top;!this.cropped||this.disabled||(Qe(this.viewBoxImage,Z({width:u,height:o},Gt(Z({translateX:-l,translateY:-h},t)))),ae(this.previews,function(m){var T=ki(m,Ia),b=T.width,N=T.height,I=b,R=N,P=1;n&&(P=b/n,R=r*P),r&&R>N&&(P=N/r,I=n*P,R=N),Qe(m,{width:I,height:R}),Qe(m.getElementsByTagName("img")[0],Z({width:u*P,height:o*P},Gt(Z({translateX:-l*P,translateY:-h*P},t))))}))}},gh={bind:function(){var t=this.element,a=this.options,i=this.cropper;_e(a.cropstart)&&xe(t,Ri,a.cropstart),_e(a.cropmove)&&xe(t,Li,a.cropmove),_e(a.cropend)&&xe(t,Di,a.cropend),_e(a.crop)&&xe(t,Oi,a.crop),_e(a.zoom)&&xe(t,yi,a.zoom),xe(i,Xs,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&xe(i,Zs,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&xe(i,Gs,this.onDblclick=this.dblclick.bind(this)),xe(t.ownerDocument,Qs,this.onCropMove=this.cropMove.bind(this)),xe(t.ownerDocument,js,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&xe(window,Ks,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;_e(a.cropstart)&&Re(t,Ri,a.cropstart),_e(a.cropmove)&&Re(t,Li,a.cropmove),_e(a.cropend)&&Re(t,Di,a.cropend),_e(a.crop)&&Re(t,Oi,a.crop),_e(a.zoom)&&Re(t,yi,a.zoom),Re(i,Xs,this.onCropStart),a.zoomable&&a.zoomOnWheel&&Re(i,Zs,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&Re(i,Gs,this.onDblclick),Re(t.ownerDocument,Qs,this.onCropMove),Re(t.ownerDocument,js,this.onCropEnd),a.responsive&&Re(window,Ks,this.onResize)}},_h={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,n=a.offsetWidth/i.width,r=a.offsetHeight/i.height,u=Math.abs(n-1)>Math.abs(r-1)?n:r;if(u!==1){var o,l;t.restore&&(o=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ae(o,function(h,m){o[m]=h*u})),this.setCropBoxData(ae(l,function(h,m){l[m]=h*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===$s||this.setDragMode(ih(this.dragBox,Ii)?Ws:xi)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Y(a)&&a!==1||Y(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ae(t.changedTouches,function(o){r[o.identifier]=Sa(o)}):r[t.pointerId||0]=Sa(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=Vs:u=ki(t.target,Wt),Xd.test(u)&&bt(this.element,Ri,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Fs&&(this.cropping=!0,le(this.dragBox,Ca)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),bt(this.element,Li,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ae(t.changedTouches,function(n){Z(i[n.identifier]||{},Sa(n,!0))}):Z(i[t.pointerId||0]||{},Sa(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?ae(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,pt(this.dragBox,Ca,this.cropped&&this.options.modal)),bt(this.element,Di,{originalEvent:t,action:a}))}}},Ah={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,l=a.aspectRatio,h=r.left,m=r.top,T=r.width,b=r.height,N=h+T,I=m+b,R=0,P=0,$=n.width,v=n.height,q=!0,F;!l&&t.shiftKey&&(l=T&&b?T/b:1),this.limited&&(R=r.minLeft,P=r.minTop,$=R+Math.min(n.width,i.width,i.left+i.width),v=P+Math.min(n.height,i.height,i.top+i.height));var k=u[Object.keys(u)[0]],_={x:k.endX-k.startX,y:k.endY-k.startY},B=function(se){switch(se){case it:N+_.x>$&&(_.x=$-N);break;case nt:h+_.x<R&&(_.x=R-h);break;case Xe:m+_.y<P&&(_.y=P-m);break;case mt:I+_.y>v&&(_.y=v-I);break}};switch(o){case Ci:h+=_.x,m+=_.y;break;case it:if(_.x>=0&&(N>=$||l&&(m<=P||I>=v))){q=!1;break}B(it),T+=_.x,T<0&&(o=nt,T=-T,h-=T),l&&(b=T/l,m+=(r.height-b)/2);break;case Xe:if(_.y<=0&&(m<=P||l&&(h<=R||N>=$))){q=!1;break}B(Xe),b-=_.y,m+=_.y,b<0&&(o=mt,b=-b,m-=b),l&&(T=b*l,h+=(r.width-T)/2);break;case nt:if(_.x<=0&&(h<=R||l&&(m<=P||I>=v))){q=!1;break}B(nt),T-=_.x,h+=_.x,T<0&&(o=it,T=-T,h-=T),l&&(b=T/l,m+=(r.height-b)/2);break;case mt:if(_.y>=0&&(I>=v||l&&(h<=R||N>=$))){q=!1;break}B(mt),b+=_.y,b<0&&(o=Xe,b=-b,m-=b),l&&(T=b*l,h+=(r.width-T)/2);break;case Ht:if(l){if(_.y<=0&&(m<=P||N>=$)){q=!1;break}B(Xe),b-=_.y,m+=_.y,T=b*l}else B(Xe),B(it),_.x>=0?N<$?T+=_.x:_.y<=0&&m<=P&&(q=!1):T+=_.x,_.y<=0?m>P&&(b-=_.y,m+=_.y):(b-=_.y,m+=_.y);T<0&&b<0?(o=qt,b=-b,T=-T,m-=b,h-=T):T<0?(o=Vt,T=-T,h-=T):b<0&&(o=Yt,b=-b,m-=b);break;case Vt:if(l){if(_.y<=0&&(m<=P||h<=R)){q=!1;break}B(Xe),b-=_.y,m+=_.y,T=b*l,h+=r.width-T}else B(Xe),B(nt),_.x<=0?h>R?(T-=_.x,h+=_.x):_.y<=0&&m<=P&&(q=!1):(T-=_.x,h+=_.x),_.y<=0?m>P&&(b-=_.y,m+=_.y):(b-=_.y,m+=_.y);T<0&&b<0?(o=Yt,b=-b,T=-T,m-=b,h-=T):T<0?(o=Ht,T=-T,h-=T):b<0&&(o=qt,b=-b,m-=b);break;case qt:if(l){if(_.x<=0&&(h<=R||I>=v)){q=!1;break}B(nt),T-=_.x,h+=_.x,b=T/l}else B(mt),B(nt),_.x<=0?h>R?(T-=_.x,h+=_.x):_.y>=0&&I>=v&&(q=!1):(T-=_.x,h+=_.x),_.y>=0?I<v&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Ht,b=-b,T=-T,m-=b,h-=T):T<0?(o=Yt,T=-T,h-=T):b<0&&(o=Vt,b=-b,m-=b);break;case Yt:if(l){if(_.x>=0&&(N>=$||I>=v)){q=!1;break}B(it),T+=_.x,b=T/l}else B(mt),B(it),_.x>=0?N<$?T+=_.x:_.y>=0&&I>=v&&(q=!1):T+=_.x,_.y>=0?I<v&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Vt,b=-b,T=-T,m-=b,h-=T):T<0?(o=qt,T=-T,h-=T):b<0&&(o=Ht,b=-b,m-=b);break;case Hs:this.move(_.x,_.y),q=!1;break;case Vs:this.zoom(uh(u),t),q=!1;break;case Fs:if(!_.x||!_.y){q=!1;break}F=ur(this.cropper),h=k.startX-F.left,m=k.startY-F.top,T=r.minWidth,b=r.minHeight,_.x>0?o=_.y>0?Yt:Ht:_.x<0&&(h-=T,o=_.y>0?qt:Vt),_.y<0&&(m-=b),this.cropped||(we(this.cropBox,ge),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}q&&(r.width=T,r.height=b,r.left=h,r.top=m,this.action=o,this.renderCropBox()),ae(u,function(G){G.startX=G.endX,G.startY=G.endY})}},Nh={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&le(this.dragBox,Ca),we(this.cropBox,ge),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Z({},this.initialImageData),this.canvasData=Z({},this.initialCanvasData),this.cropBoxData=Z({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Z(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),we(this.dragBox,Ca),le(this.cropBox,ge)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ae(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,we(this.cropper,Ys)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,le(this.cropper,Ys)),this},destroy:function(){var t=this.element;return t[K]?(t[K]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(Mi(t)?t:n+Number(t),Mi(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(Y(t)&&(i.left=t,n=!0),Y(a)&&(i.top=a,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var n=this.options,r=this.canvasData,u=r.width,o=r.height,l=r.naturalWidth,h=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var m=l*t,T=h*t;if(bt(this.element,yi,{ratio:t,oldRatio:u/l,originalEvent:i})===!1)return this;if(i){var b=this.pointers,N=ur(this.cropper),I=b&&Object.keys(b).length?oh(b):{pageX:i.pageX,pageY:i.pageY};r.left-=(m-u)*((I.pageX-N.left-r.left)/u),r.top-=(T-o)*((I.pageY-N.top-r.top)/o)}else Et(a)&&Y(a.x)&&Y(a.y)?(r.left-=(m-u)*((a.x-r.left)/u),r.top-=(T-o)*((a.y-r.top)/o)):(r.left-=(m-u)/2,r.top-=(T-o)/2);r.width=m,r.height=T,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Y(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,Y(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(Y(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(Y(t)&&(i.scaleX=t,n=!0),Y(a)&&(i.scaleY=a,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,n=this.canvasData,r=this.cropBoxData,u;if(this.ready&&this.cropped){u={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var o=i.width/i.naturalWidth;if(ae(u,function(m,T){u[T]=m/o}),t){var l=Math.round(u.y+u.height),h=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=h-u.x,u.height=l-u.y}}else u={x:0,y:0,width:0,height:0};return a.rotatable&&(u.rotate=i.rotate||0),a.scalable&&(u.scaleX=i.scaleX||1,u.scaleY=i.scaleY||1),u},setData:function(t){var a=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&Et(t)){var u=!1;a.rotatable&&Y(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(Y(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),Y(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;Y(t.x)&&(r.left=t.x*o+n.left),Y(t.y)&&(r.top=t.y*o+n.top),Y(t.width)&&(r.width=t.width*o),Y(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?Z({},this.containerData):{}},getImageData:function(){return this.sized?Z({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&ae(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&Et(t)&&(Y(t.left)&&(a.left=t.left),Y(t.top)&&(a.top=t.top),Y(t.width)?(a.width=t.width,a.height=t.width/i):Y(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&Et(t)&&(Y(t.left)&&(a.left=t.left),Y(t.top)&&(a.top=t.top),Y(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),Y(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),i&&(n?a.height=a.width/i:r&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=lh(this.image,this.imageData,a,t);if(!this.cropped)return i;var n=this.getData(t.rounded),r=n.x,u=n.y,o=n.width,l=n.height,h=i.width/Math.floor(a.naturalWidth);h!==1&&(r*=h,u*=h,o*=h,l*=h);var m=o/l,T=je({aspectRatio:m,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),b=je({aspectRatio:m,width:t.minWidth||0,height:t.minHeight||0},"cover"),N=je({aspectRatio:m,width:t.width||(h!==1?i.width:o),height:t.height||(h!==1?i.height:l)}),I=N.width,R=N.height;I=Math.min(T.width,Math.max(b.width,I)),R=Math.min(T.height,Math.max(b.height,R));var P=document.createElement("canvas"),$=P.getContext("2d");P.width=Tt(I),P.height=Tt(R),$.fillStyle=t.fillColor||"transparent",$.fillRect(0,0,I,R);var v=t.imageSmoothingEnabled,q=v===void 0?!0:v,F=t.imageSmoothingQuality;$.imageSmoothingEnabled=q,F&&($.imageSmoothingQuality=F);var k=i.width,_=i.height,B=r,G=u,se,fe,Ae,Oe,me,Ee;B<=-o||B>k?(B=0,se=0,Ae=0,me=0):B<=0?(Ae=-B,B=0,se=Math.min(k,o+B),me=se):B<=k&&(Ae=0,se=Math.min(o,k-B),me=se),se<=0||G<=-l||G>_?(G=0,fe=0,Oe=0,Ee=0):G<=0?(Oe=-G,G=0,fe=Math.min(_,l+G),Ee=fe):G<=_&&(Oe=0,fe=Math.min(l,_-G),Ee=fe);var ee=[B,G,se,fe];if(me>0&&Ee>0){var De=I/o;ee.push(Ae*De,Oe*De,me*De,Ee*De)}return $.drawImage.apply($,[i].concat(Us(ee.map(function(x){return Math.floor(Tt(x))})))),P},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!Mi(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===xi,u=a.movable&&t===Ws;t=r||u?t:$s,a.dragMode=t,$t(i,Wt,t),pt(i,Ii,r),pt(i,Si,u),a.cropBoxMovable||($t(n,Wt,t),pt(n,Ii,r),pt(n,Si,u))}return this}},Ch=ke.Cropper,dr=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Bd(this,e),!t||!zd.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=Z({},ar,Et(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return vd(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[K]){if(a[K]=this,i==="img"){if(this.isImg=!0,n=a.getAttribute("src")||"",this.originalUrl=n,!n)return;n=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=a.toDataURL());this.load(n)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Qd.test(a)){jd.test(a)?this.read(fh(a)):this.clone();return}var u=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=u,u.onabort=o,u.onerror=o,u.ontimeout=o,u.onprogress=function(){u.getResponseHeader("content-type")!==Js&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&or(a)&&n.crossOrigin&&(a=cr(a)),u.open("GET",a,!0),u.responseType="arraybuffer",u.withCredentials=n.crossOrigin==="use-credentials",u.send()}}},{key:"read",value:function(a){var i=this.options,n=this.imageData,r=Eh(a),u=0,o=1,l=1;if(r>1){this.url=mh(a,Js);var h=Th(r);u=h.rotate,o=h.scaleX,l=h.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&or(i)&&(n||(n="anonymous"),r=cr(i)),this.crossOrigin=n,this.crossOriginUrl=r;var u=document.createElement("img");n&&(u.crossOrigin=n),u.src=r||i,u.alt=a.alt||"The image to crop",this.image=u,u.onload=this.start.bind(this),u.onerror=this.stop.bind(this),le(u,qs),a.parentNode.insertBefore(u,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=ke.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ke.navigator.userAgent),r=function(h,m){Z(a.imageData,{naturalWidth:h,naturalHeight:m,aspectRatio:h/m}),a.initialImageData=Z({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!n){r(i.naturalWidth,i.naturalHeight);return}var u=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=u,u.onload=function(){r(u.width,u.height),n||o.removeChild(u)},u.src=i.src,n||(u.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(u))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,n=this.image,r=a.parentNode,u=document.createElement("div");u.innerHTML=Kd;var o=u.querySelector(".".concat(K,"-container")),l=o.querySelector(".".concat(K,"-canvas")),h=o.querySelector(".".concat(K,"-drag-box")),m=o.querySelector(".".concat(K,"-crop-box")),T=m.querySelector(".".concat(K,"-face"));this.container=r,this.cropper=o,this.canvas=l,this.dragBox=h,this.cropBox=m,this.viewBox=o.querySelector(".".concat(K,"-view-box")),this.face=T,l.appendChild(n),le(a,ge),r.insertBefore(o,a.nextSibling),we(n,qs),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,le(m,ge),i.guides||le(m.getElementsByClassName("".concat(K,"-dashed")),ge),i.center||le(m.getElementsByClassName("".concat(K,"-center")),ge),i.background&&le(o,"".concat(K,"-bg")),i.highlight||le(T,qd),i.cropBoxMovable&&(le(T,Si),$t(T,Wt,Ci)),i.cropBoxResizable||(le(m.getElementsByClassName("".concat(K,"-line")),ge),le(m.getElementsByClassName("".concat(K,"-point")),ge)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),_e(i.ready)&&xe(a,zs,i.ready,{once:!0}),bt(a,zs)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),we(this.element,ge)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Ch,e}},{key:"setDefaults",value:function(a){Z(ar,Et(a)&&a)}}])}();Z(dr.prototype,ph,bh,gh,_h,Ah,Nh);function Ih(e,t){const a=e.split(",")||[],i=a[0].match(/:(.*?);/)[1],n=a[1]&&atob(a[1]);let r=n&&n.length;const u=new Uint8Array(r);for(;r--;)u[r]=n==null?void 0:n.charCodeAt(r);return new File([u],t,{type:i})}const Sh={key:0,contenteditable:"false",class:"z-10 w-[100vw] h-[100vh] bg-[rgba(0,0,0,0.7)] flex flex-col justify-center items-center fixed top-0 left-0 cursor-auto"},xh={class:"w-[700px] flex flex-col bg-white rounded pb-8"},Oh={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Dh={class:"flex flex-col h-full"},Lh={class:"flex flex-row justify-center items-start flex-1"},Rh={class:"flex flex-col items-start flex-1"},yh={class:"flex flex-col w-full px-6 py-4"},Mh={class:"flex flex-col w-full"},Ph={class:"flex flex-row items-center"},kh={class:"relative bg-[#474AFF] text-white rounded p-3"},wh={class:"flex flex-row items-start justify-between mt-3"},Bh={class:"flex flex-col"},vh={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},Uh={key:0,class:"w-full text-center"},Fh=["src"],Hh={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Vh={class:"text-[#999] mt-05 flex justify-center mt-4"},Yh={class:"w-full flex justify-end space-x-5 mt-5 px-6"},qh=["loading"],Wh=c.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=c.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=c.ref(),u=c.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=c.ref(!1),l=c.ref({afterImg:"",image:null,myCropper:null}),h=c.ref("image/jpeg"),m=F=>{console.log(F);const k=F.target.files[0];if(k){k.name&&(n.value.inputValue=k.name);const _=new FileReader;_.onload=B=>{var G,se;console.log("e?.target?.result",(G=B==null?void 0:B.target)==null?void 0:G.result),T((se=B==null?void 0:B.target)==null?void 0:se.result)},_.readAsDataURL(k)}};async function T(F){if(!F)return;await q();const k=F;l.value.image=k,l.value.image&&b()}function b(){const F=document.querySelector("#imgId");F&&F.addEventListener("load",()=>{v(),l.value.myCropper=new dr(F,u.value)})}const N=c.ref(!1);function I(F,k,_){r.value=F,F&&F.aspectRatio&&(u.value.aspectRatio=F.aspectRatio),_&&(n.value.inputValue=_),N.value=!0,k&&T(k)}function R(){N.value=!1}const P=()=>{var k,_;if(!l.value.myCropper)return;o.value=!0,l.value.afterImg=l.value.myCropper.getCroppedCanvas({height:(k=r.value)==null?void 0:k.height,imageSmoothingQuality:"high",width:(_=r.value)==null?void 0:_.width}).toDataURL(h.value);const F=Ih(l.value.afterImg,n.value.inputValue);i("ok",F),o.value=!1,q(),v(),R()};function $(){q(),v(),R(),i("cancel")}function v(){l.value.myCropper&&l.value.myCropper.destroy()}function q(){l.value.image=""}return t({handleCloseCropper:R,handleOpenCropper:I}),(F,k)=>{var _,B,G;return N.value?(c.openBlock(),c.createElementBlock("div",Sh,[c.createElementVNode("div",xh,[c.createElementVNode("div",Oh,[k[1]||(k[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:c.withModifiers($,["stop"])})]),c.createElementVNode("div",Dh,[c.createElementVNode("div",Lh,[c.createElementVNode("div",Rh,[c.createElementVNode("div",yh,[c.createElementVNode("div",Mh,[c.createElementVNode("div",Ph,[c.createElementVNode("div",kh,[c.createElementVNode("input",{type:"file",accept:"image/*",onClick:k[0]||(k[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:m,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),k[2]||(k[2]=c.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),k[3]||(k[3]=c.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),c.createElementVNode("div",wh,[c.createElementVNode("div",Bh,[c.createElementVNode("div",vh,[l.value.image?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",Uh," 请上传图片 ")),c.createElementVNode("img",{id:"imgId",src:l.value.image,style:{width:"300px"}},null,8,Fh)])]),c.createElementVNode("div",Hh,[k[4]||(k[4]=c.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),c.createElementVNode("div",Vh," 预览画像 "+c.toDisplayString(((_=r.value)==null?void 0:_.width)||"")+" "+c.toDisplayString((B=r.value)!=null&&B.width?"x":"")+" "+c.toDisplayString(((G=r.value)==null?void 0:G.height)||""),1)])])])])])]),c.createElementVNode("div",Yh,[c.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:P}," 确认 ",8,qh),c.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:$},"取消")])])])])):c.createCommentVNode("",!0)}}}),$h={key:0,"date-action":"1",class:"aidition",contenteditable:"false"},Gh={class:"aidition_left"},Xh={class:"aidition_right"},Qh={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},jh=ft(c.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object,icons:{type:Array,default:()=>[]}},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=c.computed(()=>a.selectedElement===a.element),r=c.computed(()=>a.hoveredElement===a.element),u=c.ref(!1),o=c.ref(!1),l=c.ref(""),h=c.computed(()=>a.element.rule.minText||0),m=c.computed(()=>a.element.rule.maxText||1/0),T=c.ref();function b(O){O.xpath!="/div[1]"&&(i("selectElement",O),!O.rule.isReadOnly&&O.type===ce.Text&&(u.value=!0))}function N(O){i("selectElement",O)}function I(O,D){i("hoverElement",O,D)}function R(O){i("hoverElement",O)}function P(O){O.currentTarget.contains(O.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function $(){u.value=!1,i("contentUpdated",v())}function v(){function O(D){const H=Object.entries(D.attrs||{}).map(([ie,Fe])=>`${ie}="${Fe}"`).join(" "),V=`<${D.tag}${H?" "+H:""}>`,j=`</${D.tag}>`,te=(D.children||[]).map(ie=>O(ie)).join("");return`${V}${D.editText||D.text||""}${te}${j}`}return O(a.element)}function q(O){var V;O.stopPropagation();const D=O.target,H=((V=D.firstChild)==null?void 0:V.nodeType)===Node.TEXT_NODE&&D.firstChild.nodeValue||"";if(H.length<h.value){o.value=!0,l.value=`最少输入 ${h.value} 个字符`;return}else if(H.length>m.value){o.value=!0,l.value=`最多输入 ${m.value} 个字符`;return}else o.value=!1,l.value="";a.element.editText=H,i("updateText",{element:a.element,newText:H}),i("contentUpdated",v())}function F(O){i("updateText",O),i("contentUpdated",v())}function k(){const O={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:O})}function _(){i("blockAction",{action:"moveUp",element:a.element})}function B(){i("blockAction",{action:"moveDown",element:a.element})}function G(){i("blockAction",{action:"delete",element:a.element})}function se(O){i("blockAction",O),i("contentUpdated",v())}function fe(){T.value.openModal()}function Ae(O){i("addIcon",O,a.element),i("contentUpdated",v())}function Oe(O,D){i("addIcon",O,D),i("contentUpdated",v())}let me;const Ee=c.ref(),ee=c.ref({});function De(O,D){if(D.rule.minImageWidth&&D.rule.maxImageHeight?(ee.value.width=D.rule.minImageWidth,ee.value.height=D.rule.maxImageHeight,ee.value.aspectRatio=D.rule.minImageWidth/D.rule.maxImageHeight):ee.value={},O){O.name;const H=new FileReader;H.onload=V=>{var j;me=(j=V==null?void 0:V.target)==null?void 0:j.result,Ee.value.handleOpenCropper(ee.value,me,O.name)},H.readAsDataURL(O)}}function x(O,D){if(console.log(typeof O=="object",O),O)if(typeof O=="object"){D.attrs.alt=O.name;const H=new FileReader;H.onload=V=>{var te;let j=(te=V==null?void 0:V.target)==null?void 0:te.result;D.attrs.src=j,i("upload",j,D),i("contentUpdated",v())},H.readAsDataURL(O)}else D.attrs.src=O,i("upload",O,D),i("contentUpdated",v())}const M=async O=>{};return(O,D)=>{const H=c.resolveComponent("ElementRenderer",!0);return c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(a.element.tag),c.mergeProps({class:[" ",r.value?"border-dashed border-[1px] border-blue-500":"",n.value?"border-dashed border-[1px] border-green-500 z-10":"",o.value?"border-dashed border-[1px] border-red-500":"",(!r.value&&!n.value&&!o.value,""),a.element.rule&&a.element.rule.isReadOnly?"cursor-not-allowed":""]},a.element.attrs,{contenteditable:u.value,onClick:D[1]||(D[1]=c.withModifiers(()=>b(a.element),["stop"])),onMouseenter:D[2]||(D[2]=()=>R(a.element)),onMouseleave:P,onBlur:$,onInput:q}),{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[a.element.type===c.unref(ce).Block?(c.openBlock(),c.createElementBlock("div",$h,[c.createElementVNode("span",Gh,c.toDisplayString(a.element.editText||a.element.text),1),c.createElementVNode("div",Xh,[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"])},"排前"),c.createElementVNode("span",{onClick:c.withModifiers(B,["stop"])},"排后"),c.createElementVNode("span",{onClick:c.withModifiers(G,["stop"])},"删除")])])):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.element.children,(V,j)=>(c.openBlock(),c.createBlock(H,{icons:e.icons,key:j,element:V,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:N,onHoverElement:I,onUpdateText:F,onBlockAction:se,onAddIcon:Oe,onUpload:x},null,8,["icons","element","selectedElement","hoveredElement"]))),128)),a.element.type===c.unref(ce).Block?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"}),c.createElementVNode("div",{class:"add_modules",onClick:c.withModifiers(k,["stop"]),contenteditable:"false"},D[7]||(D[7]=[c.createElementVNode("span",{class:"iconfont icon-a-tianjiamian"},null,-1),c.createElementVNode("span",null,"添加模块",-1)])),c.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:D[0]||(D[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"]),class:"iconfont icon-paiqian"}),c.createElementVNode("span",{onClick:c.withModifiers(B,["stop"]),class:"iconfont icon-paihou"}),c.createElementVNode("span",{onClick:c.withModifiers(G,["stop"]),class:"iconfont icon-shanchu"}),c.createElementVNode("span",{onClick:c.withModifiers(k,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==c.unref(ce).Text&&o.value?(c.openBlock(),c.createElementBlock("div",Qh,c.toDisplayString(l.value),1)):c.createCommentVNode("",!0),a.element.type===c.unref(ce).Image?(c.openBlock(),c.createElementBlock("div",{key:1,class:"absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",onClick:D[3]||(D[3]=c.withModifiers(()=>{},["stop"]))},[D[8]||(D[8]=c.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),c.createVNode(kd,{customUpload:V=>De(V,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:M},null,8,["customUpload","height","width"])])):c.createCommentVNode("",!0),a.element.type===c.unref(ce).Icon?(c.openBlock(),c.createElementBlock("div",{key:2,class:"absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",onClick:D[5]||(D[5]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:D[4]||(D[4]=c.withModifiers(V=>fe(),["stop"])),contenteditable:"false",class:"cursor-pointer"},"选择图标")])):c.createCommentVNode("",!0),c.createVNode(Pd,{icons:e.icons,ref_key:"iconRef",ref:T,onOk:Ae},null,8,["icons"]),c.createVNode(Wh,{ref_key:"cropperRef",ref:Ee,onOk:D[6]||(D[6]=V=>x(V,a.element))},null,512)],64)}}}),[["__scopeId","data-v-45fda71e"]]),zh=c.defineComponent({name:"GpCheckbox",props:{modelValue:{type:Boolean,required:!0},label:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){return{updateValue:i=>{t("update:modelValue",i.target.checked)}}}}),Kh={class:"form-group"},Zh={class:"flex items-center space-x-2 cursor-pointer"},Jh=["checked","aria-checked"],ef={class:"checkbox-label text-sm text-gray-700"};function tf(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("div",Kh,[c.createElementVNode("label",Zh,[c.createElementVNode("input",{type:"checkbox",checked:e.modelValue,onChange:t[0]||(t[0]=(...u)=>e.updateValue&&e.updateValue(...u)),class:"custom-checkbox","aria-checked":e.modelValue},null,40,Jh),c.createElementVNode("span",ef,c.toDisplayString(e.label),1)])])}const xa=ft(zh,[["render",tf],["__scopeId","data-v-68b8f276"]]),af=c.defineComponent({name:"GpMessage",props:{message:{type:String,required:!0},type:{type:String,default:"info"},position:{type:String,default:"top-right"},duration:{type:Number,default:3e3},onClose:{type:Function,required:!0},icon:{type:Boolean,default:!0}},setup(e){const t=c.ref(!1),a=c.computed(()=>({success:"bg-green-100 text-green-800",error:"bg-red-100 text-red-800",info:"bg-blue-100 text-blue-800",warning:"bg-yellow-100 text-yellow-800"})[e.type]),i=()=>{t.value=!1,e.onClose()};return setTimeout(()=>{i()},e.duration),t.value=!0,{visible:t,typeClass:a,closeMessage:i}}}),nf={key:0,class:"gp-message"},sf={key:0,class:"mr-2"},rf={key:0,class:"text-green-500"},uf={key:1,class:"text-red-500"},of={key:2,class:"text-blue-500"},cf={key:3,class:"text-yellow-500"};function lf(e,t,a,i,n,r){return c.openBlock(),c.createBlock(c.Transition,{name:"fade"},{default:c.withCtx(()=>[e.visible?(c.openBlock(),c.createElementBlock("div",nf,[c.createElementVNode("div",{class:c.normalizeClass([e.typeClass,"message-content"])},[e.icon?(c.openBlock(),c.createElementBlock("span",sf,[c.renderSlot(e.$slots,"icon",{},()=>[e.type==="success"?(c.openBlock(),c.createElementBlock("span",rf,"✔")):c.createCommentVNode("",!0),e.type==="error"?(c.openBlock(),c.createElementBlock("span",uf,"✖")):c.createCommentVNode("",!0),e.type==="info"?(c.openBlock(),c.createElementBlock("span",of,"ℹ")):c.createCommentVNode("",!0),e.type==="warning"?(c.openBlock(),c.createElementBlock("span",cf,"⚠")):c.createCommentVNode("",!0)],!0)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,c.toDisplayString(e.message),1),c.createElementVNode("button",{class:"close-btn hover:text-gray-800 font-bold",onClick:t[0]||(t[0]=(...u)=>e.closeMessage&&e.closeMessage(...u))}," × ")],2)])):c.createCommentVNode("",!0)]),_:3})}const df=ft(af,[["render",lf],["__scopeId","data-v-56476f4c"]]),gt=c.reactive([]);let Bi=null;const hf=()=>{const e=document.createElement("div");return e.id="global-message-container",document.body.appendChild(e),e},ff=()=>{if(Bi)return;const e=hf();Bi=c.createApp({setup(){return{messageQueue:gt}},render(){const t=c.computed(()=>{var i;return{"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4","top-center":"top-4 left-1/2 transform -translate-x-1/2","bottom-center":"bottom-4 left-1/2 transform -translate-x-1/2"}[((i=gt[0])==null?void 0:i.options.position)||"top-center"]});return c.h("div",{class:`fixed flex flex-col gap-2 ${t.value}`},gt.map(a=>c.h(df,{key:a.id,...a.options,onClose:()=>hr(a.id)})))}}),Bi.mount(e)},hr=e=>{const t=gt.findIndex(a=>a.id===e);t!==-1&&gt.splice(t,1)};let mf=0;const Ce=e=>{ff();const t=mf++;gt.push({id:t,options:e}),setTimeout(()=>{hr(t)},e.duration||3e3)};Ce.success=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"success",duration:t,icon:a}:{...e,type:"success"})},Ce.error=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"error",duration:t,icon:a}:{...e,type:"error"})},Ce.info=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"info",duration:t,icon:a}:{...e,type:"info"})},Ce.warning=(e,t=3e3,a=!0)=>{Ce(typeof e=="string"?{message:e,type:"warning",duration:t,icon:a}:{...e,type:"warning"})};const Ef={key:0},Tf={key:0},pf={class:"text-gray-500 my-2"},bf={class:"text-gray-500 my-2"},gf={key:1},_f={key:2},Af={key:3},Nf={key:4},Cf={key:5},If={key:6},Sf={key:7},xf={key:8},Of=ft(c.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=c.ref({rule:{},...a.element});c.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){i("updateElement",n.value),Ce.success("保存成功")}return(u,o)=>(c.openBlock(),c.createElementBlock("div",null,[n.value?(c.openBlock(),c.createElementBlock("div",Ef,[n.value.text!==void 0?(c.openBlock(),c.createElementBlock("div",Tf,[o[11]||(o[11]=c.createElementVNode("label",{class:"block mt-4"},"内容",-1)),c.createElementVNode("div",pf,c.toDisplayString(n.value.text||"-"),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[12]||(o[12]=c.createElementVNode("label",{class:"block mt-4"},"节点",-1)),c.createElementVNode("div",bf,c.toDisplayString(n.value.xpath),1)]),c.createElementVNode("div",null,[o[14]||(o[14]=c.createElementVNode("label",{class:"block mt-4"},"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value.type=l),class:"border rounded p-1 w-full"},o[13]||(o[13]=[c.createElementVNode("option",{value:0},"无",-1),c.createElementVNode("option",{value:1},"文本",-1),c.createElementVNode("option",{value:2},"图片",-1),c.createElementVNode("option",{value:3},"视频",-1),c.createElementVNode("option",{value:4},"图标",-1),c.createElementVNode("option",{value:5},"链接",-1),c.createElementVNode("option",{value:10},"块",-1)]),512),[[c.vModelSelect,n.value.type]])]),n.value.type==c.unref(ce).Text?(c.openBlock(),c.createElementBlock("div",gf,[o[15]||(o[15]=c.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>n.value.rule.minText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(ce).Text?(c.openBlock(),c.createElementBlock("div",_f,[o[16]||(o[16]=c.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=l=>n.value.rule.maxText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(ce).Image?(c.openBlock(),c.createElementBlock("div",Af,[o[17]||(o[17]=c.createElementVNode("label",{class:"block mt-4"},"是否裁剪",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.crop,"onUpdate:modelValue":o[3]||(o[3]=l=>n.value.rule.crop=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),n.value.type==c.unref(ce).Image?(c.openBlock(),c.createElementBlock("div",Nf,[o[18]||(o[18]=c.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=l=>n.value.rule.minImageWidth=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minImageWidth]])])):c.createCommentVNode("",!0),n.value.type==c.unref(ce).Image?(c.openBlock(),c.createElementBlock("div",Cf,[o[19]||(o[19]=c.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=l=>n.value.rule.maxImageHeight=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxImageHeight]])])):c.createCommentVNode("",!0),n.value.type==c.unref(ce).Block?(c.openBlock(),c.createElementBlock("div",If,[o[20]||(o[20]=c.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=l=>n.value.rule.minBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(ce).Block?(c.openBlock(),c.createElementBlock("div",Sf,[o[21]||(o[21]=c.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=l=>n.value.rule.maxBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(ce).Text||n.value.type==c.unref(ce).Icon?(c.openBlock(),c.createElementBlock("div",xf,[o[22]||(o[22]=c.createElementVNode("label",{class:"block mt-4"},"主题色",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isThemeColor,"onUpdate:modelValue":o[8]||(o[8]=l=>n.value.rule.isThemeColor=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[23]||(o[23]=c.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isRequired,"onUpdate:modelValue":o[9]||(o[9]=l=>n.value.rule.isRequired=l),label:"是"},null,8,["modelValue"])]),c.createElementVNode("div",null,[o[24]||(o[24]=c.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isReadOnly,"onUpdate:modelValue":o[10]||(o[10]=l=>n.value.rule.isReadOnly=l),label:"是"},null,8,["modelValue"])])])):c.createCommentVNode("",!0),c.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-blue-500 text-white rounded"}," 保存 ")]))}}),[["__scopeId","data-v-e53c3800"]]),Df={class:"flex h-screen"},Lf={class:"goodschool_mobile"},Rf=["innerHTML"],yf=["innerHTML"],Mf={class:"flex-1 bg-gray-100 overflow-auto"},Pf={class:"p-4"},kf={key:0,class:"text-red-500 text-xs mt-2"},wf={key:0,class:"resize-area border-l overflow-auto w-[375px]"},Bf={class:"p-4"},fr=ft(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},previewWidth:{default:375},uploadByFile:{},icons:{},rules:{}},emits:["update:modelValue","update:element"],setup(e,{emit:t}){const a=e,i=t,n=c.ref(a.template);c.watch(()=>a.template,x=>{n.value=x},{immediate:!0}),c.watch(()=>n.value,x=>{x&&(u.value=$(x))},{immediate:!0}),c.watch(()=>a.css,x=>{x.forEach(M=>{if(document.querySelector(`link[href="${M}"]`))return;const O=document.createElement("link");O.rel="stylesheet",O.href=M,document.head.appendChild(O)})},{immediate:!0});const r=c.ref(a.mode),u=c.ref();c.watch(()=>u.value,x=>{x&&i("update:element",x)},{immediate:!0});const o=c.ref("");let l=Ms("",{},!1);c.watch(()=>o.value,x=>{i("update:modelValue",x)},{immediate:!0});const h=c.ref(),m=c.ref(),T=c.ref("");function b(x){console.log("选择",x),h.value=x}function N(x,M=""){if(M){const O=I(u.value,M);O?m.value=O:m.value=x}else m.value=x}function I(x,M){if(x.xpath===M)return x;if(x.children&&x.children.length)for(const O of x.children){const D=I(O,M);if(D)return D}}function R(x){var M,O,D,H;if(console.log(x,h.value),h.value)if(h.value.rule=x.rule,h.value.type=x.type,(M=x.rule)!=null&&M.isThemeColor?(x.attrs.class+="theme_color",x.attrs.style&&(x.attrs.style=void 0)):(console.log("e111",(O=x.attrs.class)==null?void 0:O.includes("theme_color")),(D=x.attrs.class)!=null&&D.includes("theme_color")&&(x.attrs.class=x.attrs.class.replace("theme_color"," "))),h.value.type===ce.Block){const V=I(u.value,h.value.parentxpath||"");V&&V.children&&V.children.forEach(j=>{var te;j.tag===h.value.tag&&(j.rule=x.rule,j.type=x.type,(te=j.attrs.class)!=null&&te.includes(" mb40")||(j.attrs.class+=" mb40"))})}else(H=h.value.attrs.class)!=null&&H.includes(" mb40")&&(h.value.attrs.class=h.value.attrs.class.replace(" mb40"," "))}function P(x){o.value=x}function $(x){l=Ms(x);const M=l("body").children().toArray().map(O=>v(l(O)));return o.value=l("body").html()||"",M[0]}function v(x,M=""){var j;function O(te){if(!te||!te[0])return"";const ie=[];let Fe=te;for(;Fe.length&&Fe[0].tagName!=="html";){const mr=Fe[0].tagName,Uf=Fe.parent().children(mr).index(Fe)+1;ie.unshift(`${mr}[${Uf}]`),Fe=Fe.parent()}return"/html/"+ie.join("/")}const D=O(x).replace("/html/body[1]",""),H=x.children().toArray().map(te=>v(l(te),D)),V=(j=a.rules)==null?void 0:j.find(te=>te.xpath===D);return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:H,xpath:D,parentxpath:M,type:(V==null?void 0:V.type)||ce.None,rule:(V==null?void 0:V.rule)||{}}}function q(x){console.log("更新子节点的文本",x);const M=I(u.value,x.element.xpath);M&&(M.editText=x.newText)}function F(x,M=""){function O(D,H){var te;const j=(H?((te=I(u.value,H))==null?void 0:te.children)||[]:[u.value]).filter(ie=>ie.tag===D.tag).indexOf(D)+1;return`${H}/${D.tag}[${j}]`}x.xpath=O(x,M),x.parentxpath=M,(x.children||[]).forEach(D=>F(D,x.xpath))}function k({action:x,element:M,newBlock:O}){console.log("块操作",x,M,O);const D=I(u.value,M.parentxpath||"");if(!D||!D.children)return;const H=D.children.findIndex(ie=>ie===M);if(H===-1)return;const V=D.children.length,{minBlock:j,maxBlock:te}=M.rule;if((x==="add"||x==="copy")&&V>=(te||1/0)){T.value=`无法添加更多块。最大块数量为 ${te}`;return}switch(x){case"add":if(O){const ie={...O,xpath:"",children:JSON.parse(JSON.stringify(O.children))};D.children.splice(H+1,0,ie)}break;case"copy":if(O){const ie={...O,xpath:"",children:JSON.parse(JSON.stringify(O.children))};D.children.splice(H+1,0,ie)}break;case"moveUp":if(H>0){const[ie]=D.children.splice(H,1);D.children.splice(H-1,0,ie)}break;case"moveDown":if(H<D.children.length-1){const[ie]=D.children.splice(H,1);D.children.splice(H+1,0,ie)}break;case"delete":if(V<=(j||0)){T.value=`无法删除更多块。最小块数量为 ${j}`;return}D.children.splice(H,1);break}T.value="",F(u.value)}function _(x,M){let O=M.attrs.class.replace(/icon-\S+/g,`icon-${x}`);M.attrs.class=O}function B(x,M){M.attrs.src=x}const G=c.ref(a.previewWidth),se=c.ref(375);let fe=c.ref(!1),Ae=c.ref(""),Oe=0,me=0;function Ee(x){Ae.value=x,fe.value=!0,Oe=event.clientX,me=G.value,window.addEventListener("mousemove",ee),window.addEventListener("mouseup",De)}function ee(x){if(!fe.value)return;const M=x.clientX-Oe;Ae.value==="preview"?G.value=Math.max(200,me+M):Ae.value==="structure"&&(se.value=Math.max(200,me-M))}function De(){fe.value=!1,Ae.value="",window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",De)}return(x,M)=>(c.openBlock(),c.createElementBlock("div",Df,[c.createElementVNode("div",{class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:G.value+"px"})},[c.createElementVNode("div",Lf,[M[1]||(M[1]=c.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),o.value?(c.openBlock(),c.createElementBlock("div",{key:0,innerHTML:o.value},null,8,Rf)):(c.openBlock(),c.createElementBlock("div",{key:1,innerHTML:c.unref(l)("body").html()},null,8,yf))])],4),c.createElementVNode("div",{class:"resizer",onMousedown:M[0]||(M[0]=O=>Ee("preview"))},null,32),c.createElementVNode("div",Mf,[c.createElementVNode("div",Pf,[M[2]||(M[2]=c.createElementVNode("div",{class:"flex justify-between"},[c.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染")],-1)),T.value?(c.openBlock(),c.createElementBlock("div",kf,c.toDisplayString(T.value),1)):c.createCommentVNode("",!0),u.value?(c.openBlock(),c.createBlock(jh,{key:1,icons:x.icons,element:u.value,selectedElement:h.value,hoveredElement:m.value,onSelectElement:b,onHoverElement:N,onContentUpdated:P,onUpdateText:q,onBlockAction:k,onAddIcon:_,onUpload:B},null,8,["icons","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),r.value=="design"?(c.openBlock(),c.createElementBlock("div",wf,[c.createElementVNode("div",Bf,[M[3]||(M[3]=c.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),h.value?(c.openBlock(),c.createBlock(Of,{key:0,element:h.value,onUpdateElement:R},null,8,["element"])):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-199dde04"]]),vf={install(e){e.component("Designer",fr)}};He.Designer=fr,He.default=vf,Object.defineProperties(He,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ */function ks(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,i)}return a}function vs(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ks(Object(a),!0).forEach(function(i){Ud(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ks(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}function vd(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var i=a.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ws(e){var t=vd(e,"string");return typeof t=="symbol"?t:t+""}function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function wd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bs(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ws(i.key),i)}}function Bd(e,t,a){return t&&Bs(e.prototype,t),a&&Bs(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ud(e,t,a){return t=ws(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Us(e){return Fd(e)||Hd(e)||Vd(e)||Yd()}function Fd(e){if(Array.isArray(e))return _i(e)}function Hd(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vd(e,t){if(e){if(typeof e=="string")return _i(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _i(e,t)}}function _i(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}function Yd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Na=typeof window<"u"&&typeof window.document<"u",ke=Na?window:{},Ai=Na&&ke.document.documentElement?"ontouchstart"in ke.document.documentElement:!1,Ni=Na?"PointerEvent"in ke:!1,Z="cropper",Ci="all",Fs="crop",Hs="move",Vs="zoom",it="e",nt="w",mt="s",Xe="n",Ht="ne",Vt="nw",Yt="se",qt="sw",Ii="".concat(Z,"-crop"),Ys="".concat(Z,"-disabled"),_e="".concat(Z,"-hidden"),qs="".concat(Z,"-hide"),qd="".concat(Z,"-invisible"),Ca="".concat(Z,"-modal"),Si="".concat(Z,"-move"),Wt="".concat(Z,"Action"),Ia="".concat(Z,"Preview"),xi="crop",Ws="move",$s="none",Oi="crop",Di="cropend",Li="cropmove",yi="cropstart",Gs="dblclick",Wd=Ai?"touchstart":"mousedown",$d=Ai?"touchmove":"mousemove",Gd=Ai?"touchend touchcancel":"mouseup",Xs=Ni?"pointerdown":Wd,Qs=Ni?"pointermove":$d,js=Ni?"pointerup pointercancel":Gd,zs="ready",Ks="resize",Zs="wheel",Ri="zoom",Js="image/jpeg",Xd=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Qd=/^data:/,jd=/^data:image\/jpeg;base64,/,zd=/^img|canvas$/i,er=200,tr=100,ar={viewMode:0,dragMode:xi,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:er,minContainerHeight:tr,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Kd='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',Zd=Number.isNaN||ke.isNaN;function Y(e){return typeof e=="number"&&!Zd(e)}var ir=function(t){return t>0&&t<1/0};function Mi(e){return typeof e>"u"}function st(e){return gi(e)==="object"&&e!==null}var Jd=Object.prototype.hasOwnProperty;function Et(e){if(!st(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&Jd.call(a,"isPrototypeOf")}catch{return!1}}function Ae(e){return typeof e=="function"}var eh=Array.prototype.slice;function nr(e){return Array.from?Array.from(e):eh.call(e)}function ne(e,t){return e&&Ae(t)&&(Array.isArray(e)||Y(e.length)?nr(e).forEach(function(a,i){t.call(e,a,i,e)}):st(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var J=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return st(t)&&i.length>0&&i.forEach(function(r){st(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},th=/\.\d*(?:0|9){12}\d*$/;function Tt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return th.test(e)?Math.round(e*t)/t:e}var ah=/^width|height|left|top|marginLeft|marginTop$/;function Qe(e,t){var a=e.style;ne(t,function(i,n){ah.test(n)&&Y(i)&&(i="".concat(i,"px")),a[n]=i})}function ih(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function de(e,t){if(t){if(Y(e.length)){ne(e,function(i){de(i,t)});return}if(e.classList){e.classList.add(t);return}var a=e.className.trim();a?a.indexOf(t)<0&&(e.className="".concat(a," ").concat(t)):e.className=t}}function ve(e,t){if(t){if(Y(e.length)){ne(e,function(a){ve(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function pt(e,t,a){if(t){if(Y(e.length)){ne(e,function(i){pt(i,t,a)});return}a?de(e,t):ve(e,t)}}var nh=/([a-z\d])([A-Z])/g;function Pi(e){return e.replace(nh,"$1-$2").toLowerCase()}function ki(e,t){return st(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Pi(t)))}function $t(e,t,a){st(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Pi(t)),a)}function sh(e,t){if(st(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Pi(t)))}var sr=/\s\s*/,rr=function(){var e=!1;if(Na){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});ke.addEventListener("test",a,i),ke.removeEventListener("test",a,i)}return e}();function ye(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sr).forEach(function(r){if(!rr){var u=e.listeners;u&&u[r]&&u[r][a]&&(n=u[r][a],delete u[r][a],Object.keys(u[r]).length===0&&delete u[r],Object.keys(u).length===0&&delete e.listeners)}e.removeEventListener(r,n,i)})}function xe(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sr).forEach(function(r){if(i.once&&!rr){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var h=arguments.length,m=new Array(h),T=0;T<h;T++)m[T]=arguments[T];a.apply(e,m)},o[r]||(o[r]={}),o[r][a]&&e.removeEventListener(r,o[r][a],i),o[r][a]=n,e.listeners=o}e.addEventListener(r,n,i)})}function bt(e,t,a){var i;return Ae(Event)&&Ae(CustomEvent)?i=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,a)),e.dispatchEvent(i)}function ur(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var vi=ke.location,rh=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function or(e){var t=e.match(rh);return t!==null&&(t[1]!==vi.protocol||t[2]!==vi.hostname||t[3]!==vi.port)}function cr(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function Gt(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];Y(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),Y(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),Y(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),Y(a)&&a!==1&&u.push("scaleX(".concat(a,")")),Y(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function uh(e){var t=vs({},e),a=0;return ne(e,function(i,n){delete t[n],ne(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),l=Math.abs(i.endX-r.endX),h=Math.abs(i.endY-r.endY),m=Math.sqrt(u*u+o*o),T=Math.sqrt(l*l+h*h),b=(T-m)/m;Math.abs(b)>Math.abs(a)&&(a=b)})}),a}function Sa(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:vs({startX:a,startY:i},n)}function oh(e){var t=0,a=0,i=0;return ne(e,function(n){var r=n.startX,u=n.startY;t+=r,a+=u,i+=1}),t/=i,a/=i,{pageX:t,pageY:a}}function je(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=ir(i),u=ir(a);if(r&&u){var o=a*t;n==="contain"&&o>i||n==="cover"&&o<i?a=i/t:i=a*t}else r?a=i/t:u&&(i=a*t);return{width:i,height:a}}function ch(e){var t=e.width,a=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:a,height:t};var n=i%90*Math.PI/180,r=Math.sin(n),u=Math.cos(n),o=t*u+a*r,l=t*r+a*u;return i>90?{width:l,height:o}:{width:o,height:l}}function lh(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,l=o===void 0?0:o,h=t.scaleX,m=h===void 0?1:h,T=t.scaleY,b=T===void 0?1:T,N=a.aspectRatio,I=a.naturalWidth,y=a.naturalHeight,P=i.fillColor,$=P===void 0?"transparent":P,B=i.imageSmoothingEnabled,q=B===void 0?!0:B,F=i.imageSmoothingQuality,v=F===void 0?"low":F,_=i.maxWidth,w=_===void 0?1/0:_,G=i.maxHeight,ue=G===void 0?1/0:G,me=i.minWidth,Ne=me===void 0?0:me,Oe=i.minHeight,Ee=Oe===void 0?0:Oe,Te=document.createElement("canvas"),ae=Te.getContext("2d"),De=je({aspectRatio:N,width:w,height:ue}),x=je({aspectRatio:N,width:Ne,height:Ee},"cover"),M=Math.min(De.width,Math.max(x.width,I)),O=Math.min(De.height,Math.max(x.height,y)),D=je({aspectRatio:n,width:w,height:ue}),H=je({aspectRatio:n,width:Ne,height:Ee},"cover"),V=Math.min(D.width,Math.max(H.width,r)),j=Math.min(D.height,Math.max(H.height,u)),ie=[-V/2,-j/2,V,j];return Te.width=Tt(M),Te.height=Tt(O),ae.fillStyle=$,ae.fillRect(0,0,M,O),ae.save(),ae.translate(M/2,O/2),ae.rotate(l*Math.PI/180),ae.scale(m,b),ae.imageSmoothingEnabled=q,ae.imageSmoothingQuality=v,ae.drawImage.apply(ae,[e].concat(Us(ie.map(function(se){return Math.floor(Tt(se))})))),ae.restore(),Te}var lr=String.fromCharCode;function dh(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=lr(e.getUint8(n));return i}var hh=/^data:.*,/;function fh(e){var t=e.replace(hh,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return ne(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function mh(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(lr.apply(null,nr(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function Eh(e){var t=new DataView(e),a;try{var i,n,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var u=t.byteLength,o=2;o+1<u;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){n=o;break}o+=1}if(n){var l=n+4,h=n+10;if(dh(t,l,4)==="Exif"){var m=t.getUint16(h);if(i=m===18761,(i||m===19789)&&t.getUint16(h+2,i)===42){var T=t.getUint32(h+4,i);T>=8&&(r=h+T)}}}if(r){var b=t.getUint16(r,i),N,I;for(I=0;I<b;I+=1)if(N=r+I*12+2,t.getUint16(N,i)===274){N+=8,a=t.getUint16(N,i),t.setUint16(N,1,i);break}}}catch{a=1}return a}function Th(e){var t=0,a=1,i=1;switch(e){case 2:a=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,a=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:a,scaleY:i}}var ph={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,i=this.container,n=this.cropper,r=Number(a.minContainerWidth),u=Number(a.minContainerHeight);de(n,_e),ve(t,_e);var o={width:Math.max(i.offsetWidth,r>=0?r:er),height:Math.max(i.offsetHeight,u>=0?u:tr)};this.containerData=o,Qe(n,{width:o.width,height:o.height}),de(t,_e),ve(n,_e)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,n=Math.abs(a.rotate)%180===90,r=n?a.naturalHeight:a.naturalWidth,u=n?a.naturalWidth:a.naturalHeight,o=r/u,l=t.width,h=t.height;t.height*o>t.width?i===3?l=t.height*o:h=t.width/o:i===3?h=t.width/o:l=t.height*o;var m={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:l,height:h};this.canvasData=m,this.limited=i===1||i===2,this.limitCanvas(!0,!0),m.width=Math.min(Math.max(m.width,m.minWidth),m.maxWidth),m.height=Math.min(Math.max(m.height,m.minHeight),m.maxHeight),m.left=(t.width-m.width)/2,m.top=(t.height-m.height)/2,m.oldLeft=m.left,m.oldTop=m.top,this.initialCanvasData=J({},m)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,l=r.aspectRatio,h=this.cropped&&u;if(t){var m=Number(i.minCanvasWidth)||0,T=Number(i.minCanvasHeight)||0;o>1?(m=Math.max(m,n.width),T=Math.max(T,n.height),o===3&&(T*l>m?m=T*l:T=m/l)):o>0&&(m?m=Math.max(m,h?u.width:0):T?T=Math.max(T,h?u.height:0):h&&(m=u.width,T=u.height,T*l>m?m=T*l:T=m/l));var b=je({aspectRatio:l,width:m,height:T});m=b.width,T=b.height,r.minWidth=m,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(h?0:1)){var N=n.width-r.width,I=n.height-r.height;r.minLeft=Math.min(0,N),r.minTop=Math.min(0,I),r.maxLeft=Math.max(0,N),r.maxTop=Math.max(0,I),h&&this.limited&&(r.minLeft=Math.min(u.left,u.left+(u.width-r.width)),r.minTop=Math.min(u.top,u.top+(u.height-r.height)),r.maxLeft=u.left,r.maxTop=u.top,o===2&&(r.width>=n.width&&(r.minLeft=Math.min(0,N),r.maxLeft=Math.max(0,N)),r.height>=n.height&&(r.minTop=Math.min(0,I),r.maxTop=Math.max(0,I))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t,a){var i=this.canvasData,n=this.imageData;if(a){var r=ch({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),u=r.width,o=r.height,l=i.width*(u/i.naturalWidth),h=i.height*(o/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(h-i.height)/2,i.width=l,i.height=h,i.aspectRatio=u/o,i.naturalWidth=u,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,Qe(this.canvas,J({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,i=this.imageData,n=i.naturalWidth*(a.width/a.naturalWidth),r=i.naturalHeight*(a.height/a.naturalHeight);J(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),Qe(this.image,J({width:i.width,height:i.height},Gt(J({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};i&&(a.height*i>a.width?r.height=r.width/i:r.width=r.height*i),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*n),r.height=Math.max(r.minHeight,r.height*n),r.left=a.left+(a.width-r.width)/2,r.top=a.top+(a.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=J({},r)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=this.limited,l=i.aspectRatio;if(t){var h=Number(i.minCropBoxWidth)||0,m=Number(i.minCropBoxHeight)||0,T=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,b=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;h=Math.min(h,n.width),m=Math.min(m,n.height),l&&(h&&m?m*l>h?m=h/l:h=m*l:h?m=h/l:m&&(h=m*l),b*l>T?b=T/l:T=b*l),u.minWidth=Math.min(h,T),u.minHeight=Math.min(m,b),u.maxWidth=T,u.maxHeight=b}a&&(o?(u.minLeft=Math.max(0,r.left),u.minTop=Math.max(0,r.top),u.maxLeft=Math.min(n.width,r.left+r.width)-u.width,u.maxTop=Math.min(n.height,r.top+r.height)-u.height):(u.minLeft=0,u.minTop=0,u.maxLeft=n.width-u.width,u.maxTop=n.height-u.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&$t(this.face,Wt,i.width>=a.width&&i.height>=a.height?Hs:Ci),Qe(this.cropBox,J({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),bt(this.element,Oi,this.getData())}},bh={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,n=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",u=document.createElement("img");if(a&&(u.crossOrigin=a),u.src=n,u.alt=r,this.viewBox.appendChild(u),this.viewBoxImage=u,!!i){var o=i;typeof i=="string"?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,ne(o,function(l){var h=document.createElement("img");$t(l,Ia,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(h.crossOrigin=a),h.src=n,h.alt=r,h.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(h)})}},resetPreview:function(){ne(this.previews,function(t){var a=ki(t,Ia);Qe(t,{width:a.width,height:a.height}),t.innerHTML=a.html,sh(t,Ia)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,l=i.left-a.left-t.left,h=i.top-a.top-t.top;!this.cropped||this.disabled||(Qe(this.viewBoxImage,J({width:u,height:o},Gt(J({translateX:-l,translateY:-h},t)))),ne(this.previews,function(m){var T=ki(m,Ia),b=T.width,N=T.height,I=b,y=N,P=1;n&&(P=b/n,y=r*P),r&&y>N&&(P=N/r,I=n*P,y=N),Qe(m,{width:I,height:y}),Qe(m.getElementsByTagName("img")[0],J({width:u*P,height:o*P},Gt(J({translateX:-l*P,translateY:-h*P},t))))}))}},gh={bind:function(){var t=this.element,a=this.options,i=this.cropper;Ae(a.cropstart)&&xe(t,yi,a.cropstart),Ae(a.cropmove)&&xe(t,Li,a.cropmove),Ae(a.cropend)&&xe(t,Di,a.cropend),Ae(a.crop)&&xe(t,Oi,a.crop),Ae(a.zoom)&&xe(t,Ri,a.zoom),xe(i,Xs,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&xe(i,Zs,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&xe(i,Gs,this.onDblclick=this.dblclick.bind(this)),xe(t.ownerDocument,Qs,this.onCropMove=this.cropMove.bind(this)),xe(t.ownerDocument,js,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&xe(window,Ks,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;Ae(a.cropstart)&&ye(t,yi,a.cropstart),Ae(a.cropmove)&&ye(t,Li,a.cropmove),Ae(a.cropend)&&ye(t,Di,a.cropend),Ae(a.crop)&&ye(t,Oi,a.crop),Ae(a.zoom)&&ye(t,Ri,a.zoom),ye(i,Xs,this.onCropStart),a.zoomable&&a.zoomOnWheel&&ye(i,Zs,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&ye(i,Gs,this.onDblclick),ye(t.ownerDocument,Qs,this.onCropMove),ye(t.ownerDocument,js,this.onCropEnd),a.responsive&&ye(window,Ks,this.onResize)}},_h={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,n=a.offsetWidth/i.width,r=a.offsetHeight/i.height,u=Math.abs(n-1)>Math.abs(r-1)?n:r;if(u!==1){var o,l;t.restore&&(o=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ne(o,function(h,m){o[m]=h*u})),this.setCropBoxData(ne(l,function(h,m){l[m]=h*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===$s||this.setDragMode(ih(this.dragBox,Ii)?Ws:xi)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Y(a)&&a!==1||Y(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ne(t.changedTouches,function(o){r[o.identifier]=Sa(o)}):r[t.pointerId||0]=Sa(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=Vs:u=ki(t.target,Wt),Xd.test(u)&&bt(this.element,yi,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Fs&&(this.cropping=!0,de(this.dragBox,Ca)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),bt(this.element,Li,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ne(t.changedTouches,function(n){J(i[n.identifier]||{},Sa(n,!0))}):J(i[t.pointerId||0]||{},Sa(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?ne(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,pt(this.dragBox,Ca,this.cropped&&this.options.modal)),bt(this.element,Di,{originalEvent:t,action:a}))}}},Ah={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,l=a.aspectRatio,h=r.left,m=r.top,T=r.width,b=r.height,N=h+T,I=m+b,y=0,P=0,$=n.width,B=n.height,q=!0,F;!l&&t.shiftKey&&(l=T&&b?T/b:1),this.limited&&(y=r.minLeft,P=r.minTop,$=y+Math.min(n.width,i.width,i.left+i.width),B=P+Math.min(n.height,i.height,i.top+i.height));var v=u[Object.keys(u)[0]],_={x:v.endX-v.startX,y:v.endY-v.startY},w=function(ue){switch(ue){case it:N+_.x>$&&(_.x=$-N);break;case nt:h+_.x<y&&(_.x=y-h);break;case Xe:m+_.y<P&&(_.y=P-m);break;case mt:I+_.y>B&&(_.y=B-I);break}};switch(o){case Ci:h+=_.x,m+=_.y;break;case it:if(_.x>=0&&(N>=$||l&&(m<=P||I>=B))){q=!1;break}w(it),T+=_.x,T<0&&(o=nt,T=-T,h-=T),l&&(b=T/l,m+=(r.height-b)/2);break;case Xe:if(_.y<=0&&(m<=P||l&&(h<=y||N>=$))){q=!1;break}w(Xe),b-=_.y,m+=_.y,b<0&&(o=mt,b=-b,m-=b),l&&(T=b*l,h+=(r.width-T)/2);break;case nt:if(_.x<=0&&(h<=y||l&&(m<=P||I>=B))){q=!1;break}w(nt),T-=_.x,h+=_.x,T<0&&(o=it,T=-T,h-=T),l&&(b=T/l,m+=(r.height-b)/2);break;case mt:if(_.y>=0&&(I>=B||l&&(h<=y||N>=$))){q=!1;break}w(mt),b+=_.y,b<0&&(o=Xe,b=-b,m-=b),l&&(T=b*l,h+=(r.width-T)/2);break;case Ht:if(l){if(_.y<=0&&(m<=P||N>=$)){q=!1;break}w(Xe),b-=_.y,m+=_.y,T=b*l}else w(Xe),w(it),_.x>=0?N<$?T+=_.x:_.y<=0&&m<=P&&(q=!1):T+=_.x,_.y<=0?m>P&&(b-=_.y,m+=_.y):(b-=_.y,m+=_.y);T<0&&b<0?(o=qt,b=-b,T=-T,m-=b,h-=T):T<0?(o=Vt,T=-T,h-=T):b<0&&(o=Yt,b=-b,m-=b);break;case Vt:if(l){if(_.y<=0&&(m<=P||h<=y)){q=!1;break}w(Xe),b-=_.y,m+=_.y,T=b*l,h+=r.width-T}else w(Xe),w(nt),_.x<=0?h>y?(T-=_.x,h+=_.x):_.y<=0&&m<=P&&(q=!1):(T-=_.x,h+=_.x),_.y<=0?m>P&&(b-=_.y,m+=_.y):(b-=_.y,m+=_.y);T<0&&b<0?(o=Yt,b=-b,T=-T,m-=b,h-=T):T<0?(o=Ht,T=-T,h-=T):b<0&&(o=qt,b=-b,m-=b);break;case qt:if(l){if(_.x<=0&&(h<=y||I>=B)){q=!1;break}w(nt),T-=_.x,h+=_.x,b=T/l}else w(mt),w(nt),_.x<=0?h>y?(T-=_.x,h+=_.x):_.y>=0&&I>=B&&(q=!1):(T-=_.x,h+=_.x),_.y>=0?I<B&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Ht,b=-b,T=-T,m-=b,h-=T):T<0?(o=Yt,T=-T,h-=T):b<0&&(o=Vt,b=-b,m-=b);break;case Yt:if(l){if(_.x>=0&&(N>=$||I>=B)){q=!1;break}w(it),T+=_.x,b=T/l}else w(mt),w(it),_.x>=0?N<$?T+=_.x:_.y>=0&&I>=B&&(q=!1):T+=_.x,_.y>=0?I<B&&(b+=_.y):b+=_.y;T<0&&b<0?(o=Vt,b=-b,T=-T,m-=b,h-=T):T<0?(o=qt,T=-T,h-=T):b<0&&(o=Ht,b=-b,m-=b);break;case Hs:this.move(_.x,_.y),q=!1;break;case Vs:this.zoom(uh(u),t),q=!1;break;case Fs:if(!_.x||!_.y){q=!1;break}F=ur(this.cropper),h=v.startX-F.left,m=v.startY-F.top,T=r.minWidth,b=r.minHeight,_.x>0?o=_.y>0?Yt:Ht:_.x<0&&(h-=T,o=_.y>0?qt:Vt),_.y<0&&(m-=b),this.cropped||(ve(this.cropBox,_e),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}q&&(r.width=T,r.height=b,r.left=h,r.top=m,this.action=o,this.renderCropBox()),ne(u,function(G){G.startX=G.endX,G.startY=G.endY})}},Nh={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&de(this.dragBox,Ca),ve(this.cropBox,_e),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=J({},this.initialImageData),this.canvasData=J({},this.initialCanvasData),this.cropBoxData=J({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(J(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ve(this.dragBox,Ca),de(this.cropBox,_e)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ne(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ve(this.cropper,Ys)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,de(this.cropper,Ys)),this},destroy:function(){var t=this.element;return t[Z]?(t[Z]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,r=i.top;return this.moveTo(Mi(t)?t:n+Number(t),Mi(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(Y(t)&&(i.left=t,n=!0),Y(a)&&(i.top=a,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var n=this.options,r=this.canvasData,u=r.width,o=r.height,l=r.naturalWidth,h=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var m=l*t,T=h*t;if(bt(this.element,Ri,{ratio:t,oldRatio:u/l,originalEvent:i})===!1)return this;if(i){var b=this.pointers,N=ur(this.cropper),I=b&&Object.keys(b).length?oh(b):{pageX:i.pageX,pageY:i.pageY};r.left-=(m-u)*((I.pageX-N.left-r.left)/u),r.top-=(T-o)*((I.pageY-N.top-r.top)/o)}else Et(a)&&Y(a.x)&&Y(a.y)?(r.left-=(m-u)*((a.x-r.left)/u),r.top-=(T-o)*((a.y-r.top)/o)):(r.left-=(m-u)/2,r.top-=(T-o)/2);r.width=m,r.height=T,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Y(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,Y(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(Y(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(Y(t)&&(i.scaleX=t,n=!0),Y(a)&&(i.scaleY=a,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,n=this.canvasData,r=this.cropBoxData,u;if(this.ready&&this.cropped){u={x:r.left-n.left,y:r.top-n.top,width:r.width,height:r.height};var o=i.width/i.naturalWidth;if(ne(u,function(m,T){u[T]=m/o}),t){var l=Math.round(u.y+u.height),h=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=h-u.x,u.height=l-u.y}}else u={x:0,y:0,width:0,height:0};return a.rotatable&&(u.rotate=i.rotate||0),a.scalable&&(u.scaleX=i.scaleX||1,u.scaleY=i.scaleY||1),u},setData:function(t){var a=this.options,i=this.imageData,n=this.canvasData,r={};if(this.ready&&!this.disabled&&Et(t)){var u=!1;a.rotatable&&Y(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(Y(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),Y(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;Y(t.x)&&(r.left=t.x*o+n.left),Y(t.y)&&(r.top=t.y*o+n.top),Y(t.width)&&(r.width=t.width*o),Y(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?J({},this.containerData):{}},getImageData:function(){return this.sized?J({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&ne(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&Et(t)&&(Y(t.left)&&(a.left=t.left),Y(t.top)&&(a.top=t.top),Y(t.width)?(a.width=t.width,a.height=t.width/i):Y(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,n,r;return this.ready&&this.cropped&&!this.disabled&&Et(t)&&(Y(t.left)&&(a.left=t.left),Y(t.top)&&(a.top=t.top),Y(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),Y(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),i&&(n?a.height=a.width/i:r&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=lh(this.image,this.imageData,a,t);if(!this.cropped)return i;var n=this.getData(t.rounded),r=n.x,u=n.y,o=n.width,l=n.height,h=i.width/Math.floor(a.naturalWidth);h!==1&&(r*=h,u*=h,o*=h,l*=h);var m=o/l,T=je({aspectRatio:m,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),b=je({aspectRatio:m,width:t.minWidth||0,height:t.minHeight||0},"cover"),N=je({aspectRatio:m,width:t.width||(h!==1?i.width:o),height:t.height||(h!==1?i.height:l)}),I=N.width,y=N.height;I=Math.min(T.width,Math.max(b.width,I)),y=Math.min(T.height,Math.max(b.height,y));var P=document.createElement("canvas"),$=P.getContext("2d");P.width=Tt(I),P.height=Tt(y),$.fillStyle=t.fillColor||"transparent",$.fillRect(0,0,I,y);var B=t.imageSmoothingEnabled,q=B===void 0?!0:B,F=t.imageSmoothingQuality;$.imageSmoothingEnabled=q,F&&($.imageSmoothingQuality=F);var v=i.width,_=i.height,w=r,G=u,ue,me,Ne,Oe,Ee,Te;w<=-o||w>v?(w=0,ue=0,Ne=0,Ee=0):w<=0?(Ne=-w,w=0,ue=Math.min(v,o+w),Ee=ue):w<=v&&(Ne=0,ue=Math.min(o,v-w),Ee=ue),ue<=0||G<=-l||G>_?(G=0,me=0,Oe=0,Te=0):G<=0?(Oe=-G,G=0,me=Math.min(_,l+G),Te=me):G<=_&&(Oe=0,me=Math.min(l,_-G),Te=me);var ae=[w,G,ue,me];if(Ee>0&&Te>0){var De=I/o;ae.push(Ne*De,Oe*De,Ee*De,Te*De)}return $.drawImage.apply($,[i].concat(Us(ae.map(function(x){return Math.floor(Tt(x))})))),P},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!Mi(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var r=t===xi,u=a.movable&&t===Ws;t=r||u?t:$s,a.dragMode=t,$t(i,Wt,t),pt(i,Ii,r),pt(i,Si,u),a.cropBoxMovable||($t(n,Wt,t),pt(n,Ii,r),pt(n,Si,u))}return this}},Ch=ke.Cropper,dr=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(wd(this,e),!t||!zd.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=J({},ar,Et(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Bd(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[Z]){if(a[Z]=this,i==="img"){if(this.isImg=!0,n=a.getAttribute("src")||"",this.originalUrl=n,!n)return;n=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=a.toDataURL());this.load(n)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var n=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Qd.test(a)){jd.test(a)?this.read(fh(a)):this.clone();return}var u=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=u,u.onabort=o,u.onerror=o,u.ontimeout=o,u.onprogress=function(){u.getResponseHeader("content-type")!==Js&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&or(a)&&n.crossOrigin&&(a=cr(a)),u.open("GET",a,!0),u.responseType="arraybuffer",u.withCredentials=n.crossOrigin==="use-credentials",u.send()}}},{key:"read",value:function(a){var i=this.options,n=this.imageData,r=Eh(a),u=0,o=1,l=1;if(r>1){this.url=mh(a,Js);var h=Th(r);u=h.rotate,o=h.scaleX,l=h.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&or(i)&&(n||(n="anonymous"),r=cr(i)),this.crossOrigin=n,this.crossOriginUrl=r;var u=document.createElement("img");n&&(u.crossOrigin=n),u.src=r||i,u.alt=a.alt||"The image to crop",this.image=u,u.onload=this.start.bind(this),u.onerror=this.stop.bind(this),de(u,qs),a.parentNode.insertBefore(u,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=ke.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ke.navigator.userAgent),r=function(h,m){J(a.imageData,{naturalWidth:h,naturalHeight:m,aspectRatio:h/m}),a.initialImageData=J({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!n){r(i.naturalWidth,i.naturalHeight);return}var u=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=u,u.onload=function(){r(u.width,u.height),n||o.removeChild(u)},u.src=i.src,n||(u.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(u))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,n=this.image,r=a.parentNode,u=document.createElement("div");u.innerHTML=Kd;var o=u.querySelector(".".concat(Z,"-container")),l=o.querySelector(".".concat(Z,"-canvas")),h=o.querySelector(".".concat(Z,"-drag-box")),m=o.querySelector(".".concat(Z,"-crop-box")),T=m.querySelector(".".concat(Z,"-face"));this.container=r,this.cropper=o,this.canvas=l,this.dragBox=h,this.cropBox=m,this.viewBox=o.querySelector(".".concat(Z,"-view-box")),this.face=T,l.appendChild(n),de(a,_e),r.insertBefore(o,a.nextSibling),ve(n,qs),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,de(m,_e),i.guides||de(m.getElementsByClassName("".concat(Z,"-dashed")),_e),i.center||de(m.getElementsByClassName("".concat(Z,"-center")),_e),i.background&&de(o,"".concat(Z,"-bg")),i.highlight||de(T,qd),i.cropBoxMovable&&(de(T,Si),$t(T,Wt,Ci)),i.cropBoxResizable||(de(m.getElementsByClassName("".concat(Z,"-line")),_e),de(m.getElementsByClassName("".concat(Z,"-point")),_e)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),Ae(i.ready)&&xe(a,zs,i.ready,{once:!0}),bt(a,zs)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),ve(this.element,_e)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Ch,e}},{key:"setDefaults",value:function(a){J(ar,Et(a)&&a)}}])}();J(dr.prototype,ph,bh,gh,_h,Ah,Nh);function Ih(e,t){const a=e.split(",")||[],i=a[0].match(/:(.*?);/)[1],n=a[1]&&atob(a[1]);let r=n&&n.length;const u=new Uint8Array(r);for(;r--;)u[r]=n==null?void 0:n.charCodeAt(r);return new File([u],t,{type:i})}const Sh={key:0,contenteditable:"false",class:"z-10 w-[100vw] h-[100vh] bg-[rgba(0,0,0,0.7)] flex flex-col justify-center items-center fixed top-0 left-0 cursor-auto"},xh={class:"w-[700px] flex flex-col bg-white rounded pb-8"},Oh={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Dh={class:"flex flex-col h-full"},Lh={class:"flex flex-row justify-center items-start flex-1"},yh={class:"flex flex-col items-start flex-1"},Rh={class:"flex flex-col w-full px-6 py-4"},Mh={class:"flex flex-col w-full"},Ph={class:"flex flex-row items-center"},kh={class:"relative bg-[#474AFF] text-white rounded p-3"},vh={class:"flex flex-row items-start justify-between mt-3"},wh={class:"flex flex-col"},Bh={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},Uh={key:0,class:"w-full text-center"},Fh=["src"],Hh={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Vh={class:"text-[#999] mt-05 flex justify-center mt-4"},Yh={class:"w-full flex justify-end space-x-5 mt-5 px-6"},qh=["loading"],Wh=c.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=c.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=c.ref(),u=c.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=c.ref(!1),l=c.ref({afterImg:"",image:null,myCropper:null}),h=c.ref("image/jpeg"),m=F=>{console.log(F);const v=F.target.files[0];if(v){v.name&&(n.value.inputValue=v.name);const _=new FileReader;_.onload=w=>{var G,ue;console.log("e?.target?.result",(G=w==null?void 0:w.target)==null?void 0:G.result),T((ue=w==null?void 0:w.target)==null?void 0:ue.result)},_.readAsDataURL(v)}};async function T(F){if(!F)return;await q();const v=F;l.value.image=v,l.value.image&&b()}function b(){const F=document.querySelector("#imgId");F&&F.addEventListener("load",()=>{B(),l.value.myCropper=new dr(F,u.value)})}const N=c.ref(!1);function I(F,v,_){r.value=F,F&&F.aspectRatio&&(u.value.aspectRatio=F.aspectRatio),_&&(n.value.inputValue=_),N.value=!0,v&&T(v)}function y(){N.value=!1}const P=()=>{var v,_;if(!l.value.myCropper)return;o.value=!0,l.value.afterImg=l.value.myCropper.getCroppedCanvas({height:(v=r.value)==null?void 0:v.height,imageSmoothingQuality:"high",width:(_=r.value)==null?void 0:_.width}).toDataURL(h.value);const F=Ih(l.value.afterImg,n.value.inputValue);i("ok",F),o.value=!1,q(),B(),y()};function $(){q(),B(),y(),i("cancel")}function B(){l.value.myCropper&&l.value.myCropper.destroy()}function q(){l.value.image=""}return t({handleCloseCropper:y,handleOpenCropper:I}),(F,v)=>{var _,w,G;return N.value?(c.openBlock(),c.createElementBlock("div",Sh,[c.createElementVNode("div",xh,[c.createElementVNode("div",Oh,[v[1]||(v[1]=c.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),c.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:c.withModifiers($,["stop"])})]),c.createElementVNode("div",Dh,[c.createElementVNode("div",Lh,[c.createElementVNode("div",yh,[c.createElementVNode("div",Rh,[c.createElementVNode("div",Mh,[c.createElementVNode("div",Ph,[c.createElementVNode("div",kh,[c.createElementVNode("input",{type:"file",accept:"image/*",onClick:v[0]||(v[0]=c.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:m,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),v[2]||(v[2]=c.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),v[3]||(v[3]=c.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),c.createElementVNode("div",vh,[c.createElementVNode("div",wh,[c.createElementVNode("div",Bh,[l.value.image?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",Uh," 请上传图片 ")),c.createElementVNode("img",{id:"imgId",src:l.value.image,style:{width:"300px"}},null,8,Fh)])]),c.createElementVNode("div",Hh,[v[4]||(v[4]=c.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),c.createElementVNode("div",Vh," 预览画像 "+c.toDisplayString(((_=r.value)==null?void 0:_.width)||"")+" "+c.toDisplayString((w=r.value)!=null&&w.width?"x":"")+" "+c.toDisplayString(((G=r.value)==null?void 0:G.height)||""),1)])])])])])]),c.createElementVNode("div",Yh,[c.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:P}," 确认 ",8,qh),c.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:$},"取消")])])])])):c.createCommentVNode("",!0)}}}),$h={class:"aidition_left"},Gh={class:"aidition_right"},Xh={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},Qh=ft(c.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object,icons:{type:Array,default:()=>[]}},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=c.computed(()=>a.selectedElement===a.element),r=c.computed(()=>a.hoveredElement===a.element),u=c.ref(!1),o=c.ref(!1),l=c.ref(""),h=c.computed(()=>a.element.rule.minText||0),m=c.computed(()=>a.element.rule.maxText||1/0),T=c.ref();function b(O){O.xpath!="/div[1]"&&(i("selectElement",O),!O.rule.isReadOnly&&O.type===K.Text&&(u.value=!0))}function N(O){i("selectElement",O)}function I(O,D){i("hoverElement",O,D)}function y(O){i("hoverElement",O)}function P(O){O.currentTarget.contains(O.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function $(){u.value=!1,i("contentUpdated",B())}function B(){function O(D){const H=Object.entries(D.attrs||{}).map(([se,Fe])=>`${se}="${Fe}"`).join(" "),V=`<${D.tag}${H?" "+H:""}>`,j=`</${D.tag}>`,ie=(D.children||[]).map(se=>O(se)).join("");return`${V}${D.editText||D.text||""}${ie}${j}`}return O(a.element)}function q(O){var V;O.stopPropagation();const D=O.target,H=((V=D.firstChild)==null?void 0:V.nodeType)===Node.TEXT_NODE&&D.firstChild.nodeValue||"";if(H.length<h.value){o.value=!0,l.value=`最少输入 ${h.value} 个字符`;return}else if(H.length>m.value){o.value=!0,l.value=`最多输入 ${m.value} 个字符`;return}else o.value=!1,l.value="";a.element.editText=H,i("updateText",{element:a.element,newText:H}),i("contentUpdated",B())}function F(O){i("updateText",O),i("contentUpdated",B())}function v(){const O={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:O})}function _(){i("blockAction",{action:"moveUp",element:a.element})}function w(){i("blockAction",{action:"moveDown",element:a.element})}function G(){i("blockAction",{action:"delete",element:a.element})}function ue(O){i("blockAction",O),i("contentUpdated",B())}function me(){T.value.openModal()}function Ne(O){i("addIcon",O,a.element),i("contentUpdated",B())}function Oe(O,D){i("addIcon",O,D),i("contentUpdated",B())}let Ee;const Te=c.ref(),ae=c.ref({});function De(O,D){if(D.rule.minImageWidth&&D.rule.maxImageHeight?(ae.value.width=D.rule.minImageWidth,ae.value.height=D.rule.maxImageHeight,ae.value.aspectRatio=D.rule.minImageWidth/D.rule.maxImageHeight):ae.value={},O){O.name;const H=new FileReader;H.onload=V=>{var j;Ee=(j=V==null?void 0:V.target)==null?void 0:j.result,Te.value.handleOpenCropper(ae.value,Ee,O.name)},H.readAsDataURL(O)}}function x(O,D){if(console.log(typeof O=="object",O),O)if(typeof O=="object"){D.attrs.alt=O.name;const H=new FileReader;H.onload=V=>{var ie;let j=(ie=V==null?void 0:V.target)==null?void 0:ie.result;D.attrs.src=j,i("upload",j,D),i("contentUpdated",B())},H.readAsDataURL(O)}else D.attrs.src=O,i("upload",O,D),i("contentUpdated",B())}const M=async O=>{};return(O,D)=>{const H=c.resolveComponent("ElementRenderer",!0);return c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(a.element.tag),c.mergeProps({class:["m-2 p-1 border-dashed border",r.value?"border-dashed border-[1px] border-blue-500":"",n.value?"border-dashed border-[1px] border-green-500 z-10 ":"",o.value?"border-dashed border-[1px] border-red-500":"",(!r.value&&!n.value&&!o.value,""),a.element.rule&&a.element.rule.isReadOnly?"cursor-not-allowed":""]},a.element.attrs,{contenteditable:u.value,onClick:D[1]||(D[1]=c.withModifiers(()=>b(a.element),["stop"])),onMouseenter:D[2]||(D[2]=()=>y(a.element)),onMouseleave:P,onBlur:$,onInput:q}),{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[a.element.type===c.unref(K).Block?(c.openBlock(),c.createElementBlock("div",{key:0,"date-action":"1",class:c.normalizeClass(["aidition",n.value?"flex":""]),contenteditable:"false"},[c.createElementVNode("span",$h,c.toDisplayString(a.element.editText||a.element.text),1),c.createElementVNode("div",Gh,[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"])},"排前"),c.createElementVNode("span",{onClick:c.withModifiers(w,["stop"])},"排后"),c.createElementVNode("span",{onClick:c.withModifiers(G,["stop"])},"删除")])],2)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.element.children,(V,j)=>(c.openBlock(),c.createBlock(H,{icons:e.icons,key:j,element:V,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:N,onHoverElement:I,onUpdateText:F,onBlockAction:ue,onAddIcon:Oe,onUpload:x},null,8,["icons","element","selectedElement","hoveredElement"]))),128)),a.element.type===c.unref(K).Block?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:c.withModifiers(v,["stop"]),contenteditable:"false"}),c.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:D[0]||(D[0]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:c.withModifiers(_,["stop"]),class:"iconfont icon-paiqian"}),c.createElementVNode("span",{onClick:c.withModifiers(w,["stop"]),class:"iconfont icon-paihou"}),c.createElementVNode("span",{onClick:c.withModifiers(G,["stop"]),class:"iconfont icon-shanchu"}),c.createElementVNode("span",{onClick:c.withModifiers(v,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==c.unref(K).Text&&o.value?(c.openBlock(),c.createElementBlock("div",Xh,c.toDisplayString(l.value),1)):c.createCommentVNode("",!0),a.element.type===c.unref(K).Image?(c.openBlock(),c.createElementBlock("div",{key:1,class:"absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",onClick:D[3]||(D[3]=c.withModifiers(()=>{},["stop"]))},[D[7]||(D[7]=c.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),c.createVNode(kd,{customUpload:V=>De(V,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:M},null,8,["customUpload","height","width"])])):c.createCommentVNode("",!0),a.element.type===c.unref(K).Icon?(c.openBlock(),c.createElementBlock("div",{key:2,class:"absolute -top-6 left-0 bg-white py-0.5 px-1 rounded shadow z-10",onClick:D[5]||(D[5]=c.withModifiers(()=>{},["stop"]))},[c.createElementVNode("span",{onClick:D[4]||(D[4]=c.withModifiers(V=>me(),["stop"])),contenteditable:"false",class:"cursor-pointer"},"选择图标")])):c.createCommentVNode("",!0),c.createVNode(Pd,{icons:e.icons,ref_key:"iconRef",ref:T,onOk:Ne},null,8,["icons"]),c.createVNode(Wh,{ref_key:"cropperRef",ref:Te,onOk:D[6]||(D[6]=V=>x(V,a.element))},null,512)],64)}}}),[["__scopeId","data-v-072a458e"]]),jh=c.defineComponent({name:"GpCheckbox",props:{modelValue:{type:Boolean,required:!0},label:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){return{updateValue:i=>{t("update:modelValue",i.target.checked)}}}}),zh={class:"form-group"},Kh={class:"flex items-center space-x-2 cursor-pointer"},Zh=["checked","aria-checked"],Jh={class:"checkbox-label text-sm text-gray-700"};function ef(e,t,a,i,n,r){return c.openBlock(),c.createElementBlock("div",zh,[c.createElementVNode("label",Kh,[c.createElementVNode("input",{type:"checkbox",checked:e.modelValue,onChange:t[0]||(t[0]=(...u)=>e.updateValue&&e.updateValue(...u)),class:"custom-checkbox","aria-checked":e.modelValue},null,40,Zh),c.createElementVNode("span",Jh,c.toDisplayString(e.label),1)])])}const xa=ft(jh,[["render",ef],["__scopeId","data-v-68b8f276"]]),tf=c.defineComponent({name:"GpMessage",props:{message:{type:String,required:!0},type:{type:String,default:"info"},position:{type:String,default:"top-right"},duration:{type:Number,default:3e3},onClose:{type:Function,required:!0},icon:{type:Boolean,default:!0}},setup(e){const t=c.ref(!1),a=c.computed(()=>({success:"bg-green-100 text-green-800",error:"bg-red-100 text-red-800",info:"bg-blue-100 text-blue-800",warning:"bg-yellow-100 text-yellow-800"})[e.type]),i=()=>{t.value=!1,e.onClose()};return setTimeout(()=>{i()},e.duration),t.value=!0,{visible:t,typeClass:a,closeMessage:i}}}),af={key:0,class:"gp-message"},nf={key:0,class:"mr-2"},sf={key:0,class:"text-green-500"},rf={key:1,class:"text-red-500"},uf={key:2,class:"text-blue-500"},of={key:3,class:"text-yellow-500"};function cf(e,t,a,i,n,r){return c.openBlock(),c.createBlock(c.Transition,{name:"fade"},{default:c.withCtx(()=>[e.visible?(c.openBlock(),c.createElementBlock("div",af,[c.createElementVNode("div",{class:c.normalizeClass([e.typeClass,"message-content"])},[e.icon?(c.openBlock(),c.createElementBlock("span",nf,[c.renderSlot(e.$slots,"icon",{},()=>[e.type==="success"?(c.openBlock(),c.createElementBlock("span",sf,"✔")):c.createCommentVNode("",!0),e.type==="error"?(c.openBlock(),c.createElementBlock("span",rf,"✖")):c.createCommentVNode("",!0),e.type==="info"?(c.openBlock(),c.createElementBlock("span",uf,"ℹ")):c.createCommentVNode("",!0),e.type==="warning"?(c.openBlock(),c.createElementBlock("span",of,"⚠")):c.createCommentVNode("",!0)],!0)])):c.createCommentVNode("",!0),c.createElementVNode("span",null,c.toDisplayString(e.message),1),c.createElementVNode("button",{class:"close-btn hover:text-gray-800 font-bold",onClick:t[0]||(t[0]=(...u)=>e.closeMessage&&e.closeMessage(...u))}," × ")],2)])):c.createCommentVNode("",!0)]),_:3})}const lf=ft(tf,[["render",cf],["__scopeId","data-v-56476f4c"]]),gt=c.reactive([]);let wi=null;const df=()=>{const e=document.createElement("div");return e.id="global-message-container",document.body.appendChild(e),e},hf=()=>{if(wi)return;const e=df();wi=c.createApp({setup(){return{messageQueue:gt}},render(){const t=c.computed(()=>{var i;return{"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4","top-center":"top-4 left-1/2 transform -translate-x-1/2","bottom-center":"bottom-4 left-1/2 transform -translate-x-1/2"}[((i=gt[0])==null?void 0:i.options.position)||"top-right"]});return c.h("div",{class:`fixed flex flex-col gap-2 ${t.value}`},gt.map(a=>c.h(lf,{key:a.id,...a.options,onClose:()=>hr(a.id)})))}}),wi.mount(e)},hr=e=>{const t=gt.findIndex(a=>a.id===e);t!==-1&&gt.splice(t,1)};let ff=0;const te=e=>{hf();const t=ff++;gt.push({id:t,options:e}),setTimeout(()=>{hr(t)},e.duration||3e3)};te.success=(e,t=3e3,a=!0)=>{te(typeof e=="string"?{message:e,type:"success",duration:t,icon:a}:{...e,type:"success"})},te.error=(e,t=3e3,a=!0)=>{te(typeof e=="string"?{message:e,type:"error",duration:t,icon:a}:{...e,type:"error"})},te.info=(e,t=3e3,a=!0)=>{te(typeof e=="string"?{message:e,type:"info",duration:t,icon:a}:{...e,type:"info"})},te.warning=(e,t=3e3,a=!0)=>{te(typeof e=="string"?{message:e,type:"warning",duration:t,icon:a}:{...e,type:"warning"})};const mf={key:0},Ef={key:0},Tf={class:"text-gray-500 my-2"},pf={class:"text-gray-500 my-2"},bf={key:1},gf={key:2},_f={key:3},Af={key:4},Nf={key:5},Cf={key:6},If={key:7},Sf={key:8},xf=ft(c.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=c.ref({rule:{},...a.element});c.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){if(n.value.type===K.Icon&&!n.value.attrs.class.includes("iconfont")){te.error("Icon 支持 iconfont 图标");return}if(n.value.type===K.Image&&n.value.tag!=="img"){te.error("节点类型错误");return}if(n.value.type===K.Video&&n.value.tag!=="video"){te.error("节点类型错误");return}if(n.value.type===K.Link&&n.value.tag!=="a"){te.error("节点类型错误");return}if(n.value.type===K.Text){if(n.value.rule.minText>n.value.rule.maxText){te.error("最小文本长度不能大于最大文本长度");return}if(n.value.tag!=="p"&&n.value.tag!=="div"&&n.value.tag!=="span"&&n.value.tag!=="h1"&&n.value.tag!=="h2"&&n.value.tag!=="h3"&&n.value.tag!=="h4"&&n.value.tag!=="h5"&&n.value.tag!=="h6"){te.error("节点类型错误");return}}if(n.value.type===K.Block){if(n.value.rule.minBlock>n.value.rule.maxBlock){te.error("最小块数量不能大于最大块数量");return}if(n.value.tag!=="div"&&n.value.tag!=="section"&&n.value.tag!=="article"&&n.value.tag!=="nav"&&n.value.tag!=="header"&&n.value.tag!=="footer"&&n.value.tag!=="span"&&n.value.tag!=="p"&&n.value.tag!=="img"){te.error("节点类型错误");return}}i("updateElement",n.value),te.success("保存成功")}return(u,o)=>(c.openBlock(),c.createElementBlock("div",null,[n.value?(c.openBlock(),c.createElementBlock("div",mf,[n.value.text!==void 0?(c.openBlock(),c.createElementBlock("div",Ef,[o[11]||(o[11]=c.createElementVNode("label",{class:"block mt-4"},"内容",-1)),c.createElementVNode("div",Tf,c.toDisplayString(n.value.text||"-"),1)])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[12]||(o[12]=c.createElementVNode("label",{class:"block mt-4"},"节点",-1)),c.createElementVNode("div",pf,c.toDisplayString(n.value.xpath),1)]),c.createElementVNode("div",null,[o[14]||(o[14]=c.createElementVNode("label",{class:"block mt-4"},"类型",-1)),c.withDirectives(c.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value.type=l),class:"border rounded p-1 w-full"},o[13]||(o[13]=[c.createElementVNode("option",{value:0},"无",-1),c.createElementVNode("option",{value:1},"文本",-1),c.createElementVNode("option",{value:2},"图片",-1),c.createElementVNode("option",{value:3},"视频",-1),c.createElementVNode("option",{value:4},"图标",-1),c.createElementVNode("option",{value:5},"链接",-1),c.createElementVNode("option",{value:10},"块",-1)]),512),[[c.vModelSelect,n.value.type]])]),n.value.type==c.unref(K).Text?(c.openBlock(),c.createElementBlock("div",bf,[o[15]||(o[15]=c.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=l=>n.value.rule.minText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(K).Text?(c.openBlock(),c.createElementBlock("div",gf,[o[16]||(o[16]=c.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[2]||(o[2]=l=>n.value.rule.maxText=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxText]])])):c.createCommentVNode("",!0),n.value.type==c.unref(K).Image?(c.openBlock(),c.createElementBlock("div",_f,[o[17]||(o[17]=c.createElementVNode("label",{class:"block mt-4"},"是否裁剪",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.crop,"onUpdate:modelValue":o[3]||(o[3]=l=>n.value.rule.crop=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),n.value.type==c.unref(K).Image?(c.openBlock(),c.createElementBlock("div",Af,[o[18]||(o[18]=c.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=l=>n.value.rule.minImageWidth=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minImageWidth]])])):c.createCommentVNode("",!0),n.value.type==c.unref(K).Image?(c.openBlock(),c.createElementBlock("div",Nf,[o[19]||(o[19]=c.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=l=>n.value.rule.maxImageHeight=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxImageHeight]])])):c.createCommentVNode("",!0),n.value.type==c.unref(K).Block?(c.openBlock(),c.createElementBlock("div",Cf,[o[20]||(o[20]=c.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=l=>n.value.rule.minBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.minBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(K).Block?(c.openBlock(),c.createElementBlock("div",If,[o[21]||(o[21]=c.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=l=>n.value.rule.maxBlock=l),class:"border rounded p-1 w-full"},null,512),[[c.vModelText,n.value.rule.maxBlock]])])):c.createCommentVNode("",!0),n.value.type==c.unref(K).Text||n.value.type==c.unref(K).Icon?(c.openBlock(),c.createElementBlock("div",Sf,[o[22]||(o[22]=c.createElementVNode("label",{class:"block mt-4"},"主题色",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isThemeColor,"onUpdate:modelValue":o[8]||(o[8]=l=>n.value.rule.isThemeColor=l),label:"是"},null,8,["modelValue"])])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[o[23]||(o[23]=c.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isRequired,"onUpdate:modelValue":o[9]||(o[9]=l=>n.value.rule.isRequired=l),label:"是"},null,8,["modelValue"])]),c.createElementVNode("div",null,[o[24]||(o[24]=c.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),c.createVNode(xa,{class:"py-2",modelValue:n.value.rule.isReadOnly,"onUpdate:modelValue":o[10]||(o[10]=l=>n.value.rule.isReadOnly=l),label:"是"},null,8,["modelValue"])])])):c.createCommentVNode("",!0),c.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-green-500 text-white rounded"}," 保存 ")]))}}),[["__scopeId","data-v-34a23ef6"]]),Of={class:"flex h-screen"},Df={class:"goodschool_mobile"},Lf=["innerHTML"],yf=["innerHTML"],Rf={class:"flex-1 bg-gray-100 overflow-auto"},Mf={class:"p-4"},Pf={key:0,class:"text-red-500 text-xs mt-2"},kf={key:0,class:"resize-area border-l overflow-auto w-[375px]"},vf={class:"p-4"},fr=ft(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},previewWidth:{default:375},uploadByFile:{},icons:{},rules:{}},emits:["update:modelValue","update:element"],setup(e,{emit:t}){const a=e,i=t,n=c.ref(a.template);c.watch(()=>a.template,x=>{n.value=x},{immediate:!0}),c.watch(()=>n.value,x=>{x&&(u.value=$(x))},{immediate:!0}),c.watch(()=>a.css,x=>{x.forEach(M=>{if(document.querySelector(`link[href="${M}"]`))return;const O=document.createElement("link");O.rel="stylesheet",O.href=M,document.head.appendChild(O)})},{immediate:!0});const r=c.ref(a.mode),u=c.ref();c.watch(()=>u.value,x=>{x&&i("update:element",x)},{immediate:!0});const o=c.ref("");let l=Ms("",{},!1);c.watch(()=>o.value,x=>{i("update:modelValue",x)},{immediate:!0});const h=c.ref(),m=c.ref(),T=c.ref("");function b(x){console.log("选择",x),h.value=x}function N(x,M=""){if(M){const O=I(u.value,M);O?m.value=O:m.value=x}else m.value=x}function I(x,M){if(x.xpath===M)return x;if(x.children&&x.children.length)for(const O of x.children){const D=I(O,M);if(D)return D}}function y(x){var M,O,D,H;if(console.log(x,h.value),h.value)if(h.value.rule=x.rule,h.value.type=x.type,(M=x.rule)!=null&&M.isThemeColor?(x.attrs.class+="theme_color",x.attrs.style&&(x.attrs.style=void 0)):(console.log("e111",(O=x.attrs.class)==null?void 0:O.includes("theme_color")),(D=x.attrs.class)!=null&&D.includes("theme_color")&&(x.attrs.class=x.attrs.class.replace("theme_color"," "))),h.value.type===K.Block){const V=I(u.value,h.value.parentxpath||"");V&&V.children&&V.children.forEach(j=>{var ie;j.tag===h.value.tag&&(j.rule=x.rule,j.type=x.type,(ie=j.attrs.class)!=null&&ie.includes(" mb40 relative")||(j.attrs.class+=" mb40 relative"))})}else(H=h.value.attrs.class)!=null&&H.includes(" mb40 relative")&&(h.value.attrs.class=h.value.attrs.class.replace(" mb40 relative"," "))}function P(x){o.value=x}function $(x){l=Ms(x);const M=l("body").children().toArray().map(O=>B(l(O)));return o.value=l("body").html()||"",M[0]}function B(x,M=""){var j;function O(ie){if(!ie||!ie[0])return"";const se=[];let Fe=ie;for(;Fe.length&&Fe[0].tagName!=="html";){const mr=Fe[0].tagName,Bf=Fe.parent().children(mr).index(Fe)+1;se.unshift(`${mr}[${Bf}]`),Fe=Fe.parent()}return"/html/"+se.join("/")}const D=O(x).replace("/html/body[1]",""),H=x.children().toArray().map(ie=>B(l(ie),D)),V=(j=a.rules)==null?void 0:j.find(ie=>ie.xpath===D);return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:H,xpath:D,parentxpath:M,type:(V==null?void 0:V.type)||K.None,rule:(V==null?void 0:V.rule)||{}}}function q(x){console.log("更新子节点的文本",x);const M=I(u.value,x.element.xpath);M&&(M.editText=x.newText)}function F(x,M=""){function O(D,H){var ie;const j=(H?((ie=I(u.value,H))==null?void 0:ie.children)||[]:[u.value]).filter(se=>se.tag===D.tag).indexOf(D)+1;return`${H}/${D.tag}[${j}]`}x.xpath=O(x,M),x.parentxpath=M,(x.children||[]).forEach(D=>F(D,x.xpath))}function v({action:x,element:M,newBlock:O}){console.log("块操作",x,M,O);const D=I(u.value,M.parentxpath||"");if(!D||!D.children)return;const H=D.children.findIndex(se=>se===M);if(H===-1)return;const V=D.children.length,{minBlock:j,maxBlock:ie}=M.rule;if((x==="add"||x==="copy")&&V>=(ie||1/0)){T.value=`无法添加更多块。最大块数量为 ${ie}`,te.error(T.value);return}switch(x){case"add":if(O){const se={...O,xpath:"",children:JSON.parse(JSON.stringify(O.children))};D.children.splice(H+1,0,se)}break;case"copy":if(O){const se={...O,xpath:"",children:JSON.parse(JSON.stringify(O.children))};D.children.splice(H+1,0,se)}break;case"moveUp":if(H>0){const[se]=D.children.splice(H,1);D.children.splice(H-1,0,se)}break;case"moveDown":if(H<D.children.length-1){const[se]=D.children.splice(H,1);D.children.splice(H+1,0,se)}break;case"delete":if(V<=(j||0)){T.value=`无法删除更多块。最小块数量为 ${j}`,te.error(T.value);return}D.children.splice(H,1);break}T.value="",F(u.value)}function _(x,M){let O=M.attrs.class.replace(/icon-\S+/g,`icon-${x}`);M.attrs.class=O}function w(x,M){M.attrs.src=x}const G=c.ref(a.previewWidth),ue=c.ref(375);let me=c.ref(!1),Ne=c.ref(""),Oe=0,Ee=0;function Te(x){Ne.value=x,me.value=!0,Oe=event.clientX,Ee=G.value,window.addEventListener("mousemove",ae),window.addEventListener("mouseup",De)}function ae(x){if(!me.value)return;const M=x.clientX-Oe;Ne.value==="preview"?G.value=Math.max(200,Ee+M):Ne.value==="structure"&&(ue.value=Math.max(200,Ee-M))}function De(){me.value=!1,Ne.value="",window.removeEventListener("mousemove",ae),window.removeEventListener("mouseup",De)}return(x,M)=>(c.openBlock(),c.createElementBlock("div",Of,[c.createElementVNode("div",{class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:G.value+"px"})},[c.createElementVNode("div",Df,[M[1]||(M[1]=c.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),o.value?(c.openBlock(),c.createElementBlock("div",{key:0,innerHTML:o.value},null,8,Lf)):(c.openBlock(),c.createElementBlock("div",{key:1,innerHTML:c.unref(l)("body").html()},null,8,yf))])],4),c.createElementVNode("div",{class:"resizer",onMousedown:M[0]||(M[0]=O=>Te("preview"))},null,32),c.createElementVNode("div",Rf,[c.createElementVNode("div",Mf,[M[2]||(M[2]=c.createElementVNode("div",{class:"flex justify-between"},[c.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染")],-1)),T.value?(c.openBlock(),c.createElementBlock("div",Pf,c.toDisplayString(T.value),1)):c.createCommentVNode("",!0),u.value?(c.openBlock(),c.createBlock(Qh,{key:1,icons:x.icons,element:u.value,selectedElement:h.value,hoveredElement:m.value,onSelectElement:b,onHoverElement:N,onContentUpdated:P,onUpdateText:q,onBlockAction:v,onAddIcon:_,onUpload:w},null,8,["icons","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),r.value=="design"?(c.openBlock(),c.createElementBlock("div",kf,[c.createElementVNode("div",vf,[M[3]||(M[3]=c.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),h.value?(c.openBlock(),c.createBlock(xf,{key:0,element:h.value,onUpdateElement:y},null,8,["element"])):c.createCommentVNode("",!0)])])):c.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-b3574918"]]),wf={install(e){e.component("Designer",fr)}};He.Designer=fr,He.default=wf,Object.defineProperties(He,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});