gp-designer 1.0.6 → 1.0.7
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.
- package/README.md +1 -1
- package/dist/004.css +7 -1
- package/dist/gp-designer.es.js +2496 -2447
- package/dist/gp-designer.umd.js +6 -6
- package/dist/style.css +2 -7
- package/dist/types/components/Designer.vue.d.ts +64 -1
- package/package.json +1 -1
package/dist/gp-designer.umd.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(
|
1
|
+
(function(we,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(we=typeof globalThis<"u"?globalThis:we||self,l(we.GpWebModule={},we.Vue))})(this,function(we,l){"use strict";var he=(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))(he||{});const or=l.defineComponent({name:"CustomIcon",props:{iconName:{type:String,required:!0}},setup(e){return{iconClass:l.computed(()=>`${e.iconName}`)}}}),Na=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a};function cr(e,t,a,i,n,r){return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(`iconfont icon-${e.iconClass} text-4xl overflow-hidden flex justify-center items-center`)},null,2)}const lr=Na(or,[["render",cr]]),dr={key:0,contenteditable:"false",class:l.normalizeClass(["w-full h-[100vh] fixed top-0 left-0 flex justify-center items-center bg-[rgba(0,0,0,.7)] z-10"])},hr={class:"flex flex-col max-w-[600px] bg-white rounded-xl overflow-hidden"},fr={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},Er={class:"p-8 items-center justify-center flex flex-wrap h-[500px] overflow-y-auto"},mr=l.defineComponent({__name:"IconModal",emits:["ok"],setup(e,{expose:t,emit:a}){const i=a;function n(){const T=r(),p=/\.icon-([a-zA-Z0-9_-]+)/g;let _,C=[];for(;(_=p.exec(T))!==null;)C.push(_[1]);return C}function r(){const T=document.styleSheets;let p="";const _=T[0];try{const C=_.rules||_.cssRules;for(let L=0;L<C.length;L++)p+=C[L].cssText}catch(C){console.error("无法访问样式表内容",C)}return p}const u=l.ref(n()||[]),o=l.ref(!1);function c(){console.log(666),o.value=!0}function f(T){m(),i("ok",T)}function m(){o.value=!1}return t({openModal:c,closeModal:m}),(T,p)=>o.value?(l.openBlock(),l.createElementBlock("div",dr,[l.createElementVNode("div",hr,[l.createElementVNode("div",fr,[p[1]||(p[1]=l.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"选择图标",-1)),l.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:p[0]||(p[0]=l.withModifiers(_=>m(),["stop"]))})]),l.createElementVNode("div",Er,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,_=>(l.openBlock(),l.createBlock(lr,{key:_,class:"w-12 h-12 mx-1 mb-2 border cursor-pointer hover:border-gray-400 hover:bg-gray-200",iconName:_,onClick:l.withModifiers(C=>f(_),["stop"]),title:_},null,8,["iconName","onClick","title"]))),128))])])])):l.createCommentVNode("",!0)}});function Mi(e){return typeof e=="number"&&Number.isFinite(e)}const Tr=l.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=l.ref(),i=l.computed(()=>{const u={width:t.width,height:t.height};return Mi(t.width)&&(u.width+="px"),Mi(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)=>(l.openBlock(),l.createElementBlock("div",l.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]=l.withModifiers(()=>{},["stop"]))}),[l.createElementVNode("input",{onClick:o[0]||(o[0]=l.withModifiers(()=>{},["stop"])),contenteditable:"false",class:"cursor-pointer w-16 opacity-0",type:"file",ref_key:"fileInput",ref:a,onChange:o[1]||(o[1]=c=>n(c)),accept:"image/*"},null,544)],16))}});/*!
|
2
2
|
* Cropper.js v1.6.2
|
3
3
|
* https://fengyuanchen.github.io/cropperjs
|
4
4
|
*
|
@@ -6,12 +6,12 @@
|
|
6
6
|
* Released under the MIT license
|
7
7
|
*
|
8
8
|
* Date: 2024-04-21T07:43:05.335Z
|
9
|
-
*/function Pi(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 ki(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Pi(Object(a),!0).forEach(function(i){_r(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Pi(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}function pr(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 vi(e){var t=pr(e,"string");return typeof t=="symbol"?t:t+""}function
|
10
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Vt=typeof window<"u"&&typeof window.document<"u",Se=Vt?window:{},Ca=Vt&&Se.document.documentElement?"ontouchstart"in Se.document.documentElement:!1,Ia=Vt?"PointerEvent"in Se:!1,$="cropper",Sa="all",Ui="crop",Fi="move",Hi="zoom",We="e",Xe="w",tt="s",ve="n",Et="ne",mt="nw",Tt="se",pt="sw",xa="".concat($,"-crop"),Yi="".concat($,"-disabled"),he="".concat($,"-hidden"),Vi="".concat($,"-hide"),Sr="".concat($,"-invisible"),qt="".concat($,"-modal"),Oa="".concat($,"-move"),bt="".concat($,"Action"),Wt="".concat($,"Preview"),Da="crop",qi="move",Wi="none",La="crop",Ra="cropend",ya="cropmove",Ma="cropstart",Xi="dblclick",xr=Ca?"touchstart":"mousedown",Or=Ca?"touchmove":"mousemove",Dr=Ca?"touchend touchcancel":"mouseup",Gi=Ia?"pointerdown":xr,$i=Ia?"pointermove":Or,Qi=Ia?"pointerup pointercancel":Dr,ji="ready",Ki="resize",zi="wheel",Pa="zoom",Zi="image/jpeg",Lr=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Rr=/^data:/,yr=/^data:image\/jpeg;base64,/,Mr=/^img|canvas$/i,Ji=200,en=100,tn={viewMode:0,dragMode:Da,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:Ji,minContainerHeight:en,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Pr='<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>',kr=Number.isNaN||Se.isNaN;function F(e){return typeof e=="number"&&!kr(e)}var an=function(t){return t>0&&t<1/0};function ka(e){return typeof e>"u"}function Ge(e){return Aa(e)==="object"&&e!==null}var vr=Object.prototype.hasOwnProperty;function at(e){if(!Ge(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&vr.call(a,"isPrototypeOf")}catch{return!1}}function fe(e){return typeof e=="function"}var wr=Array.prototype.slice;function nn(e){return Array.from?Array.from(e):wr.call(e)}function ee(e,t){return e&&fe(t)&&(Array.isArray(e)||F(e.length)?nn(e).forEach(function(a,i){t.call(e,a,i,e)}):Ge(e)&&Object.keys(e).forEach(function(a){t.call(e,e[a],a,e)})),e}var Q=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 Ge(t)&&i.length>0&&i.forEach(function(r){Ge(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},Br=/\.\d*(?:0|9){12}\d*$/;function it(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Br.test(e)?Math.round(e*t)/t:e}var Ur=/^width|height|left|top|marginLeft|marginTop$/;function we(e,t){var a=e.style;ee(t,function(i,n){Ur.test(n)&&F(i)&&(i="".concat(i,"px")),a[n]=i})}function Fr(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function ae(e,t){if(t){if(F(e.length)){ee(e,function(i){ae(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 xe(e,t){if(t){if(F(e.length)){ee(e,function(a){xe(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function nt(e,t,a){if(t){if(F(e.length)){ee(e,function(i){nt(i,t,a)});return}a?ae(e,t):xe(e,t)}}var Hr=/([a-z\d])([A-Z])/g;function va(e){return e.replace(Hr,"$1-$2").toLowerCase()}function wa(e,t){return Ge(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(va(t)))}function gt(e,t,a){Ge(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(va(t)),a)}function Yr(e,t){if(Ge(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(va(t)))}var sn=/\s\s*/,rn=function(){var e=!1;if(Vt){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});Se.addEventListener("test",a,i),Se.removeEventListener("test",a,i)}return e}();function Ce(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sn).forEach(function(r){if(!rn){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 be(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sn).forEach(function(r){if(i.once&&!rn){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var f=arguments.length,E=new Array(f),T=0;T<f;T++)E[T]=arguments[T];a.apply(e,E)},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 st(e,t,a){var i;return fe(Event)&&fe(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 un(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Ba=Se.location,Vr=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function on(e){var t=e.match(Vr);return t!==null&&(t[1]!==Ba.protocol||t[2]!==Ba.hostname||t[3]!==Ba.port)}function cn(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function _t(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];F(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),F(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),F(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),F(a)&&a!==1&&u.push("scaleX(".concat(a,")")),F(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function qr(e){var t=ki({},e),a=0;return ee(e,function(i,n){delete t[n],ee(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),c=Math.abs(i.endX-r.endX),f=Math.abs(i.endY-r.endY),E=Math.sqrt(u*u+o*o),T=Math.sqrt(c*c+f*f),p=(T-E)/E;Math.abs(p)>Math.abs(a)&&(a=p)})}),a}function Xt(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:ki({startX:a,startY:i},n)}function Wr(e){var t=0,a=0,i=0;return ee(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 Be(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=an(i),u=an(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 Xr(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,c=t*r+a*u;return i>90?{width:c,height:o}:{width:o,height:c}}function Gr(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,c=o===void 0?0:o,f=t.scaleX,E=f===void 0?1:f,T=t.scaleY,p=T===void 0?1:T,A=a.aspectRatio,C=a.naturalWidth,L=a.naturalHeight,M=i.fillColor,V=M===void 0?"transparent":M,B=i.imageSmoothingEnabled,H=B===void 0?!0:B,x=i.imageSmoothingQuality,O=x===void 0?"low":x,g=i.maxWidth,D=g===void 0?1/0:g,P=i.maxHeight,q=P===void 0?1/0:P,Z=i.minWidth,z=Z===void 0?0:Z,G=i.minHeight,Ae=G===void 0?0:G,re=document.createElement("canvas"),le=re.getContext("2d"),Re=Be({aspectRatio:A,width:D,height:q}),ft=Be({aspectRatio:A,width:z,height:Ae},"cover"),v=Math.min(Re.width,Math.max(ft.width,C)),w=Math.min(Re.height,Math.max(ft.height,L)),ue=Be({aspectRatio:n,width:D,height:q}),J=Be({aspectRatio:n,width:z,height:Ae},"cover"),Ne=Math.min(ue.width,Math.max(J.width,r)),et=Math.min(ue.height,Math.max(J.height,u)),Yt=[-Ne/2,-et/2,Ne,et];return re.width=it(v),re.height=it(w),le.fillStyle=V,le.fillRect(0,0,v,w),le.save(),le.translate(v/2,w/2),le.rotate(c*Math.PI/180),le.scale(E,p),le.imageSmoothingEnabled=H,le.imageSmoothingQuality=O,le.drawImage.apply(le,[e].concat(Bi(Yt.map(function(Ri){return Math.floor(it(Ri))})))),le.restore(),re}var ln=String.fromCharCode;function $r(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=ln(e.getUint8(n));return i}var Qr=/^data:.*,/;function jr(e){var t=e.replace(Qr,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return ee(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function Kr(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(ln.apply(null,nn(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function zr(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 c=n+4,f=n+10;if($r(t,c,4)==="Exif"){var E=t.getUint16(f);if(i=E===18761,(i||E===19789)&&t.getUint16(f+2,i)===42){var T=t.getUint32(f+4,i);T>=8&&(r=f+T)}}}if(r){var p=t.getUint16(r,i),A,C;for(C=0;C<p;C+=1)if(A=r+C*12+2,t.getUint16(A,i)===274){A+=8,a=t.getUint16(A,i),t.setUint16(A,1,i);break}}}catch{a=1}return a}function Zr(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 Jr={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);ae(n,he),xe(t,he);var o={width:Math.max(i.offsetWidth,r>=0?r:Ji),height:Math.max(i.offsetHeight,u>=0?u:en)};this.containerData=o,we(n,{width:o.width,height:o.height}),ae(t,he),xe(n,he)},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,c=t.width,f=t.height;t.height*o>t.width?i===3?c=t.height*o:f=t.width/o:i===3?f=t.width/o:c=t.height*o;var E={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:c,height:f};this.canvasData=E,this.limited=i===1||i===2,this.limitCanvas(!0,!0),E.width=Math.min(Math.max(E.width,E.minWidth),E.maxWidth),E.height=Math.min(Math.max(E.height,E.minHeight),E.maxHeight),E.left=(t.width-E.width)/2,E.top=(t.height-E.height)/2,E.oldLeft=E.left,E.oldTop=E.top,this.initialCanvasData=Q({},E)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=i.viewMode,c=r.aspectRatio,f=this.cropped&&u;if(t){var E=Number(i.minCanvasWidth)||0,T=Number(i.minCanvasHeight)||0;o>1?(E=Math.max(E,n.width),T=Math.max(T,n.height),o===3&&(T*c>E?E=T*c:T=E/c)):o>0&&(E?E=Math.max(E,f?u.width:0):T?T=Math.max(T,f?u.height:0):f&&(E=u.width,T=u.height,T*c>E?E=T*c:T=E/c));var p=Be({aspectRatio:c,width:E,height:T});E=p.width,T=p.height,r.minWidth=E,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(f?0:1)){var A=n.width-r.width,C=n.height-r.height;r.minLeft=Math.min(0,A),r.minTop=Math.min(0,C),r.maxLeft=Math.max(0,A),r.maxTop=Math.max(0,C),f&&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,A),r.maxLeft=Math.max(0,A)),r.height>=n.height&&(r.minTop=Math.min(0,C),r.maxTop=Math.max(0,C))))}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=Xr({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,c=i.width*(u/i.naturalWidth),f=i.height*(o/i.naturalHeight);i.left-=(c-i.width)/2,i.top-=(f-i.height)/2,i.width=c,i.height=f,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,we(this.canvas,Q({width:i.width,height:i.height},_t({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);Q(i,{width:n,height:r,left:(a.width-n)/2,top:(a.height-r)/2}),we(this.image,Q({width:i.width,height:i.height},_t(Q({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=Q({},r)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,r=this.canvasData,u=this.cropBoxData,o=this.limited,c=i.aspectRatio;if(t){var f=Number(i.minCropBoxWidth)||0,E=Number(i.minCropBoxHeight)||0,T=o?Math.min(n.width,r.width,r.width+r.left,n.width-r.left):n.width,p=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;f=Math.min(f,n.width),E=Math.min(E,n.height),c&&(f&&E?E*c>f?E=f/c:f=E*c:f?E=f/c:E&&(f=E*c),p*c>T?p=T/c:T=p*c),u.minWidth=Math.min(f,T),u.minHeight=Math.min(E,p),u.maxWidth=T,u.maxHeight=p}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&>(this.face,bt,i.width>=a.width&&i.height>=a.height?Fi:Sa),we(this.cropBox,Q({width:i.width,height:i.height},_t({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),st(this.element,La,this.getData())}},eu={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,ee(o,function(c){var f=document.createElement("img");gt(c,Wt,{width:c.offsetWidth,height:c.offsetHeight,html:c.innerHTML}),a&&(f.crossOrigin=a),f.src=n,f.alt=r,f.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;"',c.innerHTML="",c.appendChild(f)})}},resetPreview:function(){ee(this.previews,function(t){var a=wa(t,Wt);we(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Yr(t,Wt)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,c=i.left-a.left-t.left,f=i.top-a.top-t.top;!this.cropped||this.disabled||(we(this.viewBoxImage,Q({width:u,height:o},_t(Q({translateX:-c,translateY:-f},t)))),ee(this.previews,function(E){var T=wa(E,Wt),p=T.width,A=T.height,C=p,L=A,M=1;n&&(M=p/n,L=r*M),r&&L>A&&(M=A/r,C=n*M,L=A),we(E,{width:C,height:L}),we(E.getElementsByTagName("img")[0],Q({width:u*M,height:o*M},_t(Q({translateX:-c*M,translateY:-f*M},t))))}))}},tu={bind:function(){var t=this.element,a=this.options,i=this.cropper;fe(a.cropstart)&&be(t,Ma,a.cropstart),fe(a.cropmove)&&be(t,ya,a.cropmove),fe(a.cropend)&&be(t,Ra,a.cropend),fe(a.crop)&&be(t,La,a.crop),fe(a.zoom)&&be(t,Pa,a.zoom),be(i,Gi,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&be(i,zi,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&be(i,Xi,this.onDblclick=this.dblclick.bind(this)),be(t.ownerDocument,$i,this.onCropMove=this.cropMove.bind(this)),be(t.ownerDocument,Qi,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&be(window,Ki,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;fe(a.cropstart)&&Ce(t,Ma,a.cropstart),fe(a.cropmove)&&Ce(t,ya,a.cropmove),fe(a.cropend)&&Ce(t,Ra,a.cropend),fe(a.crop)&&Ce(t,La,a.crop),fe(a.zoom)&&Ce(t,Pa,a.zoom),Ce(i,Gi,this.onCropStart),a.zoomable&&a.zoomOnWheel&&Ce(i,zi,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&Ce(i,Xi,this.onDblclick),Ce(t.ownerDocument,$i,this.onCropMove),Ce(t.ownerDocument,Qi,this.onCropEnd),a.responsive&&Ce(window,Ki,this.onResize)}},au={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,c;t.restore&&(o=this.getCanvasData(),c=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ee(o,function(f,E){o[E]=f*u})),this.setCropBoxData(ee(c,function(f,E){c[E]=f*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===Wi||this.setDragMode(Fr(this.dragBox,xa)?qi:Da)},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")&&(F(a)&&a!==1||F(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ee(t.changedTouches,function(o){r[o.identifier]=Xt(o)}):r[t.pointerId||0]=Xt(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=Hi:u=wa(t.target,bt),Lr.test(u)&&st(this.element,Ma,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Ui&&(this.cropping=!0,ae(this.dragBox,qt)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),st(this.element,ya,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ee(t.changedTouches,function(n){Q(i[n.identifier]||{},Xt(n,!0))}):Q(i[t.pointerId||0]||{},Xt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?ee(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,nt(this.dragBox,qt,this.cropped&&this.options.modal)),st(this.element,Ra,{originalEvent:t,action:a}))}}},iu={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,c=a.aspectRatio,f=r.left,E=r.top,T=r.width,p=r.height,A=f+T,C=E+p,L=0,M=0,V=n.width,B=n.height,H=!0,x;!c&&t.shiftKey&&(c=T&&p?T/p:1),this.limited&&(L=r.minLeft,M=r.minTop,V=L+Math.min(n.width,i.width,i.left+i.width),B=M+Math.min(n.height,i.height,i.top+i.height));var O=u[Object.keys(u)[0]],g={x:O.endX-O.startX,y:O.endY-O.startY},D=function(q){switch(q){case We:A+g.x>V&&(g.x=V-A);break;case Xe:f+g.x<L&&(g.x=L-f);break;case ve:E+g.y<M&&(g.y=M-E);break;case tt:C+g.y>B&&(g.y=B-C);break}};switch(o){case Sa:f+=g.x,E+=g.y;break;case We:if(g.x>=0&&(A>=V||c&&(E<=M||C>=B))){H=!1;break}D(We),T+=g.x,T<0&&(o=Xe,T=-T,f-=T),c&&(p=T/c,E+=(r.height-p)/2);break;case ve:if(g.y<=0&&(E<=M||c&&(f<=L||A>=V))){H=!1;break}D(ve),p-=g.y,E+=g.y,p<0&&(o=tt,p=-p,E-=p),c&&(T=p*c,f+=(r.width-T)/2);break;case Xe:if(g.x<=0&&(f<=L||c&&(E<=M||C>=B))){H=!1;break}D(Xe),T-=g.x,f+=g.x,T<0&&(o=We,T=-T,f-=T),c&&(p=T/c,E+=(r.height-p)/2);break;case tt:if(g.y>=0&&(C>=B||c&&(f<=L||A>=V))){H=!1;break}D(tt),p+=g.y,p<0&&(o=ve,p=-p,E-=p),c&&(T=p*c,f+=(r.width-T)/2);break;case Et:if(c){if(g.y<=0&&(E<=M||A>=V)){H=!1;break}D(ve),p-=g.y,E+=g.y,T=p*c}else D(ve),D(We),g.x>=0?A<V?T+=g.x:g.y<=0&&E<=M&&(H=!1):T+=g.x,g.y<=0?E>M&&(p-=g.y,E+=g.y):(p-=g.y,E+=g.y);T<0&&p<0?(o=pt,p=-p,T=-T,E-=p,f-=T):T<0?(o=mt,T=-T,f-=T):p<0&&(o=Tt,p=-p,E-=p);break;case mt:if(c){if(g.y<=0&&(E<=M||f<=L)){H=!1;break}D(ve),p-=g.y,E+=g.y,T=p*c,f+=r.width-T}else D(ve),D(Xe),g.x<=0?f>L?(T-=g.x,f+=g.x):g.y<=0&&E<=M&&(H=!1):(T-=g.x,f+=g.x),g.y<=0?E>M&&(p-=g.y,E+=g.y):(p-=g.y,E+=g.y);T<0&&p<0?(o=Tt,p=-p,T=-T,E-=p,f-=T):T<0?(o=Et,T=-T,f-=T):p<0&&(o=pt,p=-p,E-=p);break;case pt:if(c){if(g.x<=0&&(f<=L||C>=B)){H=!1;break}D(Xe),T-=g.x,f+=g.x,p=T/c}else D(tt),D(Xe),g.x<=0?f>L?(T-=g.x,f+=g.x):g.y>=0&&C>=B&&(H=!1):(T-=g.x,f+=g.x),g.y>=0?C<B&&(p+=g.y):p+=g.y;T<0&&p<0?(o=Et,p=-p,T=-T,E-=p,f-=T):T<0?(o=Tt,T=-T,f-=T):p<0&&(o=mt,p=-p,E-=p);break;case Tt:if(c){if(g.x>=0&&(A>=V||C>=B)){H=!1;break}D(We),T+=g.x,p=T/c}else D(tt),D(We),g.x>=0?A<V?T+=g.x:g.y>=0&&C>=B&&(H=!1):T+=g.x,g.y>=0?C<B&&(p+=g.y):p+=g.y;T<0&&p<0?(o=mt,p=-p,T=-T,E-=p,f-=T):T<0?(o=pt,T=-T,f-=T):p<0&&(o=Et,p=-p,E-=p);break;case Fi:this.move(g.x,g.y),H=!1;break;case Hi:this.zoom(qr(u),t),H=!1;break;case Ui:if(!g.x||!g.y){H=!1;break}x=un(this.cropper),f=O.startX-x.left,E=O.startY-x.top,T=r.minWidth,p=r.minHeight,g.x>0?o=g.y>0?Tt:Et:g.x<0&&(f-=T,o=g.y>0?pt:mt),g.y<0&&(E-=p),this.cropped||(xe(this.cropBox,he),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}H&&(r.width=T,r.height=p,r.left=f,r.top=E,this.action=o,this.renderCropBox()),ee(u,function(P){P.startX=P.endX,P.startY=P.endY})}},nu={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ae(this.dragBox,qt),xe(this.cropBox,he),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Q({},this.initialImageData),this.canvasData=Q({},this.initialCanvasData),this.cropBoxData=Q({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Q(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),xe(this.dragBox,qt),ae(this.cropBox,he)),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,ee(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,xe(this.cropper,Yi)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ae(this.cropper,Yi)),this},destroy:function(){var t=this.element;return t[$]?(t[$]=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(ka(t)?t:n+Number(t),ka(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&&(F(t)&&(i.left=t,n=!0),F(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,c=r.naturalWidth,f=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var E=c*t,T=f*t;if(st(this.element,Pa,{ratio:t,oldRatio:u/c,originalEvent:i})===!1)return this;if(i){var p=this.pointers,A=un(this.cropper),C=p&&Object.keys(p).length?Wr(p):{pageX:i.pageX,pageY:i.pageY};r.left-=(E-u)*((C.pageX-A.left-r.left)/u),r.top-=(T-o)*((C.pageY-A.top-r.top)/o)}else at(a)&&F(a.x)&&F(a.y)?(r.left-=(E-u)*((a.x-r.left)/u),r.top-=(T-o)*((a.y-r.top)/o)):(r.left-=(E-u)/2,r.top-=(T-o)/2);r.width=E,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),F(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,F(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(F(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&&(F(t)&&(i.scaleX=t,n=!0),F(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(ee(u,function(E,T){u[T]=E/o}),t){var c=Math.round(u.y+u.height),f=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=f-u.x,u.height=c-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&&at(t)){var u=!1;a.rotatable&&F(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(F(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),F(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;F(t.x)&&(r.left=t.x*o+n.left),F(t.y)&&(r.top=t.y*o+n.top),F(t.width)&&(r.width=t.width*o),F(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?Q({},this.containerData):{}},getImageData:function(){return this.sized?Q({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&ee(["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&&at(t)&&(F(t.left)&&(a.left=t.left),F(t.top)&&(a.top=t.top),F(t.width)?(a.width=t.width,a.height=t.width/i):F(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&&at(t)&&(F(t.left)&&(a.left=t.left),F(t.top)&&(a.top=t.top),F(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),F(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=Gr(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,c=n.height,f=i.width/Math.floor(a.naturalWidth);f!==1&&(r*=f,u*=f,o*=f,c*=f);var E=o/c,T=Be({aspectRatio:E,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Be({aspectRatio:E,width:t.minWidth||0,height:t.minHeight||0},"cover"),A=Be({aspectRatio:E,width:t.width||(f!==1?i.width:o),height:t.height||(f!==1?i.height:c)}),C=A.width,L=A.height;C=Math.min(T.width,Math.max(p.width,C)),L=Math.min(T.height,Math.max(p.height,L));var M=document.createElement("canvas"),V=M.getContext("2d");M.width=it(C),M.height=it(L),V.fillStyle=t.fillColor||"transparent",V.fillRect(0,0,C,L);var B=t.imageSmoothingEnabled,H=B===void 0?!0:B,x=t.imageSmoothingQuality;V.imageSmoothingEnabled=H,x&&(V.imageSmoothingQuality=x);var O=i.width,g=i.height,D=r,P=u,q,Z,z,G,Ae,re;D<=-o||D>O?(D=0,q=0,z=0,Ae=0):D<=0?(z=-D,D=0,q=Math.min(O,o+D),Ae=q):D<=O&&(z=0,q=Math.min(o,O-D),Ae=q),q<=0||P<=-c||P>g?(P=0,Z=0,G=0,re=0):P<=0?(G=-P,P=0,Z=Math.min(g,c+P),re=Z):P<=g&&(G=0,Z=Math.min(c,g-P),re=Z);var le=[D,P,q,Z];if(Ae>0&&re>0){var Re=C/o;le.push(z*Re,G*Re,Ae*Re,re*Re)}return V.drawImage.apply(V,[i].concat(Bi(le.map(function(ft){return Math.floor(it(ft))})))),M},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!ka(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===Da,u=a.movable&&t===qi;t=r||u?t:Wi,a.dragMode=t,gt(i,bt,t),nt(i,xa,r),nt(i,Oa,u),a.cropBoxMovable||(gt(n,bt,t),nt(n,xa,r),nt(n,Oa,u))}return this}},su=Se.Cropper,dn=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(br(this,e),!t||!Mr.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=Q({},tn,at(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 gr(e,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[$]){if(a[$]=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(Rr.test(a)){yr.test(a)?this.read(jr(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")!==Zi&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&on(a)&&n.crossOrigin&&(a=cn(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=zr(a),u=0,o=1,c=1;if(r>1){this.url=Kr(a,Zi);var f=Zr(r);u=f.rotate,o=f.scaleX,c=f.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=c),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&on(i)&&(n||(n="anonymous"),r=cn(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),ae(u,Vi),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=Se.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(Se.navigator.userAgent),r=function(f,E){Q(a.imageData,{naturalWidth:f,naturalHeight:E,aspectRatio:f/E}),a.initialImageData=Q({},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=Pr;var o=u.querySelector(".".concat($,"-container")),c=o.querySelector(".".concat($,"-canvas")),f=o.querySelector(".".concat($,"-drag-box")),E=o.querySelector(".".concat($,"-crop-box")),T=E.querySelector(".".concat($,"-face"));this.container=r,this.cropper=o,this.canvas=c,this.dragBox=f,this.cropBox=E,this.viewBox=o.querySelector(".".concat($,"-view-box")),this.face=T,c.appendChild(n),ae(a,he),r.insertBefore(o,a.nextSibling),xe(n,Vi),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,ae(E,he),i.guides||ae(E.getElementsByClassName("".concat($,"-dashed")),he),i.center||ae(E.getElementsByClassName("".concat($,"-center")),he),i.background&&ae(o,"".concat($,"-bg")),i.highlight||ae(T,Sr),i.cropBoxMovable&&(ae(T,Oa),gt(T,bt,Sa)),i.cropBoxResizable||(ae(E.getElementsByClassName("".concat($,"-line")),he),ae(E.getElementsByClassName("".concat($,"-point")),he)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),fe(i.ready)&&be(a,ji,i.ready,{once:!0}),st(a,ji)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),xe(this.element,he)}}},{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=su,e}},{key:"setDefaults",value:function(a){Q(tn,at(a)&&a)}}])}();Q(dn.prototype,Jr,eu,tu,au,iu,nu);function ru(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 uu={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"},ou={class:"w-[700px] flex flex-col bg-white rounded pb-8"},cu={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},lu={class:"flex flex-col h-full"},du={class:"flex flex-row justify-center items-start flex-1"},hu={class:"flex flex-col items-start flex-1"},fu={class:"flex flex-col w-full px-6 py-4"},Eu={class:"flex flex-col w-full"},mu={class:"flex flex-row items-center"},Tu={class:"relative bg-[#474AFF] text-white rounded p-3"},pu={class:"flex flex-row items-start justify-between mt-3"},bu={class:"flex flex-col"},gu={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},_u={key:0,class:"w-full text-center"},Au=["src"],Nu={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Cu={class:"text-[#999] mt-05 flex justify-center mt-4"},Iu={class:"w-full flex justify-end space-x-5 mt-5 px-6"},Su=["loading"],xu=l.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=l.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=l.ref(),u=l.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=l.ref(!1),c=l.ref({afterImg:"",image:null,myCropper:null}),f=l.ref("image/jpeg"),E=x=>{console.log(x);const O=x.target.files[0];if(O){O.name&&(n.value.inputValue=O.name);const g=new FileReader;g.onload=D=>{var P,q;console.log("e?.target?.result",(P=D==null?void 0:D.target)==null?void 0:P.result),T((q=D==null?void 0:D.target)==null?void 0:q.result)},g.readAsDataURL(O)}};async function T(x){if(!x)return;await H();const O=x;c.value.image=O,c.value.image&&p()}function p(){const x=document.querySelector("#imgId");x&&x.addEventListener("load",()=>{B(),c.value.myCropper=new dn(x,u.value)})}const A=l.ref(!1);function C(x,O,g){r.value=x,x&&x.aspectRatio&&(u.value.aspectRatio=x.aspectRatio),g&&(n.value.inputValue=g),A.value=!0,O&&T(O)}function L(){A.value=!1}const M=()=>{var O,g;if(!c.value.myCropper)return;o.value=!0,c.value.afterImg=c.value.myCropper.getCroppedCanvas({height:(O=r.value)==null?void 0:O.height,imageSmoothingQuality:"high",width:(g=r.value)==null?void 0:g.width}).toDataURL(f.value);const x=ru(c.value.afterImg,n.value.inputValue);i("ok",x),o.value=!1,H(),B(),L()};function V(){H(),B(),L(),i("cancel")}function B(){c.value.myCropper&&c.value.myCropper.destroy()}function H(){c.value.image=""}return t({handleCloseCropper:L,handleOpenCropper:C}),(x,O)=>{var g,D,P;return A.value?(l.openBlock(),l.createElementBlock("div",uu,[l.createElementVNode("div",ou,[l.createElementVNode("div",cu,[O[1]||(O[1]=l.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),l.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:l.withModifiers(V,["stop"])})]),l.createElementVNode("div",lu,[l.createElementVNode("div",du,[l.createElementVNode("div",hu,[l.createElementVNode("div",fu,[l.createElementVNode("div",Eu,[l.createElementVNode("div",mu,[l.createElementVNode("div",Tu,[l.createElementVNode("input",{type:"file",accept:"image/*",onClick:O[0]||(O[0]=l.withModifiers(()=>{},["stop"])),contenteditable:"false",ref:"fileInput",onChange:E,class:"absolute top-0 left-0 w-[110px] h-[40px] opacity-0 cursor-pointer"},null,544),O[2]||(O[2]=l.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),O[3]||(O[3]=l.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),l.createElementVNode("div",pu,[l.createElementVNode("div",bu,[l.createElementVNode("div",gu,[c.value.image?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",_u," 请上传图片 ")),l.createElementVNode("img",{id:"imgId",src:c.value.image,style:{width:"300px"}},null,8,Au)])]),l.createElementVNode("div",Nu,[O[4]||(O[4]=l.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),l.createElementVNode("div",Cu," 预览画像 "+l.toDisplayString(((g=r.value)==null?void 0:g.width)||"")+" "+l.toDisplayString((D=r.value)!=null&&D.width?"x":"")+" "+l.toDisplayString(((P=r.value)==null?void 0:P.height)||""),1)])])])])])]),l.createElementVNode("div",Iu,[l.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:M}," 确认 ",8,Su),l.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:V},"取消")])])])])):l.createCommentVNode("",!0)}}}),Ou={key:0,"date-action":"1",class:"aidition",contenteditable:"false"},Du={class:"aidition_left"},Lu={class:"aidition_right"},Ru={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},yu=yi(l.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=l.computed(()=>a.selectedElement===a.element),r=l.computed(()=>a.hoveredElement===a.element),u=l.ref(!1),o=l.ref(!1),c=l.ref(""),f=l.computed(()=>a.element.rule.minText||0),E=l.computed(()=>a.element.rule.maxText||1/0),T=l.ref();function p(v){v.xpath!="/div[1]"&&(u.value=!0,i("selectElement",v))}function A(v){i("selectElement",v)}function C(v,w){i("hoverElement",v,w)}function L(v){i("hoverElement",v)}function M(v){v.currentTarget.contains(v.relatedTarget)?i("hoverElement",null):a.hoveredElement?i("hoverElement",null,a.hoveredElement.parentxpath):i("hoverElement",null)}function V(){u.value=!1,i("contentUpdated",B())}function B(){function v(w){const ue=Object.entries(w.attrs||{}).map(([Yt,Ri])=>`${Yt}="${Ri}"`).join(" "),J=`<${w.tag}${ue?" "+ue:""}>`,Ne=`</${w.tag}>`,et=(w.children||[]).map(Yt=>v(Yt)).join("");return`${J}${w.editText||w.text||""}${et}${Ne}`}return v(a.element)}function H(v){var J;v.stopPropagation();const w=v.target,ue=((J=w.firstChild)==null?void 0:J.nodeType)===Node.TEXT_NODE&&w.firstChild.nodeValue||"";if(ue.length<f.value){o.value=!0,c.value=`最少输入 ${f.value} 个字符`;return}else if(ue.length>E.value){o.value=!0,c.value=`最多输入 ${E.value} 个字符`;return}else o.value=!1,c.value="";a.element.editText=ue,i("updateText",{element:a.element,newText:ue}),i("contentUpdated",B())}function x(v){i("updateText",v),i("contentUpdated",B())}function O(){const v={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:v})}function g(){i("blockAction",{action:"moveUp",element:a.element})}function D(){i("blockAction",{action:"moveDown",element:a.element})}function P(){i("blockAction",{action:"delete",element:a.element})}function q(v){i("blockAction",v),i("contentUpdated",B())}function Z(v){i("addIcon",v,a.element),i("contentUpdated",B())}function z(v,w){i("addIcon",v,w),i("contentUpdated",B())}let G;const Ae=l.ref(),re=l.ref({});function le(v,w){if(w.rule.minImageWidth&&w.rule.maxImageHeight?(re.value.width=w.rule.minImageWidth,re.value.height=w.rule.maxImageHeight,re.value.aspectRatio=w.rule.minImageWidth/w.rule.maxImageHeight):re.value={},v){v.name;const ue=new FileReader;ue.onload=J=>{var Ne;G=(Ne=J==null?void 0:J.target)==null?void 0:Ne.result,Ae.value.handleOpenCropper(re.value,G,v.name)},ue.readAsDataURL(v)}}function Re(v,w){if(console.log(typeof v=="object",v),v)if(typeof v=="object"){w.attrs.alt=v.name;const ue=new FileReader;ue.onload=J=>{var et;let Ne=(et=J==null?void 0:J.target)==null?void 0:et.result;w.attrs.src=Ne,i("upload",Ne,w),i("contentUpdated",B())},ue.readAsDataURL(v)}else w.attrs.src=v,i("upload",v,w),i("contentUpdated",B())}const ft=async v=>{};return(v,w)=>{const ue=l.resolveComponent("ElementRenderer",!0);return l.openBlock(),l.createElementBlock(l.Fragment,null,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.element.tag),l.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.attrs,{contenteditable:u.value,onClick:w[1]||(w[1]=l.withModifiers(()=>p(a.element),["stop"])),onMouseenter:w[2]||(w[2]=()=>L(a.element)),onMouseleave:M,onBlur:V,onInput:H}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[a.element.type===l.unref(de).Block?(l.openBlock(),l.createElementBlock("div",Ou,[l.createElementVNode("span",Du,l.toDisplayString(a.element.editText||a.element.text),1),l.createElementVNode("div",Lu,[l.createElementVNode("span",{onClick:l.withModifiers(g,["stop"])},"排前"),l.createElementVNode("span",{onClick:l.withModifiers(D,["stop"])},"排后"),l.createElementVNode("span",{onClick:l.withModifiers(P,["stop"])},"删除")])])):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.element.children,(J,Ne)=>(l.openBlock(),l.createBlock(ue,{key:Ne,element:J,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:A,onHoverElement:C,onUpdateText:x,onBlockAction:q,onAddIcon:z,onUpload:Re},null,8,["element","selectedElement","hoveredElement"]))),128)),a.element.type===l.unref(de).Block?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:l.withModifiers(O,["stop"]),contenteditable:"false"}),l.createElementVNode("div",{class:"add_modules",onClick:l.withModifiers(O,["stop"]),contenteditable:"false"},w[5]||(w[5]=[l.createElementVNode("span",{class:"iconfont icon-a-tianjiamian"},null,-1),l.createElementVNode("span",null,"添加模块",-1)])),l.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:w[0]||(w[0]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("span",{onClick:l.withModifiers(g,["stop"]),class:"iconfont icon-paiqian"}),l.createElementVNode("span",{onClick:l.withModifiers(D,["stop"]),class:"iconfont icon-paihou"}),l.createElementVNode("span",{onClick:l.withModifiers(P,["stop"]),class:"iconfont icon-shanchu"}),l.createElementVNode("span",{onClick:l.withModifiers(O,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==l.unref(de).Text&&o.value?(l.openBlock(),l.createElementBlock("div",Ru,l.toDisplayString(c.value),1)):l.createCommentVNode("",!0),a.element.type===l.unref(de).Image?(l.openBlock(),l.createElementBlock("div",{key:1,class:"absolute top-0 right-0 bg-white rounded shadow z-10 py-0.5 px-1",onClick:w[3]||(w[3]=l.withModifiers(()=>{},["stop"]))},[w[6]||(w[6]=l.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),l.createVNode(Tr,{customUpload:J=>le(J,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:ft},null,8,["customUpload","height","width"])])):l.createCommentVNode("",!0),l.createVNode(mr,{ref_key:"iconRef",ref:T,onOk:Z},null,512),l.createVNode(xu,{ref_key:"cropperRef",ref:Ae,onOk:w[4]||(w[4]=J=>Re(J,a.element))},null,512)],64)}}}),[["__scopeId","data-v-6d87a1e6"]]),Mu={key:0},Pu={key:0},ku={key:1},vu={key:2},wu={key:3},Bu={key:4},Uu={key:5},Fu={key:6},Hu={key:7},Yu=l.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=l.ref({rule:{},...a.element});l.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){i("updateElement",n.value)}return(u,o)=>(l.openBlock(),l.createElementBlock("div",null,[n.value?(l.openBlock(),l.createElementBlock("div",Mu,[n.value.text!==void 0?(l.openBlock(),l.createElementBlock("div",Pu,[o[12]||(o[12]=l.createElementVNode("label",{class:"block mt-4"},"内容",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=c=>n.value.text=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.text]])])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[o[13]||(o[13]=l.createElementVNode("label",{class:"block mt-4"},"节点",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=c=>n.value.xpath=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.xpath]])]),l.createElementVNode("div",null,[o[15]||(o[15]=l.createElementVNode("label",{class:"block mt-4"},"节点类型",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[2]||(o[2]=c=>n.value.type=c),class:"border rounded p-2 w-full"},o[14]||(o[14]=[l.createElementVNode("option",{value:0},"无",-1),l.createElementVNode("option",{value:1},"文本",-1),l.createElementVNode("option",{value:2},"图片",-1),l.createElementVNode("option",{value:3},"视频",-1),l.createElementVNode("option",{value:4},"图标",-1),l.createElementVNode("option",{value:5},"链接",-1),l.createElementVNode("option",{value:10},"块",-1)]),512),[[l.vModelSelect,n.value.type]])]),n.value.type==l.unref(de).Text?(l.openBlock(),l.createElementBlock("div",ku,[o[16]||(o[16]=l.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=c=>n.value.rule.maxText=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxText]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Text?(l.openBlock(),l.createElementBlock("div",vu,[o[17]||(o[17]=l.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=c=>n.value.rule.minText=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minText]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Image?(l.openBlock(),l.createElementBlock("div",wu,[o[18]||(o[18]=l.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=c=>n.value.rule.minImageWidth=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minImageWidth]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Image?(l.openBlock(),l.createElementBlock("div",Bu,[o[19]||(o[19]=l.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=c=>n.value.rule.maxImageHeight=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxImageHeight]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Block?(l.openBlock(),l.createElementBlock("div",Uu,[o[20]||(o[20]=l.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=c=>n.value.rule.minBlock=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minBlock]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Block?(l.openBlock(),l.createElementBlock("div",Fu,[o[21]||(o[21]=l.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[8]||(o[8]=c=>n.value.rule.maxBlock=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxBlock]])])):l.createCommentVNode("",!0),n.value.type==l.unref(de).Text||n.value.type==l.unref(de).Icon?(l.openBlock(),l.createElementBlock("div",Hu,[o[23]||(o[23]=l.createElementVNode("label",{class:"block mt-4"},"颜色/主题色",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[9]||(o[9]=c=>n.value.rule.isThemeColor=c),class:"border rounded p-2 w-full"},o[22]||(o[22]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isThemeColor]])])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[o[25]||(o[25]=l.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[10]||(o[10]=c=>n.value.rule.isRequired=c),class:"border rounded p-2 w-full"},o[24]||(o[24]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isRequired]])]),l.createElementVNode("div",null,[o[27]||(o[27]=l.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[11]||(o[11]=c=>n.value.rule.isReadOnly=c),class:"border rounded p-2 w-full"},o[26]||(o[26]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isReadOnly]])])])):l.createCommentVNode("",!0),l.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-blue-500 text-white rounded"},"保存")]))}});var W;(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"})(W||(W={}));function Vu(e){return e.type===W.Tag||e.type===W.Script||e.type===W.Style}const qu=W.Root,Wu=W.Text,Xu=W.Directive,Gu=W.Comment,$u=W.Script,Qu=W.Style,ju=W.Tag,Ku=W.CDATA,zu=W.Doctype;let hn=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 Nt(this,t)}};class Ua extends hn{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class At extends Ua{constructor(){super(...arguments),this.type=W.Text}get nodeType(){return 3}}class Fa extends Ua{constructor(){super(...arguments),this.type=W.Comment}get nodeType(){return 8}}class Ha extends Ua{constructor(t,a){super(a),this.name=t,this.type=W.Directive}get nodeType(){return 1}}class Ya extends hn{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 fn extends Ya{constructor(){super(...arguments),this.type=W.CDATA}get nodeType(){return 4}}class $e extends Ya{constructor(){super(...arguments),this.type=W.Root}get nodeType(){return 9}}class Va extends Ya{constructor(t,a,i=[],n=t==="script"?W.Script:t==="style"?W.Style:W.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 Vu(e)}function Gt(e){return e.type===W.CDATA}function Oe(e){return e.type===W.Text}function $t(e){return e.type===W.Comment}function qa(e){return e.type===W.Directive}function Ue(e){return e.type===W.Root}function ie(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Nt(e,t=!1){let a;if(Oe(e))a=new At(e.data);else if($t(e))a=new Fa(e.data);else if(k(e)){const i=t?Wa(e.children):[],n=new Va(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(Gt(e)){const i=t?Wa(e.children):[],n=new fn(i);i.forEach(r=>r.parent=n),a=n}else if(Ue(e)){const i=t?Wa(e.children):[],n=new $e(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(qa(e)){const i=new Ha(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 Wa(e){const t=e.map(a=>Nt(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 En={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Zu{constructor(t,a,i){this.dom=[],this.root=new $e(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=En),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??En,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new $e(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?W.Tag:void 0,n=new Va(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===W.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new At(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===W.Comment){this.lastNode.data+=t;return}const a=new Fa(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new At(""),a=new fn([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new Ha(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 Xa=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),mn=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ga;const Ju=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]]),$a=(Ga=String.fromCodePoint)!==null&&Ga!==void 0?Ga: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 eo(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ju.get(e))!==null&&t!==void 0?t:e}var ne;(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"})(ne||(ne={}));const to=32;var Fe;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fe||(Fe={}));function Qa(e){return e>=ne.ZERO&&e<=ne.NINE}function ao(e){return e>=ne.UPPER_A&&e<=ne.UPPER_F||e>=ne.LOWER_A&&e<=ne.LOWER_F}function io(e){return e>=ne.UPPER_A&&e<=ne.UPPER_Z||e>=ne.LOWER_A&&e<=ne.LOWER_Z||Qa(e)}function no(e){return e===ne.EQUALS||io(e)}var se;(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"})(se||(se={}));var ge;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ge||(ge={}));class ja{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=se.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ge.Strict}startEntity(t){this.decodeMode=t,this.state=se.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case se.EntityStart:return t.charCodeAt(a)===ne.NUM?(this.state=se.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=se.NamedEntity,this.stateNamedEntity(t,a));case se.NumericStart:return this.stateNumericStart(t,a);case se.NumericDecimal:return this.stateNumericDecimal(t,a);case se.NumericHex:return this.stateNumericHex(t,a);case se.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|to)===ne.LOWER_X?(this.state=se.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=se.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(Qa(n)||ao(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(Qa(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===ne.SEMI)this.consumed+=1;else if(this.decodeMode===ge.Strict)return 0;return this.emitCodePoint(eo(this.result),this.consumed),this.errors&&(t!==ne.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&Fe.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const u=t.charCodeAt(a);if(this.treeIndex=so(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===ge.Attribute&&(r===0||no(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Fe.VALUE_LENGTH)>>14,r!==0){if(u===ne.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==ge.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]&Fe.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]&~Fe.VALUE_LENGTH:n[t+1],i),a===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case se.NamedEntity:return this.result!==0&&(this.decodeMode!==ge.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case se.NumericDecimal:return this.emitNumericEntity(0,2);case se.NumericHex:return this.emitNumericEntity(0,3);case se.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case se.EntityStart:return 0}}}function Tn(e){let t="";const a=new ja(e,i=>t+=$a(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 f=a.write(n,o+1);if(f<0){u=o+a.end();break}u=o+f,o=f===0?u+1:u}const c=t+n.slice(u);return t="",c}}function so(e,t,a,i){const n=(t&Fe.BRANCH_LENGTH)>>7,r=t&Fe.JUMP_TABLE;if(n===0)return r!==0&&i===r?a:-1;if(r){const c=i-r;return c<0||c>=n?-1:e[a+c]-1}let u=a,o=u+n-1;for(;u<=o;){const c=u+o>>>1,f=e[c];if(f<i)u=c+1;else if(f>i)o=c-1;else return e[c+n]}return-1}Tn(Xa),Tn(mn);const pn=/["&'<>$\x80-\uFFFF]/g,ro=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),uo=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 bn(e){let t="",a=0,i;for(;(i=pn.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=ro.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${uo(e,n).toString(16)};`,a=pn.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function gn(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 _n=gn(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),An=gn(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),oo=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])),co=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])),lo=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function ho(e){return e.replace(/"/g,""")}function fo(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?ho:t.xmlMode||t.encodeEntities!=="utf8"?bn:_n;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=co.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Nn=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Qt(e,t={}){const a="length"in e?e:[e];let i="";for(let n=0;n<a.length;n++)i+=Eo(a[n],t);return i}function Eo(e,t){switch(e.type){case qu:return Qt(e.children,t);case zu:case Xu:return bo(e);case Gu:return Ao(e);case Ku:return _o(e);case $u:case Qu:case ju:return po(e,t);case Wu:return go(e,t)}}const mo=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),To=new Set(["svg","math"]);function po(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=oo.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&mo.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&To.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=fo(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Nn.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=Qt(e.children,t)),(t.xmlMode||!Nn.has(e.name))&&(i+=`</${e.name}>`)),i}function bo(e){return`<${e.data}>`}function go(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&lo.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?bn(i):An(i)),i}function _o(e){return`<![CDATA[${e.children[0].data}]]>`}function Ao(e){return`<!--${e.data}-->`}function Cn(e,t){return Qt(e,t)}function No(e,t){return ie(e)?e.children.map(a=>Cn(a,t)).join(""):""}function jt(e){return Array.isArray(e)?e.map(jt).join(""):k(e)?e.name==="br"?`
|
11
|
-
`:jt(e.children):Gt(e)?jt(e.children):Oe(e)?e.data:""}function rt(e){return Array.isArray(e)?e.map(rt).join(""):ie(e)&&!$t(e)?rt(e.children):Oe(e)?e.data:""}function Kt(e){return Array.isArray(e)?e.map(Kt).join(""):ie(e)&&(e.type===W.Tag||Gt(e))?Kt(e.children):Oe(e)?e.data:""}function zt(e){return ie(e)?e.children:[]}function In(e){return e.parent||null}function Sn(e){const t=In(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 Co(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function Io(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function So(e){return e.name}function Ka(e){let{next:t}=e;for(;t!==null&&!k(t);)({next:t}=t);return t}function za(e){let{prev:t}=e;for(;t!==null&&!k(t);)({prev:t}=t);return t}function Qe(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 xo(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 Oo(e,t){if(Qe(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 Do(e,t){Qe(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 Lo(e,t){if(Qe(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 Ro(e,t){Qe(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 Zt(e,t,a=!0,i=1/0){return Za(e,Array.isArray(t)?t:[t],a,i)}function Za(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&&ie(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function yo(e,t){return t.find(e)}function Ja(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=Ja(e,r.children,!0));else continue}return i}function xn(e,t){return t.some(a=>k(a)&&(e(a)||xn(e,a.children)))}function Mo(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 Jt={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=>Oe(t)&&e(t.data):t=>Oe(t)&&t.data===e}};function On(e,t){return typeof t=="function"?a=>k(a)&&t(a.attribs[e]):a=>k(a)&&a.attribs[e]===t}function Po(e,t){return a=>e(a)||t(a)}function Dn(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(Jt,a)?Jt[a](i):On(a,i)});return t.length===0?null:t.reduce(Po)}function ko(e,t){const a=Dn(e);return a?a(t):!0}function vo(e,t,a,i=1/0){const n=Dn(e);return n?Zt(n,t,a,i):[]}function wo(e,t,a=!0){return Array.isArray(t)||(t=[t]),Ja(On("id",e),t,a)}function ut(e,t,a=!0,i=1/0){return Zt(Jt.tag_name(e),t,a,i)}function Bo(e,t,a=!0,i=1/0){return Zt(Jt.tag_type(e),t,a,i)}function Uo(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 _e;(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"})(_e||(_e={}));function Ln(e,t){const a=[],i=[];if(e===t)return 0;let n=ie(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=ie(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 _e.DISCONNECTED;const o=a[u-1],c=o.children,f=a[u],E=i[u];return c.indexOf(f)>c.indexOf(E)?o===t?_e.FOLLOWING|_e.CONTAINED_BY:_e.FOLLOWING:o===e?_e.PRECEDING|_e.CONTAINS:_e.PRECEDING}function ot(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=Ln(t,a);return i&_e.PRECEDING?-1:i&_e.FOLLOWING?1:0}),e}function Fo(e){const t=ea(Wo,e);return t?t.name==="feed"?Ho(t):Yo(t):null}function Ho(e){var t;const a=e.children,i={type:"atom",items:ut("entry",a).map(u=>{var o;const{children:c}=u,f={media:Rn(c)};Ee(f,"id","id",c),Ee(f,"title","title",c);const E=(o=ea("link",c))===null||o===void 0?void 0:o.attribs.href;E&&(f.link=E);const T=He("summary",c)||He("content",c);T&&(f.description=T);const p=He("updated",c);return p&&(f.pubDate=new Date(p)),f})};Ee(i,"id","id",a),Ee(i,"title","title",a);const n=(t=ea("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),Ee(i,"description","subtitle",a);const r=He("updated",a);return r&&(i.updated=new Date(r)),Ee(i,"author","email",a,!0),i}function Yo(e){var t,a;const i=(a=(t=ea("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,c={media:Rn(o)};Ee(c,"id","guid",o),Ee(c,"title","title",o),Ee(c,"link","link",o),Ee(c,"description","description",o);const f=He("pubDate",o)||He("dc:date",o);return f&&(c.pubDate=new Date(f)),c})};Ee(n,"title","title",i),Ee(n,"link","link",i),Ee(n,"description","description",i);const r=He("lastBuildDate",i);return r&&(n.updated=new Date(r)),Ee(n,"author","managingEditor",i,!0),n}const Vo=["url","type","lang"],qo=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Rn(e){return ut("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of Vo)a[n]&&(i[n]=a[n]);for(const n of qo)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function ea(e,t){return ut(e,t,!0,1)[0]}function He(e,t,a=!1){return rt(ut(e,t,a,1)).trim()}function Ee(e,t,a,i,n=!1){const r=He(a,i,n);r&&(e[t]=r)}function Wo(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const ta=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return _e},append:Do,appendChild:Oo,compareDocumentPosition:Ln,existsOne:xn,filter:Zt,find:Za,findAll:Mo,findOne:Ja,findOneChild:yo,getAttributeValue:Co,getChildren:zt,getElementById:wo,getElements:vo,getElementsByTagName:ut,getElementsByTagType:Bo,getFeed:Fo,getInnerHTML:No,getName:So,getOuterHTML:Cn,getParent:In,getSiblings:Sn,getText:jt,hasAttrib:Io,hasChildren:ie,innerText:Kt,isCDATA:Gt,isComment:$t,isDocument:Ue,isTag:k,isText:Oe,nextElementSibling:Ka,prepend:Ro,prependChild:Lo,prevElementSibling:za,removeElement:Qe,removeSubsets:Uo,replaceElement:xo,testElement:ko,textContent:rt,uniqueSort:ot},Symbol.toStringTag,{value:"Module"})),Xo={_useHtmlParser2:!1};function ei(e,t){if(!e)return t??Xo;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 yn(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function Go(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function $o(e,t){const a=Go(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...ei(t)};return yn(this,a,i)}function Qo(e){const t={...this._options,xmlMode:!0};return yn(this,e,t)}function Ct(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=rt(t[i]);return a}function jo(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 Ko(){return this(this._root)}function Mn(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 zo(e){return this.root().extract(e)}function Zo(e,t){if(!Pn(e)||!Pn(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 Pn(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 Jo=Object.freeze(Object.defineProperty({__proto__:null,contains:Mn,extract:zo,html:$o,merge:Zo,parseHTML:jo,root:Ko,text:Ct,xml:Qo},Symbol.toStringTag,{value:"Module"}));function ye(e){return e.cheerio!=null}function ec(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function tc(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function K(e,t){const a=e.length;for(let i=0;i<a;i++)t(e[i],i);return e}var je;(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"})(je||(je={}));function ti(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=je.LowerA&&a<=je.LowerZ||a>=je.UpperA&&a<=je.UpperZ||a===je.Exclamation)&&e.includes(">",t+2)}const It=Object.prototype.hasOwnProperty,St=/\s+/,ai="data-",ii=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ac=/^{[^]*}$|^\[[^]*]$/;function aa(e,t,a){var i;if(!(!e||!k(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(It.call(e.attribs,t))return!a&&ii.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Ct(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?Bn(e,t):e.attribs[t]=`${a}`}function ic(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 K(this,(a,i)=>{k(a)&&ct(a,e,t.call(a,i,a.attribs[e]))})}return K(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:aa(this[0],e,this.options.xmlMode)}function kn(e,t,a){return t in e?e[t]:!a&&ii.test(t)?aa(e,t,!1)!==void 0:aa(e,t,a)}function ni(e,t,a,i){t in e?e[t]=a:ct(e,t,!i&&ii.test(t)?a?"":null:`${a}`)}function nc(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 kn(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 K(this,(i,n)=>{k(i)&&ni(i,e,t.call(i,n,kn(i,e,this.options.xmlMode)),this.options.xmlMode)})}return K(this,i=>{if(k(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];ni(i,n,r,this.options.xmlMode)}else ni(i,e,t,this.options.xmlMode)})}}function vn(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 sc(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(ai))continue;const a=ec(t.slice(ai.length));It.call(e.data,a)||(e.data[a]=wn(e.attribs[t]))}return e.data}function rc(e,t){const a=ai+tc(t),i=e.data;if(It.call(i,t))return i[t];if(It.call(e.attribs,a))return i[t]=wn(e.attribs[a])}function wn(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(ac.test(e))try{return JSON.parse(e)}catch{}return e}function uc(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?sc(n):typeof e=="object"||t!==void 0?(K(this,r=>{k(r)&&(typeof e=="object"?vn(r,e):vn(r,e,t))}),this):rc(n,e)}function oc(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=>Ct(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Bn(e,t){!e.attribs||!It.call(e.attribs,t)||delete e.attribs[t]}function ia(e){return e?e.trim().split(St):[]}function cc(e){const t=ia(e);for(const a of t)K(this,i=>{k(i)&&Bn(i,a)});return this}function lc(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||St.test(a[i-1]))&&(n===a.length||St.test(a[n])))return!0}return!1})}function Un(e){if(typeof e=="function")return K(this,(i,n)=>{if(k(i)){const r=i.attribs.class||"";Un.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(St),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!k(n))continue;const r=aa(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const c=`${o} `;u.includes(` ${c}`)||(u+=c)}ct(n,"class",u.trim())}else ct(n,"class",t.join(" ").trim())}return this}function Fn(e){if(typeof e=="function")return K(this,(n,r)=>{k(n)&&Fn.call([n],e.call(n,r,n.attribs.class||""))});const t=ia(e),a=t.length,i=arguments.length===0;return K(this,n=>{if(k(n))if(i)n.attribs.class="";else{const r=ia(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const c=r.indexOf(t[o]);c>=0&&(r.splice(c,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function Hn(e,t){if(typeof e=="function")return K(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(St),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 c=ia(o.attribs.class);for(let f=0;f<i;f++){const E=c.indexOf(a[f]);n>=0&&E<0?c.push(a[f]):n<=0&&E>=0&&c.splice(E,1)}o.attribs.class=c.join(" ")}return this}const dc=Object.freeze(Object.defineProperty({__proto__:null,addClass:Un,attr:ic,data:uc,hasClass:lc,prop:nc,removeAttr:cc,removeClass:Fn,toggleClass:Hn,val:oc},Symbol.toStringTag,{value:"Module"}));var R;(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"})(R||(R={}));var te;(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"})(te||(te={}));const Yn=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,hc=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,fc=new Map([[126,te.Element],[94,te.Start],[36,te.End],[42,te.Any],[33,te.Not],[124,te.Hyphen]]),Ec=new Set(["has","not","matches","is","where","host","host-context"]);function xt(e){switch(e.type){case R.Adjacent:case R.Child:case R.Descendant:case R.Parent:case R.Sibling:case R.ColumnCombinator:return!0;default:return!1}}const mc=new Set(["contains","icontains"]);function Tc(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 Ot(e){return e.replace(hc,Tc)}function si(e){return e===39||e===34}function Vn(e){return e===32||e===9||e===10||e===12||e===13}function na(e){const t=[],a=qn(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function qn(e,t,a){let i=[];function n(p){const A=t.slice(a+p).match(Yn);if(!A)throw new Error(`Expected name, found ${t.slice(a)}`);const[C]=A;return a+=p+C.length,Ot(C)}function r(p){for(a+=p;a<t.length&&Vn(t.charCodeAt(a));)a++}function u(){a+=1;const p=a;let A=1;for(;A>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?A++:t.charCodeAt(a)===41&&!o(a)&&A--;if(A)throw new Error("Parenthesis not matched");return Ot(t.slice(p,a-1))}function o(p){let A=0;for(;t.charCodeAt(--p)===92;)A++;return(A&1)===1}function c(){if(i.length>0&&xt(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function f(p){if(i.length>0&&i[i.length-1].type===R.Descendant){i[i.length-1].type=p;return}c(),i.push({type:p})}function E(p,A){i.push({type:R.Attribute,name:p,action:A,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===R.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 p=t.charCodeAt(a);switch(p){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==R.Descendant)&&(c(),i.push({type:R.Descendant})),r(1);break}case 62:{f(R.Child),r(1);break}case 60:{f(R.Parent),r(1);break}case 126:{f(R.Sibling),r(1);break}case 43:{f(R.Adjacent),r(1);break}case 46:{E("class",te.Element);break}case 35:{E("id",te.Equals);break}case 91:{r(1);let A,C=null;t.charCodeAt(a)===124?A=n(1):t.startsWith("*|",a)?(C="*",A=n(2)):(A=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(C=A,A=n(1))),r(0);let L=te.Exists;const M=fc.get(t.charCodeAt(a));if(M){if(L=M,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(L=te.Equals,r(1));let V="",B=null;if(L!=="exists"){if(si(t.charCodeAt(a))){const O=t.charCodeAt(a);let g=a+1;for(;g<t.length&&(t.charCodeAt(g)!==O||o(g));)g+=1;if(t.charCodeAt(g)!==O)throw new Error("Attribute value didn't end");V=Ot(t.slice(a+1,g)),a=g+1}else{const O=a;for(;a<t.length&&(!Vn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;V=Ot(t.slice(O,a))}r(0);const x=t.charCodeAt(a)|32;x===115?(B=!1,r(1)):x===105&&(B=!0,r(1))}if(t.charCodeAt(a)!==93)throw new Error("Attribute selector didn't terminate");a+=1;const H={type:R.Attribute,name:A,action:L,value:V,namespace:C,ignoreCase:B};i.push(H);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:R.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const A=n(1).toLowerCase();let C=null;if(t.charCodeAt(a)===40)if(Ec.has(A)){if(si(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${A} cannot be quoted`);if(C=[],a=qn(C,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${A} (${t})`);a+=1}else{if(C=u(),mc.has(A)){const L=C.charCodeAt(0);L===C.charCodeAt(C.length-1)&&si(L)&&(C=C.slice(1,-1))}C=Ot(C)}i.push({type:R.Pseudo,name:A,data:C});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const L=t.indexOf("*/",a+2);if(L<0)throw new Error("Comment was not terminated");a=L+2,i.length===0&&r(0);break}let A=null,C;if(p===42)a+=1,C="*";else if(p===124){if(C="",t.charCodeAt(a+1)===124){f(R.ColumnCombinator),r(2);break}}else if(Yn.test(t.slice(a)))C=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(A=C,t.charCodeAt(a+1)===42?(C="*",a+=2):C=n(1)),i.push(C==="*"?{type:R.Universal,namespace:A}:{type:R.Tag,name:C,namespace:A})}}}return T(),a}function pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sa={trueFunc:function(){return!0},falseFunc:function(){return!1}};const U=pc(sa),Wn=new Map([[R.Universal,50],[R.Tag,30],[R.Attribute,1],[R.Pseudo,0]]);function ri(e){return!Wn.has(e.type)}const bc=new Map([[te.Exists,10],[te.Equals,8],[te.Not,7],[te.Start,6],[te.End,6],[te.Any,5]]);function gc(e){const t=e.map(Xn);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 Xn(e){var t,a;let i=(t=Wn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===R.Attribute?(i=(a=bc.get(e.action))!==null&&a!==void 0?a:4,e.action===te.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===R.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(Xn)))),i<0&&(i=0)):i=2:i=3),i}const _c=/[-[\]{}()*+?.,\\^$|#\s]/g;function Gn(e){return e.replace(_c,"\\$&")}const Ac=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 Ke(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Ac.has(e.name)}const Nc={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return Ke(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 Ke(t,a)?(r=r.toLowerCase(),function(c){const f=i.getAttributeValue(c,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u).toLowerCase()===r&&e(c)}):function(c){const f=i.getAttributeValue(c,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u)===r&&e(c)}},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)${Gn(r)}(?:$|\\s)`,Ke(t,a)?"i":"");return function(c){const f=i.getAttributeValue(c,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(c)}},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:Ke(t,a)?(r=r.toLowerCase(),o=>{const c=i.getAttributeValue(o,n);return c!=null&&c.length>=u&&c.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var c;return!!(!((c=i.getAttributeValue(o,n))===null||c===void 0)&&c.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:Ke(t,a)?(r=r.toLowerCase(),o=>{var c;return((c=i.getAttributeValue(o,n))===null||c===void 0?void 0:c.substr(u).toLowerCase())===r&&e(o)}):o=>{var c;return!!(!((c=i.getAttributeValue(o,n))===null||c===void 0)&&c.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return U.falseFunc;if(Ke(t,a)){const u=new RegExp(Gn(r),"i");return function(c){const f=i.getAttributeValue(c,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(c)}}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):Ke(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)}},Cc=new Set([9,10,12,13,32]),$n=48,Ic=57;function Sc(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 c=t;let f=0;for(;t<e.length&&e.charCodeAt(t)>=$n&&e.charCodeAt(t)<=Ic;)f=f*10+(e.charCodeAt(t)-$n),t++;return t===c?null:f}function o(){for(;t<e.length&&Cc.has(e.charCodeAt(t));)t++}}function xc(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 ra(e){return xc(Sc(e))}function ua(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const ui={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=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=0;f<o.length&&!i(u,o[f]);f++)a.isTag(o[f])&&c++;return n(c)&&e(u)}},"nth-last-child"(e,t,{adapter:a,equals:i}){const n=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=o.length-1;f>=0&&!i(u,o[f]);f--)a.isTag(o[f])&&c++;return n(c)&&e(u)}},"nth-of-type"(e,t,{adapter:a,equals:i}){const n=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=0;f<o.length;f++){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&c++}return n(c)&&e(u)}},"nth-last-of-type"(e,t,{adapter:a,equals:i}){const n=ra(t);return n===U.falseFunc?U.falseFunc:n===U.trueFunc?ua(e,a):function(u){const o=a.getSiblings(u);let c=0;for(let f=o.length-1;f>=0;f--){const E=o[f];if(i(u,E))break;a.isTag(E)&&a.getName(E)===a.getName(u)&&c++}return n(c)&&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?ui.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:oi("isHovered"),visited:oi("isVisited"),active:oi("isActive")};function oi(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 Qn={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 jn(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 Oc={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
9
|
+
*/function Pi(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 ki(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Pi(Object(a),!0).forEach(function(i){_r(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Pi(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}function pr(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 vi(e){var t=pr(e,"string");return typeof t=="symbol"?t:t+""}function Ca(e){"@babel/helpers - typeof";return Ca=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},Ca(e)}function br(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wi(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,vi(i.key),i)}}function gr(e,t,a){return t&&wi(e.prototype,t),a&&wi(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function _r(e,t,a){return t=vi(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Bi(e){return Ar(e)||Nr(e)||Cr(e)||Ir()}function Ar(e){if(Array.isArray(e))return Ia(e)}function Nr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cr(e,t){if(e){if(typeof e=="string")return Ia(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 Ia(e,t)}}function Ia(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 Ir(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qt=typeof window<"u"&&typeof window.document<"u",De=qt?window:{},Sa=qt&&De.document.documentElement?"ontouchstart"in De.document.documentElement:!1,xa=qt?"PointerEvent"in De:!1,K="cropper",Oa="all",Ui="crop",Fi="move",Hi="zoom",Ge="e",$e="w",at="s",Be="n",mt="ne",Tt="nw",pt="se",bt="sw",Da="".concat(K,"-crop"),Yi="".concat(K,"-disabled"),fe="".concat(K,"-hidden"),Vi="".concat(K,"-hide"),Sr="".concat(K,"-invisible"),Wt="".concat(K,"-modal"),La="".concat(K,"-move"),gt="".concat(K,"Action"),Xt="".concat(K,"Preview"),Ra="crop",qi="move",Wi="none",ya="crop",Ma="cropend",Pa="cropmove",ka="cropstart",Xi="dblclick",xr=Sa?"touchstart":"mousedown",Or=Sa?"touchmove":"mousemove",Dr=Sa?"touchend touchcancel":"mouseup",Gi=xa?"pointerdown":xr,$i=xa?"pointermove":Or,Qi=xa?"pointerup pointercancel":Dr,ji="ready",zi="resize",Ki="wheel",va="zoom",Zi="image/jpeg",Lr=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Rr=/^data:/,yr=/^data:image\/jpeg;base64,/,Mr=/^img|canvas$/i,Ji=200,en=100,tn={viewMode:0,dragMode:Ra,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:Ji,minContainerHeight:en,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},Pr='<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>',kr=Number.isNaN||De.isNaN;function H(e){return typeof e=="number"&&!kr(e)}var an=function(t){return t>0&&t<1/0};function wa(e){return typeof e>"u"}function Qe(e){return Ca(e)==="object"&&e!==null}var vr=Object.prototype.hasOwnProperty;function it(e){if(!Qe(e))return!1;try{var t=e.constructor,a=t.prototype;return t&&a&&vr.call(a,"isPrototypeOf")}catch{return!1}}function Ee(e){return typeof e=="function"}var wr=Array.prototype.slice;function nn(e){return Array.from?Array.from(e):wr.call(e)}function ie(e,t){return e&&Ee(t)&&(Array.isArray(e)||H(e.length)?nn(e).forEach(function(a,i){t.call(e,a,i,e)}):Qe(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 Qe(t)&&i.length>0&&i.forEach(function(r){Qe(r)&&Object.keys(r).forEach(function(u){t[u]=r[u]})}),t},Br=/\.\d*(?:0|9){12}\d*$/;function nt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Br.test(e)?Math.round(e*t)/t:e}var Ur=/^width|height|left|top|marginLeft|marginTop$/;function Ue(e,t){var a=e.style;ie(t,function(i,n){Ur.test(n)&&H(i)&&(i="".concat(i,"px")),a[n]=i})}function Fr(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function re(e,t){if(t){if(H(e.length)){ie(e,function(i){re(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 Le(e,t){if(t){if(H(e.length)){ie(e,function(a){Le(a,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function st(e,t,a){if(t){if(H(e.length)){ie(e,function(i){st(i,t,a)});return}a?re(e,t):Le(e,t)}}var Hr=/([a-z\d])([A-Z])/g;function Ba(e){return e.replace(Hr,"$1-$2").toLowerCase()}function Ua(e,t){return Qe(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Ba(t)))}function _t(e,t,a){Qe(a)?e[t]=a:e.dataset?e.dataset[t]=a:e.setAttribute("data-".concat(Ba(t)),a)}function Yr(e,t){if(Qe(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(Ba(t)))}var sn=/\s\s*/,rn=function(){var e=!1;if(qt){var t=!1,a=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(r){t=r}});De.addEventListener("test",a,i),De.removeEventListener("test",a,i)}return e}();function xe(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sn).forEach(function(r){if(!rn){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 Ne(e,t,a){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=a;t.trim().split(sn).forEach(function(r){if(i.once&&!rn){var u=e.listeners,o=u===void 0?{}:u;n=function(){delete o[r][a],e.removeEventListener(r,n,i);for(var f=arguments.length,m=new Array(f),T=0;T<f;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 rt(e,t,a){var i;return Ee(Event)&&Ee(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 un(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Fa=De.location,Vr=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function on(e){var t=e.match(Vr);return t!==null&&(t[1]!==Fa.protocol||t[2]!==Fa.hostname||t[3]!==Fa.port)}function cn(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function At(e){var t=e.rotate,a=e.scaleX,i=e.scaleY,n=e.translateX,r=e.translateY,u=[];H(n)&&n!==0&&u.push("translateX(".concat(n,"px)")),H(r)&&r!==0&&u.push("translateY(".concat(r,"px)")),H(t)&&t!==0&&u.push("rotate(".concat(t,"deg)")),H(a)&&a!==1&&u.push("scaleX(".concat(a,")")),H(i)&&i!==1&&u.push("scaleY(".concat(i,")"));var o=u.length?u.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function qr(e){var t=ki({},e),a=0;return ie(e,function(i,n){delete t[n],ie(t,function(r){var u=Math.abs(i.startX-r.startX),o=Math.abs(i.startY-r.startY),c=Math.abs(i.endX-r.endX),f=Math.abs(i.endY-r.endY),m=Math.sqrt(u*u+o*o),T=Math.sqrt(c*c+f*f),p=(T-m)/m;Math.abs(p)>Math.abs(a)&&(a=p)})}),a}function Gt(e,t){var a=e.pageX,i=e.pageY,n={endX:a,endY:i};return t?n:ki({startX:a,startY:i},n)}function Wr(e){var t=0,a=0,i=0;return ie(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 Fe(e){var t=e.aspectRatio,a=e.height,i=e.width,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=an(i),u=an(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 Xr(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,c=t*r+a*u;return i>90?{width:c,height:o}:{width:o,height:c}}function Gr(e,t,a,i){var n=t.aspectRatio,r=t.naturalWidth,u=t.naturalHeight,o=t.rotate,c=o===void 0?0:o,f=t.scaleX,m=f===void 0?1:f,T=t.scaleY,p=T===void 0?1:T,_=a.aspectRatio,C=a.naturalWidth,L=a.naturalHeight,P=i.fillColor,X=P===void 0?"transparent":P,B=i.imageSmoothingEnabled,V=B===void 0?!0:B,F=i.imageSmoothingQuality,k=F===void 0?"low":F,A=i.maxWidth,w=A===void 0?1/0:A,G=i.maxHeight,te=G===void 0?1/0:G,be=i.minWidth,Ae=be===void 0?0:be,Se=i.minHeight,ge=Se===void 0?0:Se,se=document.createElement("canvas"),x=se.getContext("2d"),R=Fe({aspectRatio:_,width:w,height:te}),Y=Fe({aspectRatio:_,width:Ae,height:ge},"cover"),O=Math.min(R.width,Math.max(Y.width,C)),D=Math.min(R.height,Math.max(Y.height,L)),q=Fe({aspectRatio:n,width:w,height:te}),$=Fe({aspectRatio:n,width:Ae,height:ge},"cover"),z=Math.min(q.width,Math.max($.width,r)),ae=Math.min(q.height,Math.max($.height,u)),Et=[-z/2,-ae/2,z,ae];return se.width=nt(O),se.height=nt(D),x.fillStyle=X,x.fillRect(0,0,O,D),x.save(),x.translate(O/2,D/2),x.rotate(c*Math.PI/180),x.scale(m,p),x.imageSmoothingEnabled=V,x.imageSmoothingQuality=k,x.drawImage.apply(x,[e].concat(Bi(Et.map(function(Vt){return Math.floor(nt(Vt))})))),x.restore(),se}var ln=String.fromCharCode;function $r(e,t,a){var i="";a+=t;for(var n=t;n<a;n+=1)i+=ln(e.getUint8(n));return i}var Qr=/^data:.*,/;function jr(e){var t=e.replace(Qr,""),a=atob(t),i=new ArrayBuffer(a.length),n=new Uint8Array(i);return ie(n,function(r,u){n[u]=a.charCodeAt(u)}),i}function zr(e,t){for(var a=[],i=8192,n=new Uint8Array(e);n.length>0;)a.push(ln.apply(null,nn(n.subarray(0,i)))),n=n.subarray(i);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function Kr(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 c=n+4,f=n+10;if($r(t,c,4)==="Exif"){var m=t.getUint16(f);if(i=m===18761,(i||m===19789)&&t.getUint16(f+2,i)===42){var T=t.getUint32(f+4,i);T>=8&&(r=f+T)}}}if(r){var p=t.getUint16(r,i),_,C;for(C=0;C<p;C+=1)if(_=r+C*12+2,t.getUint16(_,i)===274){_+=8,a=t.getUint16(_,i),t.setUint16(_,1,i);break}}}catch{a=1}return a}function Zr(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 Jr={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);re(n,fe),Le(t,fe);var o={width:Math.max(i.offsetWidth,r>=0?r:Ji),height:Math.max(i.offsetHeight,u>=0?u:en)};this.containerData=o,Ue(n,{width:o.width,height:o.height}),re(t,fe),Le(n,fe)},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,c=t.width,f=t.height;t.height*o>t.width?i===3?c=t.height*o:f=t.width/o:i===3?f=t.width/o:c=t.height*o;var m={aspectRatio:o,naturalWidth:r,naturalHeight:u,width:c,height:f};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,c=r.aspectRatio,f=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*c>m?m=T*c:T=m/c)):o>0&&(m?m=Math.max(m,f?u.width:0):T?T=Math.max(T,f?u.height:0):f&&(m=u.width,T=u.height,T*c>m?m=T*c:T=m/c));var p=Fe({aspectRatio:c,width:m,height:T});m=p.width,T=p.height,r.minWidth=m,r.minHeight=T,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(f?0:1)){var _=n.width-r.width,C=n.height-r.height;r.minLeft=Math.min(0,_),r.minTop=Math.min(0,C),r.maxLeft=Math.max(0,_),r.maxTop=Math.max(0,C),f&&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,_),r.maxLeft=Math.max(0,_)),r.height>=n.height&&(r.minTop=Math.min(0,C),r.maxTop=Math.max(0,C))))}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=Xr({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,c=i.width*(u/i.naturalWidth),f=i.height*(o/i.naturalHeight);i.left-=(c-i.width)/2,i.top-=(f-i.height)/2,i.width=c,i.height=f,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,Ue(this.canvas,Z({width:i.width,height:i.height},At({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}),Ue(this.image,Z({width:i.width,height:i.height},At(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,c=i.aspectRatio;if(t){var f=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,p=o?Math.min(n.height,r.height,r.height+r.top,n.height-r.top):n.height;f=Math.min(f,n.width),m=Math.min(m,n.height),c&&(f&&m?m*c>f?m=f/c:f=m*c:f?m=f/c:m&&(f=m*c),p*c>T?p=T/c:T=p*c),u.minWidth=Math.min(f,T),u.minHeight=Math.min(m,p),u.maxWidth=T,u.maxHeight=p}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,gt,i.width>=a.width&&i.height>=a.height?Fi:Oa),Ue(this.cropBox,Z({width:i.width,height:i.height},At({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),rt(this.element,ya,this.getData())}},eu={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,ie(o,function(c){var f=document.createElement("img");_t(c,Xt,{width:c.offsetWidth,height:c.offsetHeight,html:c.innerHTML}),a&&(f.crossOrigin=a),f.src=n,f.alt=r,f.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;"',c.innerHTML="",c.appendChild(f)})}},resetPreview:function(){ie(this.previews,function(t){var a=Ua(t,Xt);Ue(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Yr(t,Xt)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,r=i.height,u=t.width,o=t.height,c=i.left-a.left-t.left,f=i.top-a.top-t.top;!this.cropped||this.disabled||(Ue(this.viewBoxImage,Z({width:u,height:o},At(Z({translateX:-c,translateY:-f},t)))),ie(this.previews,function(m){var T=Ua(m,Xt),p=T.width,_=T.height,C=p,L=_,P=1;n&&(P=p/n,L=r*P),r&&L>_&&(P=_/r,C=n*P,L=_),Ue(m,{width:C,height:L}),Ue(m.getElementsByTagName("img")[0],Z({width:u*P,height:o*P},At(Z({translateX:-c*P,translateY:-f*P},t))))}))}},tu={bind:function(){var t=this.element,a=this.options,i=this.cropper;Ee(a.cropstart)&&Ne(t,ka,a.cropstart),Ee(a.cropmove)&&Ne(t,Pa,a.cropmove),Ee(a.cropend)&&Ne(t,Ma,a.cropend),Ee(a.crop)&&Ne(t,ya,a.crop),Ee(a.zoom)&&Ne(t,va,a.zoom),Ne(i,Gi,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&Ne(i,Ki,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&Ne(i,Xi,this.onDblclick=this.dblclick.bind(this)),Ne(t.ownerDocument,$i,this.onCropMove=this.cropMove.bind(this)),Ne(t.ownerDocument,Qi,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&Ne(window,zi,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;Ee(a.cropstart)&&xe(t,ka,a.cropstart),Ee(a.cropmove)&&xe(t,Pa,a.cropmove),Ee(a.cropend)&&xe(t,Ma,a.cropend),Ee(a.crop)&&xe(t,ya,a.crop),Ee(a.zoom)&&xe(t,va,a.zoom),xe(i,Gi,this.onCropStart),a.zoomable&&a.zoomOnWheel&&xe(i,Ki,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&xe(i,Xi,this.onDblclick),xe(t.ownerDocument,$i,this.onCropMove),xe(t.ownerDocument,Qi,this.onCropEnd),a.responsive&&xe(window,zi,this.onResize)}},au={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,c;t.restore&&(o=this.getCanvasData(),c=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ie(o,function(f,m){o[m]=f*u})),this.setCropBoxData(ie(c,function(f,m){c[m]=f*u})))}}},dblclick:function(){this.disabled||this.options.dragMode===Wi||this.setDragMode(Fr(this.dragBox,Da)?qi:Ra)},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")&&(H(a)&&a!==1||H(i)&&i!==0||t.ctrlKey))){var n=this.options,r=this.pointers,u;t.changedTouches?ie(t.changedTouches,function(o){r[o.identifier]=Gt(o)}):r[t.pointerId||0]=Gt(t),Object.keys(r).length>1&&n.zoomable&&n.zoomOnTouch?u=Hi:u=Ua(t.target,gt),Lr.test(u)&&rt(this.element,ka,{originalEvent:t,action:u})!==!1&&(t.preventDefault(),this.action=u,this.cropping=!1,u===Ui&&(this.cropping=!0,re(this.dragBox,Wt)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),rt(this.element,Pa,{originalEvent:t,action:a})!==!1&&(t.changedTouches?ie(t.changedTouches,function(n){Z(i[n.identifier]||{},Gt(n,!0))}):Z(i[t.pointerId||0]||{},Gt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?ie(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,st(this.dragBox,Wt,this.cropped&&this.options.modal)),rt(this.element,Ma,{originalEvent:t,action:a}))}}},iu={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,r=this.cropBoxData,u=this.pointers,o=this.action,c=a.aspectRatio,f=r.left,m=r.top,T=r.width,p=r.height,_=f+T,C=m+p,L=0,P=0,X=n.width,B=n.height,V=!0,F;!c&&t.shiftKey&&(c=T&&p?T/p:1),this.limited&&(L=r.minLeft,P=r.minTop,X=L+Math.min(n.width,i.width,i.left+i.width),B=P+Math.min(n.height,i.height,i.top+i.height));var k=u[Object.keys(u)[0]],A={x:k.endX-k.startX,y:k.endY-k.startY},w=function(te){switch(te){case Ge:_+A.x>X&&(A.x=X-_);break;case $e:f+A.x<L&&(A.x=L-f);break;case Be:m+A.y<P&&(A.y=P-m);break;case at:C+A.y>B&&(A.y=B-C);break}};switch(o){case Oa:f+=A.x,m+=A.y;break;case Ge:if(A.x>=0&&(_>=X||c&&(m<=P||C>=B))){V=!1;break}w(Ge),T+=A.x,T<0&&(o=$e,T=-T,f-=T),c&&(p=T/c,m+=(r.height-p)/2);break;case Be:if(A.y<=0&&(m<=P||c&&(f<=L||_>=X))){V=!1;break}w(Be),p-=A.y,m+=A.y,p<0&&(o=at,p=-p,m-=p),c&&(T=p*c,f+=(r.width-T)/2);break;case $e:if(A.x<=0&&(f<=L||c&&(m<=P||C>=B))){V=!1;break}w($e),T-=A.x,f+=A.x,T<0&&(o=Ge,T=-T,f-=T),c&&(p=T/c,m+=(r.height-p)/2);break;case at:if(A.y>=0&&(C>=B||c&&(f<=L||_>=X))){V=!1;break}w(at),p+=A.y,p<0&&(o=Be,p=-p,m-=p),c&&(T=p*c,f+=(r.width-T)/2);break;case mt:if(c){if(A.y<=0&&(m<=P||_>=X)){V=!1;break}w(Be),p-=A.y,m+=A.y,T=p*c}else w(Be),w(Ge),A.x>=0?_<X?T+=A.x:A.y<=0&&m<=P&&(V=!1):T+=A.x,A.y<=0?m>P&&(p-=A.y,m+=A.y):(p-=A.y,m+=A.y);T<0&&p<0?(o=bt,p=-p,T=-T,m-=p,f-=T):T<0?(o=Tt,T=-T,f-=T):p<0&&(o=pt,p=-p,m-=p);break;case Tt:if(c){if(A.y<=0&&(m<=P||f<=L)){V=!1;break}w(Be),p-=A.y,m+=A.y,T=p*c,f+=r.width-T}else w(Be),w($e),A.x<=0?f>L?(T-=A.x,f+=A.x):A.y<=0&&m<=P&&(V=!1):(T-=A.x,f+=A.x),A.y<=0?m>P&&(p-=A.y,m+=A.y):(p-=A.y,m+=A.y);T<0&&p<0?(o=pt,p=-p,T=-T,m-=p,f-=T):T<0?(o=mt,T=-T,f-=T):p<0&&(o=bt,p=-p,m-=p);break;case bt:if(c){if(A.x<=0&&(f<=L||C>=B)){V=!1;break}w($e),T-=A.x,f+=A.x,p=T/c}else w(at),w($e),A.x<=0?f>L?(T-=A.x,f+=A.x):A.y>=0&&C>=B&&(V=!1):(T-=A.x,f+=A.x),A.y>=0?C<B&&(p+=A.y):p+=A.y;T<0&&p<0?(o=mt,p=-p,T=-T,m-=p,f-=T):T<0?(o=pt,T=-T,f-=T):p<0&&(o=Tt,p=-p,m-=p);break;case pt:if(c){if(A.x>=0&&(_>=X||C>=B)){V=!1;break}w(Ge),T+=A.x,p=T/c}else w(at),w(Ge),A.x>=0?_<X?T+=A.x:A.y>=0&&C>=B&&(V=!1):T+=A.x,A.y>=0?C<B&&(p+=A.y):p+=A.y;T<0&&p<0?(o=Tt,p=-p,T=-T,m-=p,f-=T):T<0?(o=bt,T=-T,f-=T):p<0&&(o=mt,p=-p,m-=p);break;case Fi:this.move(A.x,A.y),V=!1;break;case Hi:this.zoom(qr(u),t),V=!1;break;case Ui:if(!A.x||!A.y){V=!1;break}F=un(this.cropper),f=k.startX-F.left,m=k.startY-F.top,T=r.minWidth,p=r.minHeight,A.x>0?o=A.y>0?pt:mt:A.x<0&&(f-=T,o=A.y>0?bt:Tt),A.y<0&&(m-=p),this.cropped||(Le(this.cropBox,fe),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}V&&(r.width=T,r.height=p,r.left=f,r.top=m,this.action=o,this.renderCropBox()),ie(u,function(G){G.startX=G.endX,G.startY=G.endY})}},nu={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&re(this.dragBox,Wt),Le(this.cropBox,fe),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(),Le(this.dragBox,Wt),re(this.cropBox,fe)),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,ie(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,Le(this.cropper,Yi)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,re(this.cropper,Yi)),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(wa(t)?t:n+Number(t),wa(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&&(H(t)&&(i.left=t,n=!0),H(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,c=r.naturalWidth,f=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var m=c*t,T=f*t;if(rt(this.element,va,{ratio:t,oldRatio:u/c,originalEvent:i})===!1)return this;if(i){var p=this.pointers,_=un(this.cropper),C=p&&Object.keys(p).length?Wr(p):{pageX:i.pageX,pageY:i.pageY};r.left-=(m-u)*((C.pageX-_.left-r.left)/u),r.top-=(T-o)*((C.pageY-_.top-r.top)/o)}else it(a)&&H(a.x)&&H(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),H(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,H(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(H(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&&(H(t)&&(i.scaleX=t,n=!0),H(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(ie(u,function(m,T){u[T]=m/o}),t){var c=Math.round(u.y+u.height),f=Math.round(u.x+u.width);u.x=Math.round(u.x),u.y=Math.round(u.y),u.width=f-u.x,u.height=c-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&&it(t)){var u=!1;a.rotatable&&H(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,u=!0),a.scalable&&(H(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,u=!0),H(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,u=!0)),u&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;H(t.x)&&(r.left=t.x*o+n.left),H(t.y)&&(r.top=t.y*o+n.top),H(t.width)&&(r.width=t.width*o),H(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&&ie(["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&&it(t)&&(H(t.left)&&(a.left=t.left),H(t.top)&&(a.top=t.top),H(t.width)?(a.width=t.width,a.height=t.width/i):H(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&&it(t)&&(H(t.left)&&(a.left=t.left),H(t.top)&&(a.top=t.top),H(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),H(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=Gr(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,c=n.height,f=i.width/Math.floor(a.naturalWidth);f!==1&&(r*=f,u*=f,o*=f,c*=f);var m=o/c,T=Fe({aspectRatio:m,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Fe({aspectRatio:m,width:t.minWidth||0,height:t.minHeight||0},"cover"),_=Fe({aspectRatio:m,width:t.width||(f!==1?i.width:o),height:t.height||(f!==1?i.height:c)}),C=_.width,L=_.height;C=Math.min(T.width,Math.max(p.width,C)),L=Math.min(T.height,Math.max(p.height,L));var P=document.createElement("canvas"),X=P.getContext("2d");P.width=nt(C),P.height=nt(L),X.fillStyle=t.fillColor||"transparent",X.fillRect(0,0,C,L);var B=t.imageSmoothingEnabled,V=B===void 0?!0:B,F=t.imageSmoothingQuality;X.imageSmoothingEnabled=V,F&&(X.imageSmoothingQuality=F);var k=i.width,A=i.height,w=r,G=u,te,be,Ae,Se,ge,se;w<=-o||w>k?(w=0,te=0,Ae=0,ge=0):w<=0?(Ae=-w,w=0,te=Math.min(k,o+w),ge=te):w<=k&&(Ae=0,te=Math.min(o,k-w),ge=te),te<=0||G<=-c||G>A?(G=0,be=0,Se=0,se=0):G<=0?(Se=-G,G=0,be=Math.min(A,c+G),se=be):G<=A&&(Se=0,be=Math.min(c,A-G),se=be);var x=[w,G,te,be];if(ge>0&&se>0){var R=C/o;x.push(Ae*R,Se*R,ge*R,se*R)}return X.drawImage.apply(X,[i].concat(Bi(x.map(function(Y){return Math.floor(nt(Y))})))),P},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!wa(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===Ra,u=a.movable&&t===qi;t=r||u?t:Wi,a.dragMode=t,_t(i,gt,t),st(i,Da,r),st(i,La,u),a.cropBoxMovable||(_t(n,gt,t),st(n,Da,r),st(n,La,u))}return this}},su=De.Cropper,dn=function(){function e(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(br(this,e),!t||!Mr.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({},tn,it(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 gr(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(Rr.test(a)){yr.test(a)?this.read(jr(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")!==Zi&&u.abort()},u.onload=function(){i.read(u.response)},u.onloadend=function(){i.reloading=!1,i.xhr=null},r.checkCrossOrigin&&on(a)&&n.crossOrigin&&(a=cn(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=Kr(a),u=0,o=1,c=1;if(r>1){this.url=zr(a,Zi);var f=Zr(r);u=f.rotate,o=f.scaleX,c=f.scaleY}i.rotatable&&(n.rotate=u),i.scalable&&(n.scaleX=o,n.scaleY=c),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,r=i;this.options.checkCrossOrigin&&on(i)&&(n||(n="anonymous"),r=cn(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),re(u,Vi),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=De.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(De.navigator.userAgent),r=function(f,m){Z(a.imageData,{naturalWidth:f,naturalHeight:m,aspectRatio:f/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=Pr;var o=u.querySelector(".".concat(K,"-container")),c=o.querySelector(".".concat(K,"-canvas")),f=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=c,this.dragBox=f,this.cropBox=m,this.viewBox=o.querySelector(".".concat(K,"-view-box")),this.face=T,c.appendChild(n),re(a,fe),r.insertBefore(o,a.nextSibling),Le(n,Vi),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,re(m,fe),i.guides||re(m.getElementsByClassName("".concat(K,"-dashed")),fe),i.center||re(m.getElementsByClassName("".concat(K,"-center")),fe),i.background&&re(o,"".concat(K,"-bg")),i.highlight||re(T,Sr),i.cropBoxMovable&&(re(T,La),_t(T,gt,Oa)),i.cropBoxResizable||(re(m.getElementsByClassName("".concat(K,"-line")),fe),re(m.getElementsByClassName("".concat(K,"-point")),fe)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),Ee(i.ready)&&Ne(a,ji,i.ready,{once:!0}),rt(a,ji)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),Le(this.element,fe)}}},{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=su,e}},{key:"setDefaults",value:function(a){Z(tn,it(a)&&a)}}])}();Z(dn.prototype,Jr,eu,tu,au,iu,nu);function ru(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 uu={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"},ou={class:"w-[700px] flex flex-col bg-white rounded pb-8"},cu={class:"flex flex-row items-center justify-between px-6 py-4 bg-[#f4f8ff]"},lu={class:"flex flex-col h-full"},du={class:"flex flex-row justify-center items-start flex-1"},hu={class:"flex flex-col items-start flex-1"},fu={class:"flex flex-col w-full px-6 py-4"},Eu={class:"flex flex-col w-full"},mu={class:"flex flex-row items-center"},Tu={class:"relative bg-[#474AFF] text-white rounded p-3"},pu={class:"flex flex-row items-start justify-between mt-3"},bu={class:"flex flex-col"},gu={class:"flex flex-col justify-center items-center border w-[300px] h-[300px]"},_u={key:0,class:"w-full text-center"},Au=["src"],Nu={class:"flex flex-col items-center",style:{width:"300px",height:"300px"}},Cu={class:"text-[#999] mt-05 flex justify-center mt-4"},Iu={class:"w-full flex justify-end space-x-5 mt-5 px-6"},Su=["loading"],xu=l.defineComponent({__name:"index",emits:["cancel","ok"],setup(e,{expose:t,emit:a}){const i=a,n=l.ref({coverUrl:"",inputValue:"",uploadType:2,videoHost:"",videoUrl:""}),r=l.ref(),u=l.ref({autoCrop:!0,autoCropArea:1,background:!0,center:!0,cropBoxResizable:!0,dragMode:"move",preview:".before",toggleDragModeOnDblclick:!0,viewMode:1,zoomOnWheel:!0}),o=l.ref(!1),c=l.ref({afterImg:"",image:null,myCropper:null}),f=l.ref("image/jpeg"),m=F=>{console.log(F);const k=F.target.files[0];if(k){k.name&&(n.value.inputValue=k.name);const A=new FileReader;A.onload=w=>{var G,te;console.log("e?.target?.result",(G=w==null?void 0:w.target)==null?void 0:G.result),T((te=w==null?void 0:w.target)==null?void 0:te.result)},A.readAsDataURL(k)}};async function T(F){if(!F)return;await V();const k=F;c.value.image=k,c.value.image&&p()}function p(){const F=document.querySelector("#imgId");F&&F.addEventListener("load",()=>{B(),c.value.myCropper=new dn(F,u.value)})}const _=l.ref(!1);function C(F,k,A){r.value=F,F&&F.aspectRatio&&(u.value.aspectRatio=F.aspectRatio),A&&(n.value.inputValue=A),_.value=!0,k&&T(k)}function L(){_.value=!1}const P=()=>{var k,A;if(!c.value.myCropper)return;o.value=!0,c.value.afterImg=c.value.myCropper.getCroppedCanvas({height:(k=r.value)==null?void 0:k.height,imageSmoothingQuality:"high",width:(A=r.value)==null?void 0:A.width}).toDataURL(f.value);const F=ru(c.value.afterImg,n.value.inputValue);i("ok",F),o.value=!1,V(),B(),L()};function X(){V(),B(),L(),i("cancel")}function B(){c.value.myCropper&&c.value.myCropper.destroy()}function V(){c.value.image=""}return t({handleCloseCropper:L,handleOpenCropper:C}),(F,k)=>{var A,w,G;return _.value?(l.openBlock(),l.createElementBlock("div",uu,[l.createElementVNode("div",ou,[l.createElementVNode("div",cu,[k[1]||(k[1]=l.createElementVNode("span",{class:"text-base font-semibold text-[#333]"},"图片裁剪",-1)),l.createElementVNode("span",{class:"text-lg cursor-pointer text-[#999] iconfont icon-shanchu2",onClick:l.withModifiers(X,["stop"])})]),l.createElementVNode("div",lu,[l.createElementVNode("div",du,[l.createElementVNode("div",hu,[l.createElementVNode("div",fu,[l.createElementVNode("div",Eu,[l.createElementVNode("div",mu,[l.createElementVNode("div",Tu,[l.createElementVNode("input",{type:"file",accept:"image/*",onClick:k[0]||(k[0]=l.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]=l.createElementVNode("span",{id:"uploadHandler",class:"cursor-pointer"}," 选择/更换图片 ",-1))]),k[3]||(k[3]=l.createElementVNode("span",{class:"text-sm text-[#999] ml-3"},"滚动鼠标放大或缩小图片",-1))]),l.createElementVNode("div",pu,[l.createElementVNode("div",bu,[l.createElementVNode("div",gu,[c.value.image?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",_u," 请上传图片 ")),l.createElementVNode("img",{id:"imgId",src:c.value.image,style:{width:"300px"}},null,8,Au)])]),l.createElementVNode("div",Nu,[k[4]||(k[4]=l.createElementVNode("div",{class:"before w-[270px] h-[200px] pr-[70px] border"},null,-1)),l.createElementVNode("div",Cu," 预览画像 "+l.toDisplayString(((A=r.value)==null?void 0:A.width)||"")+" "+l.toDisplayString((w=r.value)!=null&&w.width?"x":"")+" "+l.toDisplayString(((G=r.value)==null?void 0:G.height)||""),1)])])])])])]),l.createElementVNode("div",Iu,[l.createElementVNode("span",{loading:o.value,class:"!w-22 bg-[#474AFF] text-white rounded py-2 px-6 cursor-pointer",type:"primary",onClick:P}," 确认 ",8,Su),l.createElementVNode("span",{class:"!w-22 border border-[#DEDEDE] text-[#666] rounded py-2 px-6 cursor-pointer",onClick:X},"取消")])])])])):l.createCommentVNode("",!0)}}}),Ou={key:0,"date-action":"1",class:"aidition",contenteditable:"false"},Du={class:"aidition_left"},Lu={class:"aidition_right"},Ru={key:0,"date-action":"1",class:"text-red-500 text-xs mt-1"},yu=Na(l.defineComponent({__name:"ElementRenderer",props:{element:{type:Object,required:!0},selectedElement:Object,hoveredElement:Object},emits:["selectElement","hoverElement","updateText","contentUpdated","blockAction","addIcon","upload"],setup(e,{emit:t}){const a=e,i=t,n=l.computed(()=>a.selectedElement===a.element),r=l.computed(()=>a.hoveredElement===a.element),u=l.ref(!1),o=l.ref(!1),c=l.ref(""),f=l.computed(()=>a.element.rule.minText||0),m=l.computed(()=>a.element.rule.maxText||1/0),T=l.ref();function p(O){O.xpath!="/div[1]"&&(u.value=!0,i("selectElement",O))}function _(O){i("selectElement",O)}function C(O,D){i("hoverElement",O,D)}function L(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 X(){u.value=!1,i("contentUpdated",B())}function B(){function O(D){const q=Object.entries(D.attrs||{}).map(([Et,Vt])=>`${Et}="${Vt}"`).join(" "),$=`<${D.tag}${q?" "+q:""}>`,z=`</${D.tag}>`,ae=(D.children||[]).map(Et=>O(Et)).join("");return`${$}${D.editText||D.text||""}${ae}${z}`}return O(a.element)}function V(O){var $;O.stopPropagation();const D=O.target,q=(($=D.firstChild)==null?void 0:$.nodeType)===Node.TEXT_NODE&&D.firstChild.nodeValue||"";if(q.length<f.value){o.value=!0,c.value=`最少输入 ${f.value} 个字符`;return}else if(q.length>m.value){o.value=!0,c.value=`最多输入 ${m.value} 个字符`;return}else o.value=!1,c.value="";a.element.editText=q,i("updateText",{element:a.element,newText:q}),i("contentUpdated",B())}function F(O){i("updateText",O),i("contentUpdated",B())}function k(){const O={...a.element};i("blockAction",{action:"add",element:a.element,newBlock:O})}function A(){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 te(O){i("blockAction",O),i("contentUpdated",B())}function be(O){i("addIcon",O,a.element),i("contentUpdated",B())}function Ae(O,D){i("addIcon",O,D),i("contentUpdated",B())}let Se;const ge=l.ref(),se=l.ref({});function x(O,D){if(D.rule.minImageWidth&&D.rule.maxImageHeight?(se.value.width=D.rule.minImageWidth,se.value.height=D.rule.maxImageHeight,se.value.aspectRatio=D.rule.minImageWidth/D.rule.maxImageHeight):se.value={},O){O.name;const q=new FileReader;q.onload=$=>{var z;Se=(z=$==null?void 0:$.target)==null?void 0:z.result,ge.value.handleOpenCropper(se.value,Se,O.name)},q.readAsDataURL(O)}}function R(O,D){if(console.log(typeof O=="object",O),O)if(typeof O=="object"){D.attrs.alt=O.name;const q=new FileReader;q.onload=$=>{var ae;let z=(ae=$==null?void 0:$.target)==null?void 0:ae.result;D.attrs.src=z,i("upload",z,D),i("contentUpdated",B())},q.readAsDataURL(O)}else D.attrs.src=O,i("upload",O,D),i("contentUpdated",B())}const Y=async O=>{};return(O,D)=>{const q=l.resolveComponent("ElementRenderer",!0);return l.openBlock(),l.createElementBlock(l.Fragment,null,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.element.tag),l.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.attrs,{contenteditable:u.value,onClick:D[1]||(D[1]=l.withModifiers(()=>p(a.element),["stop"])),onMouseenter:D[2]||(D[2]=()=>L(a.element)),onMouseleave:P,onBlur:X,onInput:V}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.element.editText||a.element.text),1),a.element.children&&a.element.children.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[a.element.type===l.unref(he).Block?(l.openBlock(),l.createElementBlock("div",Ou,[l.createElementVNode("span",Du,l.toDisplayString(a.element.editText||a.element.text),1),l.createElementVNode("div",Lu,[l.createElementVNode("span",{onClick:l.withModifiers(A,["stop"])},"排前"),l.createElementVNode("span",{onClick:l.withModifiers(w,["stop"])},"排后"),l.createElementVNode("span",{onClick:l.withModifiers(G,["stop"])},"删除")])])):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.element.children,($,z)=>(l.openBlock(),l.createBlock(q,{key:z,element:$,selectedElement:a.selectedElement,hoveredElement:a.hoveredElement,onSelectElement:_,onHoverElement:C,onUpdateText:F,onBlockAction:te,onAddIcon:Ae,onUpload:R},null,8,["element","selectedElement","hoveredElement"]))),128)),a.element.type===l.unref(he).Block?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("span",{class:"iconfont icon-a-tianjiaxian icon_gray_add",onClick:l.withModifiers(k,["stop"]),contenteditable:"false"}),l.createElementVNode("div",{class:"add_modules",onClick:l.withModifiers(k,["stop"]),contenteditable:"false"},D[5]||(D[5]=[l.createElementVNode("span",{class:"iconfont icon-a-tianjiamian"},null,-1),l.createElementVNode("span",null,"添加模块",-1)])),l.createElementVNode("div",{class:"cont_aidition",contenteditable:"false",onClick:D[0]||(D[0]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("span",{onClick:l.withModifiers(A,["stop"]),class:"iconfont icon-paiqian"}),l.createElementVNode("span",{onClick:l.withModifiers(w,["stop"]),class:"iconfont icon-paihou"}),l.createElementVNode("span",{onClick:l.withModifiers(G,["stop"]),class:"iconfont icon-shanchu"}),l.createElementVNode("span",{onClick:l.withModifiers(k,["stop"]),class:"iconfont icon-a-tianjiaxian"})])],64)):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)]),_:1},16,["class","contenteditable"])),a.element.type==l.unref(he).Text&&o.value?(l.openBlock(),l.createElementBlock("div",Ru,l.toDisplayString(c.value),1)):l.createCommentVNode("",!0),a.element.type===l.unref(he).Image?(l.openBlock(),l.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]=l.withModifiers(()=>{},["stop"]))},[D[6]||(D[6]=l.createElementVNode("span",{contenteditable:"false",class:"cursor-pointer"},"上传图片",-1)),l.createVNode(Tr,{customUpload:$=>x($,a.element),height:a.element.rule.maxImageHeight,width:a.element.rule.minImageWidth,uploadByImage:Y},null,8,["customUpload","height","width"])])):l.createCommentVNode("",!0),l.createVNode(mr,{ref_key:"iconRef",ref:T,onOk:be},null,512),l.createVNode(xu,{ref_key:"cropperRef",ref:ge,onOk:D[4]||(D[4]=$=>R($,a.element))},null,512)],64)}}}),[["__scopeId","data-v-6d87a1e6"]]),Mu={key:0},Pu={key:0},ku={key:1},vu={key:2},wu={key:3},Bu={key:4},Uu={key:5},Fu={key:6},Hu={key:7},Yu=l.defineComponent({__name:"EditorPanel",props:{element:Object},emits:["updateElement"],setup(e,{emit:t}){const a=e,i=t,n=l.ref({rule:{},...a.element});l.watch(()=>a.element,u=>{n.value={rule:{},...u}},{immediate:!0});function r(){i("updateElement",n.value)}return(u,o)=>(l.openBlock(),l.createElementBlock("div",null,[n.value?(l.openBlock(),l.createElementBlock("div",Mu,[n.value.text!==void 0?(l.openBlock(),l.createElementBlock("div",Pu,[o[12]||(o[12]=l.createElementVNode("label",{class:"block mt-4"},"内容",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=c=>n.value.text=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.text]])])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[o[13]||(o[13]=l.createElementVNode("label",{class:"block mt-4"},"节点",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=c=>n.value.xpath=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.xpath]])]),l.createElementVNode("div",null,[o[15]||(o[15]=l.createElementVNode("label",{class:"block mt-4"},"节点类型",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[2]||(o[2]=c=>n.value.type=c),class:"border rounded p-2 w-full"},o[14]||(o[14]=[l.createElementVNode("option",{value:0},"无",-1),l.createElementVNode("option",{value:1},"文本",-1),l.createElementVNode("option",{value:2},"图片",-1),l.createElementVNode("option",{value:3},"视频",-1),l.createElementVNode("option",{value:4},"图标",-1),l.createElementVNode("option",{value:5},"链接",-1),l.createElementVNode("option",{value:10},"块",-1)]),512),[[l.vModelSelect,n.value.type]])]),n.value.type==l.unref(he).Text?(l.openBlock(),l.createElementBlock("div",ku,[o[16]||(o[16]=l.createElementVNode("label",{class:"block mt-4"},"最大文本长度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=c=>n.value.rule.maxText=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxText]])])):l.createCommentVNode("",!0),n.value.type==l.unref(he).Text?(l.openBlock(),l.createElementBlock("div",vu,[o[17]||(o[17]=l.createElementVNode("label",{class:"block mt-4"},"最小文本长度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[4]||(o[4]=c=>n.value.rule.minText=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minText]])])):l.createCommentVNode("",!0),n.value.type==l.unref(he).Image?(l.openBlock(),l.createElementBlock("div",wu,[o[18]||(o[18]=l.createElementVNode("label",{class:"block mt-4"},"图片宽度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=c=>n.value.rule.minImageWidth=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minImageWidth]])])):l.createCommentVNode("",!0),n.value.type==l.unref(he).Image?(l.openBlock(),l.createElementBlock("div",Bu,[o[19]||(o[19]=l.createElementVNode("label",{class:"block mt-4"},"图片高度",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[6]||(o[6]=c=>n.value.rule.maxImageHeight=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxImageHeight]])])):l.createCommentVNode("",!0),n.value.type==l.unref(he).Block?(l.openBlock(),l.createElementBlock("div",Uu,[o[20]||(o[20]=l.createElementVNode("label",{class:"block mt-4"},"块最小数量",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=c=>n.value.rule.minBlock=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.minBlock]])])):l.createCommentVNode("",!0),n.value.type==l.unref(he).Block?(l.openBlock(),l.createElementBlock("div",Fu,[o[21]||(o[21]=l.createElementVNode("label",{class:"block mt-4"},"块最大数量",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":o[8]||(o[8]=c=>n.value.rule.maxBlock=c),class:"border rounded p-2 w-full"},null,512),[[l.vModelText,n.value.rule.maxBlock]])])):l.createCommentVNode("",!0),n.value.type==l.unref(he).Text||n.value.type==l.unref(he).Icon?(l.openBlock(),l.createElementBlock("div",Hu,[o[23]||(o[23]=l.createElementVNode("label",{class:"block mt-4"},"颜色/主题色",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[9]||(o[9]=c=>n.value.rule.isThemeColor=c),class:"border rounded p-2 w-full"},o[22]||(o[22]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isThemeColor]])])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[o[25]||(o[25]=l.createElementVNode("label",{class:"block mt-4"},"是否必填",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[10]||(o[10]=c=>n.value.rule.isRequired=c),class:"border rounded p-2 w-full"},o[24]||(o[24]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isRequired]])]),l.createElementVNode("div",null,[o[27]||(o[27]=l.createElementVNode("label",{class:"block mt-4"},"是否只读",-1)),l.withDirectives(l.createElementVNode("select",{"onUpdate:modelValue":o[11]||(o[11]=c=>n.value.rule.isReadOnly=c),class:"border rounded p-2 w-full"},o[26]||(o[26]=[l.createElementVNode("option",{value:!0},"是",-1),l.createElementVNode("option",{value:!1},"否",-1)]),512),[[l.vModelSelect,n.value.rule.isReadOnly]])])])):l.createCommentVNode("",!0),l.createElementVNode("button",{onClick:r,class:"mt-4 p-2 bg-blue-500 text-white rounded"},"保存")]))}});var Q;(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"})(Q||(Q={}));function Vu(e){return e.type===Q.Tag||e.type===Q.Script||e.type===Q.Style}const qu=Q.Root,Wu=Q.Text,Xu=Q.Directive,Gu=Q.Comment,$u=Q.Script,Qu=Q.Style,ju=Q.Tag,zu=Q.CDATA,Ku=Q.Doctype;let hn=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 Ct(this,t)}};class Ha extends hn{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class Nt extends Ha{constructor(){super(...arguments),this.type=Q.Text}get nodeType(){return 3}}class Ya extends Ha{constructor(){super(...arguments),this.type=Q.Comment}get nodeType(){return 8}}class Va extends Ha{constructor(t,a){super(a),this.name=t,this.type=Q.Directive}get nodeType(){return 1}}class qa extends hn{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 fn extends qa{constructor(){super(...arguments),this.type=Q.CDATA}get nodeType(){return 4}}class je extends qa{constructor(){super(...arguments),this.type=Q.Root}get nodeType(){return 9}}class Wa extends qa{constructor(t,a,i=[],n=t==="script"?Q.Script:t==="style"?Q.Style:Q.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 v(e){return Vu(e)}function $t(e){return e.type===Q.CDATA}function Re(e){return e.type===Q.Text}function Qt(e){return e.type===Q.Comment}function Xa(e){return e.type===Q.Directive}function He(e){return e.type===Q.Root}function ue(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Ct(e,t=!1){let a;if(Re(e))a=new Nt(e.data);else if(Qt(e))a=new Ya(e.data);else if(v(e)){const i=t?Ga(e.children):[],n=new Wa(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($t(e)){const i=t?Ga(e.children):[],n=new fn(i);i.forEach(r=>r.parent=n),a=n}else if(He(e)){const i=t?Ga(e.children):[],n=new je(i);i.forEach(r=>r.parent=n),e["x-mode"]&&(n["x-mode"]=e["x-mode"]),a=n}else if(Xa(e)){const i=new Va(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 Ga(e){const t=e.map(a=>Ct(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 En={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class Zu{constructor(t,a,i){this.dom=[],this.root=new je(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof a=="function"&&(i=a,a=En),typeof t=="object"&&(a=t,t=void 0),this.callback=t??null,this.options=a??En,this.elementCB=i??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new je(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?Q.Tag:void 0,n=new Wa(t,a,void 0,i);this.addNode(n),this.tagStack.push(n)}ontext(t){const{lastNode:a}=this;if(a&&a.type===Q.Text)a.data+=t,this.options.withEndIndices&&(a.endIndex=this.parser.endIndex);else{const i=new Nt(t);this.addNode(i),this.lastNode=i}}oncomment(t){if(this.lastNode&&this.lastNode.type===Q.Comment){this.lastNode.data+=t;return}const a=new Ya(t);this.addNode(a),this.lastNode=a}oncommentend(){this.lastNode=null}oncdatastart(){const t=new Nt(""),a=new fn([t]);this.addNode(a),t.parent=a,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,a){const i=new Va(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 $a=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),mn=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Qa;const Ju=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]]),ja=(Qa=String.fromCodePoint)!==null&&Qa!==void 0?Qa: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 eo(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ju.get(e))!==null&&t!==void 0?t:e}var oe;(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"})(oe||(oe={}));const to=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 za(e){return e>=oe.ZERO&&e<=oe.NINE}function ao(e){return e>=oe.UPPER_A&&e<=oe.UPPER_F||e>=oe.LOWER_A&&e<=oe.LOWER_F}function io(e){return e>=oe.UPPER_A&&e<=oe.UPPER_Z||e>=oe.LOWER_A&&e<=oe.LOWER_Z||za(e)}function no(e){return e===oe.EQUALS||io(e)}var ce;(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"})(ce||(ce={}));var Ce;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ce||(Ce={}));class Ka{constructor(t,a,i){this.decodeTree=t,this.emitCodePoint=a,this.errors=i,this.state=ce.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ce.Strict}startEntity(t){this.decodeMode=t,this.state=ce.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case ce.EntityStart:return t.charCodeAt(a)===oe.NUM?(this.state=ce.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=ce.NamedEntity,this.stateNamedEntity(t,a));case ce.NumericStart:return this.stateNumericStart(t,a);case ce.NumericDecimal:return this.stateNumericDecimal(t,a);case ce.NumericHex:return this.stateNumericHex(t,a);case ce.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|to)===oe.LOWER_X?(this.state=ce.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=ce.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(za(n)||ao(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(za(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===oe.SEMI)this.consumed+=1;else if(this.decodeMode===Ce.Strict)return 0;return this.emitCodePoint(eo(this.result),this.consumed),this.errors&&(t!==oe.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=so(i,n,this.treeIndex+Math.max(1,r),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ce.Attribute&&(r===0||no(u))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],r=(n&Ye.VALUE_LENGTH)>>14,r!==0){if(u===oe.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Ce.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 ce.NamedEntity:return this.result!==0&&(this.decodeMode!==Ce.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ce.NumericDecimal:return this.emitNumericEntity(0,2);case ce.NumericHex:return this.emitNumericEntity(0,3);case ce.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ce.EntityStart:return 0}}}function Tn(e){let t="";const a=new Ka(e,i=>t+=ja(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 f=a.write(n,o+1);if(f<0){u=o+a.end();break}u=o+f,o=f===0?u+1:u}const c=t+n.slice(u);return t="",c}}function so(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 c=i-r;return c<0||c>=n?-1:e[a+c]-1}let u=a,o=u+n-1;for(;u<=o;){const c=u+o>>>1,f=e[c];if(f<i)u=c+1;else if(f>i)o=c-1;else return e[c+n]}return-1}Tn($a),Tn(mn);const pn=/["&'<>$\x80-\uFFFF]/g,ro=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),uo=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 bn(e){let t="",a=0,i;for(;(i=pn.exec(e))!==null;){const n=i.index,r=e.charCodeAt(n),u=ro.get(r);u!==void 0?(t+=e.substring(a,n)+u,a=n+1):(t+=`${e.substring(a,n)}&#x${uo(e,n).toString(16)};`,a=pn.lastIndex+=+((r&64512)===55296))}return t+e.substr(a)}function gn(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 _n=gn(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),An=gn(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),oo=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])),co=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])),lo=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function ho(e){return e.replace(/"/g,""")}function fo(e,t){var a;if(!e)return;const i=((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)===!1?ho:t.xmlMode||t.encodeEntities!=="utf8"?bn:_n;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=co.get(n))!==null&&u!==void 0?u:n),!t.emptyAttrs&&!t.xmlMode&&o===""?n:`${n}="${i(o)}"`}).join(" ")}const Nn=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+=Eo(a[n],t);return i}function Eo(e,t){switch(e.type){case qu:return jt(e.children,t);case Ku:case Xu:return bo(e);case Gu:return Ao(e);case zu:return _o(e);case $u:case Qu:case ju:return po(e,t);case Wu:return go(e,t)}}const mo=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),To=new Set(["svg","math"]);function po(e,t){var a;t.xmlMode==="foreign"&&(e.name=(a=oo.get(e.name))!==null&&a!==void 0?a:e.name,e.parent&&mo.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&To.has(e.name)&&(t={...t,xmlMode:"foreign"});let i=`<${e.name}`;const n=fo(e.attribs,t);return n&&(i+=` ${n}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Nn.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=jt(e.children,t)),(t.xmlMode||!Nn.has(e.name))&&(i+=`</${e.name}>`)),i}function bo(e){return`<${e.data}>`}function go(e,t){var a;let i=e.data||"";return((a=t.encodeEntities)!==null&&a!==void 0?a:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&lo.has(e.parent.name))&&(i=t.xmlMode||t.encodeEntities!=="utf8"?bn(i):An(i)),i}function _o(e){return`<![CDATA[${e.children[0].data}]]>`}function Ao(e){return`<!--${e.data}-->`}function Cn(e,t){return jt(e,t)}function No(e,t){return ue(e)?e.children.map(a=>Cn(a,t)).join(""):""}function zt(e){return Array.isArray(e)?e.map(zt).join(""):v(e)?e.name==="br"?`
|
11
|
+
`:zt(e.children):$t(e)?zt(e.children):Re(e)?e.data:""}function ut(e){return Array.isArray(e)?e.map(ut).join(""):ue(e)&&!Qt(e)?ut(e.children):Re(e)?e.data:""}function Kt(e){return Array.isArray(e)?e.map(Kt).join(""):ue(e)&&(e.type===Q.Tag||$t(e))?Kt(e.children):Re(e)?e.data:""}function Zt(e){return ue(e)?e.children:[]}function In(e){return e.parent||null}function Sn(e){const t=In(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 Co(e,t){var a;return(a=e.attribs)===null||a===void 0?void 0:a[t]}function Io(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function So(e){return e.name}function Za(e){let{next:t}=e;for(;t!==null&&!v(t);)({next:t}=t);return t}function Ja(e){let{prev:t}=e;for(;t!==null&&!v(t);)({prev:t}=t);return t}function ze(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 xo(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 Oo(e,t){if(ze(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 Do(e,t){ze(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 Lo(e,t){if(ze(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 Ro(e,t){ze(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 ei(e,Array.isArray(t)?t:[t],a,i)}function ei(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&&ue(o)&&o.children.length>0&&(u.unshift(0),r.unshift(o.children))}}function yo(e,t){return t.find(e)}function ti(e,t,a=!0){let i=null;for(let n=0;n<t.length&&!i;n++){const r=t[n];if(v(r))e(r)?i=r:a&&r.children.length>0&&(i=ti(e,r.children,!0));else continue}return i}function xn(e,t){return t.some(a=>v(a)&&(e(a)||xn(e,a.children)))}function Mo(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]++];v(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=>v(t)&&e(t.name):e==="*"?v:t=>v(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 On(e,t){return typeof t=="function"?a=>v(a)&&t(a.attribs[e]):a=>v(a)&&a.attribs[e]===t}function Po(e,t){return a=>e(a)||t(a)}function Dn(e){const t=Object.keys(e).map(a=>{const i=e[a];return Object.prototype.hasOwnProperty.call(ea,a)?ea[a](i):On(a,i)});return t.length===0?null:t.reduce(Po)}function ko(e,t){const a=Dn(e);return a?a(t):!0}function vo(e,t,a,i=1/0){const n=Dn(e);return n?Jt(n,t,a,i):[]}function wo(e,t,a=!0){return Array.isArray(t)||(t=[t]),ti(On("id",e),t,a)}function ot(e,t,a=!0,i=1/0){return Jt(ea.tag_name(e),t,a,i)}function Bo(e,t,a=!0,i=1/0){return Jt(ea.tag_type(e),t,a,i)}function Uo(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 Ie;(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"})(Ie||(Ie={}));function Ln(e,t){const a=[],i=[];if(e===t)return 0;let n=ue(e)?e:e.parent;for(;n;)a.unshift(n),n=n.parent;for(n=ue(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 Ie.DISCONNECTED;const o=a[u-1],c=o.children,f=a[u],m=i[u];return c.indexOf(f)>c.indexOf(m)?o===t?Ie.FOLLOWING|Ie.CONTAINED_BY:Ie.FOLLOWING:o===e?Ie.PRECEDING|Ie.CONTAINS:Ie.PRECEDING}function ct(e){return e=e.filter((t,a,i)=>!i.includes(t,a+1)),e.sort((t,a)=>{const i=Ln(t,a);return i&Ie.PRECEDING?-1:i&Ie.FOLLOWING?1:0}),e}function Fo(e){const t=ta(Wo,e);return t?t.name==="feed"?Ho(t):Yo(t):null}function Ho(e){var t;const a=e.children,i={type:"atom",items:ot("entry",a).map(u=>{var o;const{children:c}=u,f={media:Rn(c)};me(f,"id","id",c),me(f,"title","title",c);const m=(o=ta("link",c))===null||o===void 0?void 0:o.attribs.href;m&&(f.link=m);const T=Ve("summary",c)||Ve("content",c);T&&(f.description=T);const p=Ve("updated",c);return p&&(f.pubDate=new Date(p)),f})};me(i,"id","id",a),me(i,"title","title",a);const n=(t=ta("link",a))===null||t===void 0?void 0:t.attribs.href;n&&(i.link=n),me(i,"description","subtitle",a);const r=Ve("updated",a);return r&&(i.updated=new Date(r)),me(i,"author","email",a,!0),i}function Yo(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:ot("item",e.children).map(u=>{const{children:o}=u,c={media:Rn(o)};me(c,"id","guid",o),me(c,"title","title",o),me(c,"link","link",o),me(c,"description","description",o);const f=Ve("pubDate",o)||Ve("dc:date",o);return f&&(c.pubDate=new Date(f)),c})};me(n,"title","title",i),me(n,"link","link",i),me(n,"description","description",i);const r=Ve("lastBuildDate",i);return r&&(n.updated=new Date(r)),me(n,"author","managingEditor",i,!0),n}const Vo=["url","type","lang"],qo=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Rn(e){return ot("media:content",e).map(t=>{const{attribs:a}=t,i={medium:a.medium,isDefault:!!a.isDefault};for(const n of Vo)a[n]&&(i[n]=a[n]);for(const n of qo)a[n]&&(i[n]=parseInt(a[n],10));return a.expression&&(i.expression=a.expression),i})}function ta(e,t){return ot(e,t,!0,1)[0]}function Ve(e,t,a=!1){return ut(ot(e,t,a,1)).trim()}function me(e,t,a,i,n=!1){const r=Ve(a,i,n);r&&(e[t]=r)}function Wo(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const aa=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return Ie},append:Do,appendChild:Oo,compareDocumentPosition:Ln,existsOne:xn,filter:Jt,find:ei,findAll:Mo,findOne:ti,findOneChild:yo,getAttributeValue:Co,getChildren:Zt,getElementById:wo,getElements:vo,getElementsByTagName:ot,getElementsByTagType:Bo,getFeed:Fo,getInnerHTML:No,getName:So,getOuterHTML:Cn,getParent:In,getSiblings:Sn,getText:zt,hasAttrib:Io,hasChildren:ue,innerText:Kt,isCDATA:$t,isComment:Qt,isDocument:He,isTag:v,isText:Re,nextElementSibling:Za,prepend:Ro,prependChild:Lo,prevElementSibling:Ja,removeElement:ze,removeSubsets:Uo,replaceElement:xo,testElement:ko,textContent:ut,uniqueSort:ct},Symbol.toStringTag,{value:"Module"})),Xo={_useHtmlParser2:!1};function ai(e,t){if(!e)return t??Xo;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 yn(e,t,a){return e?e(t??e._root.children,null,void 0,a).toString():""}function Go(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function $o(e,t){const a=Go(e)?(t=e,void 0):e,i={...this===null||this===void 0?void 0:this._options,...ai(t)};return yn(this,a,i)}function Qo(e){const t={...this._options,xmlMode:!0};return yn(this,e,t)}function It(e){const t=e??(this?this.root():[]);let a="";for(let i=0;i<t.length;i++)a+=ut(t[i]);return a}function jo(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 zo(){return this(this._root)}function Mn(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 Ko(e){return this.root().extract(e)}function Zo(e,t){if(!Pn(e)||!Pn(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 Pn(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 Jo=Object.freeze(Object.defineProperty({__proto__:null,contains:Mn,extract:Ko,html:$o,merge:Zo,parseHTML:jo,root:zo,text:It,xml:Qo},Symbol.toStringTag,{value:"Module"}));function Pe(e){return e.cheerio!=null}function ec(e){return e.replace(/[._-](\w|$)/g,(t,a)=>a.toUpperCase())}function tc(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 Ke;(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"})(Ke||(Ke={}));function ii(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const a=e.charCodeAt(t+1);return(a>=Ke.LowerA&&a<=Ke.LowerZ||a>=Ke.UpperA&&a<=Ke.UpperZ||a===Ke.Exclamation)&&e.includes(">",t+2)}const St=Object.prototype.hasOwnProperty,xt=/\s+/,ni="data-",si=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ac=/^{[^]*}$|^\[[^]*]$/;function ia(e,t,a){var i;if(!(!e||!v(e))){if((i=e.attribs)!==null&&i!==void 0||(e.attribs={}),!t)return e.attribs;if(St.call(e.attribs,t))return!a&&si.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return It(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function lt(e,t,a){a===null?Bn(e,t):e.attribs[t]=`${a}`}function ic(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)=>{v(a)&<(a,e,t.call(a,i,a.attribs[e]))})}return ee(this,a=>{if(v(a))if(typeof e=="object")for(const i of Object.keys(e)){const n=e[i];lt(a,i,n)}else lt(a,e,t)})}return arguments.length>1?this:ia(this[0],e,this.options.xmlMode)}function kn(e,t,a){return t in e?e[t]:!a&&si.test(t)?ia(e,t,!1)!==void 0:ia(e,t,a)}function ri(e,t,a,i){t in e?e[t]=a:lt(e,t,!i&&si.test(t)?a?"":null:`${a}`)}function nc(e,t){var a;if(typeof e=="string"&&t===void 0){const i=this[0];if(!i||!v(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 ut(i);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return kn(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)=>{v(i)&&ri(i,e,t.call(i,n,kn(i,e,this.options.xmlMode)),this.options.xmlMode)})}return ee(this,i=>{if(v(i))if(typeof e=="object")for(const n of Object.keys(e)){const r=e[n];ri(i,n,r,this.options.xmlMode)}else ri(i,e,t,this.options.xmlMode)})}}function vn(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 sc(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(ni))continue;const a=ec(t.slice(ni.length));St.call(e.data,a)||(e.data[a]=wn(e.attribs[t]))}return e.data}function rc(e,t){const a=ni+tc(t),i=e.data;if(St.call(i,t))return i[t];if(St.call(e.attribs,a))return i[t]=wn(e.attribs[a])}function wn(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(ac.test(e))try{return JSON.parse(e)}catch{}return e}function uc(e,t){var a;const i=this[0];if(!i||!v(i))return;const n=i;return(a=n.data)!==null&&a!==void 0||(n.data={}),e==null?sc(n):typeof e=="object"||t!==void 0?(ee(this,r=>{v(r)&&(typeof e=="object"?vn(r,e):vn(r,e,t))}),this):rc(n,e)}function oc(e){const t=arguments.length===0,a=this[0];if(!a||!v(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=>It(n.children)):i.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Bn(e,t){!e.attribs||!St.call(e.attribs,t)||delete e.attribs[t]}function na(e){return e?e.trim().split(xt):[]}function cc(e){const t=na(e);for(const a of t)ee(this,i=>{v(i)&&Bn(i,a)});return this}function lc(e){return this.toArray().some(t=>{const a=v(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||xt.test(a[i-1]))&&(n===a.length||xt.test(a[n])))return!0}return!1})}function Un(e){if(typeof e=="function")return ee(this,(i,n)=>{if(v(i)){const r=i.attribs.class||"";Un.call([i],e.call(i,n,r))}});if(!e||typeof e!="string")return this;const t=e.split(xt),a=this.length;for(let i=0;i<a;i++){const n=this[i];if(!v(n))continue;const r=ia(n,"class",!1);if(r){let u=` ${r} `;for(const o of t){const c=`${o} `;u.includes(` ${c}`)||(u+=c)}lt(n,"class",u.trim())}else lt(n,"class",t.join(" ").trim())}return this}function Fn(e){if(typeof e=="function")return ee(this,(n,r)=>{v(n)&&Fn.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(v(n))if(i)n.attribs.class="";else{const r=na(n.attribs.class);let u=!1;for(let o=0;o<a;o++){const c=r.indexOf(t[o]);c>=0&&(r.splice(c,1),u=!0,o--)}u&&(n.attribs.class=r.join(" "))}})}function Hn(e,t){if(typeof e=="function")return ee(this,(u,o)=>{v(u)&&Hn.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const a=e.split(xt),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(!v(o))continue;const c=na(o.attribs.class);for(let f=0;f<i;f++){const m=c.indexOf(a[f]);n>=0&&m<0?c.push(a[f]):n<=0&&m>=0&&c.splice(m,1)}o.attribs.class=c.join(" ")}return this}const dc=Object.freeze(Object.defineProperty({__proto__:null,addClass:Un,attr:ic,data:uc,hasClass:lc,prop:nc,removeAttr:cc,removeClass:Fn,toggleClass:Hn,val:oc},Symbol.toStringTag,{value:"Module"}));var y;(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"})(y||(y={}));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 Yn=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,hc=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,fc=new Map([[126,ne.Element],[94,ne.Start],[36,ne.End],[42,ne.Any],[33,ne.Not],[124,ne.Hyphen]]),Ec=new Set(["has","not","matches","is","where","host","host-context"]);function Ot(e){switch(e.type){case y.Adjacent:case y.Child:case y.Descendant:case y.Parent:case y.Sibling:case y.ColumnCombinator:return!0;default:return!1}}const mc=new Set(["contains","icontains"]);function Tc(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 Dt(e){return e.replace(hc,Tc)}function ui(e){return e===39||e===34}function Vn(e){return e===32||e===9||e===10||e===12||e===13}function sa(e){const t=[],a=qn(t,`${e}`,0);if(a<e.length)throw new Error(`Unmatched selector: ${e.slice(a)}`);return t}function qn(e,t,a){let i=[];function n(p){const _=t.slice(a+p).match(Yn);if(!_)throw new Error(`Expected name, found ${t.slice(a)}`);const[C]=_;return a+=p+C.length,Dt(C)}function r(p){for(a+=p;a<t.length&&Vn(t.charCodeAt(a));)a++}function u(){a+=1;const p=a;let _=1;for(;_>0&&a<t.length;a++)t.charCodeAt(a)===40&&!o(a)?_++:t.charCodeAt(a)===41&&!o(a)&&_--;if(_)throw new Error("Parenthesis not matched");return Dt(t.slice(p,a-1))}function o(p){let _=0;for(;t.charCodeAt(--p)===92;)_++;return(_&1)===1}function c(){if(i.length>0&&Ot(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function f(p){if(i.length>0&&i[i.length-1].type===y.Descendant){i[i.length-1].type=p;return}c(),i.push({type:p})}function m(p,_){i.push({type:y.Attribute,name:p,action:_,value:n(1),namespace:null,ignoreCase:"quirks"})}function T(){if(i.length&&i[i.length-1].type===y.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 p=t.charCodeAt(a);switch(p){case 32:case 9:case 10:case 12:case 13:{(i.length===0||i[0].type!==y.Descendant)&&(c(),i.push({type:y.Descendant})),r(1);break}case 62:{f(y.Child),r(1);break}case 60:{f(y.Parent),r(1);break}case 126:{f(y.Sibling),r(1);break}case 43:{f(y.Adjacent),r(1);break}case 46:{m("class",ne.Element);break}case 35:{m("id",ne.Equals);break}case 91:{r(1);let _,C=null;t.charCodeAt(a)===124?_=n(1):t.startsWith("*|",a)?(C="*",_=n(2)):(_=n(0),t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==61&&(C=_,_=n(1))),r(0);let L=ne.Exists;const P=fc.get(t.charCodeAt(a));if(P){if(L=P,t.charCodeAt(a+1)!==61)throw new Error("Expected `=`");r(2)}else t.charCodeAt(a)===61&&(L=ne.Equals,r(1));let X="",B=null;if(L!=="exists"){if(ui(t.charCodeAt(a))){const k=t.charCodeAt(a);let A=a+1;for(;A<t.length&&(t.charCodeAt(A)!==k||o(A));)A+=1;if(t.charCodeAt(A)!==k)throw new Error("Attribute value didn't end");X=Dt(t.slice(a+1,A)),a=A+1}else{const k=a;for(;a<t.length&&(!Vn(t.charCodeAt(a))&&t.charCodeAt(a)!==93||o(a));)a+=1;X=Dt(t.slice(k,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 V={type:y.Attribute,name:_,action:L,value:X,namespace:C,ignoreCase:B};i.push(V);break}case 58:{if(t.charCodeAt(a+1)===58){i.push({type:y.PseudoElement,name:n(2).toLowerCase(),data:t.charCodeAt(a)===40?u():null});continue}const _=n(1).toLowerCase();let C=null;if(t.charCodeAt(a)===40)if(Ec.has(_)){if(ui(t.charCodeAt(a+1)))throw new Error(`Pseudo-selector ${_} cannot be quoted`);if(C=[],a=qn(C,t,a+1),t.charCodeAt(a)!==41)throw new Error(`Missing closing parenthesis in :${_} (${t})`);a+=1}else{if(C=u(),mc.has(_)){const L=C.charCodeAt(0);L===C.charCodeAt(C.length-1)&&ui(L)&&(C=C.slice(1,-1))}C=Dt(C)}i.push({type:y.Pseudo,name:_,data:C});break}case 44:{T(),i=[],r(1);break}default:{if(t.startsWith("/*",a)){const L=t.indexOf("*/",a+2);if(L<0)throw new Error("Comment was not terminated");a=L+2,i.length===0&&r(0);break}let _=null,C;if(p===42)a+=1,C="*";else if(p===124){if(C="",t.charCodeAt(a+1)===124){f(y.ColumnCombinator),r(2);break}}else if(Yn.test(t.slice(a)))C=n(0);else break e;t.charCodeAt(a)===124&&t.charCodeAt(a+1)!==124&&(_=C,t.charCodeAt(a+1)===42?(C="*",a+=2):C=n(1)),i.push(C==="*"?{type:y.Universal,namespace:_}:{type:y.Tag,name:C,namespace:_})}}}return T(),a}function pc(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=pc(ra),Wn=new Map([[y.Universal,50],[y.Tag,30],[y.Attribute,1],[y.Pseudo,0]]);function oi(e){return!Wn.has(e.type)}const bc=new Map([[ne.Exists,10],[ne.Equals,8],[ne.Not,7],[ne.Start,6],[ne.End,6],[ne.Any,5]]);function gc(e){const t=e.map(Xn);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 Xn(e){var t,a;let i=(t=Wn.get(e.type))!==null&&t!==void 0?t:-1;return e.type===y.Attribute?(i=(a=bc.get(e.action))!==null&&a!==void 0?a:4,e.action===ne.Equals&&e.name==="id"&&(i=9),e.ignoreCase&&(i>>=1)):e.type===y.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(Xn)))),i<0&&(i=0)):i=2:i=3),i}const _c=/[-[\]{}()*+?.,\\^$|#\s]/g;function Gn(e){return e.replace(_c,"\\$&")}const Ac=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 Ze(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Ac.has(e.name)}const Nc={equals(e,t,a){const{adapter:i}=a,{name:n}=t;let{value:r}=t;return Ze(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 Ze(t,a)?(r=r.toLowerCase(),function(c){const f=i.getAttributeValue(c,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u).toLowerCase()===r&&e(c)}):function(c){const f=i.getAttributeValue(c,n);return f!=null&&(f.length===u||f.charAt(u)==="-")&&f.substr(0,u)===r&&e(c)}},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)${Gn(r)}(?:$|\\s)`,Ze(t,a)?"i":"");return function(c){const f=i.getAttributeValue(c,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(c)}},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:Ze(t,a)?(r=r.toLowerCase(),o=>{const c=i.getAttributeValue(o,n);return c!=null&&c.length>=u&&c.substr(0,u).toLowerCase()===r&&e(o)}):o=>{var c;return!!(!((c=i.getAttributeValue(o,n))===null||c===void 0)&&c.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:Ze(t,a)?(r=r.toLowerCase(),o=>{var c;return((c=i.getAttributeValue(o,n))===null||c===void 0?void 0:c.substr(u).toLowerCase())===r&&e(o)}):o=>{var c;return!!(!((c=i.getAttributeValue(o,n))===null||c===void 0)&&c.endsWith(r))&&e(o)}},any(e,t,a){const{adapter:i}=a,{name:n,value:r}=t;if(r==="")return U.falseFunc;if(Ze(t,a)){const u=new RegExp(Gn(r),"i");return function(c){const f=i.getAttributeValue(c,n);return f!=null&&f.length>=r.length&&u.test(f)&&e(c)}}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):Ze(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)}},Cc=new Set([9,10,12,13,32]),$n=48,Ic=57;function Sc(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 c=t;let f=0;for(;t<e.length&&e.charCodeAt(t)>=$n&&e.charCodeAt(t)<=Ic;)f=f*10+(e.charCodeAt(t)-$n),t++;return t===c?null:f}function o(){for(;t<e.length&&Cc.has(e.charCodeAt(t));)t++}}function xc(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 xc(Sc(e))}function oa(e,t){return a=>{const i=t.getParent(a);return i!=null&&t.isTag(i)&&e(a)}}const ci={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 c=0;for(let f=0;f<o.length&&!i(u,o[f]);f++)a.isTag(o[f])&&c++;return n(c)&&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 c=0;for(let f=o.length-1;f>=0&&!i(u,o[f]);f--)a.isTag(o[f])&&c++;return n(c)&&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 c=0;for(let f=0;f<o.length;f++){const m=o[f];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&c++}return n(c)&&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 c=0;for(let f=o.length-1;f>=0;f--){const m=o[f];if(i(u,m))break;a.isTag(m)&&a.getName(m)===a.getName(u)&&c++}return n(c)&&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?ci.root(e,t,a):i.length===1?r=>n(i[0],r)&&e(r):r=>i.includes(r)&&e(r)},hover:li("isHovered"),visited:li("isVisited"),active:li("isActive")};function li(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 Qn={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 jn(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 Oc={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
|
12
12
|
:is(button, input, select, textarea, optgroup, option)[disabled],
|
13
13
|
optgroup[disabled] > option,
|
14
14
|
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
|
15
|
-
)`,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])"},Kn={};function Dc(e,t){return e===U.falseFunc?U.falseFunc:a=>t.isTag(a)&&e(a)}function zn(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 ci(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 li=(e,t,a,i,n)=>{const r=n(t,ci(a),i);return r===U.trueFunc?e:r===U.falseFunc?U.falseFunc:u=>r(u)&&e(u)},di={is:li,matches:li,where:li,not(e,t,a,i,n){const r=n(t,ci(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=ci(a);u.relativeSelector=!0;const o=t.some(E=>E.some(ri))?[Kn]:void 0,c=n(t,u,o);if(c===U.falseFunc)return U.falseFunc;const f=Dc(c,r);if(o&&c!==U.trueFunc){const{shouldTestNextSiblings:E=!1}=c;return T=>{if(!e(T))return!1;o[0]=T;const p=r.getChildren(T),A=E?[...p,...zn(T,r)]:p;return r.existsOne(f,A)}}return E=>e(E)&&r.existsOne(f,r.getChildren(E))}};function Lc(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in di))throw new Error(`Unknown pseudo-class :${u}(${o})`);return di[u](e,o,a,i,n)}const c=(r=a.pseudos)===null||r===void 0?void 0:r[u],f=typeof c=="string"?c:Oc[u];if(typeof f=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const E=na(f);return di.is(e,E,a,i,n)}if(typeof c=="function")return jn(c,u,o,1),E=>c(E,o)&&e(E);if(u in ui)return ui[u](e,o,a,i);if(u in Qn){const E=Qn[u];return jn(E,u,o,2),T=>E(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function hi(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function Rc(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case R.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case R.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case R.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()),Nc[t.action](e,t,a)}case R.Pseudo:return Lc(e,t,a,i,n);case R.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(f){return r.getName(f)===o&&e(f)}}case R.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(f){let E=f;for(;E=hi(E,r);)if(e(E))return!0;return!1};const o=new WeakSet;return function(f){let E=f;for(;E=hi(E,r);)if(!o.has(E)){if(r.isTag(E)&&e(E))return!0;o.add(E)}return!1}}case"_flexibleDescendant":return function(c){let f=c;do if(e(f))return!0;while(f=hi(f,r));return!1};case R.Parent:return function(c){return r.getChildren(c).some(f=>r.isTag(f)&&e(f))};case R.Child:return function(c){const f=r.getParent(c);return f!=null&&r.isTag(f)&&e(f)};case R.Sibling:return function(c){const f=r.getSiblings(c);for(let E=0;E<f.length;E++){const T=f[E];if(u(c,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case R.Adjacent:return r.prevElementSibling?function(c){const f=r.prevElementSibling(c);return f!=null&&e(f)}:function(c){const f=r.getSiblings(c);let E;for(let T=0;T<f.length;T++){const p=f[T];if(u(c,p))break;r.isTag(p)&&(E=p)}return!!E&&e(E)};case R.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function Zn(e){return e.type===R.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Zn)))}const yc={type:R.Descendant},Mc={type:"_flexibleDescendant"},Pc={type:R.Pseudo,name:"scope",data:null};function kc(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===Kn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&ri(n[0])&&n[0].type!==R.Descendant))if(i&&!n.some(Zn))n.unshift(yc);else continue;n.unshift(Pc)}}function Jn(e,t,a){var i;e.forEach(gc),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)kc(e,t,r);else if(e.some(c=>c.length>0&&ri(c[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(c=>{if(c.length>=2){const[f,E]=c;f.type!==R.Pseudo||f.name!=="scope"||(n&&E.type===R.Descendant?c[1]=Mc:(E.type===R.Adjacent||E.type===R.Sibling)&&(u=!0))}return vc(c,t,r)}).reduce(wc,U.falseFunc);return o.shouldTestNextSiblings=u,o}function vc(e,t,a){var i;return e.reduce((n,r)=>n===U.falseFunc?U.falseFunc:Rc(n,r,t,a,Jn),(i=t.rootFunc)!==null&&i!==void 0?i:U.trueFunc)}function wc(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 es=(e,t)=>e===t,Bc={adapter:ta,equals:es};function Uc(e){var t,a,i,n;const r=e??Bc;return(t=r.adapter)!==null&&t!==void 0||(r.adapter=ta),(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:es),r}function Fc(e){return function(a,i,n){const r=Uc(i);return e(a,r,n)}}const fi=Fc(Jn);function ts(e,t,a=!1){return a&&(e=Hc(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function Hc(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=zn(a[n],t);a.push(...r)}return a}const Yc=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function oa(e){return e.type!=="pseudo"?!1:Yc.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(oa)):!1}function Vc(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 qc(e){for(;e.parent;)e=e.parent;return e}function Ei(e){const t=[],a=[];for(const i of e)i.some(oa)?t.push(i):a.push(i);return[a,t]}const Wc={type:R.Universal,namespace:null},Xc={type:R.Pseudo,name:"scope",data:null};function as(e,t,a={}){return is([e],t,a)}function is(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=Ei(na(t));return i.length>0&&e.some(fi(i,a))||n.some(r=>rs(r,e,a).length>0)}function Gc(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(ss(a,t,i));return t.filter(u=>!r.has(u))}}}function ns(e,t,a={}){return ss(na(e),t,a)}function ss(e,t,a){if(t.length===0)return[];const[i,n]=Ei(e);let r;if(i.length){const u=Ti(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(E=>k(E)&&!r.has(E)):t).length===0)break;const f=rs(o,t,a);if(f.length)if(r)f.forEach(E=>r.add(E));else{if(u===n.length-1)return f;r=new Set(f)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function rs(e,t,a){var i;if(e.some(xt)){const n=(i=a.root)!==null&&i!==void 0?i:qc(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(Xc),ca(n,e,r,!0,t.length)}return ca(t,e,a,!1,t.length)}function $c(e,t,a={},i=1/0){if(typeof e=="function")return us(t,e);const[n,r]=Ei(na(e)),u=r.map(o=>ca(t,o,a,!0,i));return n.length&&u.push(mi(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:ot(u.reduce((o,c)=>[...o,...c]))}function ca(e,t,a,i,n){const r=t.findIndex(oa),u=t.slice(0,r),o=t[r],c=t.length-1===r?n:1/0,f=Vc(o.name,o.data,c);if(f===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(xt)?mi(e,[u],a,f):Ti(e,[u],a)).slice(0,f);let p=Gc(o.name,T,o.data,a);if(p.length===0||t.length===r+1)return p;const A=t.slice(r+1),C=A.some(xt);if(C){if(xt(A[0])){const{type:L}=A[0];(L===R.Sibling||L===R.Adjacent)&&(p=ts(p,ta,!0)),A.unshift(Wc)}a={...a,relativeSelector:!1,rootFunc:L=>p.includes(L)}}else a.rootFunc&&a.rootFunc!==sa.trueFunc&&(a={...a,rootFunc:sa.trueFunc});return A.some(oa)?ca(p,A,a,!1,n):C?mi(p,[A],a,n):Ti(p,[A],a)}function mi(e,t,a,i){const n=fi(t,a,e);return us(e,n,i)}function us(e,t,a=1/0){const i=ts(e,ta,t.shouldTestNextSiblings);return Za(n=>k(n)&&t(n),i,!0,a)}function Ti(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(k);if(i.length===0)return i;const n=fi(t,a);return n===sa.trueFunc?i:i.filter(n)}const Qc=/^\s*[+~]/;function jc(e){if(!e)return this._make([]);if(typeof e!="string"){const t=ye(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>Mn(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function Kc(e,t){var a;const i=this.toArray(),n=Qc.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($c(e,n,r,t))}function pi(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=_i(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 Dt=pi((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}),bi=pi((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 gi(e,...t){let a=null;const i=pi((n,r)=>{const u=[];return K(r,o=>{for(let c;(c=n(o))&&!(a!=null&&a(c,u.length));o=c)u.push(c)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>as(o,n,this.options):n?Lt(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 zc=bi(({parent:e})=>e&&!Ue(e)?e:null,lt),Zc=Dt(e=>{const t=[];for(;e.parent&&!Ue(e.parent);)t.push(e.parent),e=e.parent;return t},ot,e=>e.reverse()),Jc=gi(({parent:e})=>e&&!Ue(e)?e:null,ot,e=>e.reverse());function el(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=>as(r,e,i):Lt(e);return K(this,r=>{for(r&&!Ue(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 tl=bi(e=>Ka(e)),al=Dt(e=>{const t=[];for(;e.next;)e=e.next,k(e)&&t.push(e);return t},lt),il=gi(e=>Ka(e),lt),nl=bi(e=>za(e)),sl=Dt(e=>{const t=[];for(;e.prev;)e=e.prev,k(e)&&t.push(e);return t},lt),rl=gi(e=>za(e),lt),ul=Dt(e=>Sn(e).filter(t=>k(t)&&t!==e),ot),ol=Dt(e=>zt(e).filter(k),lt);function cl(){const e=this.toArray().reduce((t,a)=>ie(a)?t.concat(a.children):t,[]);return this._make(e)}function ll(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function dl(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 Lt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):ye(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function hl(e){var t;return this._make(_i(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function _i(e,t,a,i){return typeof t=="string"?ns(t,e,{xmlMode:a,root:i}):e.filter(Lt(t))}function fl(e){const t=this.toArray();return typeof e=="string"?is(t.filter(k),e,this.options):e?t.some(Lt(e)):!1}function El(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(ns(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=Lt(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function ml(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function Tl(){return this.length>1?this._make(this[0]):this}function pl(){return this.length>0?this._make(this[this.length-1]):this}function bl(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 gl(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function _l(){return Array.prototype.slice.call(this)}function Al(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=ye(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function Nl(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function Cl(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Il(e,t){const a=this._make(e,t),i=ot([...this.get(),...a.get()]);return this._make(i)}function Sl(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const xl=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:Kc,add:Il,addBack:Sl,children:ol,closest:el,contents:cl,each:ll,end:Cl,eq:bl,filter:hl,filterArray:_i,find:jc,first:Tl,get:gl,has:ml,index:Al,is:fl,last:pl,map:dl,next:tl,nextAll:al,nextUntil:il,not:El,parent:zc,parents:Zc,parentsUntil:Jc,prev:nl,prevAll:sl,prevUntil:rl,siblings:ul,slice:Nl,toArray:_l},Symbol.toStringTag,{value:"Module"}));function Ol(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)&&Ue(u))return u;const o=new $e([]);return ze(u,o),o}}function ze(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&&Qe(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 Dl(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?Nt(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?Nt(e,!0):e]}function os(e){return function(...t){const a=this.length-1;return K(this,(i,n)=>{if(!ie(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 Ye(e,t,a,i,n){var r,u;const o=[t,a,...i],c=t===0?null:e[t-1],f=t+a>=e.length?null:e[t+a];for(let E=0;E<i.length;++E){const T=i[E],p=T.parent;if(p){const C=p.children.indexOf(T);C>-1&&(p.children.splice(C,1),n===p&&t>C&&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=E===0?c:i[E-1],T.next=E===i.length-1?f:i[E+1]}return c&&(c.next=i[0]),f&&(f.prev=i[i.length-1]),e.splice(...o)}function Ll(e){return(ye(e)?e:this._make(e)).append(this),this}function Rl(e){return(ye(e)?e:this._make(e)).prepend(this),this}const yl=os((e,t,a)=>{Ye(t,t.length,0,e,a)}),Ml=os((e,t,a)=>{Ye(t,0,0,e,a)});function cs(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"&&!ti(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!ie(o))continue;let c=o,f=0;for(;f<c.children.length;){const E=c.children[f];k(E)?(c=E,f=0):f++}e(r,c,[o])}return this}}const Pl=cs((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);ze([e],t),Ye(n,r,0,a,i)}),kl=cs((e,t,a)=>{ie(e)&&(ze(e.children,t),ze(a,e))});function vl(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function wl(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 Bl(...e){const t=this.length-1;return K(this,(a,i)=>{if(!ie(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);Ye(n,r+1,0,o,a.parent)})}function Ul(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||(Ye(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function Fl(...e){const t=this.length-1;return K(this,(a,i)=>{if(!ie(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);Ye(n,r,0,o,a.parent)})}function Hl(e){const t=this._make(e);this.remove();const a=[];return K(t,i=>{const n=this.clone().toArray(),{parent:r}=i;if(!r)return;const u=r.children,o=u.indexOf(i);o<0||(Ye(u,o,0,n,r),a.push(...n))}),this._make(a)}function Yl(e){const t=e?this.filter(e):this;return K(t,a=>{Qe(a),a.prev=a.next=a.parent=null}),this}function Vl(e){return K(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);ze(u,null);const o=n.indexOf(t);Ye(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function ql(){return K(this,e=>{if(ie(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function Wl(e){if(e===void 0){const t=this[0];return!t||!ie(t)?null:this._render(t.children)}return K(this,t=>{if(!ie(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=ye(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;ze(a,t)})}function Xl(){return this._render(this)}function Gl(e){return e===void 0?Ct(this):typeof e=="function"?K(this,(t,a)=>this._make(t).text(e.call(t,a,Ct([t])))):K(this,t=>{if(!ie(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new At(`${e}`);ze(a,t)})}function $l(){const e=Array.prototype.map.call(this.get(),a=>Nt(a,!0)),t=new $e(e);for(const a of e)a.parent=t;return this._make(e)}const Ql=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:Dl,after:Bl,append:yl,appendTo:Ll,before:Fl,clone:$l,empty:ql,html:Wl,insertAfter:Ul,insertBefore:Hl,prepend:Ml,prependTo:Rl,remove:Yl,replaceWith:Vl,text:Gl,toString:Xl,unwrap:vl,wrap:Pl,wrapAll:wl,wrapInner:kl},Symbol.toStringTag,{value:"Module"}));function jl(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return K(this,(a,i)=>{k(a)&&ls(a,e,t,i)});if(this.length!==0)return ds(this[0],e)}function ls(e,t,a,i){if(typeof t=="string"){const n=ds(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=Kl(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];ls(e,u,t[u],r)}}}function ds(e,t){if(!e||!k(e))return;const a=zl(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 Kl(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function zl(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 Zl=Object.freeze(Object.defineProperty({__proto__:null,css:jl},Symbol.toStringTag,{value:"Module"})),hs="input,select,textarea,keygen",Jl=/%20/g,fs=/\r?\n/g;function e0(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(Jl,"+")}function t0(){return this.map((e,t)=>{const a=this._make(t);return k(t)&&t.name==="form"?a.find(hs).toArray():a.filter(hs).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(fs,`\r
|
15
|
+
)`,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])"},zn={};function Dc(e,t){return e===U.falseFunc?U.falseFunc:a=>t.isTag(a)&&e(a)}function Kn(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 di(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 hi=(e,t,a,i,n)=>{const r=n(t,di(a),i);return r===U.trueFunc?e:r===U.falseFunc?U.falseFunc:u=>r(u)&&e(u)},fi={is:hi,matches:hi,where:hi,not(e,t,a,i,n){const r=n(t,di(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=di(a);u.relativeSelector=!0;const o=t.some(m=>m.some(oi))?[zn]:void 0,c=n(t,u,o);if(c===U.falseFunc)return U.falseFunc;const f=Dc(c,r);if(o&&c!==U.trueFunc){const{shouldTestNextSiblings:m=!1}=c;return T=>{if(!e(T))return!1;o[0]=T;const p=r.getChildren(T),_=m?[...p,...Kn(T,r)]:p;return r.existsOne(f,_)}}return m=>e(m)&&r.existsOne(f,r.getChildren(m))}};function Lc(e,t,a,i,n){var r;const{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in fi))throw new Error(`Unknown pseudo-class :${u}(${o})`);return fi[u](e,o,a,i,n)}const c=(r=a.pseudos)===null||r===void 0?void 0:r[u],f=typeof c=="string"?c:Oc[u];if(typeof f=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);const m=sa(f);return fi.is(e,m,a,i,n)}if(typeof c=="function")return jn(c,u,o,1),m=>c(m,o)&&e(m);if(u in ci)return ci[u](e,o,a,i);if(u in Qn){const m=Qn[u];return jn(m,u,o,2),T=>m(T,a,o)&&e(T)}throw new Error(`Unknown pseudo-class :${u}`)}function Ei(e,t){const a=t.getParent(e);return a&&t.isTag(a)?a:null}function Rc(e,t,a,i,n){const{adapter:r,equals:u}=a;switch(t.type){case y.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case y.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case y.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()),Nc[t.action](e,t,a)}case y.Pseudo:return Lc(e,t,a,i,n);case y.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(f){return r.getName(f)===o&&e(f)}}case y.Descendant:{if(a.cacheResults===!1||typeof WeakSet>"u")return function(f){let m=f;for(;m=Ei(m,r);)if(e(m))return!0;return!1};const o=new WeakSet;return function(f){let m=f;for(;m=Ei(m,r);)if(!o.has(m)){if(r.isTag(m)&&e(m))return!0;o.add(m)}return!1}}case"_flexibleDescendant":return function(c){let f=c;do if(e(f))return!0;while(f=Ei(f,r));return!1};case y.Parent:return function(c){return r.getChildren(c).some(f=>r.isTag(f)&&e(f))};case y.Child:return function(c){const f=r.getParent(c);return f!=null&&r.isTag(f)&&e(f)};case y.Sibling:return function(c){const f=r.getSiblings(c);for(let m=0;m<f.length;m++){const T=f[m];if(u(c,T))break;if(r.isTag(T)&&e(T))return!0}return!1};case y.Adjacent:return r.prevElementSibling?function(c){const f=r.prevElementSibling(c);return f!=null&&e(f)}:function(c){const f=r.getSiblings(c);let m;for(let T=0;T<f.length;T++){const p=f[T];if(u(c,p))break;r.isTag(p)&&(m=p)}return!!m&&e(m)};case y.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function Zn(e){return e.type===y.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Zn)))}const yc={type:y.Descendant},Mc={type:"_flexibleDescendant"},Pc={type:y.Pseudo,name:"scope",data:null};function kc(e,{adapter:t},a){const i=!!(a!=null&&a.every(n=>{const r=t.isTag(n)&&t.getParent(n);return n===zn||r&&t.isTag(r)}));for(const n of e){if(!(n.length>0&&oi(n[0])&&n[0].type!==y.Descendant))if(i&&!n.some(Zn))n.unshift(yc);else continue;n.unshift(Pc)}}function Jn(e,t,a){var i;e.forEach(gc),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)kc(e,t,r);else if(e.some(c=>c.length>0&&oi(c[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1;const o=e.map(c=>{if(c.length>=2){const[f,m]=c;f.type!==y.Pseudo||f.name!=="scope"||(n&&m.type===y.Descendant?c[1]=Mc:(m.type===y.Adjacent||m.type===y.Sibling)&&(u=!0))}return vc(c,t,r)}).reduce(wc,U.falseFunc);return o.shouldTestNextSiblings=u,o}function vc(e,t,a){var i;return e.reduce((n,r)=>n===U.falseFunc?U.falseFunc:Rc(n,r,t,a,Jn),(i=t.rootFunc)!==null&&i!==void 0?i:U.trueFunc)}function wc(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 es=(e,t)=>e===t,Bc={adapter:aa,equals:es};function Uc(e){var t,a,i,n;const r=e??Bc;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:es),r}function Fc(e){return function(a,i,n){const r=Uc(i);return e(a,r,n)}}const mi=Fc(Jn);function ts(e,t,a=!1){return a&&(e=Hc(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function Hc(e,t){const a=Array.isArray(e)?e.slice(0):[e],i=a.length;for(let n=0;n<i;n++){const r=Kn(a[n],t);a.push(...r)}return a}const Yc=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function ca(e){return e.type!=="pseudo"?!1:Yc.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(ca)):!1}function Vc(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 qc(e){for(;e.parent;)e=e.parent;return e}function Ti(e){const t=[],a=[];for(const i of e)i.some(ca)?t.push(i):a.push(i);return[a,t]}const Wc={type:y.Universal,namespace:null},Xc={type:y.Pseudo,name:"scope",data:null};function as(e,t,a={}){return is([e],t,a)}function is(e,t,a={}){if(typeof t=="function")return e.some(t);const[i,n]=Ti(sa(t));return i.length>0&&e.some(mi(i,a))||n.some(r=>rs(r,e,a).length>0)}function Gc(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(ss(a,t,i));return t.filter(u=>!r.has(u))}}}function ns(e,t,a={}){return ss(sa(e),t,a)}function ss(e,t,a){if(t.length===0)return[];const[i,n]=Ti(e);let r;if(i.length){const u=bi(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=>v(m)&&!r.has(m)):t).length===0)break;const f=rs(o,t,a);if(f.length)if(r)f.forEach(m=>r.add(m));else{if(u===n.length-1)return f;r=new Set(f)}}return typeof r<"u"?r.size===t.length?t:t.filter(u=>r.has(u)):[]}function rs(e,t,a){var i;if(e.some(Ot)){const n=(i=a.root)!==null&&i!==void 0?i:qc(t[0]),r={...a,context:t,relativeSelector:!1};return e.push(Xc),la(n,e,r,!0,t.length)}return la(t,e,a,!1,t.length)}function $c(e,t,a={},i=1/0){if(typeof e=="function")return us(t,e);const[n,r]=Ti(sa(e)),u=r.map(o=>la(t,o,a,!0,i));return n.length&&u.push(pi(t,n,a,i)),u.length===0?[]:u.length===1?u[0]:ct(u.reduce((o,c)=>[...o,...c]))}function la(e,t,a,i,n){const r=t.findIndex(ca),u=t.slice(0,r),o=t[r],c=t.length-1===r?n:1/0,f=Vc(o.name,o.data,c);if(f===0)return[];const T=(u.length===0&&!Array.isArray(e)?Zt(e).filter(v):u.length===0?(Array.isArray(e)?e:[e]).filter(v):i||u.some(Ot)?pi(e,[u],a,f):bi(e,[u],a)).slice(0,f);let p=Gc(o.name,T,o.data,a);if(p.length===0||t.length===r+1)return p;const _=t.slice(r+1),C=_.some(Ot);if(C){if(Ot(_[0])){const{type:L}=_[0];(L===y.Sibling||L===y.Adjacent)&&(p=ts(p,aa,!0)),_.unshift(Wc)}a={...a,relativeSelector:!1,rootFunc:L=>p.includes(L)}}else a.rootFunc&&a.rootFunc!==ra.trueFunc&&(a={...a,rootFunc:ra.trueFunc});return _.some(ca)?la(p,_,a,!1,n):C?pi(p,[_],a,n):bi(p,[_],a)}function pi(e,t,a,i){const n=mi(t,a,e);return us(e,n,i)}function us(e,t,a=1/0){const i=ts(e,aa,t.shouldTestNextSiblings);return ei(n=>v(n)&&t(n),i,!0,a)}function bi(e,t,a){const i=(Array.isArray(e)?e:[e]).filter(v);if(i.length===0)return i;const n=mi(t,a);return n===ra.trueFunc?i:i.filter(n)}const Qc=/^\s*[+~]/;function jc(e){if(!e)return this._make([]);if(typeof e!="string"){const t=Pe(e)?e.toArray():[e],a=this.toArray();return this._make(t.filter(i=>a.some(n=>Mn(n,i))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function zc(e,t){var a;const i=this.toArray(),n=Qc.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($c(e,n,r,t))}function gi(e){return function(t,...a){return function(i){var n;let r=e(t,this);return i&&(r=Ni(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 Lt=gi((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}),_i=gi((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 Ai(e,...t){let a=null;const i=gi((n,r)=>{const u=[];return ee(r,o=>{for(let c;(c=n(o))&&!(a!=null&&a(c,u.length));o=c)u.push(c)}),u})(e,...t);return function(n,r){a=typeof n=="string"?o=>as(o,n,this.options):n?Rt(n):null;const u=i.call(this,r);return a=null,u}}function dt(e){return e.length>1?Array.from(new Set(e)):e}const Kc=_i(({parent:e})=>e&&!He(e)?e:null,dt),Zc=Lt(e=>{const t=[];for(;e.parent&&!He(e.parent);)t.push(e.parent),e=e.parent;return t},ct,e=>e.reverse()),Jc=Ai(({parent:e})=>e&&!He(e)?e:null,ct,e=>e.reverse());function el(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=>as(r,e,i):Rt(e);return ee(this,r=>{for(r&&!He(r)&&!v(r)&&(r=r.parent);r&&v(r);){if(n(r,0)){a.includes(r)||a.push(r);break}r=r.parent}}),this._make(a)}const tl=_i(e=>Za(e)),al=Lt(e=>{const t=[];for(;e.next;)e=e.next,v(e)&&t.push(e);return t},dt),il=Ai(e=>Za(e),dt),nl=_i(e=>Ja(e)),sl=Lt(e=>{const t=[];for(;e.prev;)e=e.prev,v(e)&&t.push(e);return t},dt),rl=Ai(e=>Ja(e),dt),ul=Lt(e=>Sn(e).filter(t=>v(t)&&t!==e),ct),ol=Lt(e=>Zt(e).filter(v),dt);function cl(){const e=this.toArray().reduce((t,a)=>ue(a)?t.concat(a.children):t,[]);return this._make(e)}function ll(e){let t=0;const a=this.length;for(;t<a&&e.call(this[t],t,this[t])!==!1;)++t;return this}function dl(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 Rt(e){return typeof e=="function"?(t,a)=>e.call(t,a,t):Pe(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function hl(e){var t;return this._make(Ni(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function Ni(e,t,a,i){return typeof t=="string"?ns(t,e,{xmlMode:a,root:i}):e.filter(Rt(t))}function fl(e){const t=this.toArray();return typeof e=="string"?is(t.filter(v),e,this.options):e?t.some(Rt(e)):!1}function El(e){let t=this.toArray();if(typeof e=="string"){const a=new Set(ns(e,t,this.options));t=t.filter(i=>!a.has(i))}else{const a=Rt(e);t=t.filter((i,n)=>!a(i,n))}return this._make(t)}function ml(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,a)=>this._make(a).find(e).length>0)}function Tl(){return this.length>1?this._make(this[0]):this}function pl(){return this.length>0?this._make(this[this.length-1]):this}function bl(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 gl(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function _l(){return Array.prototype.slice.call(this)}function Al(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=Pe(e)?e[0]:e),Array.prototype.indexOf.call(t,a)}function Nl(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function Cl(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Il(e,t){const a=this._make(e,t),i=ct([...this.get(),...a.get()]);return this._make(i)}function Sl(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const xl=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:zc,add:Il,addBack:Sl,children:ol,closest:el,contents:cl,each:ll,end:Cl,eq:bl,filter:hl,filterArray:Ni,find:jc,first:Tl,get:gl,has:ml,index:Al,is:fl,last:pl,map:dl,next:tl,nextAll:al,nextUntil:il,not:El,parent:Kc,parents:Zc,parentsUntil:Jc,prev:nl,prevAll:sl,prevUntil:rl,siblings:ul,slice:Nl,toArray:_l},Symbol.toStringTag,{value:"Module"}));function Ol(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)&&He(u))return u;const o=new je([]);return Je(u,o),o}}function Je(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&&ze(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 Dl(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?Ct(n,!0):n);continue}}a.push(...this._makeDomArray(n,t))}return a}return[t?Ct(e,!0):e]}function os(e){return function(...t){const a=this.length-1;return ee(this,(i,n)=>{if(!ue(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 qe(e,t,a,i,n){var r,u;const o=[t,a,...i],c=t===0?null:e[t-1],f=t+a>=e.length?null:e[t+a];for(let m=0;m<i.length;++m){const T=i[m],p=T.parent;if(p){const C=p.children.indexOf(T);C>-1&&(p.children.splice(C,1),n===p&&t>C&&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?c:i[m-1],T.next=m===i.length-1?f:i[m+1]}return c&&(c.next=i[0]),f&&(f.prev=i[i.length-1]),e.splice(...o)}function Ll(e){return(Pe(e)?e:this._make(e)).append(this),this}function Rl(e){return(Pe(e)?e:this._make(e)).prepend(this),this}const yl=os((e,t,a)=>{qe(t,t.length,0,e,a)}),Ml=os((e,t,a)=>{qe(t,0,0,e,a)});function cs(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"&&!ii(t)?i.find(t).clone():t,[o]=this._makeDomArray(u,n<a);if(!o||!ue(o))continue;let c=o,f=0;for(;f<c.children.length;){const m=c.children[f];v(m)?(c=m,f=0):f++}e(r,c,[o])}return this}}const Pl=cs((e,t,a)=>{const{parent:i}=e;if(!i)return;const n=i.children,r=n.indexOf(e);Je([e],t),qe(n,r,0,a,i)}),kl=cs((e,t,a)=>{ue(e)&&(Je(e.children,t),Je(a,e))});function vl(e){return this.parent(e).not("body").each((t,a)=>{this._make(a).replaceWith(a.children)}),this}function wl(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 Bl(...e){const t=this.length-1;return ee(this,(a,i)=>{if(!ue(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);qe(n,r+1,0,o,a.parent)})}function Ul(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||(qe(r,u+1,0,i,n),t.push(...i))}return this._make(t)}function Fl(...e){const t=this.length-1;return ee(this,(a,i)=>{if(!ue(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);qe(n,r,0,o,a.parent)})}function Hl(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||(qe(u,o,0,n,r),a.push(...n))}),this._make(a)}function Yl(e){const t=e?this.filter(e):this;return ee(t,a=>{ze(a),a.prev=a.next=a.parent=null}),this}function Vl(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);Je(u,null);const o=n.indexOf(t);qe(n,o,1,u,i),u.includes(t)||(t.parent=t.prev=t.next=null)})}function ql(){return ee(this,e=>{if(ue(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function Wl(e){if(e===void 0){const t=this[0];return!t||!ue(t)?null:this._render(t.children)}return ee(this,t=>{if(!ue(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=Pe(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;Je(a,t)})}function Xl(){return this._render(this)}function Gl(e){return e===void 0?It(this):typeof e=="function"?ee(this,(t,a)=>this._make(t).text(e.call(t,a,It([t])))):ee(this,t=>{if(!ue(t))return;for(const i of t.children)i.next=i.prev=i.parent=null;const a=new Nt(`${e}`);Je(a,t)})}function $l(){const e=Array.prototype.map.call(this.get(),a=>Ct(a,!0)),t=new je(e);for(const a of e)a.parent=t;return this._make(e)}const Ql=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:Dl,after:Bl,append:yl,appendTo:Ll,before:Fl,clone:$l,empty:ql,html:Wl,insertAfter:Ul,insertBefore:Hl,prepend:Ml,prependTo:Rl,remove:Yl,replaceWith:Vl,text:Gl,toString:Xl,unwrap:vl,wrap:Pl,wrapAll:wl,wrapInner:kl},Symbol.toStringTag,{value:"Module"}));function jl(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return ee(this,(a,i)=>{v(a)&&ls(a,e,t,i)});if(this.length!==0)return ds(this[0],e)}function ls(e,t,a,i){if(typeof t=="string"){const n=ds(e),r=typeof a=="function"?a.call(e,i,n[t]):a;r===""?delete n[t]:r!=null&&(n[t]=r),e.attribs.style=zl(n)}else if(typeof t=="object"){const n=Object.keys(t);for(let r=0;r<n.length;r++){const u=n[r];ls(e,u,t[u],r)}}}function ds(e,t){if(!e||!v(e))return;const a=Kl(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 zl(e){return Object.keys(e).reduce((t,a)=>`${t}${t?" ":""}${a}: ${e[a]};`,"")}function Kl(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 Zl=Object.freeze(Object.defineProperty({__proto__:null,css:jl},Symbol.toStringTag,{value:"Module"})),hs="input,select,textarea,keygen",Jl=/%20/g,fs=/\r?\n/g;function e0(){return this.serializeArray().map(a=>`${encodeURIComponent(a.name)}=${encodeURIComponent(a.value)}`).join("&").replace(Jl,"+")}function t0(){return this.map((e,t)=>{const a=this._make(t);return v(t)&&t.name==="form"?a.find(hs).toArray():a.filter(hs).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(fs,`\r
|
16
16
|
`)})):{name:n,value:r.replace(fs,`\r
|
17
|
-
`)}}).toArray()}const a0=Object.freeze(Object.defineProperty({__proto__:null,serialize:e0,serializeArray:t0},Symbol.toStringTag,{value:"Module"}));function i0(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 n0(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=i0(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?c=>this._make(c).prop(u):c=>this._make(c).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((c,f)=>o(f,a,t)).get();else{const c=this._findBySelector(r,1);t[a]=c.length>0?o(c[0],a,t):void 0}}return t}const s0=Object.freeze(Object.defineProperty({__proto__:null,extract:n0},Symbol.toStringTag,{value:"Module"}));class Rt{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}}}Rt.prototype.cheerio="[cheerio object]",Rt.prototype.splice=Array.prototype.splice,Rt.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Rt.prototype,dc,xl,Ql,Zl,a0,s0);function r0(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=ei(n),o=e(i,u,r,null);class c extends Rt{_make(T,p){const A=f(T,p);return A.prevObject=this,A}_parse(T,p,A,C){return e(T,p,A,C)}_render(T){return t(T,this.options)}}function f(E,T,p=o,A){if(E&&ye(E))return E;const C=ei(A,u),L=typeof p=="string"?[e(p,C,!1,null)]:"length"in p?p:[p],M=ye(L)?L:new c(L,null,C);if(M._root=M,!E)return new c(void 0,M,C);const V=typeof E=="string"&&ti(E)?e(E,C,!1,null).children:u0(E)?[E]:Array.isArray(E)?E:void 0,B=new c(V,M,C);if(V)return B;if(typeof E!="string")throw new TypeError("Unexpected type of selector");let H=E;const x=T?typeof T=="string"?ti(T)?new c([e(T,C,!1,null)],M,C):(H=`${T} ${H}`,M):ye(T)?T:new c(Array.isArray(T)?T:[T],M,C):M;return x?x.find(H):B}return Object.assign(f,Jo,{load:a,_root:o,_options:u,fn:c.prototype,prototype:c.prototype}),f}}function u0(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const o0=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]),j="�";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 me={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Es(e){return e>=55296&&e<=57343}function c0(e){return e>=56320&&e<=57343}function l0(e,t){return(e-55296)*1024+9216+t}function ms(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ts(e){return e>=64976&&e<=65007||o0.has(e)}var _;(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"})(_||(_={}));const d0=65536;class h0{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=d0,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(c0(a))return this.pos++,this._addGap(),l0(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,d.EOF;return this._err(_.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,Es(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){ms(t)?this._err(_.controlCharacterInInputStream):Ts(t)&&this._err(_.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Y;(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"})(Y||(Y={}));function ps(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 N;(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/"})(N||(N={}));var Ze;(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"})(Ze||(Ze={}));var pe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(pe||(pe={}));var b;(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"})(b||(b={}));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 f0=new Map([[b.A,s.A],[b.ADDRESS,s.ADDRESS],[b.ANNOTATION_XML,s.ANNOTATION_XML],[b.APPLET,s.APPLET],[b.AREA,s.AREA],[b.ARTICLE,s.ARTICLE],[b.ASIDE,s.ASIDE],[b.B,s.B],[b.BASE,s.BASE],[b.BASEFONT,s.BASEFONT],[b.BGSOUND,s.BGSOUND],[b.BIG,s.BIG],[b.BLOCKQUOTE,s.BLOCKQUOTE],[b.BODY,s.BODY],[b.BR,s.BR],[b.BUTTON,s.BUTTON],[b.CAPTION,s.CAPTION],[b.CENTER,s.CENTER],[b.CODE,s.CODE],[b.COL,s.COL],[b.COLGROUP,s.COLGROUP],[b.DD,s.DD],[b.DESC,s.DESC],[b.DETAILS,s.DETAILS],[b.DIALOG,s.DIALOG],[b.DIR,s.DIR],[b.DIV,s.DIV],[b.DL,s.DL],[b.DT,s.DT],[b.EM,s.EM],[b.EMBED,s.EMBED],[b.FIELDSET,s.FIELDSET],[b.FIGCAPTION,s.FIGCAPTION],[b.FIGURE,s.FIGURE],[b.FONT,s.FONT],[b.FOOTER,s.FOOTER],[b.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[b.FORM,s.FORM],[b.FRAME,s.FRAME],[b.FRAMESET,s.FRAMESET],[b.H1,s.H1],[b.H2,s.H2],[b.H3,s.H3],[b.H4,s.H4],[b.H5,s.H5],[b.H6,s.H6],[b.HEAD,s.HEAD],[b.HEADER,s.HEADER],[b.HGROUP,s.HGROUP],[b.HR,s.HR],[b.HTML,s.HTML],[b.I,s.I],[b.IMG,s.IMG],[b.IMAGE,s.IMAGE],[b.INPUT,s.INPUT],[b.IFRAME,s.IFRAME],[b.KEYGEN,s.KEYGEN],[b.LABEL,s.LABEL],[b.LI,s.LI],[b.LINK,s.LINK],[b.LISTING,s.LISTING],[b.MAIN,s.MAIN],[b.MALIGNMARK,s.MALIGNMARK],[b.MARQUEE,s.MARQUEE],[b.MATH,s.MATH],[b.MENU,s.MENU],[b.META,s.META],[b.MGLYPH,s.MGLYPH],[b.MI,s.MI],[b.MO,s.MO],[b.MN,s.MN],[b.MS,s.MS],[b.MTEXT,s.MTEXT],[b.NAV,s.NAV],[b.NOBR,s.NOBR],[b.NOFRAMES,s.NOFRAMES],[b.NOEMBED,s.NOEMBED],[b.NOSCRIPT,s.NOSCRIPT],[b.OBJECT,s.OBJECT],[b.OL,s.OL],[b.OPTGROUP,s.OPTGROUP],[b.OPTION,s.OPTION],[b.P,s.P],[b.PARAM,s.PARAM],[b.PLAINTEXT,s.PLAINTEXT],[b.PRE,s.PRE],[b.RB,s.RB],[b.RP,s.RP],[b.RT,s.RT],[b.RTC,s.RTC],[b.RUBY,s.RUBY],[b.S,s.S],[b.SCRIPT,s.SCRIPT],[b.SEARCH,s.SEARCH],[b.SECTION,s.SECTION],[b.SELECT,s.SELECT],[b.SOURCE,s.SOURCE],[b.SMALL,s.SMALL],[b.SPAN,s.SPAN],[b.STRIKE,s.STRIKE],[b.STRONG,s.STRONG],[b.STYLE,s.STYLE],[b.SUB,s.SUB],[b.SUMMARY,s.SUMMARY],[b.SUP,s.SUP],[b.TABLE,s.TABLE],[b.TBODY,s.TBODY],[b.TEMPLATE,s.TEMPLATE],[b.TEXTAREA,s.TEXTAREA],[b.TFOOT,s.TFOOT],[b.TD,s.TD],[b.TH,s.TH],[b.THEAD,s.THEAD],[b.TITLE,s.TITLE],[b.TR,s.TR],[b.TRACK,s.TRACK],[b.TT,s.TT],[b.U,s.U],[b.UL,s.UL],[b.SVG,s.SVG],[b.VAR,s.VAR],[b.WBR,s.WBR],[b.XMP,s.XMP]]);function la(e){var t;return(t=f0.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const S=s,E0={[N.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]),[N.MATHML]:new Set([S.MI,S.MO,S.MN,S.MS,S.MTEXT,S.ANNOTATION_XML]),[N.SVG]:new Set([S.TITLE,S.FOREIGN_OBJECT,S.DESC]),[N.XLINK]:new Set,[N.XML]:new Set,[N.XMLNS]:new Set},Ai=new Set([S.H1,S.H2,S.H3,S.H4,S.H5,S.H6]),m0=new Set([b.STYLE,b.SCRIPT,b.XMP,b.IFRAME,b.NOEMBED,b.NOFRAMES,b.PLAINTEXT]);function T0(e,t){return m0.has(e)||t&&e===b.NOSCRIPT}var h;(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"})(h||(h={}));const Te={DATA:h.DATA,RCDATA:h.RCDATA,RAWTEXT:h.RAWTEXT,SCRIPT_DATA:h.SCRIPT_DATA,PLAINTEXT:h.PLAINTEXT,CDATA_SECTION:h.CDATA_SECTION};function p0(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 b0(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function Ve(e){return b0(e)||yt(e)}function bs(e){return Ve(e)||p0(e)}function da(e){return e+32}function gs(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function _s(e){return gs(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function g0(e){return e===d.NULL?_.nullCharacterReference:e>1114111?_.characterReferenceOutsideUnicodeRange:Es(e)?_.surrogateCharacterReference:Ts(e)?_.noncharacterCharacterReference:ms(e)||e===d.CARRIAGE_RETURN?_.controlCharacterReference:null}let _0=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=h.DATA,this.returnState=h.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new h0(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ja(Xa,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(_.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(_.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=g0(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:Y.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Y.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Y.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Y.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(ps(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(_.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=la(t.tagName),t.type===Y.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(_.endTagWithAttributes),t.selfClosing&&this._err(_.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 Y.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Y.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Y.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:Y.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=gs(t)?Y.WHITESPACE_CHARACTER:t===d.NULL?Y.NULL_CHARACTER:Y.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Y.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=h.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ge.Attribute:ge.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===h.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case h.DATA:{this._stateData(t);break}case h.RCDATA:{this._stateRcdata(t);break}case h.RAWTEXT:{this._stateRawtext(t);break}case h.SCRIPT_DATA:{this._stateScriptData(t);break}case h.PLAINTEXT:{this._statePlaintext(t);break}case h.TAG_OPEN:{this._stateTagOpen(t);break}case h.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case h.TAG_NAME:{this._stateTagName(t);break}case h.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case h.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case h.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case h.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case h.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case h.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case h.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case h.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case h.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case h.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case h.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case h.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case h.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case h.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case h.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case h.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case h.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case h.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case h.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case h.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case h.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case h.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case h.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case h.BOGUS_COMMENT:{this._stateBogusComment(t);break}case h.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case h.COMMENT_START:{this._stateCommentStart(t);break}case h.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case h.COMMENT:{this._stateComment(t);break}case h.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case h.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case h.COMMENT_END:{this._stateCommentEnd(t);break}case h.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case h.DOCTYPE:{this._stateDoctype(t);break}case h.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case h.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case h.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case h.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case h.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case h.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case h.CDATA_SECTION:{this._stateCdataSection(t);break}case h.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case h.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case h.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case h.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.TAG_OPEN;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(_.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=h.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ve(t))this._createStartTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=h.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=h.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(_.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t);break}case d.EOF:{this._err(_.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(_.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=h.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ve(t))this._createEndTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(_.missingEndTagName),this.state=h.DATA;break}case d.EOF:{this._err(_.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(_.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=h.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=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.tagName+=j;break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(yt(t)?da(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=h.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ve(t)?(this.state=h.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=h.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=h.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=h.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=h.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=h.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ve(t)?(this.state=h.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=h.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=h.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=h.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ve(t)?(this.state=h.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ve(t)?(this._emitChars("<"),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ve(t)?(this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(me.SCRIPT,!1)&&_s(this.preprocessor.peek(me.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<me.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.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=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(j);break}case d.EOF:{this._err(_.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(me.SCRIPT,!1)&&_s(this.preprocessor.peek(me.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<me.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=h.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=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(_.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=h.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=h.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=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:{this._err(_.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.name+=j;break}default:this.currentAttr.name+=String.fromCodePoint(yt(t)?da(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=h.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=h.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=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=h.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingAttributeValue),this.state=h.DATA,this.emitCurrentTagToken();break}default:this.state=h.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case d.APOSTROPHE:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.EOF:{this._err(_.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=h.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(_.unexpectedNullCharacter),this.currentAttr.value+=j;break}case d.QUOTATION_MARK:case d.APOSTROPHE:case d.LESS_THAN_SIGN:case d.EQUALS_SIGN:case d.GRAVE_ACCENT:{this._err(_.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case d.EOF:{this._err(_.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=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this._err(_.missingWhitespaceBetweenAttributes),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(_.eofInTag),this._emitEOFToken();break}default:this._err(_.unexpectedSolidusInTag),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.data+=j;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(me.DASH_DASH,!0)?(this._createCommentToken(me.DASH_DASH.length+1),this.state=h.COMMENT_START):this._consumeSequenceIfMatch(me.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(me.DOCTYPE.length+1),this.state=h.DOCTYPE):this._consumeSequenceIfMatch(me.CDATA_START,!0)?this.inForeignNode?this.state=h.CDATA_SECTION:(this._err(_.cdataInHtmlContent),this._createCommentToken(me.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=h.BOGUS_COMMENT):this._ensureHibernation()||(this._err(_.incorrectlyOpenedComment),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptClosingOfEmptyComment),this.state=h.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptClosingOfEmptyComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=h.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.data+=j;break}case d.EOF:{this._err(_.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=h.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=h.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=h.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(_.nestedComment),this.state=h.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=h.COMMENT_END_BANG;break}case d.HYPHEN_MINUS:{a.data+="-";break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=h.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(_.incorrectlyClosedComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(_.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=h.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case d.EOF:{this._err(_.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingWhitespaceBeforeDoctypeName),this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(yt(t))this._createDoctypeToken(String.fromCharCode(da(t))),this.state=h.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(_.unexpectedNullCharacter),this._createDoctypeToken(j),this.state=h.DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.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=h.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=h.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.name+=j;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(yt(t)?da(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=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(me.PUBLIC,!1)?this.state=h.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(me.SYSTEM,!1)?this.state=h.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(_.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=h.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=h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(_.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(_.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.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=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.publicId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.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=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.publicId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.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=h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(_.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(_.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.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=h.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.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=h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(_.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(_.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.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=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(_.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.systemId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.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=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(_.unexpectedNullCharacter),a.systemId+=j;break}case d.GREATER_THAN_SIGN:{this._err(_.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.EOF:{this._err(_.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=h.DATA;break}case d.EOF:{this._err(_.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(_.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.DATA;break}case d.NULL:{this._err(_.unexpectedNullCharacter);break}case d.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case d.RIGHT_SQUARE_BRACKET:{this.state=h.CDATA_SECTION_BRACKET;break}case d.EOF:{this._err(_.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===d.RIGHT_SQUARE_BRACKET?this.state=h.CDATA_SECTION_END:(this._emitChars("]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=h.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()&&bs(this.preprocessor.peek(1))?h.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){bs(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(_.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const As=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),Ns=new Set([...As,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),ha=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),A0=new Set([...ha,s.OL,s.UL]),N0=new Set([...ha,s.BUTTON]),Cs=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),Is=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),C0=new Set([s.TR,s.TEMPLATE,s.HTML]),I0=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),S0=new Set([s.TABLE,s.TEMPLATE,s.HTML]),x0=new Set([s.TD,s.TH]);class O0{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)===N.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])!==N.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(Ai,N.HTML)}popUntilTableCellPopped(){this.popUntilPopped(x0,N.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(S0,N.HTML)}clearBackToTableBodyContext(){this.clearBackTo(I0,N.HTML)}clearBackToTableRowContext(){this.clearBackTo(C0,N.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 N.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case N.SVG:{if(Is.has(n))return!1;break}case N.MATHML:{if(Cs.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ha)}hasInListItemScope(t){return this.hasInDynamicScope(t,A0)}hasInButtonScope(t){return this.hasInDynamicScope(t,N0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case N.HTML:{if(Ai.has(a))return!0;if(ha.has(a))return!1;break}case N.SVG:{if(Is.has(a))return!1;break}case N.MATHML:{if(Cs.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===N.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])===N.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])===N.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;As.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Ns.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Ns.has(this.currentTagId);)this.pop()}}const Ni=3;var De;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(De||(De={}));const Ss={type:De.Marker};class D0{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 c=this.entries[o];if(c.type===De.Marker)break;const{element:f}=c;if(this.treeAdapter.getTagName(f)===r&&this.treeAdapter.getNamespaceURI(f)===u){const E=this.treeAdapter.getAttrList(f);E.length===n&&i.push({idx:o,attrs:E})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Ni)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<Ni)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(c=>n.get(c.name)===c.value)&&(r+=1,r>=Ni&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Ss)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:De.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:De.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(Ss);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===De.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===De.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===De.Element&&a.element===t)}}const Me={createDocument(){return{nodeName:"#document",mode:pe.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};Me.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(Me.isTextNode(a)){a.value+=t;return}}Me.appendChild(e,Me.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&Me.isTextNode(i)?i.value+=t:Me.insertBefore(e,Me.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}}},xs="html",L0="about:legacy-compat",R0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Os=["+//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//"],y0=[...Os,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],M0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ds=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],P0=[...Ds,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ls(e,t){return t.some(a=>e.startsWith(a))}function k0(e){return e.name===xs&&e.publicId===null&&(e.systemId===null||e.systemId===L0)}function v0(e){if(e.name!==xs)return pe.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===R0)return pe.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),M0.has(a))return pe.QUIRKS;let i=t===null?y0:Os;if(Ls(a,i))return pe.QUIRKS;if(i=t===null?Ds:P0,Ls(a,i))return pe.LIMITED_QUIRKS}return pe.NO_QUIRKS}const Rs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},w0="definitionurl",B0="definitionURL",U0=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])),F0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:N.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:N.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:N.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:N.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:N.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:N.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:N.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:N.XML}],["xml:space",{prefix:"xml",name:"space",namespace:N.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:N.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:N.XMLNS}]]),H0=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])),Y0=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 V0(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===Ze.COLOR||i===Ze.SIZE||i===Ze.FACE)||Y0.has(t)}function ys(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===w0){e.attrs[t].name=B0;break}}function Ms(e){for(let t=0;t<e.attrs.length;t++){const a=U0.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Ci(e){for(let t=0;t<e.attrs.length;t++){const a=F0.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 q0(e){const t=H0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=la(e.tagName))}function W0(e,t){return t===N.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function X0(e,t,a){if(t===N.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===Ze.ENCODING){const n=a[i].value.toLowerCase();return n===Rs.TEXT_HTML||n===Rs.APPLICATION_XML}}return t===N.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function G0(e,t,a,i){return(!i||i===N.HTML)&&X0(e,t,a)||(!i||i===N.MATHML)&&W0(e,t)}const $0="hidden",Q0=8,j0=3;var m;(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"})(m||(m={}));const K0={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ps=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),ks={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Me,onParseError:null};let vs=class{constructor(t,a,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=m.INITIAL,this.originalInsertionMode=m.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={...ks,...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 _0(this.options,this),this.activeFormattingElements=new D0(this.treeAdapter),this.fragmentContextID=i?la(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new O0(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={...ks,...a};t??(t=i.treeAdapter.createElement(b.TEMPLATE,N.HTML,[]));const n=i.treeAdapter.createElement("documentmock",N.HTML,[]),r=new this(i,n,t);return r.fragmentContextID===s.TEMPLATE&&r.tmplInsertionModeStack.unshift(m.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:K0,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)===N.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,N.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=m.TEXT}switchToPlaintextParsing(){this.insertionMode=m.TEXT,this.originalInsertionMode=m.IN_BODY,this.tokenizer.state=Te.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)===b.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==N.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=Te.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=Te.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=Te.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=Te.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,N.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,N.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(b.HTML,N.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:c,endCol:f,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:c,endCol:f,endOffset:E})}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===Y.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)===b.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===N.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,N.HTML)}_processToken(t){switch(t.type){case Y.CHARACTER:{this.onCharacter(t);break}case Y.NULL_CHARACTER:{this.onNullCharacter(t);break}case Y.COMMENT:{this.onComment(t);break}case Y.DOCTYPE:{this.onDoctype(t);break}case Y.START_TAG:{this._processStartTag(t);break}case Y.END_TAG:{this.onEndTag(t);break}case Y.EOF:{this.onEof(t);break}case Y.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,i){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return G0(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===De.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=m.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=m.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=m.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=m.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=m.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=m.IN_TABLE;return}case s.BODY:{this.insertionMode=m.IN_BODY;return}case s.FRAMESET:{this.insertionMode=m.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?m.AFTER_HEAD:m.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=m.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=m.IN_HEAD;return}break}}this.insertionMode=m.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=m.IN_SELECT_IN_TABLE;return}}this.insertionMode=m.IN_SELECT}_isElementCausesFosterParenting(t){return Ps.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)===N.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 E0[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){xh(this,t);return}switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{Pt(this,t);break}case m.BEFORE_HEAD:{kt(this,t);break}case m.IN_HEAD:{vt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case m.AFTER_HEAD:{Bt(this,t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:{Bs(this,t);break}case m.TEXT:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{Oi(this,t);break}case m.IN_TABLE_TEXT:{Xs(this,t);break}case m.IN_COLUMN_GROUP:{ma(this,t);break}case m.AFTER_BODY:{ba(this,t);break}case m.AFTER_AFTER_BODY:{ga(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Sh(this,t);return}switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{Pt(this,t);break}case m.BEFORE_HEAD:{kt(this,t);break}case m.IN_HEAD:{vt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case m.AFTER_HEAD:{Bt(this,t);break}case m.TEXT:{this._insertCharacters(t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{Oi(this,t);break}case m.IN_COLUMN_GROUP:{ma(this,t);break}case m.AFTER_BODY:{ba(this,t);break}case m.AFTER_AFTER_BODY:{ga(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Si(this,t);return}switch(this.insertionMode){case m.INITIAL:case m.BEFORE_HTML:case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_TEMPLATE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{Si(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.AFTER_BODY:{id(this,t);break}case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{nd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case m.INITIAL:{sd(this,t);break}case m.BEFORE_HEAD:case m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:{this._err(t,_.misplacedDoctype);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,_.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Oh(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{rd(this,t);break}case m.BEFORE_HEAD:{od(this,t);break}case m.IN_HEAD:{Ie(this,t);break}case m.IN_HEAD_NO_SCRIPT:{dd(this,t);break}case m.AFTER_HEAD:{fd(this,t);break}case m.IN_BODY:{ce(this,t);break}case m.IN_TABLE:{dt(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.IN_CAPTION:{ch(this,t);break}case m.IN_COLUMN_GROUP:{Di(this,t);break}case m.IN_TABLE_BODY:{Ta(this,t);break}case m.IN_ROW:{pa(this,t);break}case m.IN_CELL:{hh(this,t);break}case m.IN_SELECT:{Qs(this,t);break}case m.IN_SELECT_IN_TABLE:{Eh(this,t);break}case m.IN_TEMPLATE:{Th(this,t);break}case m.AFTER_BODY:{bh(this,t);break}case m.IN_FRAMESET:{gh(this,t);break}case m.AFTER_FRAMESET:{Ah(this,t);break}case m.AFTER_AFTER_BODY:{Ch(this,t);break}case m.AFTER_AFTER_FRAMESET:{Ih(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Dh(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{ud(this,t);break}case m.BEFORE_HEAD:{cd(this,t);break}case m.IN_HEAD:{ld(this,t);break}case m.IN_HEAD_NO_SCRIPT:{hd(this,t);break}case m.AFTER_HEAD:{Ed(this,t);break}case m.IN_BODY:{Ea(this,t);break}case m.TEXT:{Jd(this,t);break}case m.IN_TABLE:{Ut(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.IN_CAPTION:{lh(this,t);break}case m.IN_COLUMN_GROUP:{dh(this,t);break}case m.IN_TABLE_BODY:{Li(this,t);break}case m.IN_ROW:{$s(this,t);break}case m.IN_CELL:{fh(this,t);break}case m.IN_SELECT:{js(this,t);break}case m.IN_SELECT_IN_TABLE:{mh(this,t);break}case m.IN_TEMPLATE:{ph(this,t);break}case m.AFTER_BODY:{zs(this,t);break}case m.IN_FRAMESET:{_h(this,t);break}case m.AFTER_FRAMESET:{Nh(this,t);break}case m.AFTER_AFTER_BODY:{ga(this,t);break}}}onEof(t){switch(this.insertionMode){case m.INITIAL:{Mt(this,t);break}case m.BEFORE_HTML:{Pt(this,t);break}case m.BEFORE_HEAD:{kt(this,t);break}case m.IN_HEAD:{vt(this,t);break}case m.IN_HEAD_NO_SCRIPT:{wt(this,t);break}case m.AFTER_HEAD:{Bt(this,t);break}case m.IN_BODY:case m.IN_TABLE:case m.IN_CAPTION:case m.IN_COLUMN_GROUP:case m.IN_TABLE_BODY:case m.IN_ROW:case m.IN_CELL:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:{qs(this,t);break}case m.TEXT:{eh(this,t);break}case m.IN_TABLE_TEXT:{Ht(this,t);break}case m.IN_TEMPLATE:{Ks(this,t);break}case m.AFTER_BODY:case m.IN_FRAMESET:case m.AFTER_FRAMESET:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{xi(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 m.IN_HEAD:case m.IN_HEAD_NO_SCRIPT:case m.AFTER_HEAD:case m.TEXT:case m.IN_COLUMN_GROUP:case m.IN_SELECT:case m.IN_SELECT_IN_TABLE:case m.IN_FRAMESET:case m.AFTER_FRAMESET:{this._insertCharacters(t);break}case m.IN_BODY:case m.IN_CAPTION:case m.IN_CELL:case m.IN_TEMPLATE:case m.AFTER_BODY:case m.AFTER_AFTER_BODY:case m.AFTER_AFTER_FRAMESET:{ws(this,t);break}case m.IN_TABLE:case m.IN_TABLE_BODY:case m.IN_ROW:{Oi(this,t);break}case m.IN_TABLE_TEXT:{Ws(this,t);break}}}};function z0(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):Vs(e,t),a}function Z0(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 J0(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),c=o&&r>=j0;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=ed(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function ed(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 td(e,t,a){const i=e.treeAdapter.getTagName(t),n=la(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===s.TEMPLATE&&r===N.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function ad(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 Ii(e,t){for(let a=0;a<Q0;a++){const i=z0(e,t);if(!i)break;const n=Z0(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=J0(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&td(e,u,r),ad(e,n,i)}}function Si(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function id(e,t){e._appendCommentNode(t,e.openElements.items[0])}function nd(e,t){e._appendCommentNode(t,e.document)}function xi(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 sd(e,t){e._setDocumentType(t);const a=t.forceQuirks?pe.QUIRKS:v0(t);k0(t)||e._err(t,_.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=m.BEFORE_HTML}function Mt(e,t){e._err(t,_.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,pe.QUIRKS),e.insertionMode=m.BEFORE_HTML,e._processToken(t)}function rd(e,t){t.tagID===s.HTML?(e._insertElement(t,N.HTML),e.insertionMode=m.BEFORE_HEAD):Pt(e,t)}function ud(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&Pt(e,t)}function Pt(e,t){e._insertFakeRootElement(),e.insertionMode=m.BEFORE_HEAD,e._processToken(t)}function od(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.HEAD:{e._insertElement(t,N.HTML),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD;break}default:kt(e,t)}}function cd(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?kt(e,t):e._err(t,_.endTagWithoutMatchingOpenElement)}function kt(e,t){e._insertFakeElement(b.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=m.IN_HEAD,e._processToken(t)}function Ie(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,Te.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Te.RAWTEXT):(e._insertElement(t,N.HTML),e.insertionMode=m.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,Te.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,Te.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=m.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(m.IN_TEMPLATE);break}case s.HEAD:{e._err(t,_.misplacedStartTagForHeadElement);break}default:vt(e,t)}}function ld(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=m.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{vt(e,t);break}case s.TEMPLATE:{Je(e,t);break}default:e._err(t,_.endTagWithoutMatchingOpenElement)}}function Je(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,_.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,_.endTagWithoutMatchingOpenElement)}function vt(e,t){e.openElements.pop(),e.insertionMode=m.AFTER_HEAD,e._processToken(t)}function dd(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Ie(e,t);break}case s.NOSCRIPT:{e._err(t,_.nestedNoscriptInHead);break}default:wt(e,t)}}function hd(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=m.IN_HEAD;break}case s.BR:{wt(e,t);break}default:e._err(t,_.endTagWithoutMatchingOpenElement)}}function wt(e,t){const a=t.type===Y.EOF?_.openElementsLeftAfterEof:_.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=m.IN_HEAD,e._processToken(t)}function fd(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.BODY:{e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=m.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,N.HTML),e.insertionMode=m.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,_.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Ie(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,_.misplacedStartTagForHeadElement);break}default:Bt(e,t)}}function Ed(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Bt(e,t);break}case s.TEMPLATE:{Je(e,t);break}default:e._err(t,_.endTagWithoutMatchingOpenElement)}}function Bt(e,t){e._insertFakeElement(b.BODY,s.BODY),e.insertionMode=m.IN_BODY,fa(e,t)}function fa(e,t){switch(t.type){case Y.CHARACTER:{Bs(e,t);break}case Y.WHITESPACE_CHARACTER:{ws(e,t);break}case Y.COMMENT:{Si(e,t);break}case Y.START_TAG:{ce(e,t);break}case Y.END_TAG:{Ea(e,t);break}case Y.EOF:{qs(e,t);break}}}function ws(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Bs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function md(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Td(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function pd(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_FRAMESET)}function bd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML)}function gd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),Ai.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,N.HTML)}function _d(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ad(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),a||(e.formElement=e.openElements.current))}function Nd(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,N.HTML)}function Cd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.tokenizer.state=Te.PLAINTEXT}function Id(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.framesetOk=!1}function Sd(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(b.A);a&&(Ii(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Od(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(Ii(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Dd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ld(e,t){e.treeAdapter.getDocumentMode(e.document)!==pe.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=m.IN_TABLE}function Us(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Fs(e){const t=ps(e,Ze.TYPE);return t!=null&&t.toLowerCase()===$0}function Rd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),Fs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yd(e,t){e._appendElement(t,N.HTML),t.ackSelfClosing=!0}function Md(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Pd(e,t){t.tagName=b.IMG,t.tagID=s.IMG,Us(e,t)}function kd(e,t){e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Te.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=m.TEXT}function vd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Te.RAWTEXT)}function wd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Te.RAWTEXT)}function Hs(e,t){e._switchToTextParsing(t,Te.RAWTEXT)}function Bd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===m.IN_TABLE||e.insertionMode===m.IN_CAPTION||e.insertionMode===m.IN_TABLE_BODY||e.insertionMode===m.IN_ROW||e.insertionMode===m.IN_CELL?m.IN_SELECT_IN_TABLE:m.IN_SELECT}function Ud(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function Fd(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,N.HTML)}function Hd(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,N.HTML)}function Yd(e,t){e._reconstructActiveFormattingElements(),ys(t),Ci(t),t.selfClosing?e._appendElement(t,N.MATHML):e._insertElement(t,N.MATHML),t.ackSelfClosing=!0}function Vd(e,t){e._reconstructActiveFormattingElements(),Ms(t),Ci(t),t.selfClosing?e._appendElement(t,N.SVG):e._insertElement(t,N.SVG),t.ackSelfClosing=!0}function Ys(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function ce(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:{xd(e,t);break}case s.A:{Sd(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{gd(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:{bd(e,t);break}case s.LI:case s.DD:case s.DT:{Nd(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{Us(e,t);break}case s.HR:{Md(e,t);break}case s.RB:case s.RTC:{Fd(e,t);break}case s.RT:case s.RP:{Hd(e,t);break}case s.PRE:case s.LISTING:{_d(e,t);break}case s.XMP:{vd(e,t);break}case s.SVG:{Vd(e,t);break}case s.HTML:{md(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:{Ie(e,t);break}case s.BODY:{Td(e,t);break}case s.FORM:{Ad(e,t);break}case s.NOBR:{Od(e,t);break}case s.MATH:{Yd(e,t);break}case s.TABLE:{Ld(e,t);break}case s.INPUT:{Rd(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{yd(e,t);break}case s.IMAGE:{Pd(e,t);break}case s.BUTTON:{Id(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Dd(e,t);break}case s.IFRAME:{wd(e,t);break}case s.SELECT:{Bd(e,t);break}case s.OPTION:case s.OPTGROUP:{Ud(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Hs(e,t);break}case s.FRAMESET:{pd(e,t);break}case s.TEXTAREA:{kd(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Hs(e,t):Ys(e,t);break}case s.PLAINTEXT:{Cd(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:Ys(e,t)}}function qd(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function Wd(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=m.AFTER_BODY,zs(e,t))}function Xd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function Gd(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 $d(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(b.P,s.P),e._closePElement()}function Qd(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function jd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function Kd(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function Zd(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(b.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function Vs(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:{Ii(e,t);break}case s.P:{$d(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:{Xd(e,t);break}case s.LI:{Qd(e);break}case s.DD:case s.DT:{jd(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{Kd(e);break}case s.BR:{Zd(e);break}case s.BODY:{qd(e,t);break}case s.HTML:{Wd(e,t);break}case s.FORM:{Gd(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{zd(e,t);break}case s.TEMPLATE:{Je(e,t);break}default:Vs(e,t)}}function qs(e,t){e.tmplInsertionModeStack.length>0?Ks(e,t):xi(e,t)}function Jd(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 eh(e,t){e._err(t,_.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Oi(e,t){if(Ps.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=m.IN_TABLE_TEXT,t.type){case Y.CHARACTER:{Xs(e,t);break}case Y.WHITESPACE_CHARACTER:{Ws(e,t);break}}else Ft(e,t)}function th(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_CAPTION}function ah(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_COLUMN_GROUP}function ih(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.COLGROUP,s.COLGROUP),e.insertionMode=m.IN_COLUMN_GROUP,Di(e,t)}function nh(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_TABLE_BODY}function sh(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.TBODY,s.TBODY),e.insertionMode=m.IN_TABLE_BODY,Ta(e,t)}function rh(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function uh(e,t){Fs(t)?e._appendElement(t,N.HTML):Ft(e,t),t.ackSelfClosing=!0}function oh(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,N.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:{sh(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Ie(e,t);break}case s.COL:{ih(e,t);break}case s.FORM:{oh(e,t);break}case s.TABLE:{rh(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{nh(e,t);break}case s.INPUT:{uh(e,t);break}case s.CAPTION:{th(e,t);break}case s.COLGROUP:{ah(e,t);break}default:Ft(e,t)}}function Ut(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{Je(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:Ft(e,t)}}function Ft(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,fa(e,t),e.fosterParentingEnabled=a}function Ws(e,t){e.pendingCharacterTokens.push(t)}function Xs(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ht(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Ft(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Gs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function ch(e,t){const a=t.tagID;Gs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=m.IN_TABLE,dt(e,t)):ce(e,t)}function lh(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=m.IN_TABLE,a===s.TABLE&&Ut(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 Di(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.COL:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Ie(e,t);break}default:ma(e,t)}}function dh(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE);break}case s.TEMPLATE:{Je(e,t);break}case s.COL:break;default:ma(e,t)}}function ma(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=m.IN_TABLE,e._processToken(t))}function Ta(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,N.HTML),e.insertionMode=m.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(b.TR,s.TR),e.insertionMode=m.IN_ROW,pa(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=m.IN_TABLE,dt(e,t));break}default:dt(e,t)}}function Li(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=m.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE,Ut(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:Ut(e,t)}}function pa(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,N.HTML),e.insertionMode=m.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=m.IN_TABLE_BODY,Ta(e,t));break}default:dt(e,t)}}function $s(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=m.IN_TABLE_BODY,Li(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=m.IN_TABLE_BODY,Li(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:Ut(e,t)}}function hh(e,t){const a=t.tagID;Gs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),pa(e,t)):ce(e,t)}function fh(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=m.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),$s(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:Ea(e,t)}}function Qs(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,N.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,N.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,N.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:{Ie(e,t);break}}}function js(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:{Je(e,t);break}}}function Eh(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)):Qs(e,t)}function mh(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)):js(e,t)}function Th(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:{Ie(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=m.IN_TABLE,e.insertionMode=m.IN_TABLE,dt(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=m.IN_COLUMN_GROUP,e.insertionMode=m.IN_COLUMN_GROUP,Di(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=m.IN_TABLE_BODY,e.insertionMode=m.IN_TABLE_BODY,Ta(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=m.IN_ROW,e.insertionMode=m.IN_ROW,pa(e,t);break}default:e.tmplInsertionModeStack[0]=m.IN_BODY,e.insertionMode=m.IN_BODY,ce(e,t)}}function ph(e,t){t.tagID===s.TEMPLATE&&Je(e,t)}function Ks(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xi(e,t)}function bh(e,t){t.tagID===s.HTML?ce(e,t):ba(e,t)}function zs(e,t){var a;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=m.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 ba(e,t)}function ba(e,t){e.insertionMode=m.IN_BODY,fa(e,t)}function gh(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.FRAMESET:{e._insertElement(t,N.HTML);break}case s.FRAME:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Ie(e,t);break}}}function _h(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=m.AFTER_FRAMESET))}function Ah(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.NOFRAMES:{Ie(e,t);break}}}function Nh(e,t){t.tagID===s.HTML&&(e.insertionMode=m.AFTER_AFTER_FRAMESET)}function Ch(e,t){t.tagID===s.HTML?ce(e,t):ga(e,t)}function ga(e,t){e.insertionMode=m.IN_BODY,fa(e,t)}function Ih(e,t){switch(t.tagID){case s.HTML:{ce(e,t);break}case s.NOFRAMES:{Ie(e,t);break}}}function Sh(e,t){t.chars=j,e._insertCharacters(t)}function xh(e,t){e._insertCharacters(t),e.framesetOk=!1}function Zs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==N.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Oh(e,t){if(V0(t))Zs(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===N.MATHML?ys(t):i===N.SVG&&(q0(t),Ms(t)),Ci(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function Dh(e,t){if(t.tagID===s.P||t.tagID===s.BR){Zs(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)===N.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 Lh=new Set([b.AREA,b.BASE,b.BASEFONT,b.BGSOUND,b.BR,b.COL,b.EMBED,b.FRAME,b.HR,b.IMG,b.INPUT,b.KEYGEN,b.LINK,b.META,b.PARAM,b.SOURCE,b.TRACK,b.WBR]);function Rh(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===N.HTML&&Lh.has(t.treeAdapter.getTagName(e))}const yh={treeAdapter:Me,scriptingEnabled:!0};function Mh(e,t){const a={...yh,...t};return Js(e,a)}function Ph(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===b.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===N.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=Js(r,t);return a}function Js(e,t){return t.treeAdapter.isElementNode(e)?kh(e,t):t.treeAdapter.isTextNode(e)?wh(e,t):t.treeAdapter.isCommentNode(e)?Bh(e,t):t.treeAdapter.isDocumentTypeNode(e)?Uh(e,t):""}function kh(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${vh(e,t)}>${Rh(e,t)?"":`${Ph(e,t)}</${a}>`}`}function vh(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case N.XML:{a+=`xml:${i.name}`;break}case N.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case N.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${_n(i.value)}"`}return a}function wh(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)===N.HTML&&T0(r,t.scriptingEnabled)?i:An(i)}function Bh(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Uh(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Fh(e,t){return vs.parse(e,t)}function Hh(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=vs.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function er(e){const t=e.includes('"')?"'":'"';return t+e+t}function Yh(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${er(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${er(a)}`),i}const qe={isCommentNode:$t,isElementNode:k,isTextNode:Oe,createDocument(){const e=new $e([]);return e["x-mode"]=pe.NO_QUIRKS,e},createDocumentFragment(){return new $e([])},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 c=a[o].name;i[c]=a[o].value,n[c]=a[o].namespace,r[c]=a[o].prefix}const u=new Va(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Fa(e)},createTextNode(e){return new At(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){qe.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=Yh(t,a,i);let r=e.children.find(u=>qa(u)&&u.name==="!doctype");r?r.data=n??null:(r=new Ha("!doctype",n),qe.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&&Oe(a)?a.data+=t:qe.appendChild(e,qe.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&Oe(i)?i.data+=t:qe.insertBefore(e,qe.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 qa(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 Vh(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=qe),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?Fh(e,t):Hh(i,e,t)}const qh={treeAdapter:qe};function Wh(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];Ue(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+=Mh(n,qh)}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 I;(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"})(I||(I={}));function Pe(e){return e===y.Space||e===y.NewLine||e===y.Tab||e===y.FormFeed||e===y.CarriageReturn}function _a(e){return e===y.Slash||e===y.Gt||Pe(e)}function Xh(e){return e>=y.LowerA&&e<=y.LowerZ||e>=y.UpperA&&e<=y.UpperZ}var Le;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Le||(Le={}));const oe={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 Gh{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=I.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=I.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 ja(t?mn:Xa,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=I.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=I.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=I.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateSpecialStartSequence(t){const a=this.sequenceIndex===this.currentSequence.length;if(!(a?_a(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!a){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=I.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===y.Gt||Pe(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===oe.TitleEnd?this.decodeEntities&&t===y.Amp&&this.startEntity():this.fastForwardTo(y.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===y.Lt)}stateCDATASequence(t){t===oe.Cdata[this.sequenceIndex]?++this.sequenceIndex===oe.Cdata.length&&(this.state=I.InCommentLike,this.currentSequence=oe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=I.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===oe.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=I.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?!_a(t):Xh(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=I.SpecialStartSequence}stateBeforeTagName(t){if(t===y.ExclamationMark)this.state=I.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===y.Questionmark)this.state=I.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=I.InTagName:a===oe.ScriptEnd[2]?this.state=I.BeforeSpecialS:a===oe.TitleEnd[2]?this.state=I.BeforeSpecialT:this.state=I.InTagName}else t===y.Slash?this.state=I.BeforeClosingTagName:(this.state=I.Text,this.stateText(t))}stateInTagName(t){_a(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Pe(t)||(t===y.Gt?this.state=I.Text:(this.state=this.isTagStartChar(t)?I.InClosingTagName:I.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===y.Gt||Pe(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=I.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===y.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=I.InSpecialTag,this.sequenceIndex=0):this.state=I.Text,this.sectionStart=this.index+1):t===y.Slash?this.state=I.InSelfClosingTag:Pe(t)||(this.state=I.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===y.Gt?(this.cbs.onselfclosingtag(this.index),this.state=I.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Pe(t)||(this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===y.Eq||_a(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=I.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===y.Eq?this.state=I.BeforeAttributeValue:t===y.Slash||t===y.Gt?(this.cbs.onattribend(Le.NoValue,this.sectionStart),this.sectionStart=-1,this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t)):Pe(t)||(this.cbs.onattribend(Le.NoValue,this.sectionStart),this.state=I.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===y.DoubleQuote?(this.state=I.InAttributeValueDq,this.sectionStart=this.index+1):t===y.SingleQuote?(this.state=I.InAttributeValueSq,this.sectionStart=this.index+1):Pe(t)||(this.sectionStart=this.index,this.state=I.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?Le.Double:Le.Single,this.index+1),this.state=I.BeforeAttributeName):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,y.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,y.SingleQuote)}stateInAttributeValueNoQuotes(t){Pe(t)||t===y.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Le.Unquoted,this.index),this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===y.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===y.OpeningSquareBracket?(this.state=I.CDATASequence,this.sequenceIndex=0):this.state=t===y.Dash?I.BeforeComment:I.InDeclaration}stateInDeclaration(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=I.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===y.Dash?(this.state=I.InCommentLike,this.currentSequence=oe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=I.InDeclaration}stateInSpecialComment(t){(t===y.Gt||this.fastForwardTo(y.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===oe.ScriptEnd[3]?this.startSpecial(oe.ScriptEnd,4):a===oe.StyleEnd[3]?this.startSpecial(oe.StyleEnd,4):(this.state=I.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===oe.TitleEnd[3]?this.startSpecial(oe.TitleEnd,4):a===oe.TextareaEnd[3]?this.startSpecial(oe.TextareaEnd,4):(this.state=I.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=I.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?ge.Strict:this.baseState===I.Text||this.baseState===I.InSpecialTag?ge.Legacy:ge.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===I.Text||this.state===I.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===I.InAttributeValueDq||this.state===I.InAttributeValueSq||this.state===I.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 I.Text:{this.stateText(t);break}case I.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case I.InSpecialTag:{this.stateInSpecialTag(t);break}case I.CDATASequence:{this.stateCDATASequence(t);break}case I.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case I.InAttributeName:{this.stateInAttributeName(t);break}case I.InCommentLike:{this.stateInCommentLike(t);break}case I.InSpecialComment:{this.stateInSpecialComment(t);break}case I.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case I.InTagName:{this.stateInTagName(t);break}case I.InClosingTagName:{this.stateInClosingTagName(t);break}case I.BeforeTagName:{this.stateBeforeTagName(t);break}case I.AfterAttributeName:{this.stateAfterAttributeName(t);break}case I.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case I.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case I.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case I.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case I.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case I.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case I.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case I.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case I.InDeclaration:{this.stateInDeclaration(t);break}case I.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case I.BeforeComment:{this.stateBeforeComment(t);break}case I.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case I.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===I.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===I.InCommentLike?this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===I.InTagName||this.state===I.BeforeAttributeName||this.state===I.BeforeAttributeValue||this.state===I.AfterAttributeName||this.state===I.InAttributeName||this.state===I.InAttributeValueSq||this.state===I.InAttributeValueDq||this.state===I.InAttributeValueNq||this.state===I.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==I.Text&&this.baseState!==I.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"]),X=new Set(["p"]),tr=new Set(["thead","tbody"]),ar=new Set(["dd","dt"]),ir=new Set(["rt","rp"]),$h=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",X],["h1",X],["h2",X],["h3",X],["h4",X],["h5",X],["h6",X],["select",ht],["input",ht],["output",ht],["button",ht],["datalist",ht],["textarea",ht],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",ar],["dt",ar],["address",X],["article",X],["aside",X],["blockquote",X],["details",X],["div",X],["dl",X],["fieldset",X],["figcaption",X],["figure",X],["footer",X],["form",X],["header",X],["hr",X],["main",X],["nav",X],["ol",X],["pre",X],["section",X],["table",X],["ul",X],["rt",ir],["rp",ir],["tbody",tr],["tfoot",tr]]),Qh=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),nr=new Set(["math","svg"]),sr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),jh=/\s|\//;class Kh{constructor(t,a={}){var i,n,r,u,o,c;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:Gh)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(o=this.cbs).onparserinit)===null||c===void 0||c.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,$a(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Qh.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&&$h.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&&(nr.has(t)?this.foreignContext.unshift(!0):sr.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,c,f,E;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(nr.has(T)||sr.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"),(c=(o=this.cbs).onopentag)===null||c===void 0||c.call(o,"br",{},!0),(E=(f=this.cbs).onclosetag)===null||E===void 0||E.call(f,"br",!1));else{const p=this.stack.indexOf(T);if(p!==-1)for(let A=0;A<=p;A++){const C=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,C,A!==p)}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+=$a(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===Le.Double?'"':t===Le.Single?"'":t===Le.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(jh);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,c,f,E,T,p,A;this.endIndex=a;const C=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,C),(f=(c=this.cbs).oncdataend)===null||f===void 0||f.call(c)):((T=(E=this.cbs).oncomment)===null||T===void 0||T.call(E,`[CDATA[${C}]]`),(A=(p=this.cbs).oncommentend)===null||A===void 0||A.call(p)),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 zh(e,t){const a=new Zu(void 0,t);return new Kh(a,t).end(e),a.root}const Zh=Ol((e,t,a,i)=>t._useHtmlParser2?zh(e,t):Vh(e,t,a,i)),rr=r0(Zh,(e,t)=>t._useHtmlParser2?Qt(e,t):Wh(e)),Jh={class:"flex h-screen"},ef={class:"w-[375px] border-l overflow-auto"},tf={class:"goodschool_mobile"},af=["innerHTML"],nf=["innerHTML"],sf={class:"flex-1 bg-gray-100 overflow-auto"},rf={class:"p-4"},uf={class:"flex justify-between"},of={key:0,class:"text-red-500 text-xs mt-2"},cf={class:"w-2/12 border-l overflow-auto"},lf={class:"p-4"},ur=l.defineComponent({__name:"Designer",setup(e){const t=l.ref(),a=l.ref(),i=l.ref(),n=l.ref("");let r=rr("",{},!1);function u(x){console.log("选择",x),a.value=x}function o(x,O=""){if(O){const g=c(t.value,O);g?i.value=g:i.value=x}else i.value=x}function c(x,O){if(x.xpath===O)return x;if(x.children&&x.children.length)for(const g of x.children){const D=c(g,O);if(D)return D}}function f(x){var O,g,D;if(console.log(x,a.value),a.value)if(a.value.rule=x.rule,a.value.type=x.type,(O=x.rule)!=null&&O.isThemeColor?(x.attrs.class+=" ys_tit_color",x.attrs.style&&(x.attrs.style=void 0)):((g=x.attrs.class)!=null&&g.includes(" ys_tit_color")&&(x.attrs.class=x.attrs.class.replace(" ys_tit_color"," ")),x.rule.color&&(x.attrs.style={color:x.rule.color})),a.value.type===de.Block){const P=c(t.value,a.value.parentxpath||"");P&&P.children&&P.children.forEach(q=>{var Z;q.tag===a.value.tag&&(q.rule=x.rule,q.type=x.type,(Z=q.attrs.class)!=null&&Z.includes(" mb40")||(q.attrs.class+=" mb40"))})}else(D=a.value.attrs.class)!=null&&D.includes(" mb40")&&(a.value.attrs.class=a.value.attrs.class.replace(" mb40"," "))}async function E(x="/001.html"){const g=await(await fetch(x)).text();t.value=A(g)}const T=l.ref("");function p(x){T.value=x}function A(x){r=rr(x);const O=r("body").children().toArray().map(g=>C(r(g)));return console.log(O[0]),O[0]}function C(x,O=""){function g(q){if(!q||!q[0])return"";const Z=[];let z=q;for(;z.length&&z[0].tagName!=="html";){const G=z[0].tagName,re=z.parent().children(G).index(z)+1;Z.unshift(`${G}[${re}]`),z=z.parent()}return"/html/"+Z.join("/")}const D=g(x).replace("/html/body[1]",""),P=x.children().toArray().map(q=>C(r(q),D));return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:P,xpath:D,parentxpath:O,rule:{}}}l.onMounted(()=>{E()});function L(x){console.log("更新子节点的文本",x);const O=c(t.value,x.element.xpath);O&&(O.editText=x.newText)}function M(x,O=""){function g(D,P){var z;const Z=(P?((z=c(t.value,P))==null?void 0:z.children)||[]:[t.value]).filter(G=>G.tag===D.tag).indexOf(D)+1;return`${P}/${D.tag}[${Z}]`}x.xpath=g(x,O),x.parentxpath=O,(x.children||[]).forEach(D=>M(D,x.xpath))}function V({action:x,element:O,newBlock:g}){console.log("块操作",x,O,g);const D=c(t.value,O.parentxpath||"");if(!D||!D.children)return;const P=D.children.findIndex(G=>G===O);if(P===-1)return;const q=D.children.length,{minBlock:Z,maxBlock:z}=O.rule;if((x==="add"||x==="copy")&&q>=(z||1/0)){n.value=`无法添加更多块。最大块数量为 ${z}`;return}switch(x){case"add":if(g){const G={...g,xpath:"",children:JSON.parse(JSON.stringify(g.children))};D.children.splice(P+1,0,G)}break;case"copy":if(g){const G={...g,xpath:"",children:JSON.parse(JSON.stringify(g.children))};D.children.splice(P+1,0,G)}break;case"moveUp":if(P>0){const[G]=D.children.splice(P,1);D.children.splice(P-1,0,G)}break;case"moveDown":if(P<D.children.length-1){const[G]=D.children.splice(P,1);D.children.splice(P+1,0,G)}break;case"delete":if(q<=(Z||0)){n.value=`无法删除更多块。最小块数量为 ${Z}`;return}D.children.splice(P,1);break}n.value="",M(t.value)}function B(x,O){let g=O.attrs.class.replace(/icon-\S+/g,`icon-${x}`);O.attrs.class=g}function H(x,O){O.attrs.src=x}return(x,O)=>(l.openBlock(),l.createElementBlock("div",Jh,[l.createElementVNode("div",ef,[l.createElementVNode("div",tf,[O[1]||(O[1]=l.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),T.value?(l.openBlock(),l.createElementBlock("div",{key:0,innerHTML:T.value},null,8,af)):(l.openBlock(),l.createElementBlock("div",{key:1,innerHTML:l.unref(r)("body").html()},null,8,nf))])]),l.createElementVNode("div",sf,[l.createElementVNode("div",rf,[l.createElementVNode("div",uf,[O[3]||(O[3]=l.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染",-1)),l.createElementVNode("div",null,[l.createElementVNode("select",{class:"border rounded p-2",onChange:O[0]||(O[0]=g=>E(g.target.value))},O[2]||(O[2]=[l.createElementVNode("option",{value:"/001.html"},"001.html",-1),l.createElementVNode("option",{value:"/002.html"},"002.html",-1),l.createElementVNode("option",{value:"/003.html"},"003.html",-1),l.createElementVNode("option",{value:"/004.html"},"004.html",-1)]),32)])]),n.value?(l.openBlock(),l.createElementBlock("div",of,l.toDisplayString(n.value),1)):l.createCommentVNode("",!0),t.value?(l.openBlock(),l.createBlock(yu,{key:1,element:t.value,selectedElement:a.value,hoveredElement:i.value,onSelectElement:u,onHoverElement:o,onContentUpdated:p,onUpdateText:L,onBlockAction:V,onAddIcon:B,onUpload:H},null,8,["element","selectedElement","hoveredElement"])):l.createCommentVNode("",!0)])]),l.createElementVNode("div",cf,[l.createElementVNode("div",lf,[O[4]||(O[4]=l.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),a.value?(l.openBlock(),l.createBlock(Yu,{key:0,element:a.value,onUpdateElement:f},null,8,["element"])):l.createCommentVNode("",!0)])])]))}}),df={install(e){e.component("Designer",ur)}};ke.Designer=ur,ke.default=df,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
17
|
+
`)}}).toArray()}const a0=Object.freeze(Object.defineProperty({__proto__:null,serialize:e0,serializeArray:t0},Symbol.toStringTag,{value:"Module"}));function i0(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 n0(e){const t={};for(const a in e){const i=e[a],n=Array.isArray(i),{selector:r,value:u}=i0(n?i[0]:i),o=typeof u=="function"?u:typeof u=="string"?c=>this._make(c).prop(u):c=>this._make(c).extract(u);if(n)t[a]=this._findBySelector(r,Number.POSITIVE_INFINITY).map((c,f)=>o(f,a,t)).get();else{const c=this._findBySelector(r,1);t[a]=c.length>0?o(c[0],a,t):void 0}}return t}const s0=Object.freeze(Object.defineProperty({__proto__:null,extract:n0},Symbol.toStringTag,{value:"Module"}));class yt{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}}}yt.prototype.cheerio="[cheerio object]",yt.prototype.splice=Array.prototype.splice,yt.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(yt.prototype,dc,xl,Ql,Zl,a0,s0);function r0(e,t){return function a(i,n,r=!0){if(i==null)throw new Error("cheerio.load() expects a string");const u=ai(n),o=e(i,u,r,null);class c extends yt{_make(T,p){const _=f(T,p);return _.prevObject=this,_}_parse(T,p,_,C){return e(T,p,_,C)}_render(T){return t(T,this.options)}}function f(m,T,p=o,_){if(m&&Pe(m))return m;const C=ai(_,u),L=typeof p=="string"?[e(p,C,!1,null)]:"length"in p?p:[p],P=Pe(L)?L:new c(L,null,C);if(P._root=P,!m)return new c(void 0,P,C);const X=typeof m=="string"&&ii(m)?e(m,C,!1,null).children:u0(m)?[m]:Array.isArray(m)?m:void 0,B=new c(X,P,C);if(X)return B;if(typeof m!="string")throw new TypeError("Unexpected type of selector");let V=m;const F=T?typeof T=="string"?ii(T)?new c([e(T,C,!1,null)],P,C):(V=`${T} ${V}`,P):Pe(T)?T:new c(Array.isArray(T)?T:[T],P,C):P;return F?F.find(V):B}return Object.assign(f,Jo,{load:a,_root:o,_options:u,fn:c.prototype,prototype:c.prototype}),f}}function u0(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const o0=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]),J="�";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 Te={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Es(e){return e>=55296&&e<=57343}function c0(e){return e>=56320&&e<=57343}function l0(e,t){return(e-55296)*1024+9216+t}function ms(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ts(e){return e>=64976&&e<=65007||o0.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 d0=65536;class h0{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=d0,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(c0(a))return this.pos++,this._addGap(),l0(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,Es(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){ms(t)?this._err(g.controlCharacterInInputStream):Ts(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 ps(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 N;(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/"})(N||(N={}));var et;(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"})(et||(et={}));var _e;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(_e||(_e={}));var b;(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"})(b||(b={}));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 f0=new Map([[b.A,s.A],[b.ADDRESS,s.ADDRESS],[b.ANNOTATION_XML,s.ANNOTATION_XML],[b.APPLET,s.APPLET],[b.AREA,s.AREA],[b.ARTICLE,s.ARTICLE],[b.ASIDE,s.ASIDE],[b.B,s.B],[b.BASE,s.BASE],[b.BASEFONT,s.BASEFONT],[b.BGSOUND,s.BGSOUND],[b.BIG,s.BIG],[b.BLOCKQUOTE,s.BLOCKQUOTE],[b.BODY,s.BODY],[b.BR,s.BR],[b.BUTTON,s.BUTTON],[b.CAPTION,s.CAPTION],[b.CENTER,s.CENTER],[b.CODE,s.CODE],[b.COL,s.COL],[b.COLGROUP,s.COLGROUP],[b.DD,s.DD],[b.DESC,s.DESC],[b.DETAILS,s.DETAILS],[b.DIALOG,s.DIALOG],[b.DIR,s.DIR],[b.DIV,s.DIV],[b.DL,s.DL],[b.DT,s.DT],[b.EM,s.EM],[b.EMBED,s.EMBED],[b.FIELDSET,s.FIELDSET],[b.FIGCAPTION,s.FIGCAPTION],[b.FIGURE,s.FIGURE],[b.FONT,s.FONT],[b.FOOTER,s.FOOTER],[b.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[b.FORM,s.FORM],[b.FRAME,s.FRAME],[b.FRAMESET,s.FRAMESET],[b.H1,s.H1],[b.H2,s.H2],[b.H3,s.H3],[b.H4,s.H4],[b.H5,s.H5],[b.H6,s.H6],[b.HEAD,s.HEAD],[b.HEADER,s.HEADER],[b.HGROUP,s.HGROUP],[b.HR,s.HR],[b.HTML,s.HTML],[b.I,s.I],[b.IMG,s.IMG],[b.IMAGE,s.IMAGE],[b.INPUT,s.INPUT],[b.IFRAME,s.IFRAME],[b.KEYGEN,s.KEYGEN],[b.LABEL,s.LABEL],[b.LI,s.LI],[b.LINK,s.LINK],[b.LISTING,s.LISTING],[b.MAIN,s.MAIN],[b.MALIGNMARK,s.MALIGNMARK],[b.MARQUEE,s.MARQUEE],[b.MATH,s.MATH],[b.MENU,s.MENU],[b.META,s.META],[b.MGLYPH,s.MGLYPH],[b.MI,s.MI],[b.MO,s.MO],[b.MN,s.MN],[b.MS,s.MS],[b.MTEXT,s.MTEXT],[b.NAV,s.NAV],[b.NOBR,s.NOBR],[b.NOFRAMES,s.NOFRAMES],[b.NOEMBED,s.NOEMBED],[b.NOSCRIPT,s.NOSCRIPT],[b.OBJECT,s.OBJECT],[b.OL,s.OL],[b.OPTGROUP,s.OPTGROUP],[b.OPTION,s.OPTION],[b.P,s.P],[b.PARAM,s.PARAM],[b.PLAINTEXT,s.PLAINTEXT],[b.PRE,s.PRE],[b.RB,s.RB],[b.RP,s.RP],[b.RT,s.RT],[b.RTC,s.RTC],[b.RUBY,s.RUBY],[b.S,s.S],[b.SCRIPT,s.SCRIPT],[b.SEARCH,s.SEARCH],[b.SECTION,s.SECTION],[b.SELECT,s.SELECT],[b.SOURCE,s.SOURCE],[b.SMALL,s.SMALL],[b.SPAN,s.SPAN],[b.STRIKE,s.STRIKE],[b.STRONG,s.STRONG],[b.STYLE,s.STYLE],[b.SUB,s.SUB],[b.SUMMARY,s.SUMMARY],[b.SUP,s.SUP],[b.TABLE,s.TABLE],[b.TBODY,s.TBODY],[b.TEMPLATE,s.TEMPLATE],[b.TEXTAREA,s.TEXTAREA],[b.TFOOT,s.TFOOT],[b.TD,s.TD],[b.TH,s.TH],[b.THEAD,s.THEAD],[b.TITLE,s.TITLE],[b.TR,s.TR],[b.TRACK,s.TRACK],[b.TT,s.TT],[b.U,s.U],[b.UL,s.UL],[b.SVG,s.SVG],[b.VAR,s.VAR],[b.WBR,s.WBR],[b.XMP,s.XMP]]);function da(e){var t;return(t=f0.get(e))!==null&&t!==void 0?t:s.UNKNOWN}const S=s,E0={[N.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]),[N.MATHML]:new Set([S.MI,S.MO,S.MN,S.MS,S.MTEXT,S.ANNOTATION_XML]),[N.SVG]:new Set([S.TITLE,S.FOREIGN_OBJECT,S.DESC]),[N.XLINK]:new Set,[N.XML]:new Set,[N.XMLNS]:new Set},Ci=new Set([S.H1,S.H2,S.H3,S.H4,S.H5,S.H6]),m0=new Set([b.STYLE,b.SCRIPT,b.XMP,b.IFRAME,b.NOEMBED,b.NOFRAMES,b.PLAINTEXT]);function T0(e,t){return m0.has(e)||t&&e===b.NOSCRIPT}var h;(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"})(h||(h={}));const pe={DATA:h.DATA,RCDATA:h.RCDATA,RAWTEXT:h.RAWTEXT,SCRIPT_DATA:h.SCRIPT_DATA,PLAINTEXT:h.PLAINTEXT,CDATA_SECTION:h.CDATA_SECTION};function p0(e){return e>=d.DIGIT_0&&e<=d.DIGIT_9}function Mt(e){return e>=d.LATIN_CAPITAL_A&&e<=d.LATIN_CAPITAL_Z}function b0(e){return e>=d.LATIN_SMALL_A&&e<=d.LATIN_SMALL_Z}function We(e){return b0(e)||Mt(e)}function bs(e){return We(e)||p0(e)}function ha(e){return e+32}function gs(e){return e===d.SPACE||e===d.LINE_FEED||e===d.TABULATION||e===d.FORM_FEED}function _s(e){return gs(e)||e===d.SOLIDUS||e===d.GREATER_THAN_SIGN}function g0(e){return e===d.NULL?g.nullCharacterReference:e>1114111?g.characterReferenceOutsideUnicodeRange:Es(e)?g.surrogateCharacterReference:Ts(e)?g.noncharacterCharacterReference:ms(e)||e===d.CARRIAGE_RETURN?g.controlCharacterReference:null}let _0=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=h.DATA,this.returnState=h.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new h0(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ka($a,(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=g0(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(ps(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=gs(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=h.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ce.Attribute:Ce.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===h.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case h.DATA:{this._stateData(t);break}case h.RCDATA:{this._stateRcdata(t);break}case h.RAWTEXT:{this._stateRawtext(t);break}case h.SCRIPT_DATA:{this._stateScriptData(t);break}case h.PLAINTEXT:{this._statePlaintext(t);break}case h.TAG_OPEN:{this._stateTagOpen(t);break}case h.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case h.TAG_NAME:{this._stateTagName(t);break}case h.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case h.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case h.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case h.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case h.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case h.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case h.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case h.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case h.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case h.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case h.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case h.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case h.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case h.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case h.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case h.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case h.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case h.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case h.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case h.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case h.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case h.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case h.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case h.BOGUS_COMMENT:{this._stateBogusComment(t);break}case h.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case h.COMMENT_START:{this._stateCommentStart(t);break}case h.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case h.COMMENT:{this._stateComment(t);break}case h.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case h.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case h.COMMENT_END:{this._stateCommentEnd(t);break}case h.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case h.DOCTYPE:{this._stateDoctype(t);break}case h.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case h.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case h.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case h.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case h.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case h.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case h.CDATA_SECTION:{this._stateCdataSection(t);break}case h.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case h.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case h.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case h.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.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=h.RCDATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(J);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.RAWTEXT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(J);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(J);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(J);break}case d.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(We(t))this._createStartTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.EXCLAMATION_MARK:{this.state=h.MARKUP_DECLARATION_OPEN;break}case d.SOLIDUS:{this.state=h.END_TAG_OPEN;break}case d.QUESTION_MARK:{this._err(g.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=h.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=h.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(We(t))this._createEndTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case d.GREATER_THAN_SIGN:{this._err(g.missingEndTagName),this.state=h.DATA;break}case d.EOF:{this._err(g.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(g.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=h.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=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.tagName+=J;break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(Mt(t)?ha(t):t)}}_stateRcdataLessThanSign(t){t===d.SOLIDUS?this.state=h.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){We(t)?(this.state=h.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=h.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=h.BEFORE_ATTRIBUTE_NAME,!1;case d.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=h.SELF_CLOSING_START_TAG,!1;case d.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=h.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===d.SOLIDUS?this.state=h.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){We(t)?(this.state=h.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case d.SOLIDUS:{this.state=h.SCRIPT_DATA_END_TAG_OPEN;break}case d.EXCLAMATION_MARK:{this.state=h.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=h.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){We(t)?(this.state=h.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===d.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(J);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=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(J);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case d.HYPHEN_MINUS:{this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(J);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===d.SOLIDUS?this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:We(t)?(this._emitChars("<"),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){We(t)?(this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&_s(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Te.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this._emitChars(J);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=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case d.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(J);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.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=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case d.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(J);break}case d.EOF:{this._err(g.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===d.SOLIDUS?(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&_s(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<Te.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=h.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=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._err(g.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=h.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=h.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=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case d.EQUALS_SIGN:{this._leaveAttrName(),this.state=h.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+=J;break}default:this.currentAttr.name+=String.fromCodePoint(Mt(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=h.SELF_CLOSING_START_TAG;break}case d.EQUALS_SIGN:{this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=h.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=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this.state=h.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingAttributeValue),this.state=h.DATA,this.emitCurrentTagToken();break}default:this.state=h.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=J;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=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=J;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=h.BEFORE_ATTRIBUTE_NAME;break}case d.AMPERSAND:{this._startCharacterReference();break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),this.currentAttr.value+=J;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=h.BEFORE_ATTRIBUTE_NAME;break}case d.SOLIDUS:{this._leaveAttrValue(),this.state=h.SELF_CLOSING_START_TAG;break}case d.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.missingWhitespaceBetweenAttributes),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case d.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=h.DATA,this.emitCurrentTagToken();break}case d.EOF:{this._err(g.eofInTag),this._emitEOFToken();break}default:this._err(g.unexpectedSolidusInTag),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=J;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Te.DASH_DASH,!0)?(this._createCommentToken(Te.DASH_DASH.length+1),this.state=h.COMMENT_START):this._consumeSequenceIfMatch(Te.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Te.DOCTYPE.length+1),this.state=h.DOCTYPE):this._consumeSequenceIfMatch(Te.CDATA_START,!0)?this.inForeignNode?this.state=h.CDATA_SECTION:(this._err(g.cdataInHtmlContent),this._createCommentToken(Te.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=h.BOGUS_COMMENT):this._ensureHibernation()||(this._err(g.incorrectlyOpenedComment),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_START_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=h.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptClosingOfEmptyComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END_DASH;break}case d.LESS_THAN_SIGN:{a.data+="<",this.state=h.COMMENT_LESS_THAN_SIGN;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.data+=J;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=h.COMMENT_LESS_THAN_SIGN_BANG;break}case d.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=h.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===d.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=h.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==d.GREATER_THAN_SIGN&&t!==d.EOF&&this._err(g.nestedComment),this.state=h.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(a);break}case d.EXCLAMATION_MARK:{this.state=h.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=h.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case d.HYPHEN_MINUS:{a.data+="--!",this.state=h.COMMENT_END_DASH;break}case d.GREATER_THAN_SIGN:{this._err(g.incorrectlyClosedComment),this.state=h.DATA,this.emitCurrentComment(a);break}case d.EOF:{this._err(g.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=h.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case d.SPACE:case d.LINE_FEED:case d.TABULATION:case d.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.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=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Mt(t))this._createDoctypeToken(String.fromCharCode(ha(t))),this.state=h.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(J),this.state=h.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=h.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=h.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=h.AFTER_DOCTYPE_NAME;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.name+=J;break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(Mt(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=h.DATA,this.emitCurrentDoctype(a);break}case d.EOF:{this._err(g.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Te.PUBLIC,!1)?this.state=h.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Te.SYSTEM,!1)?this.state=h.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(g.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=h.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=h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.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=h.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=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=h.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=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=J;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.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=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.publicId+=J;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.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=h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case d.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(a);break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=h.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=h.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=h.DATA;break}case d.QUOTATION_MARK:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.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=h.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=h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.QUOTATION_MARK:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{this._err(g.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.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=h.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=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case d.APOSTROPHE:{a.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case d.GREATER_THAN_SIGN:{this._err(g.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=h.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=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case d.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=J;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.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=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case d.NULL:{this._err(g.unexpectedNullCharacter),a.systemId+=J;break}case d.GREATER_THAN_SIGN:{this._err(g.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=h.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=h.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=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case d.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=h.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=h.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=h.CDATA_SECTION_END:(this._emitChars("]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case d.GREATER_THAN_SIGN:{this.state=h.DATA;break}case d.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=h.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()&&bs(this.preprocessor.peek(1))?h.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){bs(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===d.SEMICOLON&&this._err(g.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const As=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),Ns=new Set([...As,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]),A0=new Set([...fa,s.OL,s.UL]),N0=new Set([...fa,s.BUTTON]),Cs=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),Is=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),C0=new Set([s.TR,s.TEMPLATE,s.HTML]),I0=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),S0=new Set([s.TABLE,s.TEMPLATE,s.HTML]),x0=new Set([s.TD,s.TH]);class O0{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)===N.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])!==N.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(Ci,N.HTML)}popUntilTableCellPopped(){this.popUntilPopped(x0,N.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(S0,N.HTML)}clearBackToTableBodyContext(){this.clearBackTo(I0,N.HTML)}clearBackToTableRowContext(){this.clearBackTo(C0,N.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 N.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case N.SVG:{if(Is.has(n))return!1;break}case N.MATHML:{if(Cs.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,fa)}hasInListItemScope(t){return this.hasInDynamicScope(t,A0)}hasInButtonScope(t){return this.hasInDynamicScope(t,N0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case N.HTML:{if(Ci.has(a))return!0;if(fa.has(a))return!1;break}case N.SVG:{if(Is.has(a))return!1;break}case N.MATHML:{if(Cs.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===N.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])===N.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])===N.HTML)switch(this.tagIDs[a]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;As.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Ns.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Ns.has(this.currentTagId);)this.pop()}}const Ii=3;var ye;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ye||(ye={}));const Ss={type:ye.Marker};class D0{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 c=this.entries[o];if(c.type===ye.Marker)break;const{element:f}=c;if(this.treeAdapter.getTagName(f)===r&&this.treeAdapter.getNamespaceURI(f)===u){const m=this.treeAdapter.getAttrList(f);m.length===n&&i.push({idx:o,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Ii)return;const a=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,a);if(i.length<Ii)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(c=>n.get(c.name)===c.value)&&(r+=1,r>=Ii&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Ss)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:ye.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:ye.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(Ss);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const a=this.entries.find(i=>i.type===ye.Marker||this.treeAdapter.getTagName(i.element)===t);return a&&a.type===ye.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===ye.Element&&a.element===t)}}const ke={createDocument(){return{nodeName:"#document",mode:_e.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};ke.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(ke.isTextNode(a)){a.value+=t;return}}ke.appendChild(e,ke.createTextNode(t))},insertTextBefore(e,t,a){const i=e.childNodes[e.childNodes.indexOf(a)-1];i&&ke.isTextNode(i)?i.value+=t:ke.insertBefore(e,ke.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}}},xs="html",L0="about:legacy-compat",R0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Os=["+//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//"],y0=[...Os,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],M0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ds=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],P0=[...Ds,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ls(e,t){return t.some(a=>e.startsWith(a))}function k0(e){return e.name===xs&&e.publicId===null&&(e.systemId===null||e.systemId===L0)}function v0(e){if(e.name!==xs)return _e.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===R0)return _e.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),M0.has(a))return _e.QUIRKS;let i=t===null?y0:Os;if(Ls(a,i))return _e.QUIRKS;if(i=t===null?Ds:P0,Ls(a,i))return _e.LIMITED_QUIRKS}return _e.NO_QUIRKS}const Rs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},w0="definitionurl",B0="definitionURL",U0=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])),F0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:N.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:N.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:N.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:N.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:N.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:N.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:N.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:N.XML}],["xml:space",{prefix:"xml",name:"space",namespace:N.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:N.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:N.XMLNS}]]),H0=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])),Y0=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 V0(e){const t=e.tagID;return t===s.FONT&&e.attrs.some(({name:i})=>i===et.COLOR||i===et.SIZE||i===et.FACE)||Y0.has(t)}function ys(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===w0){e.attrs[t].name=B0;break}}function Ms(e){for(let t=0;t<e.attrs.length;t++){const a=U0.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Si(e){for(let t=0;t<e.attrs.length;t++){const a=F0.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 q0(e){const t=H0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=da(e.tagName))}function W0(e,t){return t===N.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function X0(e,t,a){if(t===N.MATHML&&e===s.ANNOTATION_XML){for(let i=0;i<a.length;i++)if(a[i].name===et.ENCODING){const n=a[i].value.toLowerCase();return n===Rs.TEXT_HTML||n===Rs.APPLICATION_XML}}return t===N.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function G0(e,t,a,i){return(!i||i===N.HTML)&&X0(e,t,a)||(!i||i===N.MATHML)&&W0(e,t)}const $0="hidden",Q0=8,j0=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 z0={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ps=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),ks={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ke,onParseError:null};let vs=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={...ks,...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 _0(this.options,this),this.activeFormattingElements=new D0(this.treeAdapter),this.fragmentContextID=i?da(this.treeAdapter.getTagName(i)):s.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new O0(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={...ks,...a};t??(t=i.treeAdapter.createElement(b.TEMPLATE,N.HTML,[]));const n=i.treeAdapter.createElement("documentmock",N.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:z0,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)===N.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,N.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=pe.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)===b.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==N.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=pe.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=pe.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=pe.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=pe.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,N.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,N.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(b.HTML,N.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:c,endCol:f,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:c,endCol:f,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)===b.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===N.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&!this._isIntegrationPoint(i,a,N.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 G0(t,n,r,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===ye.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 Ps.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)===N.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 E0[i].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){xh(this,t);return}switch(this.insertionMode){case E.INITIAL:{Pt(this,t);break}case E.BEFORE_HTML:{kt(this,t);break}case E.BEFORE_HEAD:{vt(this,t);break}case E.IN_HEAD:{wt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Bt(this,t);break}case E.AFTER_HEAD:{Ut(this,t);break}case E.IN_BODY:case E.IN_CAPTION:case E.IN_CELL:case E.IN_TEMPLATE:{Bs(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:{Li(this,t);break}case E.IN_TABLE_TEXT:{Xs(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){Sh(this,t);return}switch(this.insertionMode){case E.INITIAL:{Pt(this,t);break}case E.BEFORE_HTML:{kt(this,t);break}case E.BEFORE_HEAD:{vt(this,t);break}case E.IN_HEAD:{wt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Bt(this,t);break}case E.AFTER_HEAD:{Ut(this,t);break}case E.TEXT:{this._insertCharacters(t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Li(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){Oi(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:{Oi(this,t);break}case E.IN_TABLE_TEXT:{Yt(this,t);break}case E.AFTER_BODY:{id(this,t);break}case E.AFTER_AFTER_BODY:case E.AFTER_AFTER_FRAMESET:{nd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case E.INITIAL:{sd(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:{Yt(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)?Oh(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Pt(this,t);break}case E.BEFORE_HTML:{rd(this,t);break}case E.BEFORE_HEAD:{od(this,t);break}case E.IN_HEAD:{Oe(this,t);break}case E.IN_HEAD_NO_SCRIPT:{dd(this,t);break}case E.AFTER_HEAD:{fd(this,t);break}case E.IN_BODY:{de(this,t);break}case E.IN_TABLE:{ht(this,t);break}case E.IN_TABLE_TEXT:{Yt(this,t);break}case E.IN_CAPTION:{ch(this,t);break}case E.IN_COLUMN_GROUP:{Ri(this,t);break}case E.IN_TABLE_BODY:{pa(this,t);break}case E.IN_ROW:{ba(this,t);break}case E.IN_CELL:{hh(this,t);break}case E.IN_SELECT:{Qs(this,t);break}case E.IN_SELECT_IN_TABLE:{Eh(this,t);break}case E.IN_TEMPLATE:{Th(this,t);break}case E.AFTER_BODY:{bh(this,t);break}case E.IN_FRAMESET:{gh(this,t);break}case E.AFTER_FRAMESET:{Ah(this,t);break}case E.AFTER_AFTER_BODY:{Ch(this,t);break}case E.AFTER_AFTER_FRAMESET:{Ih(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Dh(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case E.INITIAL:{Pt(this,t);break}case E.BEFORE_HTML:{ud(this,t);break}case E.BEFORE_HEAD:{cd(this,t);break}case E.IN_HEAD:{ld(this,t);break}case E.IN_HEAD_NO_SCRIPT:{hd(this,t);break}case E.AFTER_HEAD:{Ed(this,t);break}case E.IN_BODY:{ma(this,t);break}case E.TEXT:{Jd(this,t);break}case E.IN_TABLE:{Ft(this,t);break}case E.IN_TABLE_TEXT:{Yt(this,t);break}case E.IN_CAPTION:{lh(this,t);break}case E.IN_COLUMN_GROUP:{dh(this,t);break}case E.IN_TABLE_BODY:{yi(this,t);break}case E.IN_ROW:{$s(this,t);break}case E.IN_CELL:{fh(this,t);break}case E.IN_SELECT:{js(this,t);break}case E.IN_SELECT_IN_TABLE:{mh(this,t);break}case E.IN_TEMPLATE:{ph(this,t);break}case E.AFTER_BODY:{Ks(this,t);break}case E.IN_FRAMESET:{_h(this,t);break}case E.AFTER_FRAMESET:{Nh(this,t);break}case E.AFTER_AFTER_BODY:{_a(this,t);break}}}onEof(t){switch(this.insertionMode){case E.INITIAL:{Pt(this,t);break}case E.BEFORE_HTML:{kt(this,t);break}case E.BEFORE_HEAD:{vt(this,t);break}case E.IN_HEAD:{wt(this,t);break}case E.IN_HEAD_NO_SCRIPT:{Bt(this,t);break}case E.AFTER_HEAD:{Ut(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:{qs(this,t);break}case E.TEXT:{eh(this,t);break}case E.IN_TABLE_TEXT:{Yt(this,t);break}case E.IN_TEMPLATE:{zs(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:{Di(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:{ws(this,t);break}case E.IN_TABLE:case E.IN_TABLE_BODY:case E.IN_ROW:{Li(this,t);break}case E.IN_TABLE_TEXT:{Ws(this,t);break}}}};function K0(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):Vs(e,t),a}function Z0(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 J0(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),c=o&&r>=j0;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=ed(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(u,i),i=u)}return i}function ed(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 td(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===N.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function ad(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 xi(e,t){for(let a=0;a<Q0;a++){const i=K0(e,t);if(!i)break;const n=Z0(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const r=J0(e,n,i.element),u=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(r),u&&td(e,u,r),ad(e,n,i)}}function Oi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function id(e,t){e._appendCommentNode(t,e.openElements.items[0])}function nd(e,t){e._appendCommentNode(t,e.document)}function Di(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 sd(e,t){e._setDocumentType(t);const a=t.forceQuirks?_e.QUIRKS:v0(t);k0(t)||e._err(t,g.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=E.BEFORE_HTML}function Pt(e,t){e._err(t,g.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,_e.QUIRKS),e.insertionMode=E.BEFORE_HTML,e._processToken(t)}function rd(e,t){t.tagID===s.HTML?(e._insertElement(t,N.HTML),e.insertionMode=E.BEFORE_HEAD):kt(e,t)}function ud(e,t){const a=t.tagID;(a===s.HTML||a===s.HEAD||a===s.BODY||a===s.BR)&&kt(e,t)}function kt(e,t){e._insertFakeRootElement(),e.insertionMode=E.BEFORE_HEAD,e._processToken(t)}function od(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.HEAD:{e._insertElement(t,N.HTML),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD;break}default:vt(e,t)}}function cd(e,t){const a=t.tagID;a===s.HEAD||a===s.BODY||a===s.HTML||a===s.BR?vt(e,t):e._err(t,g.endTagWithoutMatchingOpenElement)}function vt(e,t){e._insertFakeElement(b.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=E.IN_HEAD,e._processToken(t)}function Oe(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,pe.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,pe.RAWTEXT):(e._insertElement(t,N.HTML),e.insertionMode=E.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,pe.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,pe.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:wt(e,t)}}function ld(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:{wt(e,t);break}case s.TEMPLATE:{tt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function tt(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 wt(e,t){e.openElements.pop(),e.insertionMode=E.AFTER_HEAD,e._processToken(t)}function dd(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Oe(e,t);break}case s.NOSCRIPT:{e._err(t,g.nestedNoscriptInHead);break}default:Bt(e,t)}}function hd(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=E.IN_HEAD;break}case s.BR:{Bt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Bt(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 fd(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.BODY:{e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=E.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,N.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),Oe(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,g.misplacedStartTagForHeadElement);break}default:Ut(e,t)}}function Ed(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{Ut(e,t);break}case s.TEMPLATE:{tt(e,t);break}default:e._err(t,g.endTagWithoutMatchingOpenElement)}}function Ut(e,t){e._insertFakeElement(b.BODY,s.BODY),e.insertionMode=E.IN_BODY,Ea(e,t)}function Ea(e,t){switch(t.type){case W.CHARACTER:{Bs(e,t);break}case W.WHITESPACE_CHARACTER:{ws(e,t);break}case W.COMMENT:{Oi(e,t);break}case W.START_TAG:{de(e,t);break}case W.END_TAG:{ma(e,t);break}case W.EOF:{qs(e,t);break}}}function ws(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Bs(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function md(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Td(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function pd(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,N.HTML),e.insertionMode=E.IN_FRAMESET)}function bd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML)}function gd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),Ci.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,N.HTML)}function _d(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ad(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),a||(e.formElement=e.openElements.current))}function Nd(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,N.HTML)}function Cd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.tokenizer.state=pe.PLAINTEXT}function Id(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.framesetOk=!1}function Sd(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(b.A);a&&(xi(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Od(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(xi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,N.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Dd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ld(e,t){e.treeAdapter.getDocumentMode(e.document)!==_e.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,N.HTML),e.framesetOk=!1,e.insertionMode=E.IN_TABLE}function Us(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Fs(e){const t=ps(e,et.TYPE);return t!=null&&t.toLowerCase()===$0}function Rd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,N.HTML),Fs(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yd(e,t){e._appendElement(t,N.HTML),t.ackSelfClosing=!0}function Md(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,N.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Pd(e,t){t.tagName=b.IMG,t.tagID=s.IMG,Us(e,t)}function kd(e,t){e._insertElement(t,N.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=E.TEXT}function vd(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function wd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pe.RAWTEXT)}function Hs(e,t){e._switchToTextParsing(t,pe.RAWTEXT)}function Bd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.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 Ud(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function Fd(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,N.HTML)}function Hd(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,N.HTML)}function Yd(e,t){e._reconstructActiveFormattingElements(),ys(t),Si(t),t.selfClosing?e._appendElement(t,N.MATHML):e._insertElement(t,N.MATHML),t.ackSelfClosing=!0}function Vd(e,t){e._reconstructActiveFormattingElements(),Ms(t),Si(t),t.selfClosing?e._appendElement(t,N.SVG):e._insertElement(t,N.SVG),t.ackSelfClosing=!0}function Ys(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,N.HTML)}function de(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:{xd(e,t);break}case s.A:{Sd(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{gd(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:{bd(e,t);break}case s.LI:case s.DD:case s.DT:{Nd(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{Us(e,t);break}case s.HR:{Md(e,t);break}case s.RB:case s.RTC:{Fd(e,t);break}case s.RT:case s.RP:{Hd(e,t);break}case s.PRE:case s.LISTING:{_d(e,t);break}case s.XMP:{vd(e,t);break}case s.SVG:{Vd(e,t);break}case s.HTML:{md(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:{Oe(e,t);break}case s.BODY:{Td(e,t);break}case s.FORM:{Ad(e,t);break}case s.NOBR:{Od(e,t);break}case s.MATH:{Yd(e,t);break}case s.TABLE:{Ld(e,t);break}case s.INPUT:{Rd(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{yd(e,t);break}case s.IMAGE:{Pd(e,t);break}case s.BUTTON:{Id(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Dd(e,t);break}case s.IFRAME:{wd(e,t);break}case s.SELECT:{Bd(e,t);break}case s.OPTION:case s.OPTGROUP:{Ud(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Hs(e,t);break}case s.FRAMESET:{pd(e,t);break}case s.TEXTAREA:{kd(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Hs(e,t):Ys(e,t);break}case s.PLAINTEXT:{Cd(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:Ys(e,t)}}function qd(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 Wd(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=E.AFTER_BODY,Ks(e,t))}function Xd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function Gd(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 $d(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(b.P,s.P),e._closePElement()}function Qd(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function jd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function zd(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Kd(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function Zd(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(b.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function Vs(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 ma(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:{xi(e,t);break}case s.P:{$d(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:{Xd(e,t);break}case s.LI:{Qd(e);break}case s.DD:case s.DT:{jd(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{zd(e);break}case s.BR:{Zd(e);break}case s.BODY:{qd(e,t);break}case s.HTML:{Wd(e,t);break}case s.FORM:{Gd(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{Kd(e,t);break}case s.TEMPLATE:{tt(e,t);break}default:Vs(e,t)}}function qs(e,t){e.tmplInsertionModeStack.length>0?zs(e,t):Di(e,t)}function Jd(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 eh(e,t){e._err(t,g.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Li(e,t){if(Ps.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:{Xs(e,t);break}case W.WHITESPACE_CHARACTER:{Ws(e,t);break}}else Ht(e,t)}function th(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,N.HTML),e.insertionMode=E.IN_CAPTION}function ah(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=E.IN_COLUMN_GROUP}function ih(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.COLGROUP,s.COLGROUP),e.insertionMode=E.IN_COLUMN_GROUP,Ri(e,t)}function nh(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,N.HTML),e.insertionMode=E.IN_TABLE_BODY}function sh(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.TBODY,s.TBODY),e.insertionMode=E.IN_TABLE_BODY,pa(e,t)}function rh(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function uh(e,t){Fs(t)?e._appendElement(t,N.HTML):Ht(e,t),t.ackSelfClosing=!0}function oh(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,N.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ht(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{sh(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Oe(e,t);break}case s.COL:{ih(e,t);break}case s.FORM:{oh(e,t);break}case s.TABLE:{rh(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{nh(e,t);break}case s.INPUT:{uh(e,t);break}case s.CAPTION:{th(e,t);break}case s.COLGROUP:{ah(e,t);break}default:Ht(e,t)}}function Ft(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{tt(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:Ht(e,t)}}function Ht(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ea(e,t),e.fosterParentingEnabled=a}function Ws(e,t){e.pendingCharacterTokens.push(t)}function Xs(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Yt(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Ht(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Gs=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function ch(e,t){const a=t.tagID;Gs.has(a)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=E.IN_TABLE,ht(e,t)):de(e,t)}function lh(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&&Ft(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:ma(e,t)}}function Ri(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.COL:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Oe(e,t);break}default:Ta(e,t)}}function dh(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:{tt(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,N.HTML),e.insertionMode=E.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(b.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,ht(e,t));break}default:ht(e,t)}}function yi(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,Ft(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:Ft(e,t)}}function ba(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,N.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:ht(e,t)}}function $s(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,yi(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,yi(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:Ft(e,t)}}function hh(e,t){const a=t.tagID;Gs.has(a)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),ba(e,t)):de(e,t)}function fh(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(),$s(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:ma(e,t)}}function Qs(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,N.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,N.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,N.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:{Oe(e,t);break}}}function js(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:{tt(e,t);break}}}function Eh(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)):Qs(e,t)}function mh(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)):js(e,t)}function Th(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:{Oe(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,ht(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=E.IN_COLUMN_GROUP,e.insertionMode=E.IN_COLUMN_GROUP,Ri(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,de(e,t)}}function ph(e,t){t.tagID===s.TEMPLATE&&tt(e,t)}function zs(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Di(e,t)}function bh(e,t){t.tagID===s.HTML?de(e,t):ga(e,t)}function Ks(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,Ea(e,t)}function gh(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.FRAMESET:{e._insertElement(t,N.HTML);break}case s.FRAME:{e._appendElement(t,N.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Oe(e,t);break}}}function _h(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 Ah(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.NOFRAMES:{Oe(e,t);break}}}function Nh(e,t){t.tagID===s.HTML&&(e.insertionMode=E.AFTER_AFTER_FRAMESET)}function Ch(e,t){t.tagID===s.HTML?de(e,t):_a(e,t)}function _a(e,t){e.insertionMode=E.IN_BODY,Ea(e,t)}function Ih(e,t){switch(t.tagID){case s.HTML:{de(e,t);break}case s.NOFRAMES:{Oe(e,t);break}}}function Sh(e,t){t.chars=J,e._insertCharacters(t)}function xh(e,t){e._insertCharacters(t),e.framesetOk=!1}function Zs(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==N.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Oh(e,t){if(V0(t))Zs(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(a);i===N.MATHML?ys(t):i===N.SVG&&(q0(t),Ms(t)),Si(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function Dh(e,t){if(t.tagID===s.P||t.tagID===s.BR){Zs(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)===N.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 Lh=new Set([b.AREA,b.BASE,b.BASEFONT,b.BGSOUND,b.BR,b.COL,b.EMBED,b.FRAME,b.HR,b.IMG,b.INPUT,b.KEYGEN,b.LINK,b.META,b.PARAM,b.SOURCE,b.TRACK,b.WBR]);function Rh(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===N.HTML&&Lh.has(t.treeAdapter.getTagName(e))}const yh={treeAdapter:ke,scriptingEnabled:!0};function Mh(e,t){const a={...yh,...t};return Js(e,a)}function Ph(e,t){let a="";const i=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===b.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===N.HTML?t.treeAdapter.getTemplateContent(e):e,n=t.treeAdapter.getChildNodes(i);if(n)for(const r of n)a+=Js(r,t);return a}function Js(e,t){return t.treeAdapter.isElementNode(e)?kh(e,t):t.treeAdapter.isTextNode(e)?wh(e,t):t.treeAdapter.isCommentNode(e)?Bh(e,t):t.treeAdapter.isDocumentTypeNode(e)?Uh(e,t):""}function kh(e,t){const a=t.treeAdapter.getTagName(e);return`<${a}${vh(e,t)}>${Rh(e,t)?"":`${Ph(e,t)}</${a}>`}`}function vh(e,{treeAdapter:t}){let a="";for(const i of t.getAttrList(e)){if(a+=" ",i.namespace)switch(i.namespace){case N.XML:{a+=`xml:${i.name}`;break}case N.XMLNS:{i.name!=="xmlns"&&(a+="xmlns:"),a+=i.name;break}case N.XLINK:{a+=`xlink:${i.name}`;break}default:a+=`${i.prefix}:${i.name}`}else a+=i.name;a+=`="${_n(i.value)}"`}return a}function wh(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)===N.HTML&&T0(r,t.scriptingEnabled)?i:An(i)}function Bh(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Uh(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Fh(e,t){return vs.parse(e,t)}function Hh(e,t,a){typeof e=="string"&&(a=t,t=e,e=null);const i=vs.getFragmentParser(e,a);return i.tokenizer.write(t,!0),i.getFragment()}function er(e){const t=e.includes('"')?"'":'"';return t+e+t}function Yh(e,t,a){let i="!DOCTYPE ";return e&&(i+=e),t?i+=` PUBLIC ${er(t)}`:a&&(i+=" SYSTEM"),a&&(i+=` ${er(a)}`),i}const Xe={isCommentNode:Qt,isElementNode:v,isTextNode:Re,createDocument(){const e=new je([]);return e["x-mode"]=_e.NO_QUIRKS,e},createDocumentFragment(){return new je([])},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 c=a[o].name;i[c]=a[o].value,n[c]=a[o].namespace,r[c]=a[o].prefix}const u=new Wa(e,i,[]);return u.namespace=t,u["x-attribsNamespace"]=n,u["x-attribsPrefix"]=r,u},createCommentNode(e){return new Ya(e)},createTextNode(e){return new Nt(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){Xe.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,a,i){const n=Yh(t,a,i);let r=e.children.find(u=>Xa(u)&&u.name==="!doctype");r?r.data=n??null:(r=new Va("!doctype",n),Xe.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:Xe.appendChild(e,Xe.createTextNode(t))},insertTextBefore(e,t,a){const i=e.children[e.children.indexOf(a)-1];i&&Re(i)?i.data+=t:Xe.insertBefore(e,Xe.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 Xa(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 Vh(e,t,a,i){var n;return(n=t.treeAdapter)!==null&&n!==void 0||(t.treeAdapter=Xe),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),a?Fh(e,t):Hh(i,e,t)}const qh={treeAdapter:Xe};function Wh(e){const t="length"in e?e:[e];for(let i=0;i<t.length;i+=1){const n=t[i];He(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+=Mh(n,qh)}return a}var M;(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"})(M||(M={}));var I;(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"})(I||(I={}));function ve(e){return e===M.Space||e===M.NewLine||e===M.Tab||e===M.FormFeed||e===M.CarriageReturn}function Aa(e){return e===M.Slash||e===M.Gt||ve(e)}function Xh(e){return e>=M.LowerA&&e<=M.LowerZ||e>=M.UpperA&&e<=M.UpperZ}var Me;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Me||(Me={}));const le={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 Gh{constructor({xmlMode:t=!1,decodeEntities:a=!0},i){this.cbs=i,this.state=I.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=I.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 Ka(t?mn:$a,(n,r)=>this.emitCodePoint(n,r))}reset(){this.state=I.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=I.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===M.Lt||!this.decodeEntities&&this.fastForwardTo(M.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=I.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===M.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=I.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===M.Gt||ve(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===le.TitleEnd?this.decodeEntities&&t===M.Amp&&this.startEntity():this.fastForwardTo(M.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===M.Lt)}stateCDATASequence(t){t===le.Cdata[this.sequenceIndex]?++this.sequenceIndex===le.Cdata.length&&(this.state=I.InCommentLike,this.currentSequence=le.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=I.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===le.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=I.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):Xh(t)}startSpecial(t,a){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=a,this.state=I.SpecialStartSequence}stateBeforeTagName(t){if(t===M.ExclamationMark)this.state=I.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===M.Questionmark)this.state=I.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const a=t|32;this.sectionStart=this.index,this.xmlMode?this.state=I.InTagName:a===le.ScriptEnd[2]?this.state=I.BeforeSpecialS:a===le.TitleEnd[2]?this.state=I.BeforeSpecialT:this.state=I.InTagName}else t===M.Slash?this.state=I.BeforeClosingTagName:(this.state=I.Text,this.stateText(t))}stateInTagName(t){Aa(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){ve(t)||(t===M.Gt?this.state=I.Text:(this.state=this.isTagStartChar(t)?I.InClosingTagName:I.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===M.Gt||ve(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=I.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===M.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=I.InSpecialTag,this.sequenceIndex=0):this.state=I.Text,this.sectionStart=this.index+1):t===M.Slash?this.state=I.InSelfClosingTag:ve(t)||(this.state=I.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===M.Gt?(this.cbs.onselfclosingtag(this.index),this.state=I.Text,this.sectionStart=this.index+1,this.isSpecial=!1):ve(t)||(this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===M.Eq||Aa(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=I.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===M.Eq?this.state=I.BeforeAttributeValue:t===M.Slash||t===M.Gt?(this.cbs.onattribend(Me.NoValue,this.sectionStart),this.sectionStart=-1,this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t)):ve(t)||(this.cbs.onattribend(Me.NoValue,this.sectionStart),this.state=I.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===M.DoubleQuote?(this.state=I.InAttributeValueDq,this.sectionStart=this.index+1):t===M.SingleQuote?(this.state=I.InAttributeValueSq,this.sectionStart=this.index+1):ve(t)||(this.sectionStart=this.index,this.state=I.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===M.DoubleQuote?Me.Double:Me.Single,this.index+1),this.state=I.BeforeAttributeName):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,M.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,M.SingleQuote)}stateInAttributeValueNoQuotes(t){ve(t)||t===M.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Me.Unquoted,this.index),this.state=I.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===M.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===M.OpeningSquareBracket?(this.state=I.CDATASequence,this.sequenceIndex=0):this.state=t===M.Dash?I.BeforeComment:I.InDeclaration}stateInDeclaration(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=I.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===M.Dash?(this.state=I.InCommentLike,this.currentSequence=le.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=I.InDeclaration}stateInSpecialComment(t){(t===M.Gt||this.fastForwardTo(M.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=I.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const a=t|32;a===le.ScriptEnd[3]?this.startSpecial(le.ScriptEnd,4):a===le.StyleEnd[3]?this.startSpecial(le.StyleEnd,4):(this.state=I.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const a=t|32;a===le.TitleEnd[3]?this.startSpecial(le.TitleEnd,4):a===le.TextareaEnd[3]?this.startSpecial(le.TextareaEnd,4):(this.state=I.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=I.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Ce.Strict:this.baseState===I.Text||this.baseState===I.InSpecialTag?Ce.Legacy:Ce.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===I.Text||this.state===I.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===I.InAttributeValueDq||this.state===I.InAttributeValueSq||this.state===I.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 I.Text:{this.stateText(t);break}case I.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case I.InSpecialTag:{this.stateInSpecialTag(t);break}case I.CDATASequence:{this.stateCDATASequence(t);break}case I.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case I.InAttributeName:{this.stateInAttributeName(t);break}case I.InCommentLike:{this.stateInCommentLike(t);break}case I.InSpecialComment:{this.stateInSpecialComment(t);break}case I.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case I.InTagName:{this.stateInTagName(t);break}case I.InClosingTagName:{this.stateInClosingTagName(t);break}case I.BeforeTagName:{this.stateBeforeTagName(t);break}case I.AfterAttributeName:{this.stateAfterAttributeName(t);break}case I.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case I.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case I.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case I.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case I.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case I.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case I.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case I.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case I.InDeclaration:{this.stateInDeclaration(t);break}case I.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case I.BeforeComment:{this.stateBeforeComment(t);break}case I.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case I.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===I.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===I.InCommentLike?this.currentSequence===le.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===I.InTagName||this.state===I.BeforeAttributeName||this.state===I.BeforeAttributeValue||this.state===I.AfterAttributeName||this.state===I.InAttributeName||this.state===I.InAttributeValueSq||this.state===I.InAttributeValueDq||this.state===I.InAttributeValueNq||this.state===I.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,a){this.baseState!==I.Text&&this.baseState!==I.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 ft=new Set(["input","option","optgroup","select","button","datalist","textarea"]),j=new Set(["p"]),tr=new Set(["thead","tbody"]),ar=new Set(["dd","dt"]),ir=new Set(["rt","rp"]),$h=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",j],["h1",j],["h2",j],["h3",j],["h4",j],["h5",j],["h6",j],["select",ft],["input",ft],["output",ft],["button",ft],["datalist",ft],["textarea",ft],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",ar],["dt",ar],["address",j],["article",j],["aside",j],["blockquote",j],["details",j],["div",j],["dl",j],["fieldset",j],["figcaption",j],["figure",j],["footer",j],["form",j],["header",j],["hr",j],["main",j],["nav",j],["ol",j],["pre",j],["section",j],["table",j],["ul",j],["rt",ir],["rp",ir],["tbody",tr],["tfoot",tr]]),Qh=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),nr=new Set(["math","svg"]),sr=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),jh=/\s|\//;class zh{constructor(t,a={}){var i,n,r,u,o,c;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:Gh)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(o=this.cbs).onparserinit)===null||c===void 0||c.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,ja(t)),this.startIndex=a}isVoidElement(t){return this.htmlMode&&Qh.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&&$h.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&&(nr.has(t)?this.foreignContext.unshift(!0):sr.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,c,f,m;this.endIndex=a;let T=this.getSlice(t,a);if(this.lowerCaseTagNames&&(T=T.toLowerCase()),this.htmlMode&&(nr.has(T)||sr.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"),(c=(o=this.cbs).onopentag)===null||c===void 0||c.call(o,"br",{},!0),(m=(f=this.cbs).onclosetag)===null||m===void 0||m.call(f,"br",!1));else{const p=this.stack.indexOf(T);if(p!==-1)for(let _=0;_<=p;_++){const C=this.stack.shift();(n=(i=this.cbs).onclosetag)===null||n===void 0||n.call(i,C,_!==p)}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+=ja(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===Me.Double?'"':t===Me.Single?"'":t===Me.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(jh);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,c,f,m,T,p,_;this.endIndex=a;const C=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,C),(f=(c=this.cbs).oncdataend)===null||f===void 0||f.call(c)):((T=(m=this.cbs).oncomment)===null||T===void 0||T.call(m,`[CDATA[${C}]]`),(_=(p=this.cbs).oncommentend)===null||_===void 0||_.call(p)),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 Kh(e,t){const a=new Zu(void 0,t);return new zh(a,t).end(e),a.root}const Zh=Ol((e,t,a,i)=>t._useHtmlParser2?Kh(e,t):Vh(e,t,a,i)),rr=r0(Zh,(e,t)=>t._useHtmlParser2?jt(e,t):Wh(e)),Jh={class:"flex h-screen"},ef={class:"goodschool_mobile"},tf=["innerHTML"],af=["innerHTML"],nf={class:"flex-1 bg-gray-100 overflow-auto"},sf={class:"p-4"},rf={key:0,class:"text-red-500 text-xs mt-2"},uf={key:0,class:"resize-area border-l overflow-auto w-[375px]"},of={class:"p-4"},ur=Na(l.defineComponent({__name:"Designer",props:{mode:{type:String,default:"design"},template:{type:String,default:""},css:{type:Array,default:()=>[]},previewWidth:{type:Number,default:375}},setup(e){const t=e,a=l.ref(t.template);l.watch(()=>t.template,x=>{a.value=x},{immediate:!0}),l.watch(()=>a.value,x=>{x&&(n.value=L(x))},{immediate:!0}),l.watch(()=>t.css,x=>{x.forEach(R=>{if(document.querySelector(`link[href="${R}"]`))return;const Y=document.createElement("link");Y.rel="stylesheet",Y.href=R,document.head.appendChild(Y)})},{immediate:!0});const i=l.ref(t.mode),n=l.ref(),r=l.ref(),u=l.ref(),o=l.ref("");let c=rr("",{},!1);function f(x){console.log("选择",x),r.value=x}function m(x,R=""){if(R){const Y=T(n.value,R);Y?u.value=Y:u.value=x}else u.value=x}function T(x,R){if(x.xpath===R)return x;if(x.children&&x.children.length)for(const Y of x.children){const O=T(Y,R);if(O)return O}}function p(x){var R,Y,O;if(console.log(x,r.value),r.value)if(r.value.rule=x.rule,r.value.type=x.type,(R=x.rule)!=null&&R.isThemeColor?(x.attrs.class+=" ys_tit_color",x.attrs.style&&(x.attrs.style=void 0)):((Y=x.attrs.class)!=null&&Y.includes(" ys_tit_color")&&(x.attrs.class=x.attrs.class.replace(" ys_tit_color"," ")),x.rule.color&&(x.attrs.style={color:x.rule.color})),r.value.type===he.Block){const D=T(n.value,r.value.parentxpath||"");D&&D.children&&D.children.forEach(q=>{var $;q.tag===r.value.tag&&(q.rule=x.rule,q.type=x.type,($=q.attrs.class)!=null&&$.includes(" mb40")||(q.attrs.class+=" mb40"))})}else(O=r.value.attrs.class)!=null&&O.includes(" mb40")&&(r.value.attrs.class=r.value.attrs.class.replace(" mb40"," "))}const _=l.ref("");function C(x){_.value=x}function L(x){c=rr(x);const R=c("body").children().toArray().map(Y=>P(c(Y)));return console.log(R[0]),R[0]}function P(x,R=""){function Y(q){if(!q||!q[0])return"";const $=[];let z=q;for(;z.length&&z[0].tagName!=="html";){const ae=z[0].tagName,Vt=z.parent().children(ae).index(z)+1;$.unshift(`${ae}[${Vt}]`),z=z.parent()}return"/html/"+$.join("/")}const O=Y(x).replace("/html/body[1]",""),D=x.children().toArray().map(q=>P(c(q),O));return{tag:x[0].tagName,text:x.contents().not(x.children()).text().trim(),attrs:x[0].attribs,children:D,xpath:O,parentxpath:R,rule:{}}}function X(x){console.log("更新子节点的文本",x);const R=T(n.value,x.element.xpath);R&&(R.editText=x.newText)}function B(x,R=""){function Y(O,D){var z;const $=(D?((z=T(n.value,D))==null?void 0:z.children)||[]:[n.value]).filter(ae=>ae.tag===O.tag).indexOf(O)+1;return`${D}/${O.tag}[${$}]`}x.xpath=Y(x,R),x.parentxpath=R,(x.children||[]).forEach(O=>B(O,x.xpath))}function V({action:x,element:R,newBlock:Y}){console.log("块操作",x,R,Y);const O=T(n.value,R.parentxpath||"");if(!O||!O.children)return;const D=O.children.findIndex(ae=>ae===R);if(D===-1)return;const q=O.children.length,{minBlock:$,maxBlock:z}=R.rule;if((x==="add"||x==="copy")&&q>=(z||1/0)){o.value=`无法添加更多块。最大块数量为 ${z}`;return}switch(x){case"add":if(Y){const ae={...Y,xpath:"",children:JSON.parse(JSON.stringify(Y.children))};O.children.splice(D+1,0,ae)}break;case"copy":if(Y){const ae={...Y,xpath:"",children:JSON.parse(JSON.stringify(Y.children))};O.children.splice(D+1,0,ae)}break;case"moveUp":if(D>0){const[ae]=O.children.splice(D,1);O.children.splice(D-1,0,ae)}break;case"moveDown":if(D<O.children.length-1){const[ae]=O.children.splice(D,1);O.children.splice(D+1,0,ae)}break;case"delete":if(q<=($||0)){o.value=`无法删除更多块。最小块数量为 ${$}`;return}O.children.splice(D,1);break}o.value="",B(n.value)}function F(x,R){let Y=R.attrs.class.replace(/icon-\S+/g,`icon-${x}`);R.attrs.class=Y}function k(x,R){R.attrs.src=x}const A=l.ref(t.previewWidth),w=l.ref(375);let G=l.ref(!1),te=l.ref(""),be=0,Ae=0;function Se(x){te.value=x,G.value=!0,be=event.clientX,Ae=A.value,window.addEventListener("mousemove",ge),window.addEventListener("mouseup",se)}function ge(x){if(!G.value)return;const R=x.clientX-be;te.value==="preview"?A.value=Math.max(200,Ae+R):te.value==="structure"&&(w.value=Math.max(200,Ae-R))}function se(){G.value=!1,te.value="",window.removeEventListener("mousemove",ge),window.removeEventListener("mouseup",se)}return(x,R)=>(l.openBlock(),l.createElementBlock("div",Jh,[l.createElementVNode("div",{class:"border-l overflow-auto resize-area",style:l.normalizeStyle({width:A.value+"px"})},[l.createElementVNode("div",ef,[R[1]||(R[1]=l.createElementVNode("h2",{class:"text-lg font-bold"},"实时预览",-1)),_.value?(l.openBlock(),l.createElementBlock("div",{key:0,innerHTML:_.value},null,8,tf)):(l.openBlock(),l.createElementBlock("div",{key:1,innerHTML:l.unref(c)("body").html()},null,8,af))])],4),l.createElementVNode("div",{class:"resizer with-arrows",onMousedown:R[0]||(R[0]=Y=>Se("preview"))},null,32),l.createElementVNode("div",nf,[l.createElementVNode("div",sf,[R[2]||(R[2]=l.createElementVNode("div",{class:"flex justify-between"},[l.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染")],-1)),o.value?(l.openBlock(),l.createElementBlock("div",rf,l.toDisplayString(o.value),1)):l.createCommentVNode("",!0),n.value?(l.openBlock(),l.createBlock(yu,{key:1,element:n.value,selectedElement:r.value,hoveredElement:u.value,onSelectElement:f,onHoverElement:m,onContentUpdated:C,onUpdateText:X,onBlockAction:V,onAddIcon:F,onUpload:k},null,8,["element","selectedElement","hoveredElement"])):l.createCommentVNode("",!0)])]),i.value=="design"?(l.openBlock(),l.createElementBlock("div",uf,[l.createElementVNode("div",of,[R[3]||(R[3]=l.createElementVNode("h2",{class:"text-lg font-bold"},"节点属性",-1)),r.value?(l.openBlock(),l.createBlock(Yu,{key:0,element:r.value,onUpdateElement:p},null,8,["element"])):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-9eba1e82"]]),cf={install(e){e.component("Designer",ur)}};we.Designer=ur,we.default=cf,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|