@chatsystem/client 1.1.41 → 1.1.42
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/dist/index.cjs +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +444 -432
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ki;function wl(){return Ki||(Ki=1,process.env.NODE_ENV!=="production"&&(function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),
|
|
18
|
-
`+se+C}}var le=!1,ce;{var ke=typeof WeakMap=="function"?WeakMap:Map;ce=new ke}function Y(C,
|
|
17
|
+
*/var Ki;function wl(){return Ki||(Ki=1,process.env.NODE_ENV!=="production"&&(function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),_=Symbol.iterator,A="@@iterator";function O(C){if(C===null||typeof C!="object")return null;var z=_&&C[_]||C[A];return typeof z=="function"?z:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function L(C){{for(var z=arguments.length,Q=new Array(z>1?z-1:0),fe=1;fe<z;fe++)Q[fe-1]=arguments[fe];M("error",C,Q)}}function M(C,z,Q){{var fe=v.ReactDebugCurrentFrame,Oe=fe.getStackAddendum();Oe!==""&&(z+="%s",Q=Q.concat([Oe]));var Pe=Q.map(function(ve){return String(ve)});Pe.unshift("Warning: "+z),Function.prototype.apply.call(console[C],console,Pe)}}var V=!1,R=!1,D=!1,ae=!1,ge=!1,ue;ue=Symbol.for("react.module.reference");function W(C){return!!(typeof C=="string"||typeof C=="function"||C===r||C===i||ge||C===a||C===l||C===d||ae||C===m||V||R||D||typeof C=="object"&&C!==null&&(C.$$typeof===h||C.$$typeof===f||C.$$typeof===s||C.$$typeof===u||C.$$typeof===c||C.$$typeof===ue||C.getModuleId!==void 0))}function xe(C,z,Q){var fe=C.displayName;if(fe)return fe;var Oe=z.displayName||z.name||"";return Oe!==""?Q+"("+Oe+")":Q}function te(C){return C.displayName||"Context"}function F(C){if(C==null)return null;if(typeof C.tag=="number"&&L("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case a:return"StrictMode";case l:return"Suspense";case d:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case u:var z=C;return te(z)+".Consumer";case s:var Q=C;return te(Q._context)+".Provider";case c:return xe(C,C.render,"ForwardRef");case f:var fe=C.displayName||null;return fe!==null?fe:F(C.type)||"Memo";case h:{var Oe=C,Pe=Oe._payload,ve=Oe._init;try{return F(ve(Pe))}catch{return null}}}return null}var H=Object.assign,Z=0,he,de,Ce,Fe,g,G,X;function x(){}x.__reactDisabledLog=!0;function ee(){{if(Z===0){he=console.log,de=console.info,Ce=console.warn,Fe=console.error,g=console.group,G=console.groupCollapsed,X=console.groupEnd;var C={configurable:!0,enumerable:!0,value:x,writable:!0};Object.defineProperties(console,{info:C,log:C,warn:C,error:C,group:C,groupCollapsed:C,groupEnd:C})}Z++}}function ie(){{if(Z--,Z===0){var C={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},C,{value:he}),info:H({},C,{value:de}),warn:H({},C,{value:Ce}),error:H({},C,{value:Fe}),group:H({},C,{value:g}),groupCollapsed:H({},C,{value:G}),groupEnd:H({},C,{value:X})})}Z<0&&L("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=v.ReactCurrentDispatcher,se;function K(C,z,Q){{if(se===void 0)try{throw Error()}catch(Oe){var fe=Oe.stack.trim().match(/\n( *(at )?)/);se=fe&&fe[1]||""}return`
|
|
18
|
+
`+se+C}}var le=!1,ce;{var ke=typeof WeakMap=="function"?WeakMap:Map;ce=new ke}function Y(C,z){if(!C||le)return"";{var Q=ce.get(C);if(Q!==void 0)return Q}var fe;le=!0;var Oe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pe;Pe=oe.current,oe.current=null,ee();try{if(z){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(Bt){fe=Bt}Reflect.construct(C,[],ve)}else{try{ve.call()}catch(Bt){fe=Bt}C.call(ve.prototype)}}else{try{throw Error()}catch(Bt){fe=Bt}C()}}catch(Bt){if(Bt&&fe&&typeof Bt.stack=="string"){for(var Se=Bt.stack.split(`
|
|
19
19
|
`),rt=fe.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+Se[
|
|
20
|
+
`),ze=Se.length-1,Ge=rt.length-1;ze>=1&&Ge>=0&&Se[ze]!==rt[Ge];)Ge--;for(;ze>=1&&Ge>=0;ze--,Ge--)if(Se[ze]!==rt[Ge]){if(ze!==1||Ge!==1)do if(ze--,Ge--,Ge<0||Se[ze]!==rt[Ge]){var ht=`
|
|
21
|
+
`+Se[ze].replace(" at new "," at ");return C.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",C.displayName)),typeof C=="function"&&ce.set(C,ht),ht}while(ze>=1&&Ge>=0);break}}}finally{le=!1,oe.current=Pe,ie(),Error.prepareStackTrace=Oe}var fn=C?C.displayName||C.name:"",Xi=fn?K(fn):"";return typeof C=="function"&&ce.set(C,Xi),Xi}function He(C,z,Q){return Y(C,!1)}function Ye(C){var z=C.prototype;return!!(z&&z.isReactComponent)}function Xe(C,z,Q){if(C==null)return"";if(typeof C=="function")return Y(C,Ye(C));if(typeof C=="string")return K(C);switch(C){case l:return K("Suspense");case d:return K("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case c:return He(C.render);case f:return Xe(C.type,z,Q);case h:{var fe=C,Oe=fe._payload,Pe=fe._init;try{return Xe(Pe(Oe),z,Q)}catch{}}}return""}var dt=Object.prototype.hasOwnProperty,Qe={},_t=v.ReactDebugCurrentFrame;function ft(C){if(C){var z=C._owner,Q=Xe(C.type,C._source,z?z.type:null);_t.setExtraStackFrame(Q)}else _t.setExtraStackFrame(null)}function me(C,z,Q,fe,Oe){{var Pe=Function.call.bind(dt);for(var ve in C)if(Pe(C,ve)){var Se=void 0;try{if(typeof C[ve]!="function"){var rt=Error((fe||"React class")+": "+Q+" type `"+ve+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[ve]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw rt.name="Invariant Violation",rt}Se=C[ve](z,ve,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ze){Se=ze}Se&&!(Se instanceof Error)&&(ft(Oe),L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",Q,ve,typeof Se),ft(null)),Se instanceof Error&&!(Se.message in Qe)&&(Qe[Se.message]=!0,ft(Oe),L("Failed %s type: %s",Q,Se.message),ft(null))}}}var Te=Array.isArray;function Ie(C){return Te(C)}function we(C){{var z=typeof Symbol=="function"&&Symbol.toStringTag,Q=z&&C[Symbol.toStringTag]||C.constructor.name||"Object";return Q}}function Ue(C){try{return I(C),!1}catch{return!0}}function I(C){return""+C}function w(C){if(Ue(C))return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",we(C)),I(C)}var q=v.ReactCurrentOwner,pe={key:!0,ref:!0,__self:!0,__source:!0},_e,Ze,yt;yt={};function Ct(C){if(dt.call(C,"ref")){var z=Object.getOwnPropertyDescriptor(C,"ref").get;if(z&&z.isReactWarning)return!1}return C.ref!==void 0}function Wt(C){if(dt.call(C,"key")){var z=Object.getOwnPropertyDescriptor(C,"key").get;if(z&&z.isReactWarning)return!1}return C.key!==void 0}function Xt(C,z){if(typeof C.ref=="string"&&q.current&&z&&q.current.stateNode!==z){var Q=F(q.current.type);yt[Q]||(L('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(q.current.type),C.ref),yt[Q]=!0)}}function nt(C,z){{var Q=function(){_e||(_e=!0,L("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};Q.isReactWarning=!0,Object.defineProperty(C,"key",{get:Q,configurable:!0})}}function Ht(C,z){{var Q=function(){Ze||(Ze=!0,L("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};Q.isReactWarning=!0,Object.defineProperty(C,"ref",{get:Q,configurable:!0})}}var St=function(C,z,Q,fe,Oe,Pe,ve){var Se={$$typeof:t,type:C,key:z,ref:Q,props:ve,_owner:Pe};return Se._store={},Object.defineProperty(Se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(Se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Oe}),Object.freeze&&(Object.freeze(Se.props),Object.freeze(Se)),Se};function El(C,z,Q,fe,Oe){{var Pe,ve={},Se=null,rt=null;Q!==void 0&&(w(Q),Se=""+Q),Wt(z)&&(w(z.key),Se=""+z.key),Ct(z)&&(rt=z.ref,Xt(z,Oe));for(Pe in z)dt.call(z,Pe)&&!pe.hasOwnProperty(Pe)&&(ve[Pe]=z[Pe]);if(C&&C.defaultProps){var ze=C.defaultProps;for(Pe in ze)ve[Pe]===void 0&&(ve[Pe]=ze[Pe])}if(Se||rt){var Ge=typeof C=="function"?C.displayName||C.name||"Unknown":C;Se&&nt(ve,Ge),rt&&Ht(ve,Ge)}return St(C,Se,rt,Oe,fe,q.current,ve)}}var ta=v.ReactCurrentOwner,$i=v.ReactDebugCurrentFrame;function dn(C){if(C){var z=C._owner,Q=Xe(C.type,C._source,z?z.type:null);$i.setExtraStackFrame(Q)}else $i.setExtraStackFrame(null)}var na;na=!1;function ra(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Yi(){{if(ta.current){var C=F(ta.current.type);if(C)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+C+"`."}return""}}function Tl(C){{if(C!==void 0){var
|
|
23
|
+
Check the render method of \``+C+"`."}return""}}function Tl(C){{if(C!==void 0){var z=C.fileName.replace(/^.*[\\\/]/,""),Q=C.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+
|
|
25
|
+
Check your code at `+z+":"+Q+"."}return""}}var Gi={};function xl(C){{var z=Yi();if(!z){var Q=typeof C=="string"?C:C.displayName||C.name;Q&&(z=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+Q+">.")}return V}}function qi(C,V){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var Q=xl(V);if(Gi[Q])return;Gi[Q]=!0;var fe="";C&&C._owner&&C._owner!==ta.current&&(fe=" It was passed a child from "+F(C._owner.type)+"."),dn(C),L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),dn(null)}}function Wi(C,V){{if(typeof C!="object")return;if(Ie(C))for(var Q=0;Q<C.length;Q++){var fe=C[Q];ra(fe)&&qi(fe,V)}else if(ra(C))C._store&&(C._store.validated=!0);else if(C){var Oe=O(C);if(typeof Oe=="function"&&Oe!==C.entries)for(var Pe=Oe.call(C),ve;!(ve=Pe.next()).done;)ra(ve.value)&&qi(ve.value,V)}}}function yl(C){{var V=C.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=F(V);me(Q,C.props,"prop",fe,C)}else if(V.PropTypes!==void 0&&!na){na=!0;var Oe=F(V);L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Cl(C){{for(var V=Object.keys(C.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){dn(C),L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),dn(null);break}}C.ref!==null&&(dn(C),L("Invalid attribute `ref` supplied to `React.Fragment`."),dn(null))}}function Sl(C,V,Q,fe,Oe,Pe){{var ve=W(C);if(!ve){var Se="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var rt=Tl(Oe);rt?Se+=rt:Se+=Yi();var Ve;C===null?Ve="null":Ie(C)?Ve="array":C!==void 0&&C.$$typeof===t?(Ve="<"+(F(C.type)||"Unknown")+" />",Se=" Did you accidentally export a JSX literal instead of a component?"):Ve=typeof C,L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ve,Se)}var Ge=El(C,V,Q,Oe,Pe);if(Ge==null)return Ge;if(ve){var ht=V.children;if(ht!==void 0)if(fe)if(Ie(ht)){for(var fn=0;fn<ht.length;fn++)Wi(ht[fn],C);Object.freeze&&Object.freeze(ht)}else L("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Wi(ht,C)}return C===r?Cl(Ge):yl(Ge),Ge}}var Al=Sl;dr.Fragment=r,dr.jsxDEV=Al})()),dr}var Ji;function Rl(){return Ji||(Ji=1,process.env.NODE_ENV==="production"?cr.exports=Il():cr.exports=wl()),cr.exports}var B=Rl();const Ol=e=>We.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 330 330",xmlSpace:"preserve",...e},We.createElement("path",{id:"XMLID_102_",d:"M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"}));var Qt={},Zi;function Ll(){if(Zi)return Qt;Zi=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.AgentDisplayFacetRoleType=Qt.AgentDisplayFacetModeType=void 0;var e;(function(n){n.SPRITESHEET="spritesheet",n.LOTTIE="lottie",n.IMAGE="image",n.SVG="svg",n.VIDEO="video"})(e||(Qt.AgentDisplayFacetModeType=e={}));var t;return(function(n){n.LAUNCHER="launcher",n.ASSISTANT="assistant",n.SEARCH="search"})(t||(Qt.AgentDisplayFacetRoleType=t={})),Qt}var ot=Ll();const ia=e=>({mode:ot.AgentDisplayFacetModeType.SVG,role:e}),Dl=()=>({agent:{display:{name:"",CSSRules:"",[ot.AgentDisplayFacetRoleType.LAUNCHER]:ia(ot.AgentDisplayFacetRoleType.LAUNCHER),[ot.AgentDisplayFacetRoleType.ASSISTANT]:ia(ot.AgentDisplayFacetRoleType.ASSISTANT),[ot.AgentDisplayFacetRoleType.SEARCH]:ia(ot.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:""}},api:{settings:{maxUserMessagesPerDiscussion:20}}}),Zn=k.createContext({companySettings:Dl(),setCompanySettings:()=>{}}),Cn=globalThis;Cn.__WIDGET_ASSET_CACHE__||(Cn.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});Cn.__WIDGET_PRELOAD_KEYS__||(Cn.__WIDGET_PRELOAD_KEYS__=new Set);const sa=Cn.__WIDGET_PRELOAD_KEYS__,$t=Cn.__WIDGET_ASSET_CACHE__,kl="widget-assets-v1";async function jr(e,t){try{const n=await caches.open(kl),r=await n.match(e,{ignoreSearch:!1});if(r)return r.clone();const a=await fetch(e,{cache:"force-cache",mode:"cors",keepalive:!0,...t});if(!a.ok)throw new Error(`HTTP ${a.status} for ${e}`);return n.put(e,a.clone()),a}catch(n){return console.log("error while fetching",n),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function qo(e){const t=$t.svg.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(a,"image/svg+xml"),u=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(u,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(a,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:a}})();return $t.svg.set(e,{promise:n,ts:Date.now()}),n}function Wo(e){const t=$t.img.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).blob();return{blobUrl:URL.createObjectURL(a)}})();return $t.img.set(e,{promise:n,ts:Date.now()}),n}function Xo(e){const t=$t.lot.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).arrayBuffer(),i=new Uint8Array(a);if(i.length>=4&&i[0]===80&&i[1]===75&&i[2]===3&&i[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([a],{type:"application/zip"}))};const u=new TextDecoder().decode(i);return{kind:"json",data:JSON.parse(u)}})();return $t.lot.set(e,{promise:n,ts:Date.now()}),n}function Qo(e){const t=$t.spr.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).blob();let i=null;try{i=await createImageBitmap(a)}catch{i=null}const{imgEl:s,width:u,height:c}=await new Promise((l,d)=>{const f=URL.createObjectURL(a),h=new Image;h.crossOrigin="anonymous",h.onload=()=>{const m=h.naturalWidth,A=h.naturalHeight;l({imgEl:h,width:m,height:A})},h.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},h.src=f,h.decode?.().catch(()=>{})});return{imgEl:s,bitmap:i,width:u,height:c}})();return $t.spr.set(e,{promise:n,ts:Date.now()}),n}function Pl(e){e.images?.forEach(t=>void Wo(t)),e.svgs?.forEach(t=>void qo(t)),e.lotties?.forEach(t=>void Xo(t)),e.sprites?.forEach(t=>void Qo(t))}function Ml(e){try{const t=document.createElement("link");t.rel="preconnect",t.href=e,t.crossOrigin="anonymous",document.head.appendChild(t);const n=document.createElement("link");n.rel="dns-prefetch",n.href=e,document.head.appendChild(n)}catch(t){console.log("error in injectPreconnect",t)}}function Ko(e){return new URL(e,document.baseURI).toString()}function Bl(e,t){const n=document.head.querySelectorAll('link[rel="preload"]');for(const r of n)if((e?r.as===e||r.getAttribute("as")===e:!0)&&r.href===t)return!0;return!1}function fr(e,t,n,r){const a=Ko(n),i=`${e}|${t??""}|${a}`;if(sa.has(i))return;if(Bl(t,a)){sa.add(i);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=a,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),sa.add(i)}function Fl(e){const t=s=>Array.from(new Set((s??[]).map(Ko))),n=t(e.images),r=t(e.svgs),a=t(e.lotties),i=t(e.sprites);n.forEach(s=>fr("preload","image",s)),r.forEach(s=>fr("preload","fetch",s,"image/svg+xml")),a.forEach(s=>fr("preload","fetch",s,"application/zip")),i.forEach(s=>fr("preload","fetch",s))}const Hl=({src:e})=>{const[t,n]=k.useState(null);return k.useEffect(()=>{let r=!1;return Wo(e).then(({blobUrl:a})=>{n(a)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),B.jsxDEV("img",{src:t??e,decoding:"async",loading:"eager"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Image/Image.tsx",lineNumber:24,columnNumber:10},void 0)};function Ul(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function jl({src:e,autoplay:t=!0,loop:n=!0,className:r,style:a,placeholder:i,fallback:s,onLoaded:u,onError:c}){const[l,d]=k.useState({kind:"loading"});return k.useEffect(()=>{let f=null,h=!1;return d({kind:"loading"}),Xo(e).then(async m=>{if(!h)if(m.kind==="zip"){const A=Ul(m)?m.blob:await(await fetch(m.blobUrl)).blob();f=URL.createObjectURL(A),d({kind:"lottieZip",blobUrl:f}),u?.(f)}else d({kind:"json",data:m.data}),u?.(m.data)}).catch(m=>!h&&(d({kind:"error",err:m}),c?.(m))),()=>{h=!0,f&&URL.revokeObjectURL(f)}},[e]),l.kind==="loading"?B.jsxDEV("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...a},children:i??"Loading animation…"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:84,columnNumber:7},this):l.kind==="error"?B.jsxDEV("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...a},children:s??"Failed to load animation"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:98,columnNumber:7},this):l.kind==="json"?B.jsxDEV(_l,{animationData:l.data,loop:n,autoplay:t,className:r,style:a,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:112,columnNumber:7},this):B.jsxDEV(vl.DotLottieReact,{src:l.blobUrl,loop:n,autoplay:t,className:r,style:a},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:124,columnNumber:5},this)}async function zl(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:a=3,debug:i=!1}=t;if(e.width<n*2||e.height<n*2)return i&&console.warn("detectGrid: image too small"),null;const s=document.createElement("canvas");s.width=e.naturalWidth,s.height=e.naturalHeight;const u=s.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,s.width,s.height),l=s.width,d=s.height,f=new Uint8ClampedArray(l*d);for(let W=0;W<d;W++){let xe=W*l;for(let te=0;te<l;te++){const F=(xe+te)*4;f[xe+te]=.299*c[F]+.587*c[F+1]+.114*c[F+2]|0}}const h=new Float32Array(l),m=new Float32Array(d);for(let W=1;W<l-1;W++){let xe=0;for(let te=0;te<d;te++){const F=te*l+W,H=f[F+1]-f[F-1];xe+=Math.abs(H)}h[W]=xe}for(let W=1;W<d-1;W++){let xe=0;for(let te=0;te<l;te++){const F=W*l+te,H=f[F+l]-f[F-l];xe+=Math.abs(H)}m[W]=xe}const A=es(h,n,Math.min(r,l/2)),_=es(m,n,Math.min(r,d/2));if(!A||!_)return i&&console.warn("detectGrid: could not find periods"),null;const O=Math.max(1,Math.round(l/A)),v=Math.max(1,Math.round(d/_)),L=ts(h,A,O,a),M=ts(m,_,v,a),z=Math.max(1,A-L),R=Math.max(1,_-M);if(z*O>l+2||R*v>d+2)return i&&console.warn("detectGrid: sanity check failed"),null;const D=Ua(h,60),ae=Ua(m,60),ge=Math.max(0,ns(h,D)),ue=Math.max(0,ns(m,ae));return i&&console.log({periodX:A,periodY:_,columns:O,rows:v,gutterX:L,gutterY:M,frameWidth:z,frameHeight:R,originX:ge,originY:ue}),{columns:O,rows:v,frameWidth:z,frameHeight:R,gutterX:L,gutterY:M,originX:ge,originY:ue}}function es(e,t,n){const r=Jo(e);let a=0;for(let m=0;m<e.length;m++){const A=e[m]-r;a+=A*A}if(a===0)return null;const i=new Float32Array(n+1);let s=0,u=-1/0;for(let m=t;m<=n;m++){let A=0;for(let O=0;O+m<e.length;O++)A+=(e[O]-r)*(e[O+m]-r);const _=A/a;i[m]=_,_>u&&(u=_,s=m)}if(s<=t||s>=n)return s||null;const c=i[s-1],l=i[s],d=i[s+1],f=c-2*l+d,h=f===0?0:.5*(c-d)/f;return s+h}function ts(e,t,n,r){const a=[];for(let u=1;u<n;u++){const c=u*t;let l=1/0,d=c;for(let f=-r;f<=r;f++){const h=c+f;if(h<=0||h>=e.length)continue;const m=e[h];m<l&&(l=m,d=h)}a.push(d)}if(a.length<1)return 0;let i=[];for(const u of a){const c=e[u]*1.5+Ua(e,10)*.5;let l=u,d=u;for(;l>1&&e[l-1]<=c;)l--;for(;d<e.length-2&&e[d+1]<=c;)d++;i.push(Math.max(0,d-l+1))}const s=Math.round(Jo(i));return Math.max(0,Math.min(s,Math.floor(t/4)))}function Jo(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function Ua(e,t){const n=Array.from(e);n.sort((a,i)=>a-i);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function ns(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function Vl(e,t,n,r,a){const{data:i}=e.getImageData(t,n,r,a);let s=0;for(let u=3;u<i.length;u+=4)s+=i[u];return s/(255*(i.length/4))<.03}const $l=k.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:a,rows:i,gutterX:s=0,gutterY:u=0,frameCount:c,atlasFrames:l,fps:d=12,autoplay:f=!0,loop:h=!0,startFrame:m=0,direction:A="forward",scale:_=1,backgroundColor:O,className:v,style:L,pauseWhenHidden:M=!1,originX:z,originY:R,onLoad:D,onEnd:ae,onFrame:ge},ue){const W=k.useRef(null),xe=k.useRef(null),[te,F]=k.useState(null),[H,Z]=k.useState(null),[he,de]=k.useState(null),[Ce,Fe]=k.useState(!1),[g,G]=k.useState(!!f),[X,x]=k.useState(m),ee=k.useRef(1),[ie,oe]=k.useState(null),se=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));k.useEffect(()=>{let me=!1;return Fe(!1),Qo(t).then(({imgEl:Te,bitmap:Ie})=>{me||(F(Te),Z(Ie),de({w:Te.naturalWidth,h:Te.naturalHeight}),Fe(!0),D?.())}).catch(()=>{}),()=>{me=!0}},[t,D]),k.useEffect(()=>{let me=!1;return(async()=>{if(!te)return;if(l&&l.length){oe(null);return}if(!(!n||!r||!a||!i)){oe(null);return}const Ie=await zl(te,{debug:!0});me||(Ie?oe({frameWidth:Ie.frameWidth,frameHeight:Ie.frameHeight,columns:Ie.columns,rows:Ie.rows,gutterX:Ie.gutterX,gutterY:Ie.gutterY}):(oe(null),console.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{me=!0}},[te,l,n,r,a,i]);const K=ie?.frameWidth??n,le=ie?.frameHeight??r,ce=ie?.columns??a,ke=ie?.rows??i,Y=ie?.gutterX??s,He=ie?.gutterY??u,Ye=ie?.originX??z??0,Xe=ie?.originY??R??0,dt=k.useMemo(()=>{if(l&&l.length>0)return{cols:0,rows:0};if(!he||!K||!le)return{cols:0,rows:0};const me=ce??Math.floor((he.w+Y)/(K+Y)),Te=ke??Math.floor((he.h+He)/(le+He));return{cols:Math.max(0,me),rows:Math.max(0,Te)}},[l,he,K,le,ce,ke,Y,He]),Qe=k.useMemo(()=>{if(l?.length)return l;if(!K||!le)return[];const{cols:me,rows:Te}=dt;if(!me||!Te)return[];const Ie=Math.min(c??me*Te,me*Te),we=[];for(let Ue=0;Ue<Ie;Ue++){const I=Ue%me,w=Math.floor(Ue/me),q=Ye+I*(K+Y),pe=Xe+w*(le+He);we.push({x:q,y:pe,w:K,h:le})}if(te&&we.length){const Ue=document.createElement("canvas");Ue.width=te.naturalWidth,Ue.height=te.naturalHeight;const I=Ue.getContext("2d");if(I){I.drawImage(te,0,0);let w=we.length;for(;w>0&&Vl(I,we[w-1].x,we[w-1].y,we[w-1].w,we[w-1].h);)w--;return we.slice(0,w)}}return we},[l,dt,c,K,le,Y,He,te,Ye,Xe]),_t=()=>{const me=W.current;if(!me||Qe.length===0)return;const Te=Qe[Math.max(0,Math.min(X,Qe.length-1))],Ie=Math.max(1,Math.round(Te.w*_)),we=Math.max(1,Math.round(Te.h*_));me.style.width=Ie+"px",me.style.height=we+"px",me.width=Ie*se,me.height=we*se};k.useEffect(()=>{_t()},[Ce,_,Qe.length,se,X]);const ft=me=>{const Te=H??te??null,Ie=W.current;if(!Ie||!Te||Qe.length===0)return;const we=Ie.getContext("2d");if(!we)return;we.save(),we.setTransform(1,0,0,1,0,0),we.clearRect(0,0,Ie.width,Ie.height),O&&(we.fillStyle=O,we.fillRect(0,0,Ie.width,Ie.height));const Ue=Qe[me];we.scale(se,se),we.drawImage(Te,Ue.x,Ue.y,Ue.w,Ue.h,0,0,Math.round(Ue.w*_),Math.round(Ue.h*_)),we.restore()};return k.useEffect(()=>{if(!Ce||Qe.length===0)return;let me=performance.now();const Te=1e3/Math.max(1,Math.min(120,d)),Ie=we=>{if(xe.current=requestAnimationFrame(Ie),!g){ft(X);return}const Ue=we-me;if(Ue<Te){ft(X);return}me=we-Ue%Te,x(I=>{const w=Qe.length-1;let q=I;return A==="forward"?q=I+1:A==="backward"?q=I-1:((I>=w&&ee.current===1||I<=0&&ee.current===-1)&&(ee.current*=-1),q=I+ee.current),(q>w||q<0)&&(h?q=A==="backward"?w:0:(q=Math.max(0,Math.min(q,w)),G(!1),ae?.())),q})};return xe.current=requestAnimationFrame(Ie),()=>{xe.current&&cancelAnimationFrame(xe.current)}},[Ce,d,g,h,A,Qe.length,X]),k.useEffect(()=>{ft(X),ge?.(X)},[X,Ce,_,se]),k.useEffect(()=>{if(!M)return;const me=()=>{document.hidden&&G(!1)};return document.addEventListener("visibilitychange",me),()=>document.removeEventListener("visibilitychange",me)},[M]),k.useImperativeHandle(ue,()=>({play:()=>G(!0),pause:()=>G(!1),toggle:()=>G(me=>!me),gotoFrame:me=>x(()=>Math.max(0,Math.min(me,Math.max(0,Qe.length-1)))),isPlaying:()=>g,currentFrame:()=>X}),[g,X,Qe.length]),B.jsxDEV("div",{className:v,style:L,children:B.jsxDEV("canvas",{ref:W,"aria-label":"spritesheet animation"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSpritesheet/RemoteSpritesheetWithCache.tsx",lineNumber:444,columnNumber:7},this)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSpritesheet/RemoteSpritesheetWithCache.tsx",lineNumber:443,columnNumber:5},this)});function Yl({url:e,className:t}){const[n,r]=k.useState(""),[a,i]=k.useState(null);return k.useEffect(()=>{let s=!1;return qo(e).then(({sanitized:u})=>{s||(r(u),i(null))}).catch(u=>!s&&i(u.message??"Failed to load")),()=>{s=!0}},[e]),a?B.jsxDEV("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",a]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSVG/RemoteSVGWithCache.tsx",lineNumber:32,columnNumber:7},this):n?B.jsxDEV("div",{className:t,dangerouslySetInnerHTML:{__html:n}},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSVG/RemoteSVGWithCache.tsx",lineNumber:38,columnNumber:5},this):B.jsxDEV("div",{className:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSVG/RemoteSVGWithCache.tsx",lineNumber:36,columnNumber:21},this)}const bi=({facet:e})=>{const{mode:t,assetUrl:n,spr_columns:r,spr_fps:a,spr_frameCount:i,spr_frameHeight:s,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:l,spr_rows:d,spr_originX:f,spr_originY:h}=e;return B.jsxDEV("div",{className:"assetContainer",children:[t===ot.AgentDisplayFacetModeType.LOTTIE&&B.jsxDEV(jl,{src:n,autoplay:!0,onError:m=>console.error(m)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:33,columnNumber:9},void 0),t===ot.AgentDisplayFacetModeType.SVG&&B.jsxDEV("div",{children:B.jsxDEV(Yl,{url:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:41,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:40,columnNumber:9},void 0),t===ot.AgentDisplayFacetModeType.IMAGE&&B.jsxDEV(Hl,{src:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:45,columnNumber:9},void 0),t===ot.AgentDisplayFacetModeType.SPRITESHEET&&B.jsxDEV($l,{src:n,frameCount:i,columns:r,rows:d,fps:a,frameHeight:s,frameWidth:u,gutterX:c,gutterY:l,originX:f,originY:h,autoplay:!0},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:55,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:31,columnNumber:5},void 0)},Gl=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=k.useContext(Zn);return B.jsxDEV("div",{className:`launcher
|
|
27
|
+
Check the top-level render call using <`+Q+">.")}return z}}function qi(C,z){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var Q=xl(z);if(Gi[Q])return;Gi[Q]=!0;var fe="";C&&C._owner&&C._owner!==ta.current&&(fe=" It was passed a child from "+F(C._owner.type)+"."),dn(C),L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),dn(null)}}function Wi(C,z){{if(typeof C!="object")return;if(Ie(C))for(var Q=0;Q<C.length;Q++){var fe=C[Q];ra(fe)&&qi(fe,z)}else if(ra(C))C._store&&(C._store.validated=!0);else if(C){var Oe=O(C);if(typeof Oe=="function"&&Oe!==C.entries)for(var Pe=Oe.call(C),ve;!(ve=Pe.next()).done;)ra(ve.value)&&qi(ve.value,z)}}}function yl(C){{var z=C.type;if(z==null||typeof z=="string")return;var Q;if(typeof z=="function")Q=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===c||z.$$typeof===f))Q=z.propTypes;else return;if(Q){var fe=F(z);me(Q,C.props,"prop",fe,C)}else if(z.PropTypes!==void 0&&!na){na=!0;var Oe=F(z);L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Cl(C){{for(var z=Object.keys(C.props),Q=0;Q<z.length;Q++){var fe=z[Q];if(fe!=="children"&&fe!=="key"){dn(C),L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),dn(null);break}}C.ref!==null&&(dn(C),L("Invalid attribute `ref` supplied to `React.Fragment`."),dn(null))}}function Sl(C,z,Q,fe,Oe,Pe){{var ve=W(C);if(!ve){var Se="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(Se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var rt=Tl(Oe);rt?Se+=rt:Se+=Yi();var ze;C===null?ze="null":Ie(C)?ze="array":C!==void 0&&C.$$typeof===t?(ze="<"+(F(C.type)||"Unknown")+" />",Se=" Did you accidentally export a JSX literal instead of a component?"):ze=typeof C,L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ze,Se)}var Ge=El(C,z,Q,Oe,Pe);if(Ge==null)return Ge;if(ve){var ht=z.children;if(ht!==void 0)if(fe)if(Ie(ht)){for(var fn=0;fn<ht.length;fn++)Wi(ht[fn],C);Object.freeze&&Object.freeze(ht)}else L("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Wi(ht,C)}return C===r?Cl(Ge):yl(Ge),Ge}}var Al=Sl;dr.Fragment=r,dr.jsxDEV=Al})()),dr}var Ji;function Rl(){return Ji||(Ji=1,process.env.NODE_ENV==="production"?cr.exports=Il():cr.exports=wl()),cr.exports}var B=Rl();const Ol=e=>We.createElement("svg",{fill:"#000000",height:"800px",width:"800px",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 330 330",xmlSpace:"preserve",...e},We.createElement("path",{id:"XMLID_102_",d:"M325.607,79.393c-5.857-5.857-15.355-5.858-21.213,0.001l-139.39,139.393L25.607,79.393 c-5.857-5.857-15.355-5.858-21.213,0.001c-5.858,5.858-5.858,15.355,0,21.213l150.004,150c2.813,2.813,6.628,4.393,10.606,4.393 s7.794-1.581,10.606-4.394l149.996-150C331.465,94.749,331.465,85.251,325.607,79.393z"}));var Qt={},Zi;function Ll(){if(Zi)return Qt;Zi=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.AgentDisplayFacetRoleType=Qt.AgentDisplayFacetModeType=void 0;var e;(function(n){n.SPRITESHEET="spritesheet",n.LOTTIE="lottie",n.IMAGE="image",n.SVG="svg",n.VIDEO="video"})(e||(Qt.AgentDisplayFacetModeType=e={}));var t;return(function(n){n.LAUNCHER="launcher",n.ASSISTANT="assistant",n.SEARCH="search"})(t||(Qt.AgentDisplayFacetRoleType=t={})),Qt}var ot=Ll();const ia=e=>({mode:ot.AgentDisplayFacetModeType.SVG,role:e}),Dl=()=>({agent:{display:{name:"",CSSRules:"",[ot.AgentDisplayFacetRoleType.LAUNCHER]:ia(ot.AgentDisplayFacetRoleType.LAUNCHER),[ot.AgentDisplayFacetRoleType.ASSISTANT]:ia(ot.AgentDisplayFacetRoleType.ASSISTANT),[ot.AgentDisplayFacetRoleType.SEARCH]:ia(ot.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:""}},api:{settings:{maxUserMessagesPerDiscussion:20}}}),Zn=k.createContext({companySettings:Dl(),setCompanySettings:()=>{}}),Cn=globalThis;Cn.__WIDGET_ASSET_CACHE__||(Cn.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});Cn.__WIDGET_PRELOAD_KEYS__||(Cn.__WIDGET_PRELOAD_KEYS__=new Set);const sa=Cn.__WIDGET_PRELOAD_KEYS__,$t=Cn.__WIDGET_ASSET_CACHE__,kl="widget-assets-v1";async function jr(e,t){try{const n=await caches.open(kl),r=await n.match(e,{ignoreSearch:!1});if(r)return r.clone();const a=await fetch(e,{cache:"force-cache",mode:"cors",keepalive:!0,...t});if(!a.ok)throw new Error(`HTTP ${a.status} for ${e}`);return n.put(e,a.clone()),a}catch(n){return console.log("error while fetching",n),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function qo(e){const t=$t.svg.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(a,"image/svg+xml"),u=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(u,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(a,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:a}})();return $t.svg.set(e,{promise:n,ts:Date.now()}),n}function Wo(e){const t=$t.img.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).blob();return{blobUrl:URL.createObjectURL(a)}})();return $t.img.set(e,{promise:n,ts:Date.now()}),n}function Xo(e){const t=$t.lot.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).arrayBuffer(),i=new Uint8Array(a);if(i.length>=4&&i[0]===80&&i[1]===75&&i[2]===3&&i[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([a],{type:"application/zip"}))};const u=new TextDecoder().decode(i);return{kind:"json",data:JSON.parse(u)}})();return $t.lot.set(e,{promise:n,ts:Date.now()}),n}function Qo(e){const t=$t.spr.get(e);if(t)return t.promise;const n=(async()=>{const a=await(await jr(e)).blob();let i=null;try{i=await createImageBitmap(a)}catch{i=null}const{imgEl:s,width:u,height:c}=await new Promise((l,d)=>{const f=URL.createObjectURL(a),h=new Image;h.crossOrigin="anonymous",h.onload=()=>{const m=h.naturalWidth,_=h.naturalHeight;l({imgEl:h,width:m,height:_})},h.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},h.src=f,h.decode?.().catch(()=>{})});return{imgEl:s,bitmap:i,width:u,height:c}})();return $t.spr.set(e,{promise:n,ts:Date.now()}),n}function Pl(e){e.images?.forEach(t=>void Wo(t)),e.svgs?.forEach(t=>void qo(t)),e.lotties?.forEach(t=>void Xo(t)),e.sprites?.forEach(t=>void Qo(t))}function Ml(e){try{const t=document.createElement("link");t.rel="preconnect",t.href=e,t.crossOrigin="anonymous",document.head.appendChild(t);const n=document.createElement("link");n.rel="dns-prefetch",n.href=e,document.head.appendChild(n)}catch(t){console.log("error in injectPreconnect",t)}}function Ko(e){return new URL(e,document.baseURI).toString()}function Bl(e,t){const n=document.head.querySelectorAll('link[rel="preload"]');for(const r of n)if((e?r.as===e||r.getAttribute("as")===e:!0)&&r.href===t)return!0;return!1}function fr(e,t,n,r){const a=Ko(n),i=`${e}|${t??""}|${a}`;if(sa.has(i))return;if(Bl(t,a)){sa.add(i);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=a,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),sa.add(i)}function Fl(e){const t=s=>Array.from(new Set((s??[]).map(Ko))),n=t(e.images),r=t(e.svgs),a=t(e.lotties),i=t(e.sprites);n.forEach(s=>fr("preload","image",s)),r.forEach(s=>fr("preload","fetch",s,"image/svg+xml")),a.forEach(s=>fr("preload","fetch",s,"application/zip")),i.forEach(s=>fr("preload","fetch",s))}const Hl=({src:e})=>{const[t,n]=k.useState(null);return k.useEffect(()=>{let r=!1;return Wo(e).then(({blobUrl:a})=>{n(a)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),B.jsxDEV("img",{src:t??e,decoding:"async",loading:"eager"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Image/Image.tsx",lineNumber:24,columnNumber:10},void 0)};function Ul(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function jl({src:e,autoplay:t=!0,loop:n=!0,className:r,style:a,placeholder:i,fallback:s,onLoaded:u,onError:c}){const[l,d]=k.useState({kind:"loading"});return k.useEffect(()=>{let f=null,h=!1;return d({kind:"loading"}),Xo(e).then(async m=>{if(!h)if(m.kind==="zip"){const _=Ul(m)?m.blob:await(await fetch(m.blobUrl)).blob();f=URL.createObjectURL(_),d({kind:"lottieZip",blobUrl:f}),u?.(f)}else d({kind:"json",data:m.data}),u?.(m.data)}).catch(m=>!h&&(d({kind:"error",err:m}),c?.(m))),()=>{h=!0,f&&URL.revokeObjectURL(f)}},[e]),l.kind==="loading"?B.jsxDEV("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...a},children:i??"Loading animation…"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:84,columnNumber:7},this):l.kind==="error"?B.jsxDEV("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...a},children:s??"Failed to load animation"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:98,columnNumber:7},this):l.kind==="json"?B.jsxDEV(_l,{animationData:l.data,loop:n,autoplay:t,className:r,style:a,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:112,columnNumber:7},this):B.jsxDEV(vl.DotLottieReact,{src:l.blobUrl,loop:n,autoplay:t,className:r,style:a},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteLottie/RemoteLottieWithCache.tsx",lineNumber:124,columnNumber:5},this)}async function Vl(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:a=3,debug:i=!1}=t;if(e.width<n*2||e.height<n*2)return i&&console.warn("detectGrid: image too small"),null;const s=document.createElement("canvas");s.width=e.naturalWidth,s.height=e.naturalHeight;const u=s.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,s.width,s.height),l=s.width,d=s.height,f=new Uint8ClampedArray(l*d);for(let W=0;W<d;W++){let xe=W*l;for(let te=0;te<l;te++){const F=(xe+te)*4;f[xe+te]=.299*c[F]+.587*c[F+1]+.114*c[F+2]|0}}const h=new Float32Array(l),m=new Float32Array(d);for(let W=1;W<l-1;W++){let xe=0;for(let te=0;te<d;te++){const F=te*l+W,H=f[F+1]-f[F-1];xe+=Math.abs(H)}h[W]=xe}for(let W=1;W<d-1;W++){let xe=0;for(let te=0;te<l;te++){const F=W*l+te,H=f[F+l]-f[F-l];xe+=Math.abs(H)}m[W]=xe}const _=es(h,n,Math.min(r,l/2)),A=es(m,n,Math.min(r,d/2));if(!_||!A)return i&&console.warn("detectGrid: could not find periods"),null;const O=Math.max(1,Math.round(l/_)),v=Math.max(1,Math.round(d/A)),L=ts(h,_,O,a),M=ts(m,A,v,a),V=Math.max(1,_-L),R=Math.max(1,A-M);if(V*O>l+2||R*v>d+2)return i&&console.warn("detectGrid: sanity check failed"),null;const D=Ua(h,60),ae=Ua(m,60),ge=Math.max(0,ns(h,D)),ue=Math.max(0,ns(m,ae));return i&&console.log({periodX:_,periodY:A,columns:O,rows:v,gutterX:L,gutterY:M,frameWidth:V,frameHeight:R,originX:ge,originY:ue}),{columns:O,rows:v,frameWidth:V,frameHeight:R,gutterX:L,gutterY:M,originX:ge,originY:ue}}function es(e,t,n){const r=Jo(e);let a=0;for(let m=0;m<e.length;m++){const _=e[m]-r;a+=_*_}if(a===0)return null;const i=new Float32Array(n+1);let s=0,u=-1/0;for(let m=t;m<=n;m++){let _=0;for(let O=0;O+m<e.length;O++)_+=(e[O]-r)*(e[O+m]-r);const A=_/a;i[m]=A,A>u&&(u=A,s=m)}if(s<=t||s>=n)return s||null;const c=i[s-1],l=i[s],d=i[s+1],f=c-2*l+d,h=f===0?0:.5*(c-d)/f;return s+h}function ts(e,t,n,r){const a=[];for(let u=1;u<n;u++){const c=u*t;let l=1/0,d=c;for(let f=-r;f<=r;f++){const h=c+f;if(h<=0||h>=e.length)continue;const m=e[h];m<l&&(l=m,d=h)}a.push(d)}if(a.length<1)return 0;let i=[];for(const u of a){const c=e[u]*1.5+Ua(e,10)*.5;let l=u,d=u;for(;l>1&&e[l-1]<=c;)l--;for(;d<e.length-2&&e[d+1]<=c;)d++;i.push(Math.max(0,d-l+1))}const s=Math.round(Jo(i));return Math.max(0,Math.min(s,Math.floor(t/4)))}function Jo(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function Ua(e,t){const n=Array.from(e);n.sort((a,i)=>a-i);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function ns(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function zl(e,t,n,r,a){const{data:i}=e.getImageData(t,n,r,a);let s=0;for(let u=3;u<i.length;u+=4)s+=i[u];return s/(255*(i.length/4))<.03}const $l=k.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:a,rows:i,gutterX:s=0,gutterY:u=0,frameCount:c,atlasFrames:l,fps:d=12,autoplay:f=!0,loop:h=!0,startFrame:m=0,direction:_="forward",scale:A=1,backgroundColor:O,className:v,style:L,pauseWhenHidden:M=!1,originX:V,originY:R,onLoad:D,onEnd:ae,onFrame:ge},ue){const W=k.useRef(null),xe=k.useRef(null),[te,F]=k.useState(null),[H,Z]=k.useState(null),[he,de]=k.useState(null),[Ce,Fe]=k.useState(!1),[g,G]=k.useState(!!f),[X,x]=k.useState(m),ee=k.useRef(1),[ie,oe]=k.useState(null),se=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));k.useEffect(()=>{let me=!1;return Fe(!1),Qo(t).then(({imgEl:Te,bitmap:Ie})=>{me||(F(Te),Z(Ie),de({w:Te.naturalWidth,h:Te.naturalHeight}),Fe(!0),D?.())}).catch(()=>{}),()=>{me=!0}},[t,D]),k.useEffect(()=>{let me=!1;return(async()=>{if(!te)return;if(l&&l.length){oe(null);return}if(!(!n||!r||!a||!i)){oe(null);return}const Ie=await Vl(te,{debug:!0});me||(Ie?oe({frameWidth:Ie.frameWidth,frameHeight:Ie.frameHeight,columns:Ie.columns,rows:Ie.rows,gutterX:Ie.gutterX,gutterY:Ie.gutterY}):(oe(null),console.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{me=!0}},[te,l,n,r,a,i]);const K=ie?.frameWidth??n,le=ie?.frameHeight??r,ce=ie?.columns??a,ke=ie?.rows??i,Y=ie?.gutterX??s,He=ie?.gutterY??u,Ye=ie?.originX??V??0,Xe=ie?.originY??R??0,dt=k.useMemo(()=>{if(l&&l.length>0)return{cols:0,rows:0};if(!he||!K||!le)return{cols:0,rows:0};const me=ce??Math.floor((he.w+Y)/(K+Y)),Te=ke??Math.floor((he.h+He)/(le+He));return{cols:Math.max(0,me),rows:Math.max(0,Te)}},[l,he,K,le,ce,ke,Y,He]),Qe=k.useMemo(()=>{if(l?.length)return l;if(!K||!le)return[];const{cols:me,rows:Te}=dt;if(!me||!Te)return[];const Ie=Math.min(c??me*Te,me*Te),we=[];for(let Ue=0;Ue<Ie;Ue++){const I=Ue%me,w=Math.floor(Ue/me),q=Ye+I*(K+Y),pe=Xe+w*(le+He);we.push({x:q,y:pe,w:K,h:le})}if(te&&we.length){const Ue=document.createElement("canvas");Ue.width=te.naturalWidth,Ue.height=te.naturalHeight;const I=Ue.getContext("2d");if(I){I.drawImage(te,0,0);let w=we.length;for(;w>0&&zl(I,we[w-1].x,we[w-1].y,we[w-1].w,we[w-1].h);)w--;return we.slice(0,w)}}return we},[l,dt,c,K,le,Y,He,te,Ye,Xe]),_t=()=>{const me=W.current;if(!me||Qe.length===0)return;const Te=Qe[Math.max(0,Math.min(X,Qe.length-1))],Ie=Math.max(1,Math.round(Te.w*A)),we=Math.max(1,Math.round(Te.h*A));me.style.width=Ie+"px",me.style.height=we+"px",me.width=Ie*se,me.height=we*se};k.useEffect(()=>{_t()},[Ce,A,Qe.length,se,X]);const ft=me=>{const Te=H??te??null,Ie=W.current;if(!Ie||!Te||Qe.length===0)return;const we=Ie.getContext("2d");if(!we)return;we.save(),we.setTransform(1,0,0,1,0,0),we.clearRect(0,0,Ie.width,Ie.height),O&&(we.fillStyle=O,we.fillRect(0,0,Ie.width,Ie.height));const Ue=Qe[me];we.scale(se,se),we.drawImage(Te,Ue.x,Ue.y,Ue.w,Ue.h,0,0,Math.round(Ue.w*A),Math.round(Ue.h*A)),we.restore()};return k.useEffect(()=>{if(!Ce||Qe.length===0)return;let me=performance.now();const Te=1e3/Math.max(1,Math.min(120,d)),Ie=we=>{if(xe.current=requestAnimationFrame(Ie),!g){ft(X);return}const Ue=we-me;if(Ue<Te){ft(X);return}me=we-Ue%Te,x(I=>{const w=Qe.length-1;let q=I;return _==="forward"?q=I+1:_==="backward"?q=I-1:((I>=w&&ee.current===1||I<=0&&ee.current===-1)&&(ee.current*=-1),q=I+ee.current),(q>w||q<0)&&(h?q=_==="backward"?w:0:(q=Math.max(0,Math.min(q,w)),G(!1),ae?.())),q})};return xe.current=requestAnimationFrame(Ie),()=>{xe.current&&cancelAnimationFrame(xe.current)}},[Ce,d,g,h,_,Qe.length,X]),k.useEffect(()=>{ft(X),ge?.(X)},[X,Ce,A,se]),k.useEffect(()=>{if(!M)return;const me=()=>{document.hidden&&G(!1)};return document.addEventListener("visibilitychange",me),()=>document.removeEventListener("visibilitychange",me)},[M]),k.useImperativeHandle(ue,()=>({play:()=>G(!0),pause:()=>G(!1),toggle:()=>G(me=>!me),gotoFrame:me=>x(()=>Math.max(0,Math.min(me,Math.max(0,Qe.length-1)))),isPlaying:()=>g,currentFrame:()=>X}),[g,X,Qe.length]),B.jsxDEV("div",{className:v,style:L,children:B.jsxDEV("canvas",{ref:W,"aria-label":"spritesheet animation"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSpritesheet/RemoteSpritesheetWithCache.tsx",lineNumber:444,columnNumber:7},this)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSpritesheet/RemoteSpritesheetWithCache.tsx",lineNumber:443,columnNumber:5},this)});function Yl({url:e,className:t}){const[n,r]=k.useState(""),[a,i]=k.useState(null);return k.useEffect(()=>{let s=!1;return qo(e).then(({sanitized:u})=>{s||(r(u),i(null))}).catch(u=>!s&&i(u.message??"Failed to load")),()=>{s=!0}},[e]),a?B.jsxDEV("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",a]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSVG/RemoteSVGWithCache.tsx",lineNumber:32,columnNumber:7},this):n?B.jsxDEV("div",{className:t,dangerouslySetInnerHTML:{__html:n}},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSVG/RemoteSVGWithCache.tsx",lineNumber:38,columnNumber:5},this):B.jsxDEV("div",{className:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/RemoteSVG/RemoteSVGWithCache.tsx",lineNumber:36,columnNumber:21},this)}const bi=({facet:e})=>{const{mode:t,assetUrl:n,spr_columns:r,spr_fps:a,spr_frameCount:i,spr_frameHeight:s,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:l,spr_rows:d,spr_originX:f,spr_originY:h}=e;return B.jsxDEV("div",{className:"assetContainer",children:[t===ot.AgentDisplayFacetModeType.LOTTIE&&B.jsxDEV(jl,{src:n,autoplay:!0,onError:m=>console.error(m)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:33,columnNumber:9},void 0),t===ot.AgentDisplayFacetModeType.SVG&&B.jsxDEV("div",{children:B.jsxDEV(Yl,{url:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:41,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:40,columnNumber:9},void 0),t===ot.AgentDisplayFacetModeType.IMAGE&&B.jsxDEV(Hl,{src:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:45,columnNumber:9},void 0),t===ot.AgentDisplayFacetModeType.SPRITESHEET&&B.jsxDEV($l,{src:n,frameCount:i,columns:r,rows:d,fps:a,frameHeight:s,frameWidth:u,gutterX:c,gutterY:l,originX:f,originY:h,autoplay:!0},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:55,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/FacetAssetDisplayer/FacetAssetDisplayer.tsx",lineNumber:31,columnNumber:5},void 0)},Gl=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=k.useContext(Zn);return B.jsxDEV("div",{className:`launcher
|
|
28
28
|
fixed
|
|
29
29
|
z-[999999999]
|
|
30
30
|
transition
|
|
@@ -35,23 +35,23 @@ Check the top-level render call using <`+Q+">.")}return V}}function qi(C,V){{if(
|
|
|
35
35
|
flex
|
|
36
36
|
justify-center
|
|
37
37
|
items-center
|
|
38
|
-
`,onClick:()=>t(!e),children:[!e&&B.jsxDEV(bi,{facet:n.agent.display[ot.AgentDisplayFacetRoleType.LAUNCHER]},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Launcher/Launcher.tsx",lineNumber:35,columnNumber:9},void 0),e&&B.jsxDEV(Ol,{className:"w-6 h-6",fill:"white"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Launcher/Launcher.tsx",lineNumber:41,columnNumber:24},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Launcher/Launcher.tsx",lineNumber:19,columnNumber:5},void 0)};var ja=function(e,t){return ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},ja(e,t)};function Et(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ja(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var re=function(){return re=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},re.apply(this,arguments)};function
|
|
38
|
+
`,onClick:()=>t(!e),children:[!e&&B.jsxDEV(bi,{facet:n.agent.display[ot.AgentDisplayFacetRoleType.LAUNCHER]},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Launcher/Launcher.tsx",lineNumber:35,columnNumber:9},void 0),e&&B.jsxDEV(Ol,{className:"w-6 h-6",fill:"white"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Launcher/Launcher.tsx",lineNumber:41,columnNumber:24},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Launcher/Launcher.tsx",lineNumber:19,columnNumber:5},void 0)};var ja=function(e,t){return ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},ja(e,t)};function Et(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ja(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var re=function(){return re=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},re.apply(this,arguments)};function Vr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function Rt(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var hr={exports:{}},Le={};/** @license React v16.13.1
|
|
39
39
|
* react-is.production.min.js
|
|
40
40
|
*
|
|
41
41
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/var rs;function ql(){if(rs)return Le;rs=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,
|
|
45
|
+
*/var rs;function ql(){if(rs)return Le;rs=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,L=e?Symbol.for("react.scope"):60119;function M(R){if(typeof R=="object"&&R!==null){var D=R.$$typeof;switch(D){case t:switch(R=R.type,R){case c:case l:case r:case i:case a:case f:return R;default:switch(R=R&&R.$$typeof,R){case u:case d:case _:case m:case s:return R;default:return D}}case n:return D}}}function V(R){return M(R)===l}return Le.AsyncMode=c,Le.ConcurrentMode=l,Le.ContextConsumer=u,Le.ContextProvider=s,Le.Element=t,Le.ForwardRef=d,Le.Fragment=r,Le.Lazy=_,Le.Memo=m,Le.Portal=n,Le.Profiler=i,Le.StrictMode=a,Le.Suspense=f,Le.isAsyncMode=function(R){return V(R)||M(R)===c},Le.isConcurrentMode=V,Le.isContextConsumer=function(R){return M(R)===u},Le.isContextProvider=function(R){return M(R)===s},Le.isElement=function(R){return typeof R=="object"&&R!==null&&R.$$typeof===t},Le.isForwardRef=function(R){return M(R)===d},Le.isFragment=function(R){return M(R)===r},Le.isLazy=function(R){return M(R)===_},Le.isMemo=function(R){return M(R)===m},Le.isPortal=function(R){return M(R)===n},Le.isProfiler=function(R){return M(R)===i},Le.isStrictMode=function(R){return M(R)===a},Le.isSuspense=function(R){return M(R)===f},Le.isValidElementType=function(R){return typeof R=="string"||typeof R=="function"||R===r||R===l||R===i||R===a||R===f||R===h||typeof R=="object"&&R!==null&&(R.$$typeof===_||R.$$typeof===m||R.$$typeof===s||R.$$typeof===u||R.$$typeof===d||R.$$typeof===O||R.$$typeof===v||R.$$typeof===L||R.$$typeof===A)},Le.typeOf=M,Le}var De={};/** @license React v16.13.1
|
|
46
46
|
* react-is.development.js
|
|
47
47
|
*
|
|
48
48
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the MIT license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/var as;function Wl(){return as||(as=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,_=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,L=e?Symbol.for("react.scope"):60119;function M(Y){return typeof Y=="string"||typeof Y=="function"||Y===r||Y===l||Y===i||Y===a||Y===f||Y===h||typeof Y=="object"&&Y!==null&&(Y.$$typeof===A||Y.$$typeof===m||Y.$$typeof===s||Y.$$typeof===u||Y.$$typeof===d||Y.$$typeof===O||Y.$$typeof===v||Y.$$typeof===L||Y.$$typeof===_)}function z(Y){if(typeof Y=="object"&&Y!==null){var He=Y.$$typeof;switch(He){case t:var Ye=Y.type;switch(Ye){case c:case l:case r:case i:case a:case f:return Ye;default:var Xe=Ye&&Ye.$$typeof;switch(Xe){case u:case d:case A:case m:case s:return Xe;default:return He}}case n:return He}}}var R=c,D=l,ae=u,ge=s,ue=t,W=d,xe=r,te=A,F=m,H=n,Z=i,he=a,de=f,Ce=!1;function Fe(Y){return Ce||(Ce=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),g(Y)||z(Y)===c}function g(Y){return z(Y)===l}function G(Y){return z(Y)===u}function X(Y){return z(Y)===s}function x(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===t}function ee(Y){return z(Y)===d}function ie(Y){return z(Y)===r}function oe(Y){return z(Y)===A}function se(Y){return z(Y)===m}function K(Y){return z(Y)===n}function le(Y){return z(Y)===i}function ce(Y){return z(Y)===a}function ke(Y){return z(Y)===f}De.AsyncMode=R,De.ConcurrentMode=D,De.ContextConsumer=ae,De.ContextProvider=ge,De.Element=ue,De.ForwardRef=W,De.Fragment=xe,De.Lazy=te,De.Memo=F,De.Portal=H,De.Profiler=Z,De.StrictMode=he,De.Suspense=de,De.isAsyncMode=Fe,De.isConcurrentMode=g,De.isContextConsumer=G,De.isContextProvider=X,De.isElement=x,De.isForwardRef=ee,De.isFragment=ie,De.isLazy=oe,De.isMemo=se,De.isPortal=K,De.isProfiler=le,De.isStrictMode=ce,De.isSuspense=ke,De.isValidElementType=M,De.typeOf=z})()),De}var is;function gi(){return is||(is=1,process.env.NODE_ENV==="production"?hr.exports=ql():hr.exports=Wl()),hr.exports}var oa,ss;function Xl(){if(ss)return oa;ss=1;var e=gi(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=a;function s(A){return e.isMemo(A)?a:i[A.$$typeof]||t}var u=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function m(A,_,O){if(typeof _!="string"){if(h){var v=f(_);v&&v!==h&&m(A,v,O)}var L=c(_);l&&(L=L.concat(l(_)));for(var M=s(A),z=s(_),R=0;R<L.length;++R){var D=L[R];if(!n[D]&&!(O&&O[D])&&!(z&&z[D])&&!(M&&M[D])){var ae=d(_,D);try{u(A,D,ae)}catch{}}}}return A}return oa=m,oa}Xl();function Zo(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var Ae;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ae||(Ae={}));var je;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(je||(je={}));var Sn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Sn||(Sn={}));function os(e){return e.type===je.literal}function Ql(e){return e.type===je.argument}function eu(e){return e.type===je.number}function tu(e){return e.type===je.date}function nu(e){return e.type===je.time}function ru(e){return e.type===je.select}function au(e){return e.type===je.plural}function Kl(e){return e.type===je.pound}function iu(e){return e.type===je.tag}function su(e){return!!(e&&typeof e=="object"&&e.type===Sn.number)}function za(e){return!!(e&&typeof e=="object"&&e.type===Sn.dateTime)}var ou=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Jl=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Zl(e){var t={};return e.replace(Jl,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var ed=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function td(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ed).filter(function(h){return h.length>0}),n=[],r=0,a=t;r<a.length;r++){var i=a[r],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var u=s[0],c=s.slice(1),l=0,d=c;l<d.length;l++){var f=d[l];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:u,options:c})}return n}function nd(e){return e.replace(/^(.*?)-/,"")}var us=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,uu=/^(@+)?(\+|#+)?[rs]?$/g,rd=/(\*)(0+)|(#+)(0+)|(0+)/g,cu=/^(0+)$/;function cs(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(uu,function(n,r,a){return typeof a!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):a==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof a=="string"?a.length:0)),""}),t}function lu(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ad(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!cu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ls(e){var t={},n=lu(e);return n||t}function id(e){for(var t={},n=0,r=e;n<r.length;n++){var a=r[n];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=nd(a.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=re(re(re({},t),{notation:"scientific"}),a.options.reduce(function(c,l){return re(re({},c),ls(l))},{}));continue;case"engineering":t=re(re(re({},t),{notation:"engineering"}),a.options.reduce(function(c,l){return re(re({},c),ls(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(rd,function(c,l,d,f,h,m){if(l)t.minimumIntegerDigits=d.length;else{if(f&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(cu.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(us.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(us,function(c,l,d,f,h,m){return d==="*"?t.minimumFractionDigits=l.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=a.options[0];i==="w"?t=re(re({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=re(re({},t),cs(i)));continue}if(uu.test(a.stem)){t=re(re({},t),cs(a.stem));continue}var s=lu(a.stem);s&&(t=re(re({},t),s));var u=ad(a.stem);u&&(t=re(re({},t),u))}return t}var mr={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function sd(e,t){for(var n="",r=0;r<e.length;r++){var a=e.charAt(r);if(a==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===a;)i++,r++;var s=1+(i&1),u=i<2?1:3+(i>>1),c="a",l=od(t);for((l=="H"||l=="k")&&(u=0);u-- >0;)n+=c;for(;s-- >0;)n=l+n}else a==="J"?n+="H":n+=a}return n}function od(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var a=mr[r||""]||mr[n||""]||mr["".concat(n,"-001")]||mr["001"];return a[0]}var ua,ud=new RegExp("^".concat(ou.source,"*")),cd=new RegExp("".concat(ou.source,"*$"));function Ne(e,t){return{start:e,end:t}}var ld=!!String.prototype.startsWith&&"_a".startsWith("a",1),dd=!!String.fromCodePoint,fd=!!Object.fromEntries,hd=!!String.prototype.codePointAt,md=!!String.prototype.trimStart,pd=!!String.prototype.trimEnd,bd=!!Number.isSafeInteger,gd=bd?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Va=!0;try{var Ed=fu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Va=((ua=Ed.exec("a"))===null||ua===void 0?void 0:ua[0])==="a"}catch{Va=!1}var ds=ld?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},$a=dd?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",a=t.length,i=0,s;a>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},fs=fd?Object.fromEntries:function(t){for(var n={},r=0,a=t;r<a.length;r++){var i=a[r],s=i[0],u=i[1];n[s]=u}return n},du=hd?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var a=t.charCodeAt(n),i;return a<55296||a>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},Td=md?function(t){return t.trimStart()}:function(t){return t.replace(ud,"")},xd=pd?function(t){return t.trimEnd()}:function(t){return t.replace(cd,"")};function fu(e,t){return new RegExp(e,t)}var Ya;if(Va){var hs=fu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ya=function(t,n){var r;hs.lastIndex=n;var a=hs.exec(t);return(r=a[1])!==null&&r!==void 0?r:""}}else Ya=function(t,n){for(var r=[];;){var a=du(t,n);if(a===void 0||hu(a)||Ad(a))break;r.push(a),n+=a>=65536?2:1}return $a.apply(void 0,r)};var yd=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var a=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,r);if(s.err)return s;a.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var u=this.clonePosition();this.bump(),a.push({type:je.pound,location:Ne(u,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Ae.UNMATCHED_CLOSING_TAG,Ne(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Ga(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:je.literal,value:"<".concat(a,"/>"),location:Ne(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var s=i.val,u=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ga(this.char()))return this.error(Ae.INVALID_TAG,Ne(u,this.clonePosition()));var c=this.clonePosition(),l=this.parseTagName();return a!==l?this.error(Ae.UNMATCHED_CLOSING_TAG,Ne(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:je.tag,value:a,children:s,location:Ne(r,this.clonePosition())},err:null}:this.error(Ae.INVALID_TAG,Ne(u,this.clonePosition())))}else return this.error(Ae.UNCLOSED_TAG,Ne(r,this.clonePosition()))}else return this.error(Ae.INVALID_TAG,Ne(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Sd(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),a="";;){var i=this.tryParseQuote(n);if(i){a+=i;continue}var s=this.tryParseUnquoted(t,n);if(s){a+=s;continue}var u=this.tryParseLeftAngleBracket();if(u){a+=u;continue}break}var c=Ne(r,this.clonePosition());return{val:{type:je.literal,value:a,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Cd(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return $a.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),$a(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ae.EMPTY_ARGUMENT,Ne(r,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(Ae.MALFORMED_ARGUMENT,Ne(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:je.argument,value:a,location:Ne(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(r,this.clonePosition())):this.parseArgumentOptions(t,n,a,r);default:return this.error(Ae.MALFORMED_ARGUMENT,Ne(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Ya(this.message,n),a=n+r.length;this.bumpTo(a);var i=this.clonePosition(),s=Ne(t,i);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,a){var i,s=this.clonePosition(),u=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(u){case"":return this.error(Ae.EXPECT_ARGUMENT_TYPE,Ne(s,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var h=xd(f.val);if(h.length===0)return this.error(Ae.EXPECT_ARGUMENT_STYLE,Ne(this.clonePosition(),this.clonePosition()));var m=Ne(d,this.clonePosition());l={style:h,styleLocation:m}}var A=this.tryParseArgumentClose(a);if(A.err)return A;var _=Ne(a,this.clonePosition());if(l&&ds(l?.style,"::",0)){var O=Td(l.style.slice(2));if(u==="number"){var f=this.parseNumberSkeletonFromString(O,l.styleLocation);return f.err?f:{val:{type:je.number,value:r,location:_,style:f.val},err:null}}else{if(O.length===0)return this.error(Ae.EXPECT_DATE_TIME_SKELETON,_);var v=O;this.locale&&(v=sd(O,this.locale));var h={type:Sn.dateTime,pattern:v,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Zl(v):{}},L=u==="date"?je.date:je.time;return{val:{type:L,value:r,location:_,style:h},err:null}}}return{val:{type:u==="number"?je.number:u==="date"?je.date:je.time,value:r,location:_,style:(i=l?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var M=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ae.EXPECT_SELECT_ARGUMENT_OPTIONS,Ne(M,re({},M)));this.bumpSpace();var z=this.parseIdentifierIfPossible(),R=0;if(u!=="select"&&z.value==="offset"){if(!this.bumpIf(":"))return this.error(Ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ne(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(Ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ae.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),z=this.parseIdentifierIfPossible(),R=f.val}var D=this.tryParsePluralOrSelectOptions(t,u,n,z);if(D.err)return D;var A=this.tryParseArgumentClose(a);if(A.err)return A;var ae=Ne(a,this.clonePosition());return u==="select"?{val:{type:je.select,value:r,options:fs(D.val),location:ae},err:null}:{val:{type:je.plural,value:r,options:fs(D.val),offset:R,pluralType:u==="plural"?"cardinal":"ordinal",location:ae},err:null}}default:return this.error(Ae.INVALID_ARGUMENT_TYPE,Ne(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ae.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ne(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=td(t)}catch{return this.error(Ae.INVALID_NUMBER_SKELETON,n)}return{val:{type:Sn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?id(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,a){for(var i,s=!1,u=[],c=new Set,l=a.value,d=a.location;;){if(l.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(Ae.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ae.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;d=Ne(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(c.has(l))return this.error(n==="select"?Ae.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ae.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Ae.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ae.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ne(this.clonePosition(),this.clonePosition()));var A=this.parseMessage(t+1,n,r);if(A.err)return A;var _=this.tryParseArgumentClose(m);if(_.err)return _;u.push([l,{value:A.val,location:Ne(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,d=i.location}return u.length===0?this.error(n==="select"?Ae.EXPECT_SELECT_ARGUMENT_SELECTOR:Ae.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ne(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Ae.MISSING_OTHER_CLAUSE,Ne(this.clonePosition(),this.clonePosition())):{val:u,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,s=0;!this.isEOF();){var u=this.char();if(u>=48&&u<=57)i=!0,s=s*10+(u-48),this.bump();else break}var c=Ne(a,this.clonePosition());return i?(s*=r,gd(s)?{val:s,err:null}:this.error(n,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=du(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(ds(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&hu(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function Ga(e){return e>=97&&e<=122||e>=65&&e<=90}function Cd(e){return Ga(e)||e===47}function Sd(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function hu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ad(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function qa(e){e.forEach(function(t){if(delete t.location,ru(t)||au(t))for(var n in t.options)delete t.options[n].location,qa(t.options[n].value);else eu(t)&&su(t.style)||(tu(t)||nu(t))&&za(t.style)?delete t.style.location:iu(t)&&qa(t.children)})}function _d(e,t){t===void 0&&(t={}),t=re({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new yd(e,t).parse();if(n.err){var r=SyntaxError(Ae[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||qa(n.val),n.val}function Nt(e,t){var n=t&&t.cache?t.cache:Od,r=t&&t.serializer?t.serializer:Rd,a=t&&t.strategy?t.strategy:Id;return a(e,{cache:n,serializer:r})}function vd(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Nd(e,t,n,r){var a=vd(r)?r:n(r),i=t.get(a);return typeof i>"u"&&(i=e.call(this,r),t.set(a,i)),i}function mu(e,t,n){var r=Array.prototype.slice.call(arguments,3),a=n(r),i=t.get(a);return typeof i>"u"&&(i=e.apply(this,r),t.set(a,i)),i}function pu(e,t,n,r,a){return n.bind(t,e,r,a)}function Id(e,t){var n=e.length===1?Nd:mu;return pu(e,this,n,t.cache.create(),t.serializer)}function wd(e,t){return pu(e,this,mu,t.cache.create(),t.serializer)}var Rd=function(){return JSON.stringify(arguments)};function Ei(){this.cache=Object.create(null)}Ei.prototype.get=function(e){return this.cache[e]};Ei.prototype.set=function(e,t){this.cache[e]=t};var Od={create:function(){return new Ei}},It={variadic:wd},Dt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Dt||(Dt={}));var Yt=(function(e){Et(t,e);function t(n,r,a){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),ms=(function(e){Et(t,e);function t(n,r,a,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Dt.INVALID_VALUE,i)||this}return t})(Yt),Ld=(function(e){Et(t,e);function t(n,r,a){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Dt.INVALID_VALUE,a)||this}return t})(Yt),Dd=(function(e){Et(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Dt.MISSING_VALUE,r)||this}return t})(Yt),at;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(at||(at={}));function kd(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==at.literal||n.type!==at.literal?t.push(n):r.value+=n.value,t},[])}function bu(e){return typeof e=="function"}function Ar(e,t,n,r,a,i,s){if(e.length===1&&os(e[0]))return[{type:at.literal,value:e[0].value}];for(var u=[],c=0,l=e;c<l.length;c++){var d=l[c];if(os(d)){u.push({type:at.literal,value:d.value});continue}if(Kl(d)){typeof i=="number"&&u.push({type:at.literal,value:n.getNumberFormat(t).format(i)});continue}var f=d.value;if(!(a&&f in a))throw new Dd(f,s);var h=a[f];if(Ql(d)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),u.push({type:typeof h=="string"?at.literal:at.object,value:h});continue}if(tu(d)){var m=typeof d.style=="string"?r.date[d.style]:za(d.style)?d.style.parsedOptions:void 0;u.push({type:at.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(nu(d)){var m=typeof d.style=="string"?r.time[d.style]:za(d.style)?d.style.parsedOptions:r.time.medium;u.push({type:at.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(eu(d)){var m=typeof d.style=="string"?r.number[d.style]:su(d.style)?d.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),u.push({type:at.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(iu(d)){var A=d.children,_=d.value,O=a[_];if(!bu(O))throw new Ld(_,"function",s);var v=Ar(A,t,n,r,a,i),L=O(v.map(function(R){return R.value}));Array.isArray(L)||(L=[L]),u.push.apply(u,L.map(function(R){return{type:typeof R=="string"?at.literal:at.object,value:R}}))}if(ru(d)){var M=d.options[h]||d.options.other;if(!M)throw new ms(d.value,h,Object.keys(d.options),s);u.push.apply(u,Ar(M.value,t,n,r,a));continue}if(au(d)){var M=d.options["=".concat(h)];if(!M){if(!Intl.PluralRules)throw new Yt(`Intl.PluralRules is not available in this environment.
|
|
52
|
+
*/var as;function Wl(){return as||(as=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,L=e?Symbol.for("react.scope"):60119;function M(Y){return typeof Y=="string"||typeof Y=="function"||Y===r||Y===l||Y===i||Y===a||Y===f||Y===h||typeof Y=="object"&&Y!==null&&(Y.$$typeof===_||Y.$$typeof===m||Y.$$typeof===s||Y.$$typeof===u||Y.$$typeof===d||Y.$$typeof===O||Y.$$typeof===v||Y.$$typeof===L||Y.$$typeof===A)}function V(Y){if(typeof Y=="object"&&Y!==null){var He=Y.$$typeof;switch(He){case t:var Ye=Y.type;switch(Ye){case c:case l:case r:case i:case a:case f:return Ye;default:var Xe=Ye&&Ye.$$typeof;switch(Xe){case u:case d:case _:case m:case s:return Xe;default:return He}}case n:return He}}}var R=c,D=l,ae=u,ge=s,ue=t,W=d,xe=r,te=_,F=m,H=n,Z=i,he=a,de=f,Ce=!1;function Fe(Y){return Ce||(Ce=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),g(Y)||V(Y)===c}function g(Y){return V(Y)===l}function G(Y){return V(Y)===u}function X(Y){return V(Y)===s}function x(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===t}function ee(Y){return V(Y)===d}function ie(Y){return V(Y)===r}function oe(Y){return V(Y)===_}function se(Y){return V(Y)===m}function K(Y){return V(Y)===n}function le(Y){return V(Y)===i}function ce(Y){return V(Y)===a}function ke(Y){return V(Y)===f}De.AsyncMode=R,De.ConcurrentMode=D,De.ContextConsumer=ae,De.ContextProvider=ge,De.Element=ue,De.ForwardRef=W,De.Fragment=xe,De.Lazy=te,De.Memo=F,De.Portal=H,De.Profiler=Z,De.StrictMode=he,De.Suspense=de,De.isAsyncMode=Fe,De.isConcurrentMode=g,De.isContextConsumer=G,De.isContextProvider=X,De.isElement=x,De.isForwardRef=ee,De.isFragment=ie,De.isLazy=oe,De.isMemo=se,De.isPortal=K,De.isProfiler=le,De.isStrictMode=ce,De.isSuspense=ke,De.isValidElementType=M,De.typeOf=V})()),De}var is;function gi(){return is||(is=1,process.env.NODE_ENV==="production"?hr.exports=ql():hr.exports=Wl()),hr.exports}var oa,ss;function Xl(){if(ss)return oa;ss=1;var e=gi(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=a;function s(_){return e.isMemo(_)?a:i[_.$$typeof]||t}var u=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function m(_,A,O){if(typeof A!="string"){if(h){var v=f(A);v&&v!==h&&m(_,v,O)}var L=c(A);l&&(L=L.concat(l(A)));for(var M=s(_),V=s(A),R=0;R<L.length;++R){var D=L[R];if(!n[D]&&!(O&&O[D])&&!(V&&V[D])&&!(M&&M[D])){var ae=d(A,D);try{u(_,D,ae)}catch{}}}}return _}return oa=m,oa}Xl();function Zo(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var Ae;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ae||(Ae={}));var je;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(je||(je={}));var Sn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Sn||(Sn={}));function os(e){return e.type===je.literal}function Ql(e){return e.type===je.argument}function eu(e){return e.type===je.number}function tu(e){return e.type===je.date}function nu(e){return e.type===je.time}function ru(e){return e.type===je.select}function au(e){return e.type===je.plural}function Kl(e){return e.type===je.pound}function iu(e){return e.type===je.tag}function su(e){return!!(e&&typeof e=="object"&&e.type===Sn.number)}function Va(e){return!!(e&&typeof e=="object"&&e.type===Sn.dateTime)}var ou=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Jl=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Zl(e){var t={};return e.replace(Jl,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var ed=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function td(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ed).filter(function(h){return h.length>0}),n=[],r=0,a=t;r<a.length;r++){var i=a[r],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var u=s[0],c=s.slice(1),l=0,d=c;l<d.length;l++){var f=d[l];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:u,options:c})}return n}function nd(e){return e.replace(/^(.*?)-/,"")}var us=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,uu=/^(@+)?(\+|#+)?[rs]?$/g,rd=/(\*)(0+)|(#+)(0+)|(0+)/g,cu=/^(0+)$/;function cs(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(uu,function(n,r,a){return typeof a!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):a==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof a=="string"?a.length:0)),""}),t}function lu(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ad(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!cu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ls(e){var t={},n=lu(e);return n||t}function id(e){for(var t={},n=0,r=e;n<r.length;n++){var a=r[n];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=nd(a.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=re(re(re({},t),{notation:"scientific"}),a.options.reduce(function(c,l){return re(re({},c),ls(l))},{}));continue;case"engineering":t=re(re(re({},t),{notation:"engineering"}),a.options.reduce(function(c,l){return re(re({},c),ls(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(rd,function(c,l,d,f,h,m){if(l)t.minimumIntegerDigits=d.length;else{if(f&&h)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(cu.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(us.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(us,function(c,l,d,f,h,m){return d==="*"?t.minimumFractionDigits=l.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:h&&m?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+m.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=a.options[0];i==="w"?t=re(re({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=re(re({},t),cs(i)));continue}if(uu.test(a.stem)){t=re(re({},t),cs(a.stem));continue}var s=lu(a.stem);s&&(t=re(re({},t),s));var u=ad(a.stem);u&&(t=re(re({},t),u))}return t}var mr={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function sd(e,t){for(var n="",r=0;r<e.length;r++){var a=e.charAt(r);if(a==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===a;)i++,r++;var s=1+(i&1),u=i<2?1:3+(i>>1),c="a",l=od(t);for((l=="H"||l=="k")&&(u=0);u-- >0;)n+=c;for(;s-- >0;)n=l+n}else a==="J"?n+="H":n+=a}return n}function od(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var a=mr[r||""]||mr[n||""]||mr["".concat(n,"-001")]||mr["001"];return a[0]}var ua,ud=new RegExp("^".concat(ou.source,"*")),cd=new RegExp("".concat(ou.source,"*$"));function Ne(e,t){return{start:e,end:t}}var ld=!!String.prototype.startsWith&&"_a".startsWith("a",1),dd=!!String.fromCodePoint,fd=!!Object.fromEntries,hd=!!String.prototype.codePointAt,md=!!String.prototype.trimStart,pd=!!String.prototype.trimEnd,bd=!!Number.isSafeInteger,gd=bd?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},za=!0;try{var Ed=fu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");za=((ua=Ed.exec("a"))===null||ua===void 0?void 0:ua[0])==="a"}catch{za=!1}var ds=ld?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},$a=dd?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",a=t.length,i=0,s;a>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},fs=fd?Object.fromEntries:function(t){for(var n={},r=0,a=t;r<a.length;r++){var i=a[r],s=i[0],u=i[1];n[s]=u}return n},du=hd?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var a=t.charCodeAt(n),i;return a<55296||a>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?a:(a-55296<<10)+(i-56320)+65536}},Td=md?function(t){return t.trimStart()}:function(t){return t.replace(ud,"")},xd=pd?function(t){return t.trimEnd()}:function(t){return t.replace(cd,"")};function fu(e,t){return new RegExp(e,t)}var Ya;if(za){var hs=fu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ya=function(t,n){var r;hs.lastIndex=n;var a=hs.exec(t);return(r=a[1])!==null&&r!==void 0?r:""}}else Ya=function(t,n){for(var r=[];;){var a=du(t,n);if(a===void 0||hu(a)||Ad(a))break;r.push(a),n+=a>=65536?2:1}return $a.apply(void 0,r)};var yd=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var a=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,r);if(s.err)return s;a.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var u=this.clonePosition();this.bump(),a.push({type:je.pound,location:Ne(u,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Ae.UNMATCHED_CLOSING_TAG,Ne(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Ga(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:je.literal,value:"<".concat(a,"/>"),location:Ne(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var s=i.val,u=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ga(this.char()))return this.error(Ae.INVALID_TAG,Ne(u,this.clonePosition()));var c=this.clonePosition(),l=this.parseTagName();return a!==l?this.error(Ae.UNMATCHED_CLOSING_TAG,Ne(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:je.tag,value:a,children:s,location:Ne(r,this.clonePosition())},err:null}:this.error(Ae.INVALID_TAG,Ne(u,this.clonePosition())))}else return this.error(Ae.UNCLOSED_TAG,Ne(r,this.clonePosition()))}else return this.error(Ae.INVALID_TAG,Ne(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Sd(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),a="";;){var i=this.tryParseQuote(n);if(i){a+=i;continue}var s=this.tryParseUnquoted(t,n);if(s){a+=s;continue}var u=this.tryParseLeftAngleBracket();if(u){a+=u;continue}break}var c=Ne(r,this.clonePosition());return{val:{type:je.literal,value:a,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Cd(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return $a.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),$a(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Ae.EMPTY_ARGUMENT,Ne(r,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(Ae.MALFORMED_ARGUMENT,Ne(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:je.argument,value:a,location:Ne(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(r,this.clonePosition())):this.parseArgumentOptions(t,n,a,r);default:return this.error(Ae.MALFORMED_ARGUMENT,Ne(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Ya(this.message,n),a=n+r.length;this.bumpTo(a);var i=this.clonePosition(),s=Ne(t,i);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,a){var i,s=this.clonePosition(),u=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(u){case"":return this.error(Ae.EXPECT_ARGUMENT_TYPE,Ne(s,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var h=xd(f.val);if(h.length===0)return this.error(Ae.EXPECT_ARGUMENT_STYLE,Ne(this.clonePosition(),this.clonePosition()));var m=Ne(d,this.clonePosition());l={style:h,styleLocation:m}}var _=this.tryParseArgumentClose(a);if(_.err)return _;var A=Ne(a,this.clonePosition());if(l&&ds(l?.style,"::",0)){var O=Td(l.style.slice(2));if(u==="number"){var f=this.parseNumberSkeletonFromString(O,l.styleLocation);return f.err?f:{val:{type:je.number,value:r,location:A,style:f.val},err:null}}else{if(O.length===0)return this.error(Ae.EXPECT_DATE_TIME_SKELETON,A);var v=O;this.locale&&(v=sd(O,this.locale));var h={type:Sn.dateTime,pattern:v,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Zl(v):{}},L=u==="date"?je.date:je.time;return{val:{type:L,value:r,location:A,style:h},err:null}}}return{val:{type:u==="number"?je.number:u==="date"?je.date:je.time,value:r,location:A,style:(i=l?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var M=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ae.EXPECT_SELECT_ARGUMENT_OPTIONS,Ne(M,re({},M)));this.bumpSpace();var V=this.parseIdentifierIfPossible(),R=0;if(u!=="select"&&V.value==="offset"){if(!this.bumpIf(":"))return this.error(Ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ne(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(Ae.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ae.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),V=this.parseIdentifierIfPossible(),R=f.val}var D=this.tryParsePluralOrSelectOptions(t,u,n,V);if(D.err)return D;var _=this.tryParseArgumentClose(a);if(_.err)return _;var ae=Ne(a,this.clonePosition());return u==="select"?{val:{type:je.select,value:r,options:fs(D.val),location:ae},err:null}:{val:{type:je.plural,value:r,options:fs(D.val),offset:R,pluralType:u==="plural"?"cardinal":"ordinal",location:ae},err:null}}default:return this.error(Ae.INVALID_ARGUMENT_TYPE,Ne(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Ae.EXPECT_ARGUMENT_CLOSING_BRACE,Ne(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ae.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ne(a,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=td(t)}catch{return this.error(Ae.INVALID_NUMBER_SKELETON,n)}return{val:{type:Sn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?id(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,a){for(var i,s=!1,u=[],c=new Set,l=a.value,d=a.location;;){if(l.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(Ae.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ae.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;d=Ne(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(c.has(l))return this.error(n==="select"?Ae.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Ae.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Ae.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Ae.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ne(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,n,r);if(_.err)return _;var A=this.tryParseArgumentClose(m);if(A.err)return A;u.push([l,{value:_.val,location:Ne(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,d=i.location}return u.length===0?this.error(n==="select"?Ae.EXPECT_SELECT_ARGUMENT_SELECTOR:Ae.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ne(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Ae.MISSING_OTHER_CLAUSE,Ne(this.clonePosition(),this.clonePosition())):{val:u,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,s=0;!this.isEOF();){var u=this.char();if(u>=48&&u<=57)i=!0,s=s*10+(u-48),this.bump();else break}var c=Ne(a,this.clonePosition());return i?(s*=r,gd(s)?{val:s,err:null}:this.error(n,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=du(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(ds(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&hu(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function Ga(e){return e>=97&&e<=122||e>=65&&e<=90}function Cd(e){return Ga(e)||e===47}function Sd(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function hu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ad(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function qa(e){e.forEach(function(t){if(delete t.location,ru(t)||au(t))for(var n in t.options)delete t.options[n].location,qa(t.options[n].value);else eu(t)&&su(t.style)||(tu(t)||nu(t))&&Va(t.style)?delete t.style.location:iu(t)&&qa(t.children)})}function _d(e,t){t===void 0&&(t={}),t=re({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new yd(e,t).parse();if(n.err){var r=SyntaxError(Ae[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||qa(n.val),n.val}function Nt(e,t){var n=t&&t.cache?t.cache:Od,r=t&&t.serializer?t.serializer:Rd,a=t&&t.strategy?t.strategy:Id;return a(e,{cache:n,serializer:r})}function vd(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Nd(e,t,n,r){var a=vd(r)?r:n(r),i=t.get(a);return typeof i>"u"&&(i=e.call(this,r),t.set(a,i)),i}function mu(e,t,n){var r=Array.prototype.slice.call(arguments,3),a=n(r),i=t.get(a);return typeof i>"u"&&(i=e.apply(this,r),t.set(a,i)),i}function pu(e,t,n,r,a){return n.bind(t,e,r,a)}function Id(e,t){var n=e.length===1?Nd:mu;return pu(e,this,n,t.cache.create(),t.serializer)}function wd(e,t){return pu(e,this,mu,t.cache.create(),t.serializer)}var Rd=function(){return JSON.stringify(arguments)};function Ei(){this.cache=Object.create(null)}Ei.prototype.get=function(e){return this.cache[e]};Ei.prototype.set=function(e,t){this.cache[e]=t};var Od={create:function(){return new Ei}},It={variadic:wd},Dt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Dt||(Dt={}));var Yt=(function(e){Et(t,e);function t(n,r,a){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=a,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),ms=(function(e){Et(t,e);function t(n,r,a,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Dt.INVALID_VALUE,i)||this}return t})(Yt),Ld=(function(e){Et(t,e);function t(n,r,a){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Dt.INVALID_VALUE,a)||this}return t})(Yt),Dd=(function(e){Et(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Dt.MISSING_VALUE,r)||this}return t})(Yt),at;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(at||(at={}));function kd(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==at.literal||n.type!==at.literal?t.push(n):r.value+=n.value,t},[])}function bu(e){return typeof e=="function"}function Ar(e,t,n,r,a,i,s){if(e.length===1&&os(e[0]))return[{type:at.literal,value:e[0].value}];for(var u=[],c=0,l=e;c<l.length;c++){var d=l[c];if(os(d)){u.push({type:at.literal,value:d.value});continue}if(Kl(d)){typeof i=="number"&&u.push({type:at.literal,value:n.getNumberFormat(t).format(i)});continue}var f=d.value;if(!(a&&f in a))throw new Dd(f,s);var h=a[f];if(Ql(d)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),u.push({type:typeof h=="string"?at.literal:at.object,value:h});continue}if(tu(d)){var m=typeof d.style=="string"?r.date[d.style]:Va(d.style)?d.style.parsedOptions:void 0;u.push({type:at.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(nu(d)){var m=typeof d.style=="string"?r.time[d.style]:Va(d.style)?d.style.parsedOptions:r.time.medium;u.push({type:at.literal,value:n.getDateTimeFormat(t,m).format(h)});continue}if(eu(d)){var m=typeof d.style=="string"?r.number[d.style]:su(d.style)?d.style.parsedOptions:void 0;m&&m.scale&&(h=h*(m.scale||1)),u.push({type:at.literal,value:n.getNumberFormat(t,m).format(h)});continue}if(iu(d)){var _=d.children,A=d.value,O=a[A];if(!bu(O))throw new Ld(A,"function",s);var v=Ar(_,t,n,r,a,i),L=O(v.map(function(R){return R.value}));Array.isArray(L)||(L=[L]),u.push.apply(u,L.map(function(R){return{type:typeof R=="string"?at.literal:at.object,value:R}}))}if(ru(d)){var M=d.options[h]||d.options.other;if(!M)throw new ms(d.value,h,Object.keys(d.options),s);u.push.apply(u,Ar(M.value,t,n,r,a));continue}if(au(d)){var M=d.options["=".concat(h)];if(!M){if(!Intl.PluralRules)throw new Yt(`Intl.PluralRules is not available in this environment.
|
|
53
53
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
54
|
-
`,Dt.MISSING_INTL_API,s);var
|
|
54
|
+
`,Dt.MISSING_INTL_API,s);var V=n.getPluralRules(t,{type:d.pluralType}).select(h-(d.offset||0));M=d.options[V]||d.options.other}if(!M)throw new ms(d.value,h,Object.keys(d.options),s);u.push.apply(u,Ar(M.value,t,n,r,a,h-(d.offset||0)));continue}}return kd(u)}function Pd(e,t){return t?re(re(re({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=re(re({},e[r]),t[r]||{}),n},{})):e}function Md(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Pd(e[r],t[r]),n},re({},e)):e}function ca(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Bd(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Nt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Rt([void 0],n,!1)))},{cache:ca(e.number),strategy:It.variadic}),getDateTimeFormat:Nt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Rt([void 0],n,!1)))},{cache:ca(e.dateTime),strategy:It.variadic}),getPluralRules:Nt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Rt([void 0],n,!1)))},{cache:ca(e.pluralRules),strategy:It.variadic})}}var gu=(function(){function e(t,n,r,a){var i=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var l=i.formatToParts(c);if(l.length===1)return l[0].value;var d=l.reduce(function(f,h){return!f.length||h.type!==at.literal||typeof f[f.length-1]!="string"?f.push(h.value):f[f.length-1]+=h.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(c){return Ar(i.ast,i.locales,i.formatters,i.formats,c,void 0,i.message)},this.resolvedOptions=function(){var c;return{locale:((c=i.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=a||{};s.formatters;var u=Vr(s,["formatters"]);this.ast=e.__parse(t,re(re({},u),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Md(e.formats,r),this.formatters=a&&a.formatters||Bd(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=_d,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),an;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(an||(an={}));var er=(function(e){Et(t,e);function t(n,r,a){var i=this,s=a?a instanceof Error?a:new Error(String(a)):void 0;return i=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
|
|
55
55
|
`).concat(s?`
|
|
56
56
|
`.concat(s.message,`
|
|
57
57
|
`).concat(s.stack):""))||this,i.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t})(Error),Fd=(function(e){Et(t,e);function t(n,r){return e.call(this,an.UNSUPPORTED_FORMATTER,n,r)||this}return t})(er),Hd=(function(e){Et(t,e);function t(n,r){return e.call(this,an.INVALID_CONFIG,n,r)||this}return t})(er),ps=(function(e){Et(t,e);function t(n,r){return e.call(this,an.MISSING_DATA,n,r)||this}return t})(er),Tt=(function(e){Et(t,e);function t(n,r,a){var i=e.call(this,an.FORMAT_ERROR,"".concat(n,`
|
|
@@ -60,7 +60,7 @@ Locale: `).concat(r,`
|
|
|
60
60
|
MessageID: `).concat(a?.id,`
|
|
61
61
|
Default Message: `).concat(a?.defaultMessage,`
|
|
62
62
|
Description: `).concat(a?.description,`
|
|
63
|
-
`),r,i)||this;return s.descriptor=a,s.locale=r,s}return t})(Tt),Ud=(function(e){Et(t,e);function t(n,r){var a=e.call(this,an.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(i){var s;return(s=i.value)!==null&&s!==void 0?s:JSON.stringify(i)}).join(),")"):"id"," as fallback."))||this;return a.descriptor=n,a}return t})(er);function on(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,a){return a in e?r[a]=e[a]:a in n&&(r[a]=n[a]),r},{})}var jd=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},
|
|
63
|
+
`),r,i)||this;return s.descriptor=a,s.locale=r,s}return t})(Tt),Ud=(function(e){Et(t,e);function t(n,r){var a=e.call(this,an.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(i){var s;return(s=i.value)!==null&&s!==void 0?s:JSON.stringify(i)}).join(),")"):"id"," as fallback."))||this;return a.descriptor=n,a}return t})(er);function on(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,a){return a in e?r[a]=e[a]:a in n&&(r[a]=n[a]),r},{})}var jd=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},Vd=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},Eu={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:jd,onWarn:Vd};function Tu(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Kt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function zd(e){e===void 0&&(e=Tu());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,a=Nt(function(){for(var u,c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return new((u=Intl.DateTimeFormat).bind.apply(u,Rt([void 0],c,!1)))},{cache:Kt(e.dateTime),strategy:It.variadic}),i=Nt(function(){for(var u,c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return new((u=Intl.NumberFormat).bind.apply(u,Rt([void 0],c,!1)))},{cache:Kt(e.number),strategy:It.variadic}),s=Nt(function(){for(var u,c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return new((u=Intl.PluralRules).bind.apply(u,Rt([void 0],c,!1)))},{cache:Kt(e.pluralRules),strategy:It.variadic});return{getDateTimeFormat:a,getNumberFormat:i,getMessageFormat:Nt(function(u,c,l,d){return new gu(u,c,l,re({formatters:{getNumberFormat:i,getDateTimeFormat:a,getPluralRules:s}},d||{}))},{cache:Kt(e.message),strategy:It.variadic}),getRelativeTimeFormat:Nt(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new(t.bind.apply(t,Rt([void 0],u,!1)))},{cache:Kt(e.relativeTime),strategy:It.variadic}),getPluralRules:s,getListFormat:Nt(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new(n.bind.apply(n,Rt([void 0],u,!1)))},{cache:Kt(e.list),strategy:It.variadic}),getDisplayNames:Nt(function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new(r.bind.apply(r,Rt([void 0],u,!1)))},{cache:Kt(e.displayNames),strategy:It.variadic})}}function Ti(e,t,n,r){var a=e&&e[t],i;if(a&&(i=a[n]),i)return i;r(new Fd("No ".concat(t," format named: ").concat(n)))}function pr(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=re({timeZone:t},e[r]),n},{})}function bs(e,t){var n=Object.keys(re(re({},e),t));return n.reduce(function(r,a){return r[a]=re(re({},e[a]||{}),t[a]||{}),r},{})}function gs(e,t){if(!t)return e;var n=gu.formats;return re(re(re({},n),e),{date:bs(pr(n.date,t),pr(e.date||{},t)),time:bs(pr(n.time,t),pr(e.time||{},t))})}var Wa=function(e,t,n,r,a){var i=e.locale,s=e.formats,u=e.messages,c=e.defaultLocale,l=e.defaultFormats,d=e.fallbackOnEmptyString,f=e.onError,h=e.timeZone,m=e.defaultRichTextElements;n===void 0&&(n={id:""});var _=n.id,A=n.defaultMessage;Zo(!!_,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var O=String(_),v=u&&Object.prototype.hasOwnProperty.call(u,O)&&u[O];if(Array.isArray(v)&&v.length===1&&v[0].type===je.literal)return v[0].value;if(!r&&v&&typeof v=="string"&&!m)return v.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=re(re({},m),r||{}),s=gs(s,h),l=gs(l,h),!v){if(d===!1&&v==="")return v;if((!A||i&&i.toLowerCase()!==c.toLowerCase())&&f(new Ud(n,i)),A)try{var L=t.getMessageFormat(A,c,l,a);return L.format(r)}catch(M){return f(new la('Error formatting default message for: "'.concat(O,'", rendering default message verbatim'),i,n,M)),typeof A=="string"?A:O}return O}try{var L=t.getMessageFormat(v,i,s,re({formatters:t},a||{}));return L.format(r)}catch(M){f(new la('Error formatting message: "'.concat(O,'", using ').concat(A?"default message":"id"," as fallback."),i,n,M))}if(A)try{var L=t.getMessageFormat(A,c,l,a);return L.format(r)}catch(M){f(new la('Error formatting the default message for: "'.concat(O,'", rendering message verbatim'),i,n,M))}return typeof v=="string"?v:typeof A=="string"?A:O},xu=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function zr(e,t,n,r){var a=e.locale,i=e.formats,s=e.onError,u=e.timeZone;r===void 0&&(r={});var c=r.format,l=re(re({},u&&{timeZone:u}),c&&Ti(i,t,c,s)),d=on(r,xu,l);return t==="time"&&!d.hour&&!d.minute&&!d.second&&!d.timeStyle&&!d.dateStyle&&(d=re(re({},d),{hour:"numeric",minute:"numeric"})),n(a,d)}function $d(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=n[0],i=n[1],s=i===void 0?{}:i,u=typeof a=="string"?new Date(a||0):a;try{return zr(e,"date",t,s).format(u)}catch(c){e.onError(new Tt("Error formatting date.",e.locale,c))}return String(u)}function Yd(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=n[0],i=n[1],s=i===void 0?{}:i,u=typeof a=="string"?new Date(a||0):a;try{return zr(e,"time",t,s).format(u)}catch(c){e.onError(new Tt("Error formatting time.",e.locale,c))}return String(u)}function Gd(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=n[0],i=n[1],s=n[2],u=s===void 0?{}:s,c=e.timeZone,l=e.locale,d=e.onError,f=on(u,xu,c?{timeZone:c}:{});try{return t(l,f).formatRange(a,i)}catch(h){d(new Tt("Error formatting date time range.",e.locale,h))}return String(a)}function qd(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=n[0],i=n[1],s=i===void 0?{}:i,u=typeof a=="string"?new Date(a||0):a;try{return zr(e,"date",t,s).formatToParts(u)}catch(c){e.onError(new Tt("Error formatting date.",e.locale,c))}return[]}function Wd(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var a=n[0],i=n[1],s=i===void 0?{}:i,u=typeof a=="string"?new Date(a||0):a;try{return zr(e,"time",t,s).formatToParts(u)}catch(c){e.onError(new Tt("Error formatting time.",e.locale,c))}return[]}var Xd=["style","type","fallback","languageDisplay"];function Qd(e,t,n,r){var a=e.locale,i=e.onError,s=Intl.DisplayNames;s||i(new Yt(`Intl.DisplayNames is not available in this environment.
|
|
64
64
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
65
65
|
`,Dt.MISSING_INTL_API));var u=on(r,Xd);try{return t(a,u).of(n)}catch(c){i(new Tt("Error formatting display name.",a,c))}}var Kd=["type","style"],Es=Date.now();function Jd(e){return"".concat(Es,"_").concat(e,"_").concat(Es)}function Zd(e,t,n,r){r===void 0&&(r={});var a=yu(e,t,n,r).reduce(function(i,s){var u=s.value;return typeof u!="string"?i.push(u):typeof i[i.length-1]=="string"?i[i.length-1]+=u:i.push(u),i},[]);return a.length===1?a[0]:a.length===0?"":a}function yu(e,t,n,r){var a=e.locale,i=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||i(new Yt(`Intl.ListFormat is not available in this environment.
|
|
66
66
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
@@ -70,20 +70,20 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
70
70
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
71
71
|
`,Dt.MISSING_INTL_API));try{return rf(e,t,a).format(n,r)}catch(s){e.onError(new Tt("Error formatting relative time.",e.locale,s))}return String(n)}var sf=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function Cu(e,t,n){var r=e.locale,a=e.formats,i=e.onError;n===void 0&&(n={});var s=n.format,u=s&&Ti(a,"number",s,i)||{},c=on(n,sf,u);return t(r,c)}function of(e,t,n,r){r===void 0&&(r={});try{return Cu(e,t,r).format(n)}catch(a){e.onError(new Tt("Error formatting number.",e.locale,a))}return String(n)}function uf(e,t,n,r){r===void 0&&(r={});try{return Cu(e,t,r).formatToParts(n)}catch(a){e.onError(new Tt("Error formatting number.",e.locale,a))}return[]}function cf(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function lf(e){e.onWarn&&e.defaultRichTextElements&&cf(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
72
72
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
73
|
-
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function df(e,t){var n=Vd(t),r=re(re({},Eu),e),a=r.locale,i=r.defaultLocale,s=r.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&s?s(new ps('Missing locale data for locale: "'.concat(a,'" in Intl.NumberFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&s&&s(new ps('Missing locale data for locale: "'.concat(a,'" in Intl.DateTimeFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Hd('"locale" was not configured, using "'.concat(i,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),lf(r),re(re({},r),{formatters:n,formatNumber:of.bind(null,r,n.getNumberFormat),formatNumberToParts:uf.bind(null,r,n.getNumberFormat),formatRelativeTime:af.bind(null,r,n.getRelativeTimeFormat),formatDate:$d.bind(null,r,n.getDateTimeFormat),formatDateToParts:qd.bind(null,r,n.getDateTimeFormat),formatTime:Yd.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Gd.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Wd.bind(null,r,n.getDateTimeFormat),formatPlural:tf.bind(null,r,n.getPluralRules),formatMessage:Wa.bind(null,r,n),$t:Wa.bind(null,r,n),formatList:Zd.bind(null,r,n.getListFormat),formatListToParts:yu.bind(null,r,n.getListFormat),formatDisplayName:Qd.bind(null,r,n.getDisplayNames)})}function Su(e){Zo(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Au=re(re({},Eu),{textComponent:We.Fragment});function ff(e){return function(t){return e(We.Children.toArray(t))}}function hf(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),a=n.length;if(r.length!==a)return!1;for(var i=0;i<a;i++){var s=n[i];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var xi=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=We.createContext(null)):We.createContext(null);xi.Consumer;var mf=xi.Provider,pf=mf,bf=xi;function tr(){var e=We.useContext(bf);return Su(e),e}var Xa;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Xa||(Xa={}));var Qa;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Qa||(Qa={}));function _u(e){var t=function(n){var r=tr(),a=n.value,i=n.children,s=zr(n,["value","children"]),u=typeof a=="string"?new Date(a||0):a,c=e==="formatDate"?r.formatDateToParts(u,s):r.formatTimeToParts(u,s);return i(c)};return t.displayName=Qa[e],t}function nr(e){var t=function(n){var r=tr(),a=n.value,i=n.children,s=zr(n,["value","children"]),u=r[e](a,s);if(typeof i=="function")return i(u);var c=r.textComponent||We.Fragment;return We.createElement(c,null,u)};return t.displayName=Xa[e],t}function vu(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=bu(r)?ff(r):r,t},{})}var Ts=function(e,t,n,r){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];var s=vu(r),u=Wa.apply(void 0,Rt([e,t,n,s],a,!1));return Array.isArray(u)?We.Children.toArray(u):u},xs=function(e,t){var n=e.defaultRichTextElements,r=zr(e,["defaultRichTextElements"]),a=vu(n),i=df(re(re(re({},Au),r),{defaultRichTextElements:a}),t),s={locale:i.locale,timeZone:i.timeZone,fallbackOnEmptyString:i.fallbackOnEmptyString,formats:i.formats,defaultLocale:i.defaultLocale,defaultFormats:i.defaultFormats,messages:i.messages,onError:i.onError,defaultRichTextElements:a};return re(re({},i),{formatMessage:Ts.bind(null,s,i.formatters),$t:Ts.bind(null,s,i.formatters)})};function da(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var gf=(function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Tu(),n.state={cache:n.cache,intl:xs(da(n.props),n.cache),prevConfig:da(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var a=r.prevConfig,i=r.cache,s=da(n);return hf(a,s)?null:{intl:xs(s,i),prevConfig:s}},t.prototype.render=function(){return Su(this.state.intl),We.createElement(pf,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Au,t})(We.PureComponent);nr("formatDate");nr("formatTime");nr("formatNumber");nr("formatList");nr("formatDisplayName");_u("formatDate");_u("formatTime");const yi=()=>{const e=tr(),t=e.formatMessage({defaultMessage:"Message the assistant...",id:"chatbot.placeholder.content"}),n=e.formatMessage({defaultMessage:"You",id:"chatbot.chatline.label.user"}),r=e.formatMessage({defaultMessage:"Assistant",id:"chatbot.chatline.label.assistant"}),a=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),i=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),s=e.formatMessage({defaultMessage:"Oups ! The discussion if full. Please start a new one.",id:"chatbot.error.api.409"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,tooManyRequestsTranslation:a,genericErrorTranslation:i,conflictErrorTranslation:s}},Ef=({setDiscussionId:e,setConversation:t,companySettings:n})=>({resetDiscussion:()=>{e(null),t([{userType:"assistant",content:n?.agent?.text?.initialText}])}});class Tf extends Error{name="Assertion";code="ERR_ASSERTION";constructor(t,n,r,a,i){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=n,this.expected=r,this.generated=i,this.operator=a}}function S(e,t){Nu(!!e,!1,!0,"ok","Expected value to be truthy",t)}function fa(e){Nu(!1,!1,!0,"ok","Unreachable",e)}function Nu(e,t,n,r,a,i){if(!e)throw i instanceof Error?i:new Tf(i||a,t,n,r,!i)}function ys(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function Iu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cf={};function Cs(e,t){return(Cf.jsx?yf:xf).test(e)}const Sf=/[ \t\n\f\r]/g;function Af(e){return typeof e=="object"?e.type==="text"?Ss(e.value):!1:Ss(e)}function Ss(e){return e.replace(Sf,"")===""}class rr{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}rr.prototype.property={};rr.prototype.normal={};rr.prototype.space=null;function wu(e,t){const n={},r={};let a=-1;for(;++a<e.length;)Object.assign(n,e[a].property),Object.assign(r,e[a].normal);return new rr(n,r,t)}function Xn(e){return e.toLowerCase()}class xt{constructor(t,n){this.property=t,this.attribute=n}}xt.prototype.space=null;xt.prototype.boolean=!1;xt.prototype.booleanish=!1;xt.prototype.overloadedBoolean=!1;xt.prototype.number=!1;xt.prototype.commaSeparated=!1;xt.prototype.spaceSeparated=!1;xt.prototype.commaOrSpaceSeparated=!1;xt.prototype.mustUseProperty=!1;xt.prototype.defined=!1;let _f=0;const Ee=un(),qe=un(),Ru=un(),$=un(),Me=un(),xn=un(),ct=un();function un(){return 2**++_f}const Ka=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:qe,commaOrSpaceSeparated:ct,commaSeparated:xn,number:$,overloadedBoolean:Ru,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),ha=Object.keys(Ka);class Ci extends xt{constructor(t,n,r,a){let i=-1;if(super(t,n),As(this,"space",a),typeof r=="number")for(;++i<ha.length;){const s=ha[i];As(this,ha[i],(r&Ka[s])===Ka[s])}}}Ci.prototype.defined=!0;function As(e,t,n){n&&(e[t]=n)}const vf={}.hasOwnProperty;function Nn(e){const t={},n={};let r;for(r in e.properties)if(vf.call(e.properties,r)){const a=e.properties[r],i=new Ci(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Xn(r)]=r,n[Xn(i.attribute)]=r}return new rr(t,n,e.space)}const Ou=Nn({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Lu=Nn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Du(e,t){return t in e?e[t]:t}function ku(e,t){return Du(e,t.toLowerCase())}const Pu=Nn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ku,properties:{xmlns:null,xmlnsXLink:null}}),Mu=Nn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:qe,ariaAutoComplete:null,ariaBusy:qe,ariaChecked:qe,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:qe,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:qe,ariaFlowTo:Me,ariaGrabbed:qe,ariaHasPopup:null,ariaHidden:qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:$,ariaLive:null,ariaModal:qe,ariaMultiLine:qe,ariaMultiSelectable:qe,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:qe,ariaReadOnly:qe,ariaRelevant:null,ariaRequired:qe,ariaRoleDescription:Me,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:qe,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null}}),Nf=Nn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ku,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xn,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Me,autoFocus:Ee,autoPlay:Ee,blocking:Me,capture:null,charSet:null,checked:Ee,cite:null,className:Me,cols:$,colSpan:null,content:null,contentEditable:qe,controls:Ee,controlsList:Me,coords:$|xn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:Ru,draggable:qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Me,height:$,hidden:Ee,high:$,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Me,itemRef:Me,itemScope:Ee,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:$,pattern:null,ping:Me,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Me,required:Ee,reversed:Ee,rows:$,rowSpan:$,sandbox:Me,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:qe,width:$,wrap:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:qe,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:$,security:null,unselectable:null}}),If=Nn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Du,properties:{about:ct,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xn,g2:xn,glyphName:xn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ct,rev:ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ct,requiredFeatures:ct,requiredFonts:ct,requiredFormats:ct,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ct,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),wf=/^data[-\w.:]+$/i,_s=/-[a-z]/g,Rf=/[A-Z]/g;function $r(e,t){const n=Xn(t);let r=t,a=xt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wf.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(_s,Lf);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!_s.test(i)){let s=i.replace(Rf,Of);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Ci}return new a(r,t)}function Of(e){return"-"+e.toLowerCase()}function Lf(e){return e.charAt(1).toUpperCase()}const Df={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ar=wu([Lu,Ou,Pu,Mu,Nf],"html"),Gt=wu([Lu,Ou,Pu,Mu,If],"svg");function vs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Bu(e){return e.join(" ").trim()}var hn={},ma,Ns;function kf(){if(Ns)return ma;Ns=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
74
|
-
`,l="/",d="*",f="",h="comment",m="declaration";ma=function(_,O){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];O=O||{};var v=1,L=1;function M(F){var H=F.match(t);H&&(v+=H.length);var Z=F.lastIndexOf(c);L=~Z?F.length-Z:L+F.length}function z(){var F={line:v,column:L};return function(H){return H.position=new R(F),ge(),H}}function R(F){this.start=F,this.end={line:v,column:L},this.source=O.source}R.prototype.content=_;function D(F){var H=new Error(O.source+":"+v+":"+L+": "+F);if(H.reason=F,H.filename=O.source,H.line=v,H.column=L,H.source=_,!O.silent)throw H}function ae(F){var H=F.exec(_);if(H){var Z=H[0];return M(Z),_=_.slice(Z.length),H}}function ge(){ae(n)}function ue(F){var H;for(F=F||[];H=W();)H!==!1&&F.push(H);return F}function W(){var F=z();if(!(l!=_.charAt(0)||d!=_.charAt(1))){for(var H=2;f!=_.charAt(H)&&(d!=_.charAt(H)||l!=_.charAt(H+1));)++H;if(H+=2,f===_.charAt(H-1))return D("End of comment missing");var Z=_.slice(2,H-2);return L+=2,M(Z),_=_.slice(H),L+=2,F({type:h,comment:Z})}}function xe(){var F=z(),H=ae(r);if(H){if(W(),!ae(a))return D("property missing ':'");var Z=ae(i),he=F({type:m,property:A(H[0].replace(e,f)),value:Z?A(Z[0].replace(e,f)):f});return ae(s),he}}function te(){var F=[];ue(F);for(var H;H=xe();)H!==!1&&(F.push(H),ue(F));return F}return ge(),te()};function A(_){return _?_.replace(u,f):f}return ma}var Is;function Pf(){if(Is)return hn;Is=1;var e=hn&&hn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hn,"__esModule",{value:!0});var t=e(kf());function n(r,a){var i=null;if(!r||typeof r!="string")return i;var s=(0,t.default)(r),u=typeof a=="function";return s.forEach(function(c){if(c.type==="declaration"){var l=c.property,d=c.value;u?a(l,d,c):d&&(i=i||{},i[l]=d)}}),i}return hn.default=n,hn}var Mf=Pf();const ws=Ur(Mf),Bf=ws.default||ws,Yr=Fu("end"),Pt=Fu("start");function Fu(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ff(e){const t=Pt(e),n=Yr(e);if(t&&n)return{start:t,end:n}}function jn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rs(e.position):"start"in e||"end"in e?Rs(e):"line"in e||"column"in e?Ja(e):""}function Ja(e){return Os(e&&e.line)+":"+Os(e&&e.column)}function Rs(e){return Ja(e&&e.start)+"-"+Ja(e&&e.end)}function Os(e){return e&&typeof e=="number"?e:1}class et extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const u=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=u?u.line:void 0,this.name=jn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}et.prototype.file="";et.prototype.name="";et.prototype.reason="";et.prototype.message="";et.prototype.stack="";et.prototype.column=void 0;et.prototype.line=void 0;et.prototype.ancestors=void 0;et.prototype.cause=void 0;et.prototype.fatal=void 0;et.prototype.place=void 0;et.prototype.ruleId=void 0;et.prototype.source=void 0;const Si={}.hasOwnProperty,Hf=new Map,Uf=/[A-Z]/g,jf=/-([a-z])/g,zf=new Set(["table","tbody","thead","tfoot","tr"]),Vf=new Set(["td","th"]),Hu="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $f(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Jf(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Kf(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Gt:ar,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Uu(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function Uu(e,t,n){if(t.type==="element")return Yf(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Gf(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Wf(e,t,n);if(t.type==="mdxjsEsm")return qf(e,t);if(t.type==="root")return Xf(e,t,n);if(t.type==="text")return Qf(e,t)}function Yf(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Gt,e.schema=a),e.ancestors.push(t);const i=zu(e,t.tagName,!1),s=Zf(e,t);let u=_i(e,t);return zf.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!Af(c):!0})),ju(e,s,i,t),Ai(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Gf(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return S(r.type==="ExpressionStatement"),e.evaluater.evaluateExpression(r.expression)}Qn(e,t.position)}function qf(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qn(e,t.position)}function Wf(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Gt,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:zu(e,t.name,!0),s=eh(e,t),u=_i(e,t);return ju(e,s,i,t),Ai(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Xf(e,t,n){const r={};return Ai(r,_i(e,t)),e.create(t,e.Fragment,r,n)}function Qf(e,t){return t.value}function ju(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ai(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kf(e,t,n){return r;function r(a,i,s,u){const l=Array.isArray(s.children)?n:t;return u?l(i,s,u):l(i,s)}}function Jf(e,t){return n;function n(r,a,i,s){const u=Array.isArray(i.children),c=Pt(r);return t(a,i,s,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Zf(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Si.call(t.properties,a)){const i=th(e,a,t.properties[a]);if(i){const[s,u]=i;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&Vf.has(t.tagName)?r=u:n[s]=u}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function eh(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];S(i.type==="ExpressionStatement");const s=i.expression;S(s.type==="ObjectExpression");const u=s.properties[0];S(u.type==="SpreadElement"),Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Qn(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];S(u.type==="ExpressionStatement"),i=e.evaluater.evaluateExpression(u.expression)}else Qn(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function _i(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Hf;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=a.get(c)||0;s=c+"-"+l,a.set(c,l+1)}}const u=Uu(e,i,s);u!==void 0&&n.push(u)}return n}function th(e,t,n){const r=$r(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Iu(n):Bu(n)),r.property==="style"){let a=typeof n=="object"?n:nh(e,String(n));return e.stylePropertyNameCase==="css"&&(a=rh(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?Df[r.property]||r.property:r.attribute,n]}}function nh(e,t){const n={};try{Bf(t,r)}catch(a){if(!e.ignoreInvalidStyle){const i=a,s=new et("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Hu+"#cannot-parse-style-attribute",s}}return n;function r(a,i){let s=a;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(jf,ih)),n[s]=i}}function zu(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const u=Cs(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(i&&u.type==="Literal"),optional:!1}:u}S(s,"always a result"),r=s}else r=Cs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Si.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Qn(e)}function Qn(e,t){const n=new et("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Hu+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rh(e){const t={};let n;for(n in e)Si.call(e,n)&&(t[ah(n)]=e[n]);return t}function ah(e){let t=e.replace(Uf,sh);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ih(e,t){return t.toUpperCase()}function sh(e){return"-"+e.toLowerCase()}const pa={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},oh={};function uh(e,t){const n=oh,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Vu(e,r,a)}function Vu(e,t,n){if(ch(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ls(e.children,t,n)}return Array.isArray(e)?Ls(e,t,n):""}function Ls(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Vu(e[a],t,n);return r.join("")}function ch(e){return!!(e&&typeof e=="object")}const Ds=document.createElement("i");function vi(e){const t="&"+e+";";Ds.innerHTML=t;const n=Ds.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const b={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,ht:9,lf:10,vt:11,cr:13,space:32,exclamationMark:33,quotationMark:34,numberSign:35,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseX:88,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseX:120,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},J={atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},p={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},wt={ht:" ",lf:`
|
|
75
|
-
`,cr:"\r",space:" ",replacementCharacter:"�"};function kt(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<J.v8MaxSafeChunkSize)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+J.v8MaxSafeChunkSize),s.unshift(t,0),e.splice(...s),i+=J.v8MaxSafeChunkSize,t+=J.v8MaxSafeChunkSize}function mt(e,t){return e.length>0?(kt(e,e.length,0,t),e):t}const ks={}.hasOwnProperty;function lh(e){const t={};let n=-1;for(;++n<e.length;)dh(t,e[n]);return t}function dh(e,t){let n;for(n in t){const a=(ks.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){ks.call(a,s)||(a[s]=[]);const u=i[s];fh(a[s],Array.isArray(u)?u:u?[u]:[])}}}function fh(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kt(e,0,0,r)}function $u(e,t){const n=Number.parseInt(e,t);return n<b.ht||n===b.vt||n>b.cr&&n<b.space||n>b.tilde&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?wt.replacementCharacter:String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g,wt.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Lt=qt(/[A-Za-z]/),lt=qt(/[\dA-Za-z]/),hh=qt(/[#-'*+\--9=?A-Z^-~]/);function Za(e){return e!==null&&(e<b.space||e===b.del)}const ei=qt(/\d/),mh=qt(/[\dA-Fa-f]/),ph=qt(/[!-/:-@[-`{-~]/);function ne(e){return e!==null&&e<b.horizontalTab}function ut(e){return e!==null&&(e<b.nul||e===b.space)}function Re(e){return e===b.horizontalTab||e===b.virtualSpace||e===b.space}const bh=qt(new RegExp("\\p{P}|\\p{S}","u")),gh=qt(/\s/);function qt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function In(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===b.percentSign&<(e.charCodeAt(n+1))&<(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const u=e.charCodeAt(n+1);i<56320&&u>56319&&u<57344?(s=String.fromCharCode(i,u),a=1):s=wt.replacementCharacter}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Be(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(c){return Re(c)?(e.enter(n),u(c)):t(c)}function u(c){return Re(c)&&i++<a?(e.consume(c),u):(e.exit(n),t(c))}}const Eh={tokenize:Th};function Th(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(S(u===b.eof||ne(u),"expected eol or eof"),u===b.eof){e.consume(u);return}return e.enter(p.lineEnding),e.consume(u),e.exit(p.lineEnding),Be(e,t,p.linePrefix)}function a(u){return S(u!==b.eof&&!ne(u),"expected anything other than a line ending or EOF"),e.enter(p.paragraph),i(u)}function i(u){const c=e.enter(p.chunkText,{contentType:J.contentTypeText,previous:n});return n&&(n.next=c),n=c,s(u)}function s(u){if(u===b.eof){e.exit(p.chunkText),e.exit(p.paragraph),e.consume(u);return}return ne(u)?(e.consume(u),e.exit(p.chunkText),i):(e.consume(u),s)}}const xh={tokenize:yh},Ps={tokenize:Ch};function yh(e){const t=this,n=[];let r=0,a,i,s;return u;function u(M){if(r<n.length){const z=n[r];return t.containerState=z[1],S(z[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(z[0].continuation,c,l)(M)}return l(M)}function c(M){if(S(t.containerState,"expected `containerState` to be defined after continuation"),r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&L();const z=t.events.length;let R=z,D;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type===p.chunkFlow){D=t.events[R][1].end;break}S(D,"could not find previous flow chunk"),v(r);let ae=z;for(;ae<t.events.length;)t.events[ae][1].end=Object.assign({},D),ae++;return kt(t.events,R+1,0,t.events.slice(z)),t.events.length=ae,l(M)}return u(M)}function l(M){if(r===n.length){if(!a)return h(M);if(a.currentConstruct&&a.currentConstruct.concrete)return A(M);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ps,d,f)(M)}function d(M){return a&&L(),v(r),h(M)}function f(M){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,A(M)}function h(M){return t.containerState={},e.attempt(Ps,m,A)(M)}function m(M){return S(t.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),S(t.containerState,"expected `containerState` to be defined on tokenizer"),r++,n.push([t.currentConstruct,t.containerState]),h(M)}function A(M){if(M===b.eof){a&&L(),v(0),e.consume(M);return}return a=a||t.parser.flow(t.now()),e.enter(p.chunkFlow,{contentType:J.contentTypeFlow,previous:i,_tokenizer:a}),_(M)}function _(M){if(M===b.eof){O(e.exit(p.chunkFlow),!0),v(0),e.consume(M);return}return ne(M)?(e.consume(M),O(e.exit(p.chunkFlow)),r=0,t.interrupt=void 0,u):(e.consume(M),_)}function O(M,z){S(a,"expected `childFlow` to be defined when continuing");const R=t.sliceStream(M);if(z&&R.push(null),M.previous=i,i&&(i.next=M),i=M,a.defineSkip(M.start),a.write(R),t.parser.lazy[M.start.line]){let D=a.events.length;for(;D--;)if(a.events[D][1].start.offset<s&&(!a.events[D][1].end||a.events[D][1].end.offset>s))return;const ae=t.events.length;let ge=ae,ue,W;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type===p.chunkFlow){if(ue){W=t.events[ge][1].end;break}ue=!0}for(S(W,"could not find previous flow chunk"),v(r),D=ae;D<t.events.length;)t.events[D][1].end=Object.assign({},W),D++;kt(t.events,ge+1,0,t.events.slice(ae)),t.events.length=D}}function v(M){let z=n.length;for(;z-- >M;){const R=n[z];t.containerState=R[1],S(R[0].exit,"expected `exit` to be defined on container construct"),R[0].exit.call(t,e)}n.length=M}function L(){S(t.containerState,"expected `containerState` to be defined when closing flow"),S(a,"expected `childFlow` to be defined when closing it"),a.write([b.eof]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Ch(e,t,n){return S(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,e.attempt(this.parser.constructs.document,t,n),p.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)}function Ms(e){if(e===b.eof||ut(e)||gh(e))return J.characterGroupWhitespace;if(bh(e))return J.characterGroupPunctuation}function Ni(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const ti={name:"attention",tokenize:Ah,resolveAll:Sh};function Sh(e,t){let n=-1,r,a,i,s,u,c,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[n][1].start);Bs(f,-c),Bs(h,c),s={type:c>1?p.strongSequence:p.emphasisSequence,start:f,end:Object.assign({},e[r][1].end)},u={type:c>1?p.strongSequence:p.emphasisSequence,start:Object.assign({},e[n][1].start),end:h},i={type:c>1?p.strongText:p.emphasisText,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a={type:c>1?p.strong:p.emphasis,start:Object.assign({},s.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},u.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=mt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=mt(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),S(t.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),l=mt(l,Ni(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=mt(l,[["exit",i,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=mt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,kt(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ah(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Ms(r);let i;return s;function s(c){return S(c===b.asterisk||c===b.underscore,"expected asterisk or underscore"),i=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===i)return e.consume(c),u;const l=e.exit("attentionSequence"),d=Ms(c);S(n,"expected `attentionMarkers` to be populated");const f=!d||d===J.characterGroupPunctuation&&a||n.includes(c),h=!a||a===J.characterGroupPunctuation&&d||n.includes(r);return l._open=!!(i===b.asterisk?f:f&&(a||!h)),l._close=!!(i===b.asterisk?h:h&&(d||!f)),t(c)}}function Bs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _h={name:"autolink",tokenize:vh};function vh(e,t,n){let r=0;return a;function a(m){return S(m===b.lessThan,"expected `<`"),e.enter(p.autolink),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.enter(p.autolinkProtocol),i}function i(m){return Lt(m)?(e.consume(m),s):l(m)}function s(m){return m===b.plusSign||m===b.dash||m===b.dot||lt(m)?(r=1,u(m)):l(m)}function u(m){return m===b.colon?(e.consume(m),r=0,c):(m===b.plusSign||m===b.dash||m===b.dot||lt(m))&&r++<J.autolinkSchemeSizeMax?(e.consume(m),u):(r=0,l(m))}function c(m){return m===b.greaterThan?(e.exit(p.autolinkProtocol),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),t):m===b.eof||m===b.space||m===b.lessThan||Za(m)?n(m):(e.consume(m),c)}function l(m){return m===b.atSign?(e.consume(m),d):hh(m)?(e.consume(m),l):n(m)}function d(m){return lt(m)?f(m):n(m)}function f(m){return m===b.dot?(e.consume(m),r=0,d):m===b.greaterThan?(e.exit(p.autolinkProtocol).type=p.autolinkEmail,e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),t):h(m)}function h(m){if((m===b.dash||lt(m))&&r++<J.autolinkDomainSizeMax){const A=m===b.dash?h:f;return e.consume(m),A}return n(m)}}const Gr={tokenize:Nh,partial:!0};function Nh(e,t,n){return r;function r(i){return Re(i)?Be(e,a,p.linePrefix)(i):a(i)}function a(i){return i===b.eof||ne(i)?t(i):n(i)}}const Yu={name:"blockQuote",tokenize:Ih,continuation:{tokenize:wh},exit:Rh};function Ih(e,t,n){const r=this;return a;function a(s){if(s===b.greaterThan){const u=r.containerState;return S(u,"expected `containerState` to be defined in container"),u.open||(e.enter(p.blockQuote,{_container:!0}),u.open=!0),e.enter(p.blockQuotePrefix),e.enter(p.blockQuoteMarker),e.consume(s),e.exit(p.blockQuoteMarker),i}return n(s)}function i(s){return Re(s)?(e.enter(p.blockQuotePrefixWhitespace),e.consume(s),e.exit(p.blockQuotePrefixWhitespace),e.exit(p.blockQuotePrefix),t):(e.exit(p.blockQuotePrefix),t(s))}}function wh(e,t,n){const r=this;return a;function a(s){return Re(s)?(S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,i,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(s)):i(s)}function i(s){return e.attempt(Yu,t,n)(s)}}function Rh(e){e.exit(p.blockQuote)}const Gu={name:"characterEscape",tokenize:Oh};function Oh(e,t,n){return r;function r(i){return S(i===b.backslash,"expected `\\`"),e.enter(p.characterEscape),e.enter(p.escapeMarker),e.consume(i),e.exit(p.escapeMarker),a}function a(i){return ph(i)?(e.enter(p.characterEscapeValue),e.consume(i),e.exit(p.characterEscapeValue),e.exit(p.characterEscape),t):n(i)}}const qu={name:"characterReference",tokenize:Lh};function Lh(e,t,n){const r=this;let a=0,i,s;return u;function u(f){return S(f===b.ampersand,"expected `&`"),e.enter(p.characterReference),e.enter(p.characterReferenceMarker),e.consume(f),e.exit(p.characterReferenceMarker),c}function c(f){return f===b.numberSign?(e.enter(p.characterReferenceMarkerNumeric),e.consume(f),e.exit(p.characterReferenceMarkerNumeric),l):(e.enter(p.characterReferenceValue),i=J.characterReferenceNamedSizeMax,s=lt,d(f))}function l(f){return f===b.uppercaseX||f===b.lowercaseX?(e.enter(p.characterReferenceMarkerHexadecimal),e.consume(f),e.exit(p.characterReferenceMarkerHexadecimal),e.enter(p.characterReferenceValue),i=J.characterReferenceHexadecimalSizeMax,s=mh,d):(e.enter(p.characterReferenceValue),i=J.characterReferenceDecimalSizeMax,s=ei,d(f))}function d(f){if(f===b.semicolon&&a){const h=e.exit(p.characterReferenceValue);return s===lt&&!vi(r.sliceSerialize(h))?n(f):(e.enter(p.characterReferenceMarker),e.consume(f),e.exit(p.characterReferenceMarker),e.exit(p.characterReference),t)}return s(f)&&a++<i?(e.consume(f),d):n(f)}}const Fs={tokenize:kh,partial:!0},Hs={name:"codeFenced",tokenize:Dh,concrete:!0};function Dh(e,t,n){const r=this,a={tokenize:R,partial:!0};let i=0,s=0,u;return c;function c(D){return l(D)}function l(D){S(D===b.graveAccent||D===b.tilde,"expected `` ` `` or `~`");const ae=r.events[r.events.length-1];return i=ae&&ae[1].type===p.linePrefix?ae[2].sliceSerialize(ae[1],!0).length:0,u=D,e.enter(p.codeFenced),e.enter(p.codeFencedFence),e.enter(p.codeFencedFenceSequence),d(D)}function d(D){return D===u?(s++,e.consume(D),d):s<J.codeFencedSequenceSizeMin?n(D):(e.exit(p.codeFencedFenceSequence),Re(D)?Be(e,f,p.whitespace)(D):f(D))}function f(D){return D===b.eof||ne(D)?(e.exit(p.codeFencedFence),r.interrupt?t(D):e.check(Fs,_,z)(D)):(e.enter(p.codeFencedFenceInfo),e.enter(p.chunkString,{contentType:J.contentTypeString}),h(D))}function h(D){return D===b.eof||ne(D)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),f(D)):Re(D)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),Be(e,m,p.whitespace)(D)):D===b.graveAccent&&D===u?n(D):(e.consume(D),h)}function m(D){return D===b.eof||ne(D)?f(D):(e.enter(p.codeFencedFenceMeta),e.enter(p.chunkString,{contentType:J.contentTypeString}),A(D))}function A(D){return D===b.eof||ne(D)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceMeta),f(D)):D===b.graveAccent&&D===u?n(D):(e.consume(D),A)}function _(D){return S(ne(D),"expected eol"),e.attempt(a,z,O)(D)}function O(D){return S(ne(D),"expected eol"),e.enter(p.lineEnding),e.consume(D),e.exit(p.lineEnding),v}function v(D){return i>0&&Re(D)?Be(e,L,p.linePrefix,i+1)(D):L(D)}function L(D){return D===b.eof||ne(D)?e.check(Fs,_,z)(D):(e.enter(p.codeFlowValue),M(D))}function M(D){return D===b.eof||ne(D)?(e.exit(p.codeFlowValue),L(D)):(e.consume(D),M)}function z(D){return e.exit(p.codeFenced),t(D)}function R(D,ae,ge){let ue=0;return W;function W(Z){return S(ne(Z),"expected eol"),D.enter(p.lineEnding),D.consume(Z),D.exit(p.lineEnding),xe}function xe(Z){return S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),D.enter(p.codeFencedFence),Re(Z)?Be(D,te,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(Z):te(Z)}function te(Z){return Z===u?(D.enter(p.codeFencedFenceSequence),F(Z)):ge(Z)}function F(Z){return Z===u?(ue++,D.consume(Z),F):ue>=s?(D.exit(p.codeFencedFenceSequence),Re(Z)?Be(D,H,p.whitespace)(Z):H(Z)):ge(Z)}function H(Z){return Z===b.eof||ne(Z)?(D.exit(p.codeFencedFence),ae(Z)):ge(Z)}}}function kh(e,t,n){const r=this;return a;function a(s){return s===b.eof?n(s):(S(ne(s),"expected eol"),e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ba={name:"codeIndented",tokenize:Mh},Ph={tokenize:Bh,partial:!0};function Mh(e,t,n){const r=this;return a;function a(l){return S(Re(l)),e.enter(p.codeIndented),Be(e,i,p.linePrefix,J.tabSize+1)(l)}function i(l){const d=r.events[r.events.length-1];return d&&d[1].type===p.linePrefix&&d[2].sliceSerialize(d[1],!0).length>=J.tabSize?s(l):n(l)}function s(l){return l===b.eof?c(l):ne(l)?e.attempt(Ph,s,c)(l):(e.enter(p.codeFlowValue),u(l))}function u(l){return l===b.eof||ne(l)?(e.exit(p.codeFlowValue),s(l)):(e.consume(l),u)}function c(l){return e.exit(p.codeIndented),t(l)}}function Bh(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):ne(s)?(e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),a):Be(e,i,p.linePrefix,J.tabSize+1)(s)}function i(s){const u=r.events[r.events.length-1];return u&&u[1].type===p.linePrefix&&u[2].sliceSerialize(u[1],!0).length>=J.tabSize?t(s):ne(s)?a(s):n(s)}}const Fh={name:"codeText",tokenize:Uh,resolve:Hh,previous:Wu};function Hh(e){let t=e.length-4,n=3,r,a;if((e[n][1].type===p.lineEnding||e[n][1].type==="space")&&(e[t][1].type===p.lineEnding||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type===p.codeTextData){e[n][1].type=p.codeTextPadding,e[t][1].type=p.codeTextPadding,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!==p.lineEnding&&(a=r):(r===t||e[r][1].type===p.lineEnding)&&(e[a][1].type=p.codeTextData,r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function Wu(e){return e!==b.graveAccent||this.events[this.events.length-1][1].type===p.characterEscape}function Uh(e,t,n){const r=this;let a=0,i,s;return u;function u(h){return S(h===b.graveAccent,"expected `` ` ``"),S(Wu.call(r,r.previous),"expected correct previous"),e.enter(p.codeText),e.enter(p.codeTextSequence),c(h)}function c(h){return h===b.graveAccent?(e.consume(h),a++,c):(e.exit(p.codeTextSequence),l(h))}function l(h){return h===b.eof?n(h):h===b.space?(e.enter("space"),e.consume(h),e.exit("space"),l):h===b.graveAccent?(s=e.enter(p.codeTextSequence),i=0,f(h)):ne(h)?(e.enter(p.lineEnding),e.consume(h),e.exit(p.lineEnding),l):(e.enter(p.codeTextData),d(h))}function d(h){return h===b.eof||h===b.space||h===b.graveAccent||ne(h)?(e.exit(p.codeTextData),l(h)):(e.consume(h),d)}function f(h){return h===b.graveAccent?(e.consume(h),i++,f):i===a?(e.exit(p.codeTextSequence),e.exit(p.codeText),t(h)):(s.type=p.codeTextData,d(h))}}function Xu(e){const t={};let n=-1,r,a,i,s,u,c,l;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type===p.chunkFlow&&e[n-1][1].type===p.listItemPrefix&&(S(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type===p.lineEndingBlank&&(i+=2),i<c.length&&c[i][1].type===p.content))for(;++i<c.length&&c[i][1].type!==p.content;)c[i][1].type===p.chunkText&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,jh(e,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--&&(s=e[i],s[1].type===p.lineEnding||s[1].type===p.lineEndingBlank);)s[0]==="enter"&&(a&&(e[a][1].type=p.lineEndingBlank),s[1].type=p.lineEnding,a=i);a&&(r[1].end=Object.assign({},e[a][1].start),u=e.slice(a,n),u.unshift(r),kt(e,a,n-a+1,u))}}return!l}function jh(e,t){const n=e[t][1],r=e[t][2];let a=t-1;const i=[];S(n.contentType,"expected `contentType` on subtokens");const s=n._tokenizer||r.parser[n.contentType](n.start),u=s.events,c=[],l={};let d,f,h=-1,m=n,A=0,_=0;const O=[_];for(;m;){for(;e[++a][1]!==m;);S(!f||m.previous===f,"expected previous to match"),S(!f||f.next===m,"expected next to match"),i.push(a),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(b.eof),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++h<u.length;)u[h][0]==="exit"&&u[h-1][0]==="enter"&&u[h][1].type===u[h-1][1].type&&u[h][1].start.line!==u[h][1].end.line&&(S(m,"expected a current token"),_=h+1,O.push(_),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0,S(!m.next,"expected no next token")):O.pop(),h=O.length;h--;){const v=u.slice(O[h],O[h+1]),L=i.pop();S(L!==void 0,"expected a start position when splicing"),c.unshift([L,L+v.length-1]),kt(e,L,2,v)}for(h=-1;++h<c.length;)l[A+c[h][0]]=A+c[h][1],A+=c[h][1]-c[h][0]-1;return l}const zh={tokenize:Yh,resolve:$h},Vh={tokenize:Gh,partial:!0};function $h(e){return Xu(e),e}function Yh(e,t){let n;return r;function r(u){return S(u!==b.eof&&!ne(u),"expected no eof or eol"),e.enter(p.content),n=e.enter(p.chunkContent,{contentType:J.contentTypeContent}),a(u)}function a(u){return u===b.eof?i(u):ne(u)?e.check(Vh,s,i)(u):(e.consume(u),a)}function i(u){return e.exit(p.chunkContent),e.exit(p.content),t(u)}function s(u){return S(ne(u),"expected eol"),e.consume(u),e.exit(p.chunkContent),S(n,"expected previous token"),n.next=e.enter(p.chunkContent,{contentType:J.contentTypeContent,previous:n}),n=n.next,a}}function Gh(e,t,n){const r=this;return a;function a(s){return S(ne(s),"expected a line ending"),e.exit(p.chunkContent),e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),Be(e,i,p.linePrefix)}function i(s){if(s===b.eof||ne(s))return n(s);S(r.parser.constructs.disable.null,"expected `disable.null` to be populated");const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type===p.linePrefix&&u[2].sliceSerialize(u[1],!0).length>=J.tabSize?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Qu(e,t,n,r,a,i,s,u,c){const l=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(v){return v===b.lessThan?(e.enter(r),e.enter(a),e.enter(i),e.consume(v),e.exit(i),h):v===b.eof||v===b.space||v===b.rightParenthesis||Za(v)?n(v):(e.enter(r),e.enter(s),e.enter(u),e.enter(p.chunkString,{contentType:J.contentTypeString}),_(v))}function h(v){return v===b.greaterThan?(e.enter(i),e.consume(v),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(u),e.enter(p.chunkString,{contentType:J.contentTypeString}),m(v))}function m(v){return v===b.greaterThan?(e.exit(p.chunkString),e.exit(u),h(v)):v===b.eof||v===b.lessThan||ne(v)?n(v):(e.consume(v),v===b.backslash?A:m)}function A(v){return v===b.lessThan||v===b.greaterThan||v===b.backslash?(e.consume(v),m):m(v)}function _(v){return!d&&(v===b.eof||v===b.rightParenthesis||ut(v))?(e.exit(p.chunkString),e.exit(u),e.exit(s),e.exit(r),t(v)):d<l&&v===b.leftParenthesis?(e.consume(v),d++,_):v===b.rightParenthesis?(e.consume(v),d--,_):v===b.eof||v===b.space||v===b.leftParenthesis||Za(v)?n(v):(e.consume(v),v===b.backslash?O:_)}function O(v){return v===b.leftParenthesis||v===b.rightParenthesis||v===b.backslash?(e.consume(v),_):_(v)}}function Ku(e,t,n,r,a,i){const s=this;let u=0,c;return l;function l(m){return S(m===b.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(a),e.consume(m),e.exit(a),e.enter(i),d}function d(m){return u>J.linkReferenceSizeMax||m===b.eof||m===b.leftSquareBracket||m===b.rightSquareBracket&&!c||m===b.caret&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===b.rightSquareBracket?(e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(r),t):ne(m)?(e.enter(p.lineEnding),e.consume(m),e.exit(p.lineEnding),d):(e.enter(p.chunkString,{contentType:J.contentTypeString}),f(m))}function f(m){return m===b.eof||m===b.leftSquareBracket||m===b.rightSquareBracket||ne(m)||u++>J.linkReferenceSizeMax?(e.exit(p.chunkString),d(m)):(e.consume(m),c||(c=!Re(m)),m===b.backslash?h:f)}function h(m){return m===b.leftSquareBracket||m===b.backslash||m===b.rightSquareBracket?(e.consume(m),u++,f):f(m)}}function Ju(e,t,n,r,a,i){let s;return u;function u(h){return h===b.quotationMark||h===b.apostrophe||h===b.leftParenthesis?(e.enter(r),e.enter(a),e.consume(h),e.exit(a),s=h===b.leftParenthesis?b.rightParenthesis:h,c):n(h)}function c(h){return h===s?(e.enter(a),e.consume(h),e.exit(a),e.exit(r),t):(e.enter(i),l(h))}function l(h){return h===s?(e.exit(i),c(s)):h===b.eof?n(h):ne(h)?(e.enter(p.lineEnding),e.consume(h),e.exit(p.lineEnding),Be(e,l,p.linePrefix)):(e.enter(p.chunkString,{contentType:J.contentTypeString}),d(h))}function d(h){return h===s||h===b.eof||ne(h)?(e.exit(p.chunkString),l(h)):(e.consume(h),h===b.backslash?f:d)}function f(h){return h===s||h===b.backslash?(e.consume(h),d):d(h)}}function zn(e,t){let n;return r;function r(a){return ne(a)?(e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),n=!0,r):Re(a)?Be(e,r,n?p.linePrefix:p.lineSuffix)(a):t(a)}}const qh={name:"definition",tokenize:Xh},Wh={tokenize:Qh,partial:!0};function Xh(e,t,n){const r=this;let a;return i;function i(m){return e.enter(p.definition),s(m)}function s(m){return S(m===b.leftSquareBracket,"expected `[`"),Ku.call(r,e,u,n,p.definitionLabel,p.definitionLabelMarker,p.definitionLabelString)(m)}function u(m){return a=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===b.colon?(e.enter(p.definitionMarker),e.consume(m),e.exit(p.definitionMarker),c):n(m)}function c(m){return ut(m)?zn(e,l)(m):l(m)}function l(m){return Qu(e,d,n,p.definitionDestination,p.definitionDestinationLiteral,p.definitionDestinationLiteralMarker,p.definitionDestinationRaw,p.definitionDestinationString)(m)}function d(m){return e.attempt(Wh,f,f)(m)}function f(m){return Re(m)?Be(e,h,p.whitespace)(m):h(m)}function h(m){return m===b.eof||ne(m)?(e.exit(p.definition),r.parser.defined.push(a),t(m)):n(m)}}function Qh(e,t,n){return r;function r(u){return ut(u)?zn(e,a)(u):n(u)}function a(u){return Ju(e,i,n,p.definitionTitle,p.definitionTitleMarker,p.definitionTitleString)(u)}function i(u){return Re(u)?Be(e,s,p.whitespace)(u):s(u)}function s(u){return u===b.eof||ne(u)?t(u):n(u)}}const Kh={name:"hardBreakEscape",tokenize:Jh};function Jh(e,t,n){return r;function r(i){return S(i===b.backslash,"expected `\\`"),e.enter(p.hardBreakEscape),e.consume(i),a}function a(i){return ne(i)?(e.exit(p.hardBreakEscape),t(i)):n(i)}}const Zh={name:"headingAtx",tokenize:t0,resolve:e0};function e0(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type===p.whitespace&&(r+=2),n-2>r&&e[n][1].type===p.whitespace&&(n-=2),e[n][1].type===p.atxHeadingSequence&&(r===n-1||n-4>r&&e[n-2][1].type===p.whitespace)&&(n-=r+1===n?2:4),n>r&&(a={type:p.atxHeadingText,start:e[r][1].start,end:e[n][1].end},i={type:p.chunkText,start:e[r][1].start,end:e[n][1].end,contentType:J.contentTypeText},kt(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function t0(e,t,n){let r=0;return a;function a(d){return e.enter(p.atxHeading),i(d)}function i(d){return S(d===b.numberSign,"expected `#`"),e.enter(p.atxHeadingSequence),s(d)}function s(d){return d===b.numberSign&&r++<J.atxHeadingOpeningFenceSizeMax?(e.consume(d),s):d===b.eof||ut(d)?(e.exit(p.atxHeadingSequence),u(d)):n(d)}function u(d){return d===b.numberSign?(e.enter(p.atxHeadingSequence),c(d)):d===b.eof||ne(d)?(e.exit(p.atxHeading),t(d)):Re(d)?Be(e,u,p.whitespace)(d):(e.enter(p.atxHeadingText),l(d))}function c(d){return d===b.numberSign?(e.consume(d),c):(e.exit(p.atxHeadingSequence),u(d))}function l(d){return d===b.eof||d===b.numberSign||ut(d)?(e.exit(p.atxHeadingText),u(d)):(e.consume(d),l)}}const n0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Us=["pre","script","style","textarea"],r0={name:"htmlFlow",tokenize:o0,resolveTo:s0,concrete:!0},a0={tokenize:c0,partial:!0},i0={tokenize:u0,partial:!0};function s0(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type===p.htmlFlow););return t>1&&e[t-2][1].type===p.linePrefix&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function o0(e,t,n){const r=this;let a,i,s,u,c;return l;function l(x){return d(x)}function d(x){return S(x===b.lessThan,"expected `<`"),e.enter(p.htmlFlow),e.enter(p.htmlFlowData),e.consume(x),f}function f(x){return x===b.exclamationMark?(e.consume(x),h):x===b.slash?(e.consume(x),i=!0,_):x===b.questionMark?(e.consume(x),a=J.htmlInstruction,r.interrupt?t:g):Lt(x)?(e.consume(x),s=String.fromCharCode(x),O):n(x)}function h(x){return x===b.dash?(e.consume(x),a=J.htmlComment,m):x===b.leftSquareBracket?(e.consume(x),a=J.htmlCdata,u=0,A):Lt(x)?(e.consume(x),a=J.htmlDeclaration,r.interrupt?t:g):n(x)}function m(x){return x===b.dash?(e.consume(x),r.interrupt?t:g):n(x)}function A(x){const ee=J.cdataOpeningString;return x===ee.charCodeAt(u++)?(e.consume(x),u===ee.length?r.interrupt?t:te:A):n(x)}function _(x){return Lt(x)?(e.consume(x),s=String.fromCharCode(x),O):n(x)}function O(x){if(x===b.eof||x===b.slash||x===b.greaterThan||ut(x)){const ee=x===b.slash,ie=s.toLowerCase();return!ee&&!i&&Us.includes(ie)?(a=J.htmlRaw,r.interrupt?t(x):te(x)):n0.includes(s.toLowerCase())?(a=J.htmlBasic,ee?(e.consume(x),v):r.interrupt?t(x):te(x)):(a=J.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):i?L(x):M(x))}return x===b.dash||lt(x)?(e.consume(x),s+=String.fromCharCode(x),O):n(x)}function v(x){return x===b.greaterThan?(e.consume(x),r.interrupt?t:te):n(x)}function L(x){return Re(x)?(e.consume(x),L):W(x)}function M(x){return x===b.slash?(e.consume(x),W):x===b.colon||x===b.underscore||Lt(x)?(e.consume(x),z):Re(x)?(e.consume(x),M):W(x)}function z(x){return x===b.dash||x===b.dot||x===b.colon||x===b.underscore||lt(x)?(e.consume(x),z):R(x)}function R(x){return x===b.equalsTo?(e.consume(x),D):Re(x)?(e.consume(x),R):M(x)}function D(x){return x===b.eof||x===b.lessThan||x===b.equalsTo||x===b.greaterThan||x===b.graveAccent?n(x):x===b.quotationMark||x===b.apostrophe?(e.consume(x),c=x,ae):Re(x)?(e.consume(x),D):ge(x)}function ae(x){return x===c?(e.consume(x),c=null,ue):x===b.eof||ne(x)?n(x):(e.consume(x),ae)}function ge(x){return x===b.eof||x===b.quotationMark||x===b.apostrophe||x===b.slash||x===b.lessThan||x===b.equalsTo||x===b.greaterThan||x===b.graveAccent||ut(x)?R(x):(e.consume(x),ge)}function ue(x){return x===b.slash||x===b.greaterThan||Re(x)?M(x):n(x)}function W(x){return x===b.greaterThan?(e.consume(x),xe):n(x)}function xe(x){return x===b.eof||ne(x)?te(x):Re(x)?(e.consume(x),xe):n(x)}function te(x){return x===b.dash&&a===J.htmlComment?(e.consume(x),he):x===b.lessThan&&a===J.htmlRaw?(e.consume(x),de):x===b.greaterThan&&a===J.htmlDeclaration?(e.consume(x),G):x===b.questionMark&&a===J.htmlInstruction?(e.consume(x),g):x===b.rightSquareBracket&&a===J.htmlCdata?(e.consume(x),Fe):ne(x)&&(a===J.htmlBasic||a===J.htmlComplete)?(e.exit(p.htmlFlowData),e.check(a0,X,F)(x)):x===b.eof||ne(x)?(e.exit(p.htmlFlowData),F(x)):(e.consume(x),te)}function F(x){return e.check(i0,H,X)(x)}function H(x){return S(ne(x)),e.enter(p.lineEnding),e.consume(x),e.exit(p.lineEnding),Z}function Z(x){return x===b.eof||ne(x)?F(x):(e.enter(p.htmlFlowData),te(x))}function he(x){return x===b.dash?(e.consume(x),g):te(x)}function de(x){return x===b.slash?(e.consume(x),s="",Ce):te(x)}function Ce(x){if(x===b.greaterThan){const ee=s.toLowerCase();return Us.includes(ee)?(e.consume(x),G):te(x)}return Lt(x)&&s.length<J.htmlRawSizeMax?(e.consume(x),s+=String.fromCharCode(x),Ce):te(x)}function Fe(x){return x===b.rightSquareBracket?(e.consume(x),g):te(x)}function g(x){return x===b.greaterThan?(e.consume(x),G):x===b.dash&&a===J.htmlComment?(e.consume(x),g):te(x)}function G(x){return x===b.eof||ne(x)?(e.exit(p.htmlFlowData),X(x)):(e.consume(x),G)}function X(x){return e.exit(p.htmlFlow),t(x)}}function u0(e,t,n){const r=this;return a;function a(s){return ne(s)?(e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function c0(e,t,n){return r;function r(a){return S(ne(a),"expected a line ending"),e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),e.attempt(Gr,t,n)}}const l0={name:"htmlText",tokenize:d0};function d0(e,t,n){const r=this;let a,i,s;return u;function u(g){return S(g===b.lessThan,"expected `<`"),e.enter(p.htmlText),e.enter(p.htmlTextData),e.consume(g),c}function c(g){return g===b.exclamationMark?(e.consume(g),l):g===b.slash?(e.consume(g),R):g===b.questionMark?(e.consume(g),M):Lt(g)?(e.consume(g),ge):n(g)}function l(g){return g===b.dash?(e.consume(g),d):g===b.leftSquareBracket?(e.consume(g),i=0,A):Lt(g)?(e.consume(g),L):n(g)}function d(g){return g===b.dash?(e.consume(g),m):n(g)}function f(g){return g===b.eof?n(g):g===b.dash?(e.consume(g),h):ne(g)?(s=f,de(g)):(e.consume(g),f)}function h(g){return g===b.dash?(e.consume(g),m):f(g)}function m(g){return g===b.greaterThan?he(g):g===b.dash?h(g):f(g)}function A(g){const G=J.cdataOpeningString;return g===G.charCodeAt(i++)?(e.consume(g),i===G.length?_:A):n(g)}function _(g){return g===b.eof?n(g):g===b.rightSquareBracket?(e.consume(g),O):ne(g)?(s=_,de(g)):(e.consume(g),_)}function O(g){return g===b.rightSquareBracket?(e.consume(g),v):_(g)}function v(g){return g===b.greaterThan?he(g):g===b.rightSquareBracket?(e.consume(g),v):_(g)}function L(g){return g===b.eof||g===b.greaterThan?he(g):ne(g)?(s=L,de(g)):(e.consume(g),L)}function M(g){return g===b.eof?n(g):g===b.questionMark?(e.consume(g),z):ne(g)?(s=M,de(g)):(e.consume(g),M)}function z(g){return g===b.greaterThan?he(g):M(g)}function R(g){return Lt(g)?(e.consume(g),D):n(g)}function D(g){return g===b.dash||lt(g)?(e.consume(g),D):ae(g)}function ae(g){return ne(g)?(s=ae,de(g)):Re(g)?(e.consume(g),ae):he(g)}function ge(g){return g===b.dash||lt(g)?(e.consume(g),ge):g===b.slash||g===b.greaterThan||ut(g)?ue(g):n(g)}function ue(g){return g===b.slash?(e.consume(g),he):g===b.colon||g===b.underscore||Lt(g)?(e.consume(g),W):ne(g)?(s=ue,de(g)):Re(g)?(e.consume(g),ue):he(g)}function W(g){return g===b.dash||g===b.dot||g===b.colon||g===b.underscore||lt(g)?(e.consume(g),W):xe(g)}function xe(g){return g===b.equalsTo?(e.consume(g),te):ne(g)?(s=xe,de(g)):Re(g)?(e.consume(g),xe):ue(g)}function te(g){return g===b.eof||g===b.lessThan||g===b.equalsTo||g===b.greaterThan||g===b.graveAccent?n(g):g===b.quotationMark||g===b.apostrophe?(e.consume(g),a=g,F):ne(g)?(s=te,de(g)):Re(g)?(e.consume(g),te):(e.consume(g),H)}function F(g){return g===a?(e.consume(g),a=void 0,Z):g===b.eof?n(g):ne(g)?(s=F,de(g)):(e.consume(g),F)}function H(g){return g===b.eof||g===b.quotationMark||g===b.apostrophe||g===b.lessThan||g===b.equalsTo||g===b.graveAccent?n(g):g===b.slash||g===b.greaterThan||ut(g)?ue(g):(e.consume(g),H)}function Z(g){return g===b.slash||g===b.greaterThan||ut(g)?ue(g):n(g)}function he(g){return g===b.greaterThan?(e.consume(g),e.exit(p.htmlTextData),e.exit(p.htmlText),t):n(g)}function de(g){return S(s,"expected return state"),S(ne(g),"expected eol"),e.exit(p.htmlTextData),e.enter(p.lineEnding),e.consume(g),e.exit(p.lineEnding),Ce}function Ce(g){return S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Re(g)?Be(e,Fe,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(g):Fe(g)}function Fe(g){return e.enter(p.htmlTextData),s(g)}}const Ii={name:"labelEnd",tokenize:g0,resolveTo:b0,resolveAll:p0},f0={tokenize:E0},h0={tokenize:T0},m0={tokenize:x0};function p0(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type===p.labelImage||n.type===p.labelLink||n.type===p.labelEnd)&&(e.splice(t+1,n.type===p.labelImage?4:2),n.type=p.data,t++)}return e}function b0(e,t){let n=e.length,r=0,a,i,s,u;for(;n--;)if(a=e[n][1],i){if(a.type===p.link||a.type===p.labelLink&&a._inactive)break;e[n][0]==="enter"&&a.type===p.labelLink&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type===p.labelImage||a.type===p.labelLink)&&!a._balanced&&(i=n,a.type!==p.labelLink)){r=2;break}}else a.type===p.labelEnd&&(s=n);S(i!==void 0,"`open` is supposed to be found"),S(s!==void 0,"`close` is supposed to be found");const c={type:e[i][1].type===p.labelLink?p.link:p.image,start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:p.label,start:Object.assign({},e[i][1].start),end:Object.assign({},e[s][1].end)},d={type:p.labelText,start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return u=[["enter",c,t],["enter",l,t]],u=mt(u,e.slice(i+1,i+r+3)),u=mt(u,[["enter",d,t]]),S(t.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),u=mt(u,Ni(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),u=mt(u,[["exit",d,t],e[s-2],e[s-1],["exit",l,t]]),u=mt(u,e.slice(s+1)),u=mt(u,[["exit",c,t]]),kt(e,i,e.length,u),e}function g0(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type===p.labelImage||r.events[a][1].type===p.labelLink)&&!r.events[a][1]._balanced){i=r.events[a][1];break}return u;function u(h){return S(h===b.rightSquareBracket,"expected `]`"),i?i._inactive?f(h):(s=r.parser.defined.includes(yn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter(p.labelEnd),e.enter(p.labelMarker),e.consume(h),e.exit(p.labelMarker),e.exit(p.labelEnd),c):n(h)}function c(h){return h===b.leftParenthesis?e.attempt(f0,d,s?d:f)(h):h===b.leftSquareBracket?e.attempt(h0,d,s?l:f)(h):s?d(h):f(h)}function l(h){return e.attempt(m0,d,f)(h)}function d(h){return t(h)}function f(h){return i._balanced=!0,n(h)}}function E0(e,t,n){return r;function r(f){return S(f===b.leftParenthesis,"expected left paren"),e.enter(p.resource),e.enter(p.resourceMarker),e.consume(f),e.exit(p.resourceMarker),a}function a(f){return ut(f)?zn(e,i)(f):i(f)}function i(f){return f===b.rightParenthesis?d(f):Qu(e,s,u,p.resourceDestination,p.resourceDestinationLiteral,p.resourceDestinationLiteralMarker,p.resourceDestinationRaw,p.resourceDestinationString,J.linkResourceDestinationBalanceMax)(f)}function s(f){return ut(f)?zn(e,c)(f):d(f)}function u(f){return n(f)}function c(f){return f===b.quotationMark||f===b.apostrophe||f===b.leftParenthesis?Ju(e,l,n,p.resourceTitle,p.resourceTitleMarker,p.resourceTitleString)(f):d(f)}function l(f){return ut(f)?zn(e,d)(f):d(f)}function d(f){return f===b.rightParenthesis?(e.enter(p.resourceMarker),e.consume(f),e.exit(p.resourceMarker),e.exit(p.resource),t):n(f)}}function T0(e,t,n){const r=this;return a;function a(u){return S(u===b.leftSquareBracket,"expected left bracket"),Ku.call(r,e,i,s,p.reference,p.referenceMarker,p.referenceString)(u)}function i(u){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function x0(e,t,n){return r;function r(i){return S(i===b.leftSquareBracket,"expected left bracket"),e.enter(p.reference),e.enter(p.referenceMarker),e.consume(i),e.exit(p.referenceMarker),a}function a(i){return i===b.rightSquareBracket?(e.enter(p.referenceMarker),e.consume(i),e.exit(p.referenceMarker),e.exit(p.reference),t):n(i)}}const y0={name:"labelStartImage",tokenize:C0,resolveAll:Ii.resolveAll};function C0(e,t,n){const r=this;return a;function a(u){return S(u===b.exclamationMark,"expected `!`"),e.enter(p.labelImage),e.enter(p.labelImageMarker),e.consume(u),e.exit(p.labelImageMarker),i}function i(u){return u===b.leftSquareBracket?(e.enter(p.labelMarker),e.consume(u),e.exit(p.labelMarker),e.exit(p.labelImage),s):n(u)}function s(u){return u===b.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const S0={name:"labelStartLink",tokenize:A0,resolveAll:Ii.resolveAll};function A0(e,t,n){const r=this;return a;function a(s){return S(s===b.leftSquareBracket,"expected `[`"),e.enter(p.labelLink),e.enter(p.labelMarker),e.consume(s),e.exit(p.labelMarker),e.exit(p.labelLink),i}function i(s){return s===b.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ga={name:"lineEnding",tokenize:_0};function _0(e,t){return n;function n(r){return S(ne(r),"expected eol"),e.enter(p.lineEnding),e.consume(r),e.exit(p.lineEnding),Be(e,t,p.linePrefix)}}const _r={name:"thematicBreak",tokenize:v0};function v0(e,t,n){let r=0,a;return i;function i(l){return e.enter(p.thematicBreak),s(l)}function s(l){return S(l===b.asterisk||l===b.dash||l===b.underscore,"expected `*`, `-`, or `_`"),a=l,u(l)}function u(l){return l===a?(e.enter(p.thematicBreakSequence),c(l)):r>=J.thematicBreakMarkerCountMin&&(l===b.eof||ne(l))?(e.exit(p.thematicBreak),t(l)):n(l)}function c(l){return l===a?(e.consume(l),r++,c):(e.exit(p.thematicBreakSequence),Re(l)?Be(e,u,p.whitespace)(l):u(l))}}const st={name:"list",tokenize:w0,continuation:{tokenize:R0},exit:L0},N0={tokenize:D0,partial:!0},I0={tokenize:O0,partial:!0};function w0(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type===p.linePrefix?a[2].sliceSerialize(a[1],!0).length:0,s=0;return u;function u(m){S(r.containerState,"expected state");const A=r.containerState.type||(m===b.asterisk||m===b.plusSign||m===b.dash?p.listUnordered:p.listOrdered);if(A===p.listUnordered?!r.containerState.marker||m===r.containerState.marker:ei(m)){if(r.containerState.type||(r.containerState.type=A,e.enter(A,{_container:!0})),A===p.listUnordered)return e.enter(p.listItemPrefix),m===b.asterisk||m===b.dash?e.check(_r,n,l)(m):l(m);if(!r.interrupt||m===b.digit1)return e.enter(p.listItemPrefix),e.enter(p.listItemValue),c(m)}return n(m)}function c(m){return S(r.containerState,"expected state"),ei(m)&&++s<J.listItemValueSizeMax?(e.consume(m),c):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===b.rightParenthesis||m===b.dot)?(e.exit(p.listItemValue),l(m)):n(m)}function l(m){return S(r.containerState,"expected state"),S(m!==b.eof,"eof (`null`) is not a marker"),e.enter(p.listItemMarker),e.consume(m),e.exit(p.listItemMarker),r.containerState.marker=r.containerState.marker||m,e.check(Gr,r.interrupt?n:d,e.attempt(N0,h,f))}function d(m){return S(r.containerState,"expected state"),r.containerState.initialBlankLine=!0,i++,h(m)}function f(m){return Re(m)?(e.enter(p.listItemPrefixWhitespace),e.consume(m),e.exit(p.listItemPrefixWhitespace),h):n(m)}function h(m){return S(r.containerState,"expected state"),r.containerState.size=i+r.sliceSerialize(e.exit(p.listItemPrefix),!0).length,t(m)}}function R0(e,t,n){const r=this;return S(r.containerState,"expected state"),r.containerState._closeFlow=void 0,e.check(Gr,a,i);function a(u){return S(r.containerState,"expected state"),S(typeof r.containerState.size=="number","expected size"),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Be(e,t,p.listItemIndent,r.containerState.size+1)(u)}function i(u){return S(r.containerState,"expected state"),r.containerState.furtherBlankLines||!Re(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(I0,t,s)(u))}function s(u){return S(r.containerState,"expected state"),r.containerState._closeFlow=!0,r.interrupt=void 0,S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,e.attempt(st,t,n),p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(u)}}function O0(e,t,n){const r=this;return S(r.containerState,"expected state"),S(typeof r.containerState.size=="number","expected size"),Be(e,a,p.listItemIndent,r.containerState.size+1);function a(i){S(r.containerState,"expected state");const s=r.events[r.events.length-1];return s&&s[1].type===p.listItemIndent&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function L0(e){S(this.containerState,"expected state"),S(typeof this.containerState.type=="string","expected type"),e.exit(this.containerState.type)}function D0(e,t,n){const r=this;return S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,a,p.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize+1);function a(i){const s=r.events[r.events.length-1];return!Re(i)&&s&&s[1].type===p.listItemPrefixWhitespace?t(i):n(i)}}const js={name:"setextUnderline",tokenize:P0,resolveTo:k0};function k0(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type===p.content){r=n;break}e[n][1].type===p.paragraph&&(a=n)}else e[n][1].type===p.content&&e.splice(n,1),!i&&e[n][1].type===p.definition&&(i=n);S(a!==void 0,"expected a `text` index to be found"),S(r!==void 0,"expected a `text` index to be found");const s={type:p.setextHeading,start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[a][1].type=p.setextHeadingText,i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function P0(e,t,n){const r=this;let a;return i;function i(l){let d=r.events.length,f;for(S(l===b.dash||l===b.equalsTo,"expected `=` or `-`");d--;)if(r.events[d][1].type!==p.lineEnding&&r.events[d][1].type!==p.linePrefix&&r.events[d][1].type!==p.content){f=r.events[d][1].type===p.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter(p.setextHeadingLine),a=l,s(l)):n(l)}function s(l){return e.enter(p.setextHeadingLineSequence),u(l)}function u(l){return l===a?(e.consume(l),u):(e.exit(p.setextHeadingLineSequence),Re(l)?Be(e,c,p.lineSuffix)(l):c(l))}function c(l){return l===b.eof||ne(l)?(e.exit(p.setextHeadingLine),t(l)):n(l)}}const M0={tokenize:B0};function B0(e){const t=this,n=e.attempt(Gr,r,e.attempt(this.parser.constructs.flowInitial,a,Be(e,e.attempt(this.parser.constructs.flow,a,e.attempt(zh,a)),p.linePrefix)));return n;function r(i){if(S(i===b.eof||ne(i),"expected eol or eof"),i===b.eof){e.consume(i);return}return e.enter(p.lineEndingBlank),e.consume(i),e.exit(p.lineEndingBlank),t.currentConstruct=void 0,n}function a(i){if(S(i===b.eof||ne(i),"expected eol or eof"),i===b.eof){e.consume(i);return}return e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),t.currentConstruct=void 0,n}}const F0={resolveAll:ec()},H0=Zu("string"),U0=Zu("text");function Zu(e){return{tokenize:t,resolveAll:ec(e==="text"?j0:void 0)};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,u);return s;function s(d){return l(d)?i(d):u(d)}function u(d){if(d===b.eof){n.consume(d);return}return n.enter(p.data),n.consume(d),c}function c(d){return l(d)?(n.exit(p.data),i(d)):(n.consume(d),c)}function l(d){if(d===b.eof)return!0;const f=a[d];let h=-1;if(f)for(S(Array.isArray(f),"expected `disable.null` to be populated");++h<f.length;){const m=f[h];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function ec(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type===p.data&&(i=a,a++):(!n[a]||n[a][1].type!==p.data)&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function j0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===p.lineEnding)&&e[n-1][1].type===p.data){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,u=0,c;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===b.space;)u++,s--;if(s)break;s=-1}else if(l===b.horizontalTab)c=!0,u++;else if(l!==b.virtualSpace){i++;break}}if(u){const l={type:n===e.length||c||u<J.hardBreakPrefixSizeMin?p.lineSuffix:p.hardBreakTrailing,start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_index:r.start._index+i,_bufferIndex:i?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}var br={exports:{}},Ea,zs;function z0(){if(zs)return Ea;zs=1;var e=1e3,t=e*60,n=t*60,r=n*24,a=r*7,i=r*365.25;Ea=function(d,f){f=f||{};var h=typeof d;if(h==="string"&&d.length>0)return s(d);if(h==="number"&&isFinite(d))return f.long?c(d):u(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function s(d){if(d=String(d),!(d.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(f){var h=parseFloat(f[1]),m=(f[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return h*i;case"weeks":case"week":case"w":return h*a;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*t;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function u(d){var f=Math.abs(d);return f>=r?Math.round(d/r)+"d":f>=n?Math.round(d/n)+"h":f>=t?Math.round(d/t)+"m":f>=e?Math.round(d/e)+"s":d+"ms"}function c(d){var f=Math.abs(d);return f>=r?l(d,f,r,"day"):f>=n?l(d,f,n,"hour"):f>=t?l(d,f,t,"minute"):f>=e?l(d,f,e,"second"):d+" ms"}function l(d,f,h,m){var A=f>=h*1.5;return Math.round(d/h)+" "+m+(A?"s":"")}return Ea}var Ta,Vs;function V0(){if(Vs)return Ta;Vs=1;function e(t){r.debug=r,r.default=r,r.coerce=l,r.disable=u,r.enable=i,r.enabled=c,r.humanize=z0(),r.destroy=d,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function n(f){let h=0;for(let m=0;m<f.length;m++)h=(h<<5)-h+f.charCodeAt(m),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=n;function r(f){let h,m=null,A,_;function O(...v){if(!O.enabled)return;const L=O,M=Number(new Date),z=M-(h||M);L.diff=z,L.prev=h,L.curr=M,h=M,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let R=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(ae,ge)=>{if(ae==="%%")return"%";R++;const ue=r.formatters[ge];if(typeof ue=="function"){const W=v[R];ae=ue.call(L,W),v.splice(R,1),R--}return ae}),r.formatArgs.call(L,v),(L.log||r.log).apply(L,v)}return O.namespace=f,O.useColors=r.useColors(),O.color=r.selectColor(f),O.extend=a,O.destroy=r.destroy,Object.defineProperty(O,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(A!==r.namespaces&&(A=r.namespaces,_=r.enabled(f)),_),set:v=>{m=v}}),typeof r.init=="function"&&r.init(O),O}function a(f,h){const m=r(this.namespace+(typeof h>"u"?":":h)+f);return m.log=this.log,m}function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];const h=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const m of h)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}function s(f,h){let m=0,A=0,_=-1,O=0;for(;m<f.length;)if(A<h.length&&(h[A]===f[m]||h[A]==="*"))h[A]==="*"?(_=A,O=m,A++):(m++,A++);else if(_!==-1)A=_+1,O++,m=O;else return!1;for(;A<h.length&&h[A]==="*";)A++;return A===h.length}function u(){const f=[...r.names,...r.skips.map(h=>"-"+h)].join(",");return r.enable(""),f}function c(f){for(const h of r.skips)if(s(f,h))return!1;for(const h of r.names)if(s(f,h))return!0;return!1}function l(f){return f instanceof Error?f.stack||f.message:f}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return Ta=e,Ta}var $s;function $0(){return $s||($s=1,(function(e,t){t.formatArgs=r,t.save=a,t.load=i,t.useColors=n,t.storage=s(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let d=0,f=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(d++,h==="%c"&&(f=d))}),c.splice(f,0,l)}t.log=console.debug||console.log||(()=>{});function a(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function s(){try{return localStorage}catch{}}e.exports=V0()(t);const{formatters:u}=e.exports;u.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(br,br.exports)),br.exports}var Y0=$0();const G0=Ur(Y0),Jt=G0("micromark");function q0(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const a={},i=[];let s=[],u=[],c=!0;const l={consume:z,enter:R,exit:D,attempt:ue(ae),check:ue(ge),interrupt:ue(ge,{interrupt:!0})},d={previous:b.eof,code:b.eof,containerState:{},events:[],parser:e,sliceStream:_,sliceSerialize:A,now:O,defineSkip:v,write:m};let f=t.tokenize.call(d,l),h;return t.resolveAll&&i.push(t),d;function m(F){return s=mt(s,F),L(),s[s.length-1]!==b.eof?[]:(W(t,0),d.events=Ni(i,d.events,d),d.events)}function A(F,H){return X0(_(F),H)}function _(F){return W0(s,F)}function O(){const{line:F,column:H,offset:Z,_index:he,_bufferIndex:de}=r;return{line:F,column:H,offset:Z,_index:he,_bufferIndex:de}}function v(F){a[F.line]=F.column,te(),Jt("position: define skip: `%j`",r)}function L(){let F;for(;r._index<s.length;){const H=s[r._index];if(typeof H=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<H.length;)M(H.charCodeAt(r._bufferIndex));else M(H)}}function M(F){S(c===!0,"expected character to be consumed"),c=void 0,Jt("main: passing `%s` to %s",F,f&&f.name),h=F,S(typeof f=="function","expected state"),f=f(F)}function z(F){S(F===h,"expected given code to equal expected code"),Jt("consume: `%s`",F),S(c===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),S(F===null?d.events.length===0||d.events[d.events.length-1][0]==="exit":d.events[d.events.length-1][0]==="enter","expected last token to be open"),ne(F)?(r.line++,r.column=1,r.offset+=F===b.carriageReturnLineFeed?2:1,te(),Jt("position: after eol: `%j`",r)):F!==b.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=F,c=!0}function R(F,H){const Z=H||{};return Z.type=F,Z.start=O(),S(typeof F=="string","expected string type"),S(F.length>0,"expected non-empty string"),Jt("enter: `%s`",F),d.events.push(["enter",Z,d]),u.push(Z),Z}function D(F){S(typeof F=="string","expected string type"),S(F.length>0,"expected non-empty string");const H=u.pop();return S(H,"cannot close w/o open tokens"),H.end=O(),S(F===H.type,"expected exit token to match current token"),S(!(H.start._index===H.end._index&&H.start._bufferIndex===H.end._bufferIndex),"expected non-empty token (`"+F+"`)"),Jt("exit: `%s`",H.type),d.events.push(["exit",H,d]),H}function ae(F,H){W(F,H.from)}function ge(F,H){H.restore()}function ue(F,H){return Z;function Z(he,de,Ce){let Fe,g,G,X;return Array.isArray(he)?ee(he):"tokenize"in he?ee([he]):x(he);function x(K){return le;function le(ce){const ke=ce!==null&&K[ce],Y=ce!==null&&K.null,He=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Y)?Y:Y?[Y]:[]];return ee(He)(ce)}}function ee(K){return Fe=K,g=0,K.length===0?(S(Ce,"expected `bogusState` to be given"),Ce):ie(K[g])}function ie(K){return le;function le(ce){return X=xe(),G=K,K.partial||(d.currentConstruct=K),S(d.parser.constructs.disable.null,"expected `disable.null` to be populated"),K.name&&d.parser.constructs.disable.null.includes(K.name)?se(ce):K.tokenize.call(H?Object.assign(Object.create(d),H):d,l,oe,se)(ce)}}function oe(K){return S(K===h,"expected code"),c=!0,F(G,X),de}function se(K){return S(K===h,"expected code"),c=!0,X.restore(),++g<Fe.length?ie(Fe[g]):Ce}}}function W(F,H){F.resolveAll&&!i.includes(F)&&i.push(F),F.resolve&&kt(d.events,H,d.events.length-H,F.resolve(d.events.slice(H),d)),F.resolveTo&&(d.events=F.resolveTo(d.events,d)),S(F.partial||d.events.length===0||d.events[d.events.length-1][0]==="exit","expected last token to end")}function xe(){const F=O(),H=d.previous,Z=d.currentConstruct,he=d.events.length,de=Array.from(u);return{restore:Ce,from:he};function Ce(){r=F,d.previous=H,d.currentConstruct=Z,d.events.length=he,u=de,te(),Jt("position: restore: `%j`",r)}}function te(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function W0(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)S(i>-1,"expected non-negative end buffer index"),S(r>-1,"expected non-negative start buffer index"),s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):(S(r===0,"expected `startBufferIndex` to be `0`"),s.shift())}i>0&&s.push(e[a].slice(0,i))}return s}function X0(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case b.carriageReturn:{s=wt.cr;break}case b.lineFeed:{s=wt.lf;break}case b.carriageReturnLineFeed:{s=wt.cr+wt.lf;break}case b.horizontalTab:{s=t?wt.space:wt.ht;break}case b.virtualSpace:{if(!t&&a)continue;s=wt.space;break}default:S(typeof i=="number","expected number"),s=String.fromCharCode(i)}a=i===b.horizontalTab,r.push(s)}return r.join("")}const Q0={[b.asterisk]:st,[b.plusSign]:st,[b.dash]:st,[b.digit0]:st,[b.digit1]:st,[b.digit2]:st,[b.digit3]:st,[b.digit4]:st,[b.digit5]:st,[b.digit6]:st,[b.digit7]:st,[b.digit8]:st,[b.digit9]:st,[b.greaterThan]:Yu},K0={[b.leftSquareBracket]:qh},J0={[b.horizontalTab]:ba,[b.virtualSpace]:ba,[b.space]:ba},Z0={[b.numberSign]:Zh,[b.asterisk]:_r,[b.dash]:[js,_r],[b.lessThan]:r0,[b.equalsTo]:js,[b.underscore]:_r,[b.graveAccent]:Hs,[b.tilde]:Hs},em={[b.ampersand]:qu,[b.backslash]:Gu},tm={[b.carriageReturn]:ga,[b.lineFeed]:ga,[b.carriageReturnLineFeed]:ga,[b.exclamationMark]:y0,[b.ampersand]:qu,[b.asterisk]:ti,[b.lessThan]:[_h,l0],[b.leftSquareBracket]:S0,[b.backslash]:[Kh,Gu],[b.rightSquareBracket]:Ii,[b.underscore]:ti,[b.graveAccent]:Fh},nm={null:[ti,F0]},rm={null:[b.asterisk,b.underscore]},am={null:[]},im=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rm,contentInitial:K0,disable:am,document:Q0,flow:Z0,flowInitial:J0,insideSpan:nm,string:em,text:tm},Symbol.toStringTag,{value:"Module"}));function sm(e){const n=lh([im,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:a(Eh),document:a(xh),flow:a(M0),string:a(H0),text:a(U0)};return r;function a(i){return s;function s(u){return q0(r,i,u)}}}function om(e){for(;!Xu(e););return e}const Ys=/[\0\t\n\r]/g;function um(){let e=1,t="",n=!0,r;return a;function a(i,s,u){const c=[];let l,d,f,h,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===b.byteOrderMarker&&f++,n=void 0);f<i.length;){if(Ys.lastIndex=f,l=Ys.exec(i),h=l&&l.index!==void 0?l.index:i.length,m=i.charCodeAt(h),!l){t=i.slice(f);break}if(m===b.lf&&f===h&&r)c.push(b.carriageReturnLineFeed),r=void 0;else switch(r&&(c.push(b.carriageReturn),r=void 0),f<h&&(c.push(i.slice(f,h)),e+=h-f),m){case b.nul:{c.push(b.replacementCharacter),e++;break}case b.ht:{for(d=Math.ceil(e/J.tabSize)*J.tabSize,c.push(b.horizontalTab);e++<d;)c.push(b.virtualSpace);break}case b.lf:{c.push(b.lineFeed),e=1;break}default:r=!0,e=1}f=h+1}return u&&(r&&c.push(b.carriageReturn),t&&c.push(t),c.push(b.eof)),c}}const cm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lm(e){return e.replace(cm,dm)}function dm(e,t,n){if(t)return t;if(n.charCodeAt(0)===b.numberSign){const a=n.charCodeAt(1),i=a===b.lowercaseX||a===b.uppercaseX;return $u(n.slice(i?2:1),i?J.numericBaseHexadecimal:J.numericBaseDecimal)}return vi(n)||e}const tc={}.hasOwnProperty;function fm(e,t,n){return typeof t!="string"&&(n=t,t=void 0),hm(n)(om(sm(n).document().write(um()(e,t,!0))))}function hm(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(_t),autolinkProtocol:ue,autolinkEmail:ue,atxHeading:i(Ye),blockQuote:i(le),characterEscape:ue,characterReference:ue,codeFenced:i(ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(ce,s),codeText:i(ke,s),codeTextData:ue,data:ue,codeFlowValue:ue,definition:i(Y),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(He),hardBreakEscape:i(Xe),hardBreakTrailing:i(Xe),htmlFlow:i(dt,s),htmlFlowData:ue,htmlText:i(dt,s),htmlTextData:ue,image:i(Qe),label:s,link:i(_t),listItem:i(me),listItemValue:h,listOrdered:i(ft,f),listUnordered:i(ft),paragraph:i(Te),reference:x,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Ye),strong:i(Ie),thematicBreak:i(Ue)},exit:{atxHeading:c(),atxHeadingSequence:R,autolink:c(),autolinkEmail:K,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:W,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:oe,codeFenced:c(O),codeFencedFence:_,codeFencedFenceInfo:m,codeFencedFenceMeta:A,codeFlowValue:W,codeIndented:c(v),codeText:c(Z),codeTextData:W,data:W,definition:c(),definitionDestinationString:z,definitionLabelString:L,definitionTitleString:M,emphasis:c(),hardBreakEscape:c(te),hardBreakTrailing:c(te),htmlFlow:c(F),htmlFlowData:W,htmlText:c(H),htmlTextData:W,image:c(de),label:Fe,labelText:Ce,lineEnding:xe,link:c(he),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ee,resourceDestinationString:g,resourceTitleString:G,resource:X,setextHeading:c(ge),setextHeadingLineSequence:ae,setextHeadingText:D,strong:c(),thematicBreak:c()}};nc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(I){let w={type:"root",children:[]};const q={stack:[w],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:d,data:n},pe=[];let _e=-1;for(;++_e<I.length;)if(I[_e][1].type===p.listOrdered||I[_e][1].type===p.listUnordered)if(I[_e][0]==="enter")pe.push(_e);else{const Ze=pe.pop();S(typeof Ze=="number","expected list ot be open"),_e=a(I,Ze,_e)}for(_e=-1;++_e<I.length;){const Ze=t[I[_e][0]];tc.call(Ze,I[_e][1].type)&&Ze[I[_e][1].type].call(Object.assign({sliceSerialize:I[_e][2].sliceSerialize},q),I[_e][1])}if(q.tokenStack.length>0){const Ze=q.tokenStack[q.tokenStack.length-1];(Ze[1]||Gs).call(q,void 0,Ze[0])}for(w.position={start:Ut(I.length>0?I[0][1].start:{line:1,column:1,offset:0}),end:Ut(I.length>0?I[I.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)w=t.transforms[_e](w)||w;return w}function a(I,w,q){let pe=w-1,_e=-1,Ze=!1,yt,Ct,Wt,Xt;for(;++pe<=q;){const nt=I[pe];switch(nt[1].type){case p.listUnordered:case p.listOrdered:case p.blockQuote:{nt[0]==="enter"?_e++:_e--,Xt=void 0;break}case p.lineEndingBlank:{nt[0]==="enter"&&(yt&&!Xt&&!_e&&!Wt&&(Wt=pe),Xt=void 0);break}case p.linePrefix:case p.listItemValue:case p.listItemMarker:case p.listItemPrefix:case p.listItemPrefixWhitespace:break;default:Xt=void 0}if(!_e&&nt[0]==="enter"&&nt[1].type===p.listItemPrefix||_e===-1&&nt[0]==="exit"&&(nt[1].type===p.listUnordered||nt[1].type===p.listOrdered)){if(yt){let Ht=pe;for(Ct=void 0;Ht--;){const St=I[Ht];if(St[1].type===p.lineEnding||St[1].type===p.lineEndingBlank){if(St[0]==="exit")continue;Ct&&(I[Ct][1].type=p.lineEndingBlank,Ze=!0),St[1].type=p.lineEnding,Ct=Ht}else if(!(St[1].type===p.linePrefix||St[1].type===p.blockQuotePrefix||St[1].type===p.blockQuotePrefixWhitespace||St[1].type===p.blockQuoteMarker||St[1].type===p.listItemIndent))break}Wt&&(!Ct||Wt<Ct)&&(yt._spread=!0),yt.end=Object.assign({},Ct?I[Ct][1].start:nt[1].end),I.splice(Ct||pe,0,["exit",yt,nt[2]]),pe++,q++}if(nt[1].type===p.listItemPrefix){const Ht={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};yt=Ht,I.splice(pe,0,["enter",Ht,nt[2]]),pe++,q++,Wt=void 0,Xt=!0}}}return I[w][1]._spread=Ze,q}function i(I,w){return q;function q(pe){u.call(this,I(pe),pe),w&&w.call(this,pe)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(I,w,q){const pe=this.stack[this.stack.length-1];S(pe,"expected `parent`"),S("children"in pe,"expected `parent`"),pe.children.push(I),this.stack.push(I),this.tokenStack.push([w,q]),I.position={start:Ut(w.start),end:void 0}}function c(I){return w;function w(q){I&&I.call(this,q),l.call(this,q)}}function l(I,w){const q=this.stack.pop();S(q,"expected `node`");const pe=this.tokenStack.pop();if(pe)pe[0].type!==I.type&&(w?w.call(this,I,pe[0]):(pe[1]||Gs).call(this,I,pe[0]));else throw new Error("Cannot close `"+I.type+"` ("+jn({start:I.start,end:I.end})+"): it’s not open");S(q.type!=="fragment","unexpected fragment `exit`ed"),S(q.position,"expected `position` to be defined"),q.position.end=Ut(I.end)}function d(){return uh(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(I){if(this.data.expectingFirstListItemValue){const w=this.stack[this.stack.length-2];S(w,"expected nodes on stack"),S(w.type==="list","expected list on stack"),w.start=Number.parseInt(this.sliceSerialize(I),J.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function m(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.lang=I}function A(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.meta=I}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.value=I.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.value=I.replace(/(\r?\n|\r)$/g,"")}function L(I){const w=this.resume(),q=this.stack[this.stack.length-1];S(q,"expected node on stack"),S(q.type==="definition","expected definition on stack"),q.label=w,q.identifier=yn(this.sliceSerialize(I)).toLowerCase()}function M(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="definition","expected definition on stack"),w.title=I}function z(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="definition","expected definition on stack"),w.url=I}function R(I){const w=this.stack[this.stack.length-1];if(S(w,"expected node on stack"),S(w.type==="heading","expected heading on stack"),!w.depth){const q=this.sliceSerialize(I).length;S(q===1||q===2||q===3||q===4||q===5||q===6,"expected `depth` between `1` and `6`"),w.depth=q}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function ae(I){const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="heading","expected heading on stack"),w.depth=this.sliceSerialize(I).codePointAt(0)===b.equalsTo?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function ue(I){const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S("children"in w,"expected parent on stack");const q=w.children;let pe=q[q.length-1];(!pe||pe.type!=="text")&&(pe=we(),pe.position={start:Ut(I.start),end:void 0},q.push(pe)),this.stack.push(pe)}function W(I){const w=this.stack.pop();S(w,"expected a `node` to be on the stack"),S("value"in w,"expected a `literal` to be on the stack"),S(w.position,"expected `node` to have an open position"),w.value+=this.sliceSerialize(I),w.position.end=Ut(I.end)}function xe(I){const w=this.stack[this.stack.length-1];if(S(w,"expected `node`"),this.data.atHardBreak){S("children"in w,"expected `parent`");const q=w.children[w.children.length-1];S(q.position,"expected tail to have a starting position"),q.position.end=Ut(I.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(w.type)&&(ue.call(this,I),W.call(this,I))}function te(){this.data.atHardBreak=!0}function F(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="html","expected html on stack"),w.value=I}function H(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="html","expected html on stack"),w.value=I}function Z(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="inlineCode","expected inline code on stack"),w.value=I}function he(){const I=this.stack[this.stack.length-1];if(S(I,"expected node on stack"),S(I.type==="link","expected link on stack"),this.data.inReference){const w=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=w,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function de(){const I=this.stack[this.stack.length-1];if(S(I,"expected node on stack"),S(I.type==="image","expected image on stack"),this.data.inReference){const w=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=w,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function Ce(I){const w=this.sliceSerialize(I),q=this.stack[this.stack.length-2];S(q,"expected ancestor on stack"),S(q.type==="image"||q.type==="link","expected image or link on stack"),q.label=lm(w),q.identifier=yn(w).toLowerCase()}function Fe(){const I=this.stack[this.stack.length-1];S(I,"expected node on stack"),S(I.type==="fragment","expected fragment on stack");const w=this.resume(),q=this.stack[this.stack.length-1];if(S(q,"expected node on stack"),S(q.type==="image"||q.type==="link","expected image or link on stack"),this.data.inReference=!0,q.type==="link"){const pe=I.children;q.children=pe}else q.alt=w}function g(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="image"||w.type==="link","expected image or link on stack"),w.url=I}function G(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="image"||w.type==="link","expected image or link on stack"),w.title=I}function X(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ee(I){const w=this.resume(),q=this.stack[this.stack.length-1];S(q,"expected node on stack"),S(q.type==="image"||q.type==="link","expected image reference or link reference on stack"),q.label=w,q.identifier=yn(this.sliceSerialize(I)).toLowerCase(),this.data.referenceType="full"}function ie(I){S(I.type==="characterReferenceMarkerNumeric"||I.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=I.type}function oe(I){const w=this.sliceSerialize(I),q=this.data.characterReferenceType;let pe;if(q)pe=$u(w,q===p.characterReferenceMarkerNumeric?J.numericBaseDecimal:J.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const Ze=vi(w);S(Ze!==!1,"expected reference to decode"),pe=Ze}const _e=this.stack.pop();S(_e,"expected `node`"),S(_e.position,"expected `node.position`"),S("value"in _e,"expected `node.value`"),_e.value+=pe,_e.position.end=Ut(I.end)}function se(I){W.call(this,I);const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="link","expected link on stack"),w.url=this.sliceSerialize(I)}function K(I){W.call(this,I);const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="link","expected link on stack"),w.url="mailto:"+this.sliceSerialize(I)}function le(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function He(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function dt(){return{type:"html",value:""}}function Qe(){return{type:"image",title:null,url:"",alt:null}}function _t(){return{type:"link",title:null,url:"",children:[]}}function ft(I){return{type:"list",ordered:I.type==="listOrdered",start:null,spread:I._spread,children:[]}}function me(I){return{type:"listItem",spread:I._spread,checked:null,children:[]}}function Te(){return{type:"paragraph",children:[]}}function Ie(){return{type:"strong",children:[]}}function we(){return{type:"text",value:""}}function Ue(){return{type:"thematicBreak"}}}function Ut(e){return{line:e.line,column:e.column,offset:e.offset}}function nc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?nc(e,r):mm(e,r)}}function mm(e,t){let n;for(n in t)if(tc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Gs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+jn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+jn({start:t.start,end:t.end})+") is still open")}function pm(e){const t=this;t.parser=n;function n(r){return fm(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function bm(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
73
|
+
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function df(e,t){var n=zd(t),r=re(re({},Eu),e),a=r.locale,i=r.defaultLocale,s=r.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&s?s(new ps('Missing locale data for locale: "'.concat(a,'" in Intl.NumberFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&s&&s(new ps('Missing locale data for locale: "'.concat(a,'" in Intl.DateTimeFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Hd('"locale" was not configured, using "'.concat(i,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),lf(r),re(re({},r),{formatters:n,formatNumber:of.bind(null,r,n.getNumberFormat),formatNumberToParts:uf.bind(null,r,n.getNumberFormat),formatRelativeTime:af.bind(null,r,n.getRelativeTimeFormat),formatDate:$d.bind(null,r,n.getDateTimeFormat),formatDateToParts:qd.bind(null,r,n.getDateTimeFormat),formatTime:Yd.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Gd.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Wd.bind(null,r,n.getDateTimeFormat),formatPlural:tf.bind(null,r,n.getPluralRules),formatMessage:Wa.bind(null,r,n),$t:Wa.bind(null,r,n),formatList:Zd.bind(null,r,n.getListFormat),formatListToParts:yu.bind(null,r,n.getListFormat),formatDisplayName:Qd.bind(null,r,n.getDisplayNames)})}function Su(e){Zo(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Au=re(re({},Eu),{textComponent:We.Fragment});function ff(e){return function(t){return e(We.Children.toArray(t))}}function hf(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),a=n.length;if(r.length!==a)return!1;for(var i=0;i<a;i++){var s=n[i];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var xi=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=We.createContext(null)):We.createContext(null);xi.Consumer;var mf=xi.Provider,pf=mf,bf=xi;function tr(){var e=We.useContext(bf);return Su(e),e}var Xa;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Xa||(Xa={}));var Qa;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Qa||(Qa={}));function _u(e){var t=function(n){var r=tr(),a=n.value,i=n.children,s=Vr(n,["value","children"]),u=typeof a=="string"?new Date(a||0):a,c=e==="formatDate"?r.formatDateToParts(u,s):r.formatTimeToParts(u,s);return i(c)};return t.displayName=Qa[e],t}function nr(e){var t=function(n){var r=tr(),a=n.value,i=n.children,s=Vr(n,["value","children"]),u=r[e](a,s);if(typeof i=="function")return i(u);var c=r.textComponent||We.Fragment;return We.createElement(c,null,u)};return t.displayName=Xa[e],t}function vu(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=bu(r)?ff(r):r,t},{})}var Ts=function(e,t,n,r){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];var s=vu(r),u=Wa.apply(void 0,Rt([e,t,n,s],a,!1));return Array.isArray(u)?We.Children.toArray(u):u},xs=function(e,t){var n=e.defaultRichTextElements,r=Vr(e,["defaultRichTextElements"]),a=vu(n),i=df(re(re(re({},Au),r),{defaultRichTextElements:a}),t),s={locale:i.locale,timeZone:i.timeZone,fallbackOnEmptyString:i.fallbackOnEmptyString,formats:i.formats,defaultLocale:i.defaultLocale,defaultFormats:i.defaultFormats,messages:i.messages,onError:i.onError,defaultRichTextElements:a};return re(re({},i),{formatMessage:Ts.bind(null,s,i.formatters),$t:Ts.bind(null,s,i.formatters)})};function da(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}var gf=(function(e){Et(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Tu(),n.state={cache:n.cache,intl:xs(da(n.props),n.cache),prevConfig:da(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var a=r.prevConfig,i=r.cache,s=da(n);return hf(a,s)?null:{intl:xs(s,i),prevConfig:s}},t.prototype.render=function(){return Su(this.state.intl),We.createElement(pf,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Au,t})(We.PureComponent);nr("formatDate");nr("formatTime");nr("formatNumber");nr("formatList");nr("formatDisplayName");_u("formatDate");_u("formatTime");const yi=()=>{const e=tr(),t=e.formatMessage({defaultMessage:"Message the assistant...",id:"chatbot.placeholder.content"}),n=e.formatMessage({defaultMessage:"You",id:"chatbot.chatline.label.user"}),r=e.formatMessage({defaultMessage:"Assistant",id:"chatbot.chatline.label.assistant"}),a=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),i=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),s=e.formatMessage({defaultMessage:"Oups ! The discussion if full. Please start a new one.",id:"chatbot.error.api.409"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,tooManyRequestsTranslation:a,genericErrorTranslation:i,conflictErrorTranslation:s}},Ef=({setDiscussionId:e,setConversation:t,companySettings:n})=>({resetDiscussion:()=>{e(null),t([{userType:"assistant",content:n?.agent?.text?.initialText}])}});class Tf extends Error{name="Assertion";code="ERR_ASSERTION";constructor(t,n,r,a,i){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.actual=n,this.expected=r,this.generated=i,this.operator=a}}function S(e,t){Nu(!!e,!1,!0,"ok","Expected value to be truthy",t)}function fa(e){Nu(!1,!1,!0,"ok","Unreachable",e)}function Nu(e,t,n,r,a,i){if(!e)throw i instanceof Error?i:new Tf(i||a,t,n,r,!i)}function ys(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function Iu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cf={};function Cs(e,t){return(Cf.jsx?yf:xf).test(e)}const Sf=/[ \t\n\f\r]/g;function Af(e){return typeof e=="object"?e.type==="text"?Ss(e.value):!1:Ss(e)}function Ss(e){return e.replace(Sf,"")===""}class rr{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}rr.prototype.property={};rr.prototype.normal={};rr.prototype.space=null;function wu(e,t){const n={},r={};let a=-1;for(;++a<e.length;)Object.assign(n,e[a].property),Object.assign(r,e[a].normal);return new rr(n,r,t)}function Xn(e){return e.toLowerCase()}class xt{constructor(t,n){this.property=t,this.attribute=n}}xt.prototype.space=null;xt.prototype.boolean=!1;xt.prototype.booleanish=!1;xt.prototype.overloadedBoolean=!1;xt.prototype.number=!1;xt.prototype.commaSeparated=!1;xt.prototype.spaceSeparated=!1;xt.prototype.commaOrSpaceSeparated=!1;xt.prototype.mustUseProperty=!1;xt.prototype.defined=!1;let _f=0;const Ee=un(),qe=un(),Ru=un(),$=un(),Me=un(),xn=un(),ct=un();function un(){return 2**++_f}const Ka=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:qe,commaOrSpaceSeparated:ct,commaSeparated:xn,number:$,overloadedBoolean:Ru,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),ha=Object.keys(Ka);class Ci extends xt{constructor(t,n,r,a){let i=-1;if(super(t,n),As(this,"space",a),typeof r=="number")for(;++i<ha.length;){const s=ha[i];As(this,ha[i],(r&Ka[s])===Ka[s])}}}Ci.prototype.defined=!0;function As(e,t,n){n&&(e[t]=n)}const vf={}.hasOwnProperty;function Nn(e){const t={},n={};let r;for(r in e.properties)if(vf.call(e.properties,r)){const a=e.properties[r],i=new Ci(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Xn(r)]=r,n[Xn(i.attribute)]=r}return new rr(t,n,e.space)}const Ou=Nn({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Lu=Nn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Du(e,t){return t in e?e[t]:t}function ku(e,t){return Du(e,t.toLowerCase())}const Pu=Nn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ku,properties:{xmlns:null,xmlnsXLink:null}}),Mu=Nn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:qe,ariaAutoComplete:null,ariaBusy:qe,ariaChecked:qe,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:qe,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:qe,ariaFlowTo:Me,ariaGrabbed:qe,ariaHasPopup:null,ariaHidden:qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:$,ariaLive:null,ariaModal:qe,ariaMultiLine:qe,ariaMultiSelectable:qe,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:qe,ariaReadOnly:qe,ariaRelevant:null,ariaRequired:qe,ariaRoleDescription:Me,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:qe,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null}}),Nf=Nn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ku,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xn,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Me,autoFocus:Ee,autoPlay:Ee,blocking:Me,capture:null,charSet:null,checked:Ee,cite:null,className:Me,cols:$,colSpan:null,content:null,contentEditable:qe,controls:Ee,controlsList:Me,coords:$|xn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:Ru,draggable:qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Me,height:$,hidden:Ee,high:$,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Me,itemRef:Me,itemScope:Ee,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:$,pattern:null,ping:Me,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Me,required:Ee,reversed:Ee,rows:$,rowSpan:$,sandbox:Me,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:qe,width:$,wrap:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:qe,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:$,security:null,unselectable:null}}),If=Nn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Du,properties:{about:ct,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xn,g2:xn,glyphName:xn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ct,rev:ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ct,requiredFeatures:ct,requiredFonts:ct,requiredFormats:ct,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ct,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),wf=/^data[-\w.:]+$/i,_s=/-[a-z]/g,Rf=/[A-Z]/g;function $r(e,t){const n=Xn(t);let r=t,a=xt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wf.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(_s,Lf);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!_s.test(i)){let s=i.replace(Rf,Of);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Ci}return new a(r,t)}function Of(e){return"-"+e.toLowerCase()}function Lf(e){return e.charAt(1).toUpperCase()}const Df={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ar=wu([Lu,Ou,Pu,Mu,Nf],"html"),Gt=wu([Lu,Ou,Pu,Mu,If],"svg");function vs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Bu(e){return e.join(" ").trim()}var hn={},ma,Ns;function kf(){if(Ns)return ma;Ns=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
74
|
+
`,l="/",d="*",f="",h="comment",m="declaration";ma=function(A,O){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];O=O||{};var v=1,L=1;function M(F){var H=F.match(t);H&&(v+=H.length);var Z=F.lastIndexOf(c);L=~Z?F.length-Z:L+F.length}function V(){var F={line:v,column:L};return function(H){return H.position=new R(F),ge(),H}}function R(F){this.start=F,this.end={line:v,column:L},this.source=O.source}R.prototype.content=A;function D(F){var H=new Error(O.source+":"+v+":"+L+": "+F);if(H.reason=F,H.filename=O.source,H.line=v,H.column=L,H.source=A,!O.silent)throw H}function ae(F){var H=F.exec(A);if(H){var Z=H[0];return M(Z),A=A.slice(Z.length),H}}function ge(){ae(n)}function ue(F){var H;for(F=F||[];H=W();)H!==!1&&F.push(H);return F}function W(){var F=V();if(!(l!=A.charAt(0)||d!=A.charAt(1))){for(var H=2;f!=A.charAt(H)&&(d!=A.charAt(H)||l!=A.charAt(H+1));)++H;if(H+=2,f===A.charAt(H-1))return D("End of comment missing");var Z=A.slice(2,H-2);return L+=2,M(Z),A=A.slice(H),L+=2,F({type:h,comment:Z})}}function xe(){var F=V(),H=ae(r);if(H){if(W(),!ae(a))return D("property missing ':'");var Z=ae(i),he=F({type:m,property:_(H[0].replace(e,f)),value:Z?_(Z[0].replace(e,f)):f});return ae(s),he}}function te(){var F=[];ue(F);for(var H;H=xe();)H!==!1&&(F.push(H),ue(F));return F}return ge(),te()};function _(A){return A?A.replace(u,f):f}return ma}var Is;function Pf(){if(Is)return hn;Is=1;var e=hn&&hn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hn,"__esModule",{value:!0});var t=e(kf());function n(r,a){var i=null;if(!r||typeof r!="string")return i;var s=(0,t.default)(r),u=typeof a=="function";return s.forEach(function(c){if(c.type==="declaration"){var l=c.property,d=c.value;u?a(l,d,c):d&&(i=i||{},i[l]=d)}}),i}return hn.default=n,hn}var Mf=Pf();const ws=Ur(Mf),Bf=ws.default||ws,Yr=Fu("end"),Pt=Fu("start");function Fu(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ff(e){const t=Pt(e),n=Yr(e);if(t&&n)return{start:t,end:n}}function jn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rs(e.position):"start"in e||"end"in e?Rs(e):"line"in e||"column"in e?Ja(e):""}function Ja(e){return Os(e&&e.line)+":"+Os(e&&e.column)}function Rs(e){return Ja(e&&e.start)+"-"+Ja(e&&e.end)}function Os(e){return e&&typeof e=="number"?e:1}class et extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const u=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=u?u.line:void 0,this.name=jn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}et.prototype.file="";et.prototype.name="";et.prototype.reason="";et.prototype.message="";et.prototype.stack="";et.prototype.column=void 0;et.prototype.line=void 0;et.prototype.ancestors=void 0;et.prototype.cause=void 0;et.prototype.fatal=void 0;et.prototype.place=void 0;et.prototype.ruleId=void 0;et.prototype.source=void 0;const Si={}.hasOwnProperty,Hf=new Map,Uf=/[A-Z]/g,jf=/-([a-z])/g,Vf=new Set(["table","tbody","thead","tfoot","tr"]),zf=new Set(["td","th"]),Hu="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $f(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Jf(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Kf(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Gt:ar,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Uu(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function Uu(e,t,n){if(t.type==="element")return Yf(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Gf(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Wf(e,t,n);if(t.type==="mdxjsEsm")return qf(e,t);if(t.type==="root")return Xf(e,t,n);if(t.type==="text")return Qf(e,t)}function Yf(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Gt,e.schema=a),e.ancestors.push(t);const i=Vu(e,t.tagName,!1),s=Zf(e,t);let u=_i(e,t);return Vf.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!Af(c):!0})),ju(e,s,i,t),Ai(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Gf(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return S(r.type==="ExpressionStatement"),e.evaluater.evaluateExpression(r.expression)}Qn(e,t.position)}function qf(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qn(e,t.position)}function Wf(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Gt,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:Vu(e,t.name,!0),s=eh(e,t),u=_i(e,t);return ju(e,s,i,t),Ai(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Xf(e,t,n){const r={};return Ai(r,_i(e,t)),e.create(t,e.Fragment,r,n)}function Qf(e,t){return t.value}function ju(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ai(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kf(e,t,n){return r;function r(a,i,s,u){const l=Array.isArray(s.children)?n:t;return u?l(i,s,u):l(i,s)}}function Jf(e,t){return n;function n(r,a,i,s){const u=Array.isArray(i.children),c=Pt(r);return t(a,i,s,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Zf(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Si.call(t.properties,a)){const i=th(e,a,t.properties[a]);if(i){const[s,u]=i;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&zf.has(t.tagName)?r=u:n[s]=u}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function eh(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];S(i.type==="ExpressionStatement");const s=i.expression;S(s.type==="ObjectExpression");const u=s.properties[0];S(u.type==="SpreadElement"),Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Qn(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];S(u.type==="ExpressionStatement"),i=e.evaluater.evaluateExpression(u.expression)}else Qn(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function _i(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Hf;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=a.get(c)||0;s=c+"-"+l,a.set(c,l+1)}}const u=Uu(e,i,s);u!==void 0&&n.push(u)}return n}function th(e,t,n){const r=$r(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Iu(n):Bu(n)),r.property==="style"){let a=typeof n=="object"?n:nh(e,String(n));return e.stylePropertyNameCase==="css"&&(a=rh(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?Df[r.property]||r.property:r.attribute,n]}}function nh(e,t){const n={};try{Bf(t,r)}catch(a){if(!e.ignoreInvalidStyle){const i=a,s=new et("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Hu+"#cannot-parse-style-attribute",s}}return n;function r(a,i){let s=a;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(jf,ih)),n[s]=i}}function Vu(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const u=Cs(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(i&&u.type==="Literal"),optional:!1}:u}S(s,"always a result"),r=s}else r=Cs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Si.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Qn(e)}function Qn(e,t){const n=new et("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Hu+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rh(e){const t={};let n;for(n in e)Si.call(e,n)&&(t[ah(n)]=e[n]);return t}function ah(e){let t=e.replace(Uf,sh);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ih(e,t){return t.toUpperCase()}function sh(e){return"-"+e.toLowerCase()}const pa={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},oh={};function uh(e,t){const n=oh,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zu(e,r,a)}function zu(e,t,n){if(ch(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ls(e.children,t,n)}return Array.isArray(e)?Ls(e,t,n):""}function Ls(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=zu(e[a],t,n);return r.join("")}function ch(e){return!!(e&&typeof e=="object")}const Ds=document.createElement("i");function vi(e){const t="&"+e+";";Ds.innerHTML=t;const n=Ds.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const b={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,ht:9,lf:10,vt:11,cr:13,space:32,exclamationMark:33,quotationMark:34,numberSign:35,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseX:88,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseX:120,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},J={atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},p={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},wt={ht:" ",lf:`
|
|
75
|
+
`,cr:"\r",space:" ",replacementCharacter:"�"};function kt(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<J.v8MaxSafeChunkSize)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+J.v8MaxSafeChunkSize),s.unshift(t,0),e.splice(...s),i+=J.v8MaxSafeChunkSize,t+=J.v8MaxSafeChunkSize}function mt(e,t){return e.length>0?(kt(e,e.length,0,t),e):t}const ks={}.hasOwnProperty;function lh(e){const t={};let n=-1;for(;++n<e.length;)dh(t,e[n]);return t}function dh(e,t){let n;for(n in t){const a=(ks.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){ks.call(a,s)||(a[s]=[]);const u=i[s];fh(a[s],Array.isArray(u)?u:u?[u]:[])}}}function fh(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kt(e,0,0,r)}function $u(e,t){const n=Number.parseInt(e,t);return n<b.ht||n===b.vt||n>b.cr&&n<b.space||n>b.tilde&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?wt.replacementCharacter:String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g,wt.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Lt=qt(/[A-Za-z]/),lt=qt(/[\dA-Za-z]/),hh=qt(/[#-'*+\--9=?A-Z^-~]/);function Za(e){return e!==null&&(e<b.space||e===b.del)}const ei=qt(/\d/),mh=qt(/[\dA-Fa-f]/),ph=qt(/[!-/:-@[-`{-~]/);function ne(e){return e!==null&&e<b.horizontalTab}function ut(e){return e!==null&&(e<b.nul||e===b.space)}function Re(e){return e===b.horizontalTab||e===b.virtualSpace||e===b.space}const bh=qt(new RegExp("\\p{P}|\\p{S}","u")),gh=qt(/\s/);function qt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function In(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===b.percentSign&<(e.charCodeAt(n+1))&<(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const u=e.charCodeAt(n+1);i<56320&&u>56319&&u<57344?(s=String.fromCharCode(i,u),a=1):s=wt.replacementCharacter}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Be(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(c){return Re(c)?(e.enter(n),u(c)):t(c)}function u(c){return Re(c)&&i++<a?(e.consume(c),u):(e.exit(n),t(c))}}const Eh={tokenize:Th};function Th(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(S(u===b.eof||ne(u),"expected eol or eof"),u===b.eof){e.consume(u);return}return e.enter(p.lineEnding),e.consume(u),e.exit(p.lineEnding),Be(e,t,p.linePrefix)}function a(u){return S(u!==b.eof&&!ne(u),"expected anything other than a line ending or EOF"),e.enter(p.paragraph),i(u)}function i(u){const c=e.enter(p.chunkText,{contentType:J.contentTypeText,previous:n});return n&&(n.next=c),n=c,s(u)}function s(u){if(u===b.eof){e.exit(p.chunkText),e.exit(p.paragraph),e.consume(u);return}return ne(u)?(e.consume(u),e.exit(p.chunkText),i):(e.consume(u),s)}}const xh={tokenize:yh},Ps={tokenize:Ch};function yh(e){const t=this,n=[];let r=0,a,i,s;return u;function u(M){if(r<n.length){const V=n[r];return t.containerState=V[1],S(V[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(V[0].continuation,c,l)(M)}return l(M)}function c(M){if(S(t.containerState,"expected `containerState` to be defined after continuation"),r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&L();const V=t.events.length;let R=V,D;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type===p.chunkFlow){D=t.events[R][1].end;break}S(D,"could not find previous flow chunk"),v(r);let ae=V;for(;ae<t.events.length;)t.events[ae][1].end=Object.assign({},D),ae++;return kt(t.events,R+1,0,t.events.slice(V)),t.events.length=ae,l(M)}return u(M)}function l(M){if(r===n.length){if(!a)return h(M);if(a.currentConstruct&&a.currentConstruct.concrete)return _(M);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ps,d,f)(M)}function d(M){return a&&L(),v(r),h(M)}function f(M){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,_(M)}function h(M){return t.containerState={},e.attempt(Ps,m,_)(M)}function m(M){return S(t.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),S(t.containerState,"expected `containerState` to be defined on tokenizer"),r++,n.push([t.currentConstruct,t.containerState]),h(M)}function _(M){if(M===b.eof){a&&L(),v(0),e.consume(M);return}return a=a||t.parser.flow(t.now()),e.enter(p.chunkFlow,{contentType:J.contentTypeFlow,previous:i,_tokenizer:a}),A(M)}function A(M){if(M===b.eof){O(e.exit(p.chunkFlow),!0),v(0),e.consume(M);return}return ne(M)?(e.consume(M),O(e.exit(p.chunkFlow)),r=0,t.interrupt=void 0,u):(e.consume(M),A)}function O(M,V){S(a,"expected `childFlow` to be defined when continuing");const R=t.sliceStream(M);if(V&&R.push(null),M.previous=i,i&&(i.next=M),i=M,a.defineSkip(M.start),a.write(R),t.parser.lazy[M.start.line]){let D=a.events.length;for(;D--;)if(a.events[D][1].start.offset<s&&(!a.events[D][1].end||a.events[D][1].end.offset>s))return;const ae=t.events.length;let ge=ae,ue,W;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type===p.chunkFlow){if(ue){W=t.events[ge][1].end;break}ue=!0}for(S(W,"could not find previous flow chunk"),v(r),D=ae;D<t.events.length;)t.events[D][1].end=Object.assign({},W),D++;kt(t.events,ge+1,0,t.events.slice(ae)),t.events.length=D}}function v(M){let V=n.length;for(;V-- >M;){const R=n[V];t.containerState=R[1],S(R[0].exit,"expected `exit` to be defined on container construct"),R[0].exit.call(t,e)}n.length=M}function L(){S(t.containerState,"expected `containerState` to be defined when closing flow"),S(a,"expected `childFlow` to be defined when closing it"),a.write([b.eof]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Ch(e,t,n){return S(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,e.attempt(this.parser.constructs.document,t,n),p.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)}function Ms(e){if(e===b.eof||ut(e)||gh(e))return J.characterGroupWhitespace;if(bh(e))return J.characterGroupPunctuation}function Ni(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const ti={name:"attention",tokenize:Ah,resolveAll:Sh};function Sh(e,t){let n=-1,r,a,i,s,u,c,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[n][1].start);Bs(f,-c),Bs(h,c),s={type:c>1?p.strongSequence:p.emphasisSequence,start:f,end:Object.assign({},e[r][1].end)},u={type:c>1?p.strongSequence:p.emphasisSequence,start:Object.assign({},e[n][1].start),end:h},i={type:c>1?p.strongText:p.emphasisText,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a={type:c>1?p.strong:p.emphasis,start:Object.assign({},s.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},u.end),l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=mt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=mt(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),S(t.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),l=mt(l,Ni(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=mt(l,[["exit",i,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=mt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,kt(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ah(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Ms(r);let i;return s;function s(c){return S(c===b.asterisk||c===b.underscore,"expected asterisk or underscore"),i=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===i)return e.consume(c),u;const l=e.exit("attentionSequence"),d=Ms(c);S(n,"expected `attentionMarkers` to be populated");const f=!d||d===J.characterGroupPunctuation&&a||n.includes(c),h=!a||a===J.characterGroupPunctuation&&d||n.includes(r);return l._open=!!(i===b.asterisk?f:f&&(a||!h)),l._close=!!(i===b.asterisk?h:h&&(d||!f)),t(c)}}function Bs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _h={name:"autolink",tokenize:vh};function vh(e,t,n){let r=0;return a;function a(m){return S(m===b.lessThan,"expected `<`"),e.enter(p.autolink),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.enter(p.autolinkProtocol),i}function i(m){return Lt(m)?(e.consume(m),s):l(m)}function s(m){return m===b.plusSign||m===b.dash||m===b.dot||lt(m)?(r=1,u(m)):l(m)}function u(m){return m===b.colon?(e.consume(m),r=0,c):(m===b.plusSign||m===b.dash||m===b.dot||lt(m))&&r++<J.autolinkSchemeSizeMax?(e.consume(m),u):(r=0,l(m))}function c(m){return m===b.greaterThan?(e.exit(p.autolinkProtocol),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),t):m===b.eof||m===b.space||m===b.lessThan||Za(m)?n(m):(e.consume(m),c)}function l(m){return m===b.atSign?(e.consume(m),d):hh(m)?(e.consume(m),l):n(m)}function d(m){return lt(m)?f(m):n(m)}function f(m){return m===b.dot?(e.consume(m),r=0,d):m===b.greaterThan?(e.exit(p.autolinkProtocol).type=p.autolinkEmail,e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),t):h(m)}function h(m){if((m===b.dash||lt(m))&&r++<J.autolinkDomainSizeMax){const _=m===b.dash?h:f;return e.consume(m),_}return n(m)}}const Gr={tokenize:Nh,partial:!0};function Nh(e,t,n){return r;function r(i){return Re(i)?Be(e,a,p.linePrefix)(i):a(i)}function a(i){return i===b.eof||ne(i)?t(i):n(i)}}const Yu={name:"blockQuote",tokenize:Ih,continuation:{tokenize:wh},exit:Rh};function Ih(e,t,n){const r=this;return a;function a(s){if(s===b.greaterThan){const u=r.containerState;return S(u,"expected `containerState` to be defined in container"),u.open||(e.enter(p.blockQuote,{_container:!0}),u.open=!0),e.enter(p.blockQuotePrefix),e.enter(p.blockQuoteMarker),e.consume(s),e.exit(p.blockQuoteMarker),i}return n(s)}function i(s){return Re(s)?(e.enter(p.blockQuotePrefixWhitespace),e.consume(s),e.exit(p.blockQuotePrefixWhitespace),e.exit(p.blockQuotePrefix),t):(e.exit(p.blockQuotePrefix),t(s))}}function wh(e,t,n){const r=this;return a;function a(s){return Re(s)?(S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,i,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(s)):i(s)}function i(s){return e.attempt(Yu,t,n)(s)}}function Rh(e){e.exit(p.blockQuote)}const Gu={name:"characterEscape",tokenize:Oh};function Oh(e,t,n){return r;function r(i){return S(i===b.backslash,"expected `\\`"),e.enter(p.characterEscape),e.enter(p.escapeMarker),e.consume(i),e.exit(p.escapeMarker),a}function a(i){return ph(i)?(e.enter(p.characterEscapeValue),e.consume(i),e.exit(p.characterEscapeValue),e.exit(p.characterEscape),t):n(i)}}const qu={name:"characterReference",tokenize:Lh};function Lh(e,t,n){const r=this;let a=0,i,s;return u;function u(f){return S(f===b.ampersand,"expected `&`"),e.enter(p.characterReference),e.enter(p.characterReferenceMarker),e.consume(f),e.exit(p.characterReferenceMarker),c}function c(f){return f===b.numberSign?(e.enter(p.characterReferenceMarkerNumeric),e.consume(f),e.exit(p.characterReferenceMarkerNumeric),l):(e.enter(p.characterReferenceValue),i=J.characterReferenceNamedSizeMax,s=lt,d(f))}function l(f){return f===b.uppercaseX||f===b.lowercaseX?(e.enter(p.characterReferenceMarkerHexadecimal),e.consume(f),e.exit(p.characterReferenceMarkerHexadecimal),e.enter(p.characterReferenceValue),i=J.characterReferenceHexadecimalSizeMax,s=mh,d):(e.enter(p.characterReferenceValue),i=J.characterReferenceDecimalSizeMax,s=ei,d(f))}function d(f){if(f===b.semicolon&&a){const h=e.exit(p.characterReferenceValue);return s===lt&&!vi(r.sliceSerialize(h))?n(f):(e.enter(p.characterReferenceMarker),e.consume(f),e.exit(p.characterReferenceMarker),e.exit(p.characterReference),t)}return s(f)&&a++<i?(e.consume(f),d):n(f)}}const Fs={tokenize:kh,partial:!0},Hs={name:"codeFenced",tokenize:Dh,concrete:!0};function Dh(e,t,n){const r=this,a={tokenize:R,partial:!0};let i=0,s=0,u;return c;function c(D){return l(D)}function l(D){S(D===b.graveAccent||D===b.tilde,"expected `` ` `` or `~`");const ae=r.events[r.events.length-1];return i=ae&&ae[1].type===p.linePrefix?ae[2].sliceSerialize(ae[1],!0).length:0,u=D,e.enter(p.codeFenced),e.enter(p.codeFencedFence),e.enter(p.codeFencedFenceSequence),d(D)}function d(D){return D===u?(s++,e.consume(D),d):s<J.codeFencedSequenceSizeMin?n(D):(e.exit(p.codeFencedFenceSequence),Re(D)?Be(e,f,p.whitespace)(D):f(D))}function f(D){return D===b.eof||ne(D)?(e.exit(p.codeFencedFence),r.interrupt?t(D):e.check(Fs,A,V)(D)):(e.enter(p.codeFencedFenceInfo),e.enter(p.chunkString,{contentType:J.contentTypeString}),h(D))}function h(D){return D===b.eof||ne(D)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),f(D)):Re(D)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),Be(e,m,p.whitespace)(D)):D===b.graveAccent&&D===u?n(D):(e.consume(D),h)}function m(D){return D===b.eof||ne(D)?f(D):(e.enter(p.codeFencedFenceMeta),e.enter(p.chunkString,{contentType:J.contentTypeString}),_(D))}function _(D){return D===b.eof||ne(D)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceMeta),f(D)):D===b.graveAccent&&D===u?n(D):(e.consume(D),_)}function A(D){return S(ne(D),"expected eol"),e.attempt(a,V,O)(D)}function O(D){return S(ne(D),"expected eol"),e.enter(p.lineEnding),e.consume(D),e.exit(p.lineEnding),v}function v(D){return i>0&&Re(D)?Be(e,L,p.linePrefix,i+1)(D):L(D)}function L(D){return D===b.eof||ne(D)?e.check(Fs,A,V)(D):(e.enter(p.codeFlowValue),M(D))}function M(D){return D===b.eof||ne(D)?(e.exit(p.codeFlowValue),L(D)):(e.consume(D),M)}function V(D){return e.exit(p.codeFenced),t(D)}function R(D,ae,ge){let ue=0;return W;function W(Z){return S(ne(Z),"expected eol"),D.enter(p.lineEnding),D.consume(Z),D.exit(p.lineEnding),xe}function xe(Z){return S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),D.enter(p.codeFencedFence),Re(Z)?Be(D,te,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(Z):te(Z)}function te(Z){return Z===u?(D.enter(p.codeFencedFenceSequence),F(Z)):ge(Z)}function F(Z){return Z===u?(ue++,D.consume(Z),F):ue>=s?(D.exit(p.codeFencedFenceSequence),Re(Z)?Be(D,H,p.whitespace)(Z):H(Z)):ge(Z)}function H(Z){return Z===b.eof||ne(Z)?(D.exit(p.codeFencedFence),ae(Z)):ge(Z)}}}function kh(e,t,n){const r=this;return a;function a(s){return s===b.eof?n(s):(S(ne(s),"expected eol"),e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ba={name:"codeIndented",tokenize:Mh},Ph={tokenize:Bh,partial:!0};function Mh(e,t,n){const r=this;return a;function a(l){return S(Re(l)),e.enter(p.codeIndented),Be(e,i,p.linePrefix,J.tabSize+1)(l)}function i(l){const d=r.events[r.events.length-1];return d&&d[1].type===p.linePrefix&&d[2].sliceSerialize(d[1],!0).length>=J.tabSize?s(l):n(l)}function s(l){return l===b.eof?c(l):ne(l)?e.attempt(Ph,s,c)(l):(e.enter(p.codeFlowValue),u(l))}function u(l){return l===b.eof||ne(l)?(e.exit(p.codeFlowValue),s(l)):(e.consume(l),u)}function c(l){return e.exit(p.codeIndented),t(l)}}function Bh(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):ne(s)?(e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),a):Be(e,i,p.linePrefix,J.tabSize+1)(s)}function i(s){const u=r.events[r.events.length-1];return u&&u[1].type===p.linePrefix&&u[2].sliceSerialize(u[1],!0).length>=J.tabSize?t(s):ne(s)?a(s):n(s)}}const Fh={name:"codeText",tokenize:Uh,resolve:Hh,previous:Wu};function Hh(e){let t=e.length-4,n=3,r,a;if((e[n][1].type===p.lineEnding||e[n][1].type==="space")&&(e[t][1].type===p.lineEnding||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type===p.codeTextData){e[n][1].type=p.codeTextPadding,e[t][1].type=p.codeTextPadding,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!==p.lineEnding&&(a=r):(r===t||e[r][1].type===p.lineEnding)&&(e[a][1].type=p.codeTextData,r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function Wu(e){return e!==b.graveAccent||this.events[this.events.length-1][1].type===p.characterEscape}function Uh(e,t,n){const r=this;let a=0,i,s;return u;function u(h){return S(h===b.graveAccent,"expected `` ` ``"),S(Wu.call(r,r.previous),"expected correct previous"),e.enter(p.codeText),e.enter(p.codeTextSequence),c(h)}function c(h){return h===b.graveAccent?(e.consume(h),a++,c):(e.exit(p.codeTextSequence),l(h))}function l(h){return h===b.eof?n(h):h===b.space?(e.enter("space"),e.consume(h),e.exit("space"),l):h===b.graveAccent?(s=e.enter(p.codeTextSequence),i=0,f(h)):ne(h)?(e.enter(p.lineEnding),e.consume(h),e.exit(p.lineEnding),l):(e.enter(p.codeTextData),d(h))}function d(h){return h===b.eof||h===b.space||h===b.graveAccent||ne(h)?(e.exit(p.codeTextData),l(h)):(e.consume(h),d)}function f(h){return h===b.graveAccent?(e.consume(h),i++,f):i===a?(e.exit(p.codeTextSequence),e.exit(p.codeText),t(h)):(s.type=p.codeTextData,d(h))}}function Xu(e){const t={};let n=-1,r,a,i,s,u,c,l;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type===p.chunkFlow&&e[n-1][1].type===p.listItemPrefix&&(S(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type===p.lineEndingBlank&&(i+=2),i<c.length&&c[i][1].type===p.content))for(;++i<c.length&&c[i][1].type!==p.content;)c[i][1].type===p.chunkText&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,jh(e,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--&&(s=e[i],s[1].type===p.lineEnding||s[1].type===p.lineEndingBlank);)s[0]==="enter"&&(a&&(e[a][1].type=p.lineEndingBlank),s[1].type=p.lineEnding,a=i);a&&(r[1].end=Object.assign({},e[a][1].start),u=e.slice(a,n),u.unshift(r),kt(e,a,n-a+1,u))}}return!l}function jh(e,t){const n=e[t][1],r=e[t][2];let a=t-1;const i=[];S(n.contentType,"expected `contentType` on subtokens");const s=n._tokenizer||r.parser[n.contentType](n.start),u=s.events,c=[],l={};let d,f,h=-1,m=n,_=0,A=0;const O=[A];for(;m;){for(;e[++a][1]!==m;);S(!f||m.previous===f,"expected previous to match"),S(!f||f.next===m,"expected next to match"),i.push(a),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(b.eof),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++h<u.length;)u[h][0]==="exit"&&u[h-1][0]==="enter"&&u[h][1].type===u[h-1][1].type&&u[h][1].start.line!==u[h][1].end.line&&(S(m,"expected a current token"),A=h+1,O.push(A),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0,S(!m.next,"expected no next token")):O.pop(),h=O.length;h--;){const v=u.slice(O[h],O[h+1]),L=i.pop();S(L!==void 0,"expected a start position when splicing"),c.unshift([L,L+v.length-1]),kt(e,L,2,v)}for(h=-1;++h<c.length;)l[_+c[h][0]]=_+c[h][1],_+=c[h][1]-c[h][0]-1;return l}const Vh={tokenize:Yh,resolve:$h},zh={tokenize:Gh,partial:!0};function $h(e){return Xu(e),e}function Yh(e,t){let n;return r;function r(u){return S(u!==b.eof&&!ne(u),"expected no eof or eol"),e.enter(p.content),n=e.enter(p.chunkContent,{contentType:J.contentTypeContent}),a(u)}function a(u){return u===b.eof?i(u):ne(u)?e.check(zh,s,i)(u):(e.consume(u),a)}function i(u){return e.exit(p.chunkContent),e.exit(p.content),t(u)}function s(u){return S(ne(u),"expected eol"),e.consume(u),e.exit(p.chunkContent),S(n,"expected previous token"),n.next=e.enter(p.chunkContent,{contentType:J.contentTypeContent,previous:n}),n=n.next,a}}function Gh(e,t,n){const r=this;return a;function a(s){return S(ne(s),"expected a line ending"),e.exit(p.chunkContent),e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),Be(e,i,p.linePrefix)}function i(s){if(s===b.eof||ne(s))return n(s);S(r.parser.constructs.disable.null,"expected `disable.null` to be populated");const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type===p.linePrefix&&u[2].sliceSerialize(u[1],!0).length>=J.tabSize?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Qu(e,t,n,r,a,i,s,u,c){const l=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(v){return v===b.lessThan?(e.enter(r),e.enter(a),e.enter(i),e.consume(v),e.exit(i),h):v===b.eof||v===b.space||v===b.rightParenthesis||Za(v)?n(v):(e.enter(r),e.enter(s),e.enter(u),e.enter(p.chunkString,{contentType:J.contentTypeString}),A(v))}function h(v){return v===b.greaterThan?(e.enter(i),e.consume(v),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(u),e.enter(p.chunkString,{contentType:J.contentTypeString}),m(v))}function m(v){return v===b.greaterThan?(e.exit(p.chunkString),e.exit(u),h(v)):v===b.eof||v===b.lessThan||ne(v)?n(v):(e.consume(v),v===b.backslash?_:m)}function _(v){return v===b.lessThan||v===b.greaterThan||v===b.backslash?(e.consume(v),m):m(v)}function A(v){return!d&&(v===b.eof||v===b.rightParenthesis||ut(v))?(e.exit(p.chunkString),e.exit(u),e.exit(s),e.exit(r),t(v)):d<l&&v===b.leftParenthesis?(e.consume(v),d++,A):v===b.rightParenthesis?(e.consume(v),d--,A):v===b.eof||v===b.space||v===b.leftParenthesis||Za(v)?n(v):(e.consume(v),v===b.backslash?O:A)}function O(v){return v===b.leftParenthesis||v===b.rightParenthesis||v===b.backslash?(e.consume(v),A):A(v)}}function Ku(e,t,n,r,a,i){const s=this;let u=0,c;return l;function l(m){return S(m===b.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(a),e.consume(m),e.exit(a),e.enter(i),d}function d(m){return u>J.linkReferenceSizeMax||m===b.eof||m===b.leftSquareBracket||m===b.rightSquareBracket&&!c||m===b.caret&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===b.rightSquareBracket?(e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(r),t):ne(m)?(e.enter(p.lineEnding),e.consume(m),e.exit(p.lineEnding),d):(e.enter(p.chunkString,{contentType:J.contentTypeString}),f(m))}function f(m){return m===b.eof||m===b.leftSquareBracket||m===b.rightSquareBracket||ne(m)||u++>J.linkReferenceSizeMax?(e.exit(p.chunkString),d(m)):(e.consume(m),c||(c=!Re(m)),m===b.backslash?h:f)}function h(m){return m===b.leftSquareBracket||m===b.backslash||m===b.rightSquareBracket?(e.consume(m),u++,f):f(m)}}function Ju(e,t,n,r,a,i){let s;return u;function u(h){return h===b.quotationMark||h===b.apostrophe||h===b.leftParenthesis?(e.enter(r),e.enter(a),e.consume(h),e.exit(a),s=h===b.leftParenthesis?b.rightParenthesis:h,c):n(h)}function c(h){return h===s?(e.enter(a),e.consume(h),e.exit(a),e.exit(r),t):(e.enter(i),l(h))}function l(h){return h===s?(e.exit(i),c(s)):h===b.eof?n(h):ne(h)?(e.enter(p.lineEnding),e.consume(h),e.exit(p.lineEnding),Be(e,l,p.linePrefix)):(e.enter(p.chunkString,{contentType:J.contentTypeString}),d(h))}function d(h){return h===s||h===b.eof||ne(h)?(e.exit(p.chunkString),l(h)):(e.consume(h),h===b.backslash?f:d)}function f(h){return h===s||h===b.backslash?(e.consume(h),d):d(h)}}function Vn(e,t){let n;return r;function r(a){return ne(a)?(e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),n=!0,r):Re(a)?Be(e,r,n?p.linePrefix:p.lineSuffix)(a):t(a)}}const qh={name:"definition",tokenize:Xh},Wh={tokenize:Qh,partial:!0};function Xh(e,t,n){const r=this;let a;return i;function i(m){return e.enter(p.definition),s(m)}function s(m){return S(m===b.leftSquareBracket,"expected `[`"),Ku.call(r,e,u,n,p.definitionLabel,p.definitionLabelMarker,p.definitionLabelString)(m)}function u(m){return a=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===b.colon?(e.enter(p.definitionMarker),e.consume(m),e.exit(p.definitionMarker),c):n(m)}function c(m){return ut(m)?Vn(e,l)(m):l(m)}function l(m){return Qu(e,d,n,p.definitionDestination,p.definitionDestinationLiteral,p.definitionDestinationLiteralMarker,p.definitionDestinationRaw,p.definitionDestinationString)(m)}function d(m){return e.attempt(Wh,f,f)(m)}function f(m){return Re(m)?Be(e,h,p.whitespace)(m):h(m)}function h(m){return m===b.eof||ne(m)?(e.exit(p.definition),r.parser.defined.push(a),t(m)):n(m)}}function Qh(e,t,n){return r;function r(u){return ut(u)?Vn(e,a)(u):n(u)}function a(u){return Ju(e,i,n,p.definitionTitle,p.definitionTitleMarker,p.definitionTitleString)(u)}function i(u){return Re(u)?Be(e,s,p.whitespace)(u):s(u)}function s(u){return u===b.eof||ne(u)?t(u):n(u)}}const Kh={name:"hardBreakEscape",tokenize:Jh};function Jh(e,t,n){return r;function r(i){return S(i===b.backslash,"expected `\\`"),e.enter(p.hardBreakEscape),e.consume(i),a}function a(i){return ne(i)?(e.exit(p.hardBreakEscape),t(i)):n(i)}}const Zh={name:"headingAtx",tokenize:t0,resolve:e0};function e0(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type===p.whitespace&&(r+=2),n-2>r&&e[n][1].type===p.whitespace&&(n-=2),e[n][1].type===p.atxHeadingSequence&&(r===n-1||n-4>r&&e[n-2][1].type===p.whitespace)&&(n-=r+1===n?2:4),n>r&&(a={type:p.atxHeadingText,start:e[r][1].start,end:e[n][1].end},i={type:p.chunkText,start:e[r][1].start,end:e[n][1].end,contentType:J.contentTypeText},kt(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function t0(e,t,n){let r=0;return a;function a(d){return e.enter(p.atxHeading),i(d)}function i(d){return S(d===b.numberSign,"expected `#`"),e.enter(p.atxHeadingSequence),s(d)}function s(d){return d===b.numberSign&&r++<J.atxHeadingOpeningFenceSizeMax?(e.consume(d),s):d===b.eof||ut(d)?(e.exit(p.atxHeadingSequence),u(d)):n(d)}function u(d){return d===b.numberSign?(e.enter(p.atxHeadingSequence),c(d)):d===b.eof||ne(d)?(e.exit(p.atxHeading),t(d)):Re(d)?Be(e,u,p.whitespace)(d):(e.enter(p.atxHeadingText),l(d))}function c(d){return d===b.numberSign?(e.consume(d),c):(e.exit(p.atxHeadingSequence),u(d))}function l(d){return d===b.eof||d===b.numberSign||ut(d)?(e.exit(p.atxHeadingText),u(d)):(e.consume(d),l)}}const n0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Us=["pre","script","style","textarea"],r0={name:"htmlFlow",tokenize:o0,resolveTo:s0,concrete:!0},a0={tokenize:c0,partial:!0},i0={tokenize:u0,partial:!0};function s0(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type===p.htmlFlow););return t>1&&e[t-2][1].type===p.linePrefix&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function o0(e,t,n){const r=this;let a,i,s,u,c;return l;function l(x){return d(x)}function d(x){return S(x===b.lessThan,"expected `<`"),e.enter(p.htmlFlow),e.enter(p.htmlFlowData),e.consume(x),f}function f(x){return x===b.exclamationMark?(e.consume(x),h):x===b.slash?(e.consume(x),i=!0,A):x===b.questionMark?(e.consume(x),a=J.htmlInstruction,r.interrupt?t:g):Lt(x)?(e.consume(x),s=String.fromCharCode(x),O):n(x)}function h(x){return x===b.dash?(e.consume(x),a=J.htmlComment,m):x===b.leftSquareBracket?(e.consume(x),a=J.htmlCdata,u=0,_):Lt(x)?(e.consume(x),a=J.htmlDeclaration,r.interrupt?t:g):n(x)}function m(x){return x===b.dash?(e.consume(x),r.interrupt?t:g):n(x)}function _(x){const ee=J.cdataOpeningString;return x===ee.charCodeAt(u++)?(e.consume(x),u===ee.length?r.interrupt?t:te:_):n(x)}function A(x){return Lt(x)?(e.consume(x),s=String.fromCharCode(x),O):n(x)}function O(x){if(x===b.eof||x===b.slash||x===b.greaterThan||ut(x)){const ee=x===b.slash,ie=s.toLowerCase();return!ee&&!i&&Us.includes(ie)?(a=J.htmlRaw,r.interrupt?t(x):te(x)):n0.includes(s.toLowerCase())?(a=J.htmlBasic,ee?(e.consume(x),v):r.interrupt?t(x):te(x)):(a=J.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):i?L(x):M(x))}return x===b.dash||lt(x)?(e.consume(x),s+=String.fromCharCode(x),O):n(x)}function v(x){return x===b.greaterThan?(e.consume(x),r.interrupt?t:te):n(x)}function L(x){return Re(x)?(e.consume(x),L):W(x)}function M(x){return x===b.slash?(e.consume(x),W):x===b.colon||x===b.underscore||Lt(x)?(e.consume(x),V):Re(x)?(e.consume(x),M):W(x)}function V(x){return x===b.dash||x===b.dot||x===b.colon||x===b.underscore||lt(x)?(e.consume(x),V):R(x)}function R(x){return x===b.equalsTo?(e.consume(x),D):Re(x)?(e.consume(x),R):M(x)}function D(x){return x===b.eof||x===b.lessThan||x===b.equalsTo||x===b.greaterThan||x===b.graveAccent?n(x):x===b.quotationMark||x===b.apostrophe?(e.consume(x),c=x,ae):Re(x)?(e.consume(x),D):ge(x)}function ae(x){return x===c?(e.consume(x),c=null,ue):x===b.eof||ne(x)?n(x):(e.consume(x),ae)}function ge(x){return x===b.eof||x===b.quotationMark||x===b.apostrophe||x===b.slash||x===b.lessThan||x===b.equalsTo||x===b.greaterThan||x===b.graveAccent||ut(x)?R(x):(e.consume(x),ge)}function ue(x){return x===b.slash||x===b.greaterThan||Re(x)?M(x):n(x)}function W(x){return x===b.greaterThan?(e.consume(x),xe):n(x)}function xe(x){return x===b.eof||ne(x)?te(x):Re(x)?(e.consume(x),xe):n(x)}function te(x){return x===b.dash&&a===J.htmlComment?(e.consume(x),he):x===b.lessThan&&a===J.htmlRaw?(e.consume(x),de):x===b.greaterThan&&a===J.htmlDeclaration?(e.consume(x),G):x===b.questionMark&&a===J.htmlInstruction?(e.consume(x),g):x===b.rightSquareBracket&&a===J.htmlCdata?(e.consume(x),Fe):ne(x)&&(a===J.htmlBasic||a===J.htmlComplete)?(e.exit(p.htmlFlowData),e.check(a0,X,F)(x)):x===b.eof||ne(x)?(e.exit(p.htmlFlowData),F(x)):(e.consume(x),te)}function F(x){return e.check(i0,H,X)(x)}function H(x){return S(ne(x)),e.enter(p.lineEnding),e.consume(x),e.exit(p.lineEnding),Z}function Z(x){return x===b.eof||ne(x)?F(x):(e.enter(p.htmlFlowData),te(x))}function he(x){return x===b.dash?(e.consume(x),g):te(x)}function de(x){return x===b.slash?(e.consume(x),s="",Ce):te(x)}function Ce(x){if(x===b.greaterThan){const ee=s.toLowerCase();return Us.includes(ee)?(e.consume(x),G):te(x)}return Lt(x)&&s.length<J.htmlRawSizeMax?(e.consume(x),s+=String.fromCharCode(x),Ce):te(x)}function Fe(x){return x===b.rightSquareBracket?(e.consume(x),g):te(x)}function g(x){return x===b.greaterThan?(e.consume(x),G):x===b.dash&&a===J.htmlComment?(e.consume(x),g):te(x)}function G(x){return x===b.eof||ne(x)?(e.exit(p.htmlFlowData),X(x)):(e.consume(x),G)}function X(x){return e.exit(p.htmlFlow),t(x)}}function u0(e,t,n){const r=this;return a;function a(s){return ne(s)?(e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function c0(e,t,n){return r;function r(a){return S(ne(a),"expected a line ending"),e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),e.attempt(Gr,t,n)}}const l0={name:"htmlText",tokenize:d0};function d0(e,t,n){const r=this;let a,i,s;return u;function u(g){return S(g===b.lessThan,"expected `<`"),e.enter(p.htmlText),e.enter(p.htmlTextData),e.consume(g),c}function c(g){return g===b.exclamationMark?(e.consume(g),l):g===b.slash?(e.consume(g),R):g===b.questionMark?(e.consume(g),M):Lt(g)?(e.consume(g),ge):n(g)}function l(g){return g===b.dash?(e.consume(g),d):g===b.leftSquareBracket?(e.consume(g),i=0,_):Lt(g)?(e.consume(g),L):n(g)}function d(g){return g===b.dash?(e.consume(g),m):n(g)}function f(g){return g===b.eof?n(g):g===b.dash?(e.consume(g),h):ne(g)?(s=f,de(g)):(e.consume(g),f)}function h(g){return g===b.dash?(e.consume(g),m):f(g)}function m(g){return g===b.greaterThan?he(g):g===b.dash?h(g):f(g)}function _(g){const G=J.cdataOpeningString;return g===G.charCodeAt(i++)?(e.consume(g),i===G.length?A:_):n(g)}function A(g){return g===b.eof?n(g):g===b.rightSquareBracket?(e.consume(g),O):ne(g)?(s=A,de(g)):(e.consume(g),A)}function O(g){return g===b.rightSquareBracket?(e.consume(g),v):A(g)}function v(g){return g===b.greaterThan?he(g):g===b.rightSquareBracket?(e.consume(g),v):A(g)}function L(g){return g===b.eof||g===b.greaterThan?he(g):ne(g)?(s=L,de(g)):(e.consume(g),L)}function M(g){return g===b.eof?n(g):g===b.questionMark?(e.consume(g),V):ne(g)?(s=M,de(g)):(e.consume(g),M)}function V(g){return g===b.greaterThan?he(g):M(g)}function R(g){return Lt(g)?(e.consume(g),D):n(g)}function D(g){return g===b.dash||lt(g)?(e.consume(g),D):ae(g)}function ae(g){return ne(g)?(s=ae,de(g)):Re(g)?(e.consume(g),ae):he(g)}function ge(g){return g===b.dash||lt(g)?(e.consume(g),ge):g===b.slash||g===b.greaterThan||ut(g)?ue(g):n(g)}function ue(g){return g===b.slash?(e.consume(g),he):g===b.colon||g===b.underscore||Lt(g)?(e.consume(g),W):ne(g)?(s=ue,de(g)):Re(g)?(e.consume(g),ue):he(g)}function W(g){return g===b.dash||g===b.dot||g===b.colon||g===b.underscore||lt(g)?(e.consume(g),W):xe(g)}function xe(g){return g===b.equalsTo?(e.consume(g),te):ne(g)?(s=xe,de(g)):Re(g)?(e.consume(g),xe):ue(g)}function te(g){return g===b.eof||g===b.lessThan||g===b.equalsTo||g===b.greaterThan||g===b.graveAccent?n(g):g===b.quotationMark||g===b.apostrophe?(e.consume(g),a=g,F):ne(g)?(s=te,de(g)):Re(g)?(e.consume(g),te):(e.consume(g),H)}function F(g){return g===a?(e.consume(g),a=void 0,Z):g===b.eof?n(g):ne(g)?(s=F,de(g)):(e.consume(g),F)}function H(g){return g===b.eof||g===b.quotationMark||g===b.apostrophe||g===b.lessThan||g===b.equalsTo||g===b.graveAccent?n(g):g===b.slash||g===b.greaterThan||ut(g)?ue(g):(e.consume(g),H)}function Z(g){return g===b.slash||g===b.greaterThan||ut(g)?ue(g):n(g)}function he(g){return g===b.greaterThan?(e.consume(g),e.exit(p.htmlTextData),e.exit(p.htmlText),t):n(g)}function de(g){return S(s,"expected return state"),S(ne(g),"expected eol"),e.exit(p.htmlTextData),e.enter(p.lineEnding),e.consume(g),e.exit(p.lineEnding),Ce}function Ce(g){return S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Re(g)?Be(e,Fe,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(g):Fe(g)}function Fe(g){return e.enter(p.htmlTextData),s(g)}}const Ii={name:"labelEnd",tokenize:g0,resolveTo:b0,resolveAll:p0},f0={tokenize:E0},h0={tokenize:T0},m0={tokenize:x0};function p0(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type===p.labelImage||n.type===p.labelLink||n.type===p.labelEnd)&&(e.splice(t+1,n.type===p.labelImage?4:2),n.type=p.data,t++)}return e}function b0(e,t){let n=e.length,r=0,a,i,s,u;for(;n--;)if(a=e[n][1],i){if(a.type===p.link||a.type===p.labelLink&&a._inactive)break;e[n][0]==="enter"&&a.type===p.labelLink&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type===p.labelImage||a.type===p.labelLink)&&!a._balanced&&(i=n,a.type!==p.labelLink)){r=2;break}}else a.type===p.labelEnd&&(s=n);S(i!==void 0,"`open` is supposed to be found"),S(s!==void 0,"`close` is supposed to be found");const c={type:e[i][1].type===p.labelLink?p.link:p.image,start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:p.label,start:Object.assign({},e[i][1].start),end:Object.assign({},e[s][1].end)},d={type:p.labelText,start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return u=[["enter",c,t],["enter",l,t]],u=mt(u,e.slice(i+1,i+r+3)),u=mt(u,[["enter",d,t]]),S(t.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),u=mt(u,Ni(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),u=mt(u,[["exit",d,t],e[s-2],e[s-1],["exit",l,t]]),u=mt(u,e.slice(s+1)),u=mt(u,[["exit",c,t]]),kt(e,i,e.length,u),e}function g0(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type===p.labelImage||r.events[a][1].type===p.labelLink)&&!r.events[a][1]._balanced){i=r.events[a][1];break}return u;function u(h){return S(h===b.rightSquareBracket,"expected `]`"),i?i._inactive?f(h):(s=r.parser.defined.includes(yn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter(p.labelEnd),e.enter(p.labelMarker),e.consume(h),e.exit(p.labelMarker),e.exit(p.labelEnd),c):n(h)}function c(h){return h===b.leftParenthesis?e.attempt(f0,d,s?d:f)(h):h===b.leftSquareBracket?e.attempt(h0,d,s?l:f)(h):s?d(h):f(h)}function l(h){return e.attempt(m0,d,f)(h)}function d(h){return t(h)}function f(h){return i._balanced=!0,n(h)}}function E0(e,t,n){return r;function r(f){return S(f===b.leftParenthesis,"expected left paren"),e.enter(p.resource),e.enter(p.resourceMarker),e.consume(f),e.exit(p.resourceMarker),a}function a(f){return ut(f)?Vn(e,i)(f):i(f)}function i(f){return f===b.rightParenthesis?d(f):Qu(e,s,u,p.resourceDestination,p.resourceDestinationLiteral,p.resourceDestinationLiteralMarker,p.resourceDestinationRaw,p.resourceDestinationString,J.linkResourceDestinationBalanceMax)(f)}function s(f){return ut(f)?Vn(e,c)(f):d(f)}function u(f){return n(f)}function c(f){return f===b.quotationMark||f===b.apostrophe||f===b.leftParenthesis?Ju(e,l,n,p.resourceTitle,p.resourceTitleMarker,p.resourceTitleString)(f):d(f)}function l(f){return ut(f)?Vn(e,d)(f):d(f)}function d(f){return f===b.rightParenthesis?(e.enter(p.resourceMarker),e.consume(f),e.exit(p.resourceMarker),e.exit(p.resource),t):n(f)}}function T0(e,t,n){const r=this;return a;function a(u){return S(u===b.leftSquareBracket,"expected left bracket"),Ku.call(r,e,i,s,p.reference,p.referenceMarker,p.referenceString)(u)}function i(u){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function x0(e,t,n){return r;function r(i){return S(i===b.leftSquareBracket,"expected left bracket"),e.enter(p.reference),e.enter(p.referenceMarker),e.consume(i),e.exit(p.referenceMarker),a}function a(i){return i===b.rightSquareBracket?(e.enter(p.referenceMarker),e.consume(i),e.exit(p.referenceMarker),e.exit(p.reference),t):n(i)}}const y0={name:"labelStartImage",tokenize:C0,resolveAll:Ii.resolveAll};function C0(e,t,n){const r=this;return a;function a(u){return S(u===b.exclamationMark,"expected `!`"),e.enter(p.labelImage),e.enter(p.labelImageMarker),e.consume(u),e.exit(p.labelImageMarker),i}function i(u){return u===b.leftSquareBracket?(e.enter(p.labelMarker),e.consume(u),e.exit(p.labelMarker),e.exit(p.labelImage),s):n(u)}function s(u){return u===b.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const S0={name:"labelStartLink",tokenize:A0,resolveAll:Ii.resolveAll};function A0(e,t,n){const r=this;return a;function a(s){return S(s===b.leftSquareBracket,"expected `[`"),e.enter(p.labelLink),e.enter(p.labelMarker),e.consume(s),e.exit(p.labelMarker),e.exit(p.labelLink),i}function i(s){return s===b.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ga={name:"lineEnding",tokenize:_0};function _0(e,t){return n;function n(r){return S(ne(r),"expected eol"),e.enter(p.lineEnding),e.consume(r),e.exit(p.lineEnding),Be(e,t,p.linePrefix)}}const _r={name:"thematicBreak",tokenize:v0};function v0(e,t,n){let r=0,a;return i;function i(l){return e.enter(p.thematicBreak),s(l)}function s(l){return S(l===b.asterisk||l===b.dash||l===b.underscore,"expected `*`, `-`, or `_`"),a=l,u(l)}function u(l){return l===a?(e.enter(p.thematicBreakSequence),c(l)):r>=J.thematicBreakMarkerCountMin&&(l===b.eof||ne(l))?(e.exit(p.thematicBreak),t(l)):n(l)}function c(l){return l===a?(e.consume(l),r++,c):(e.exit(p.thematicBreakSequence),Re(l)?Be(e,u,p.whitespace)(l):u(l))}}const st={name:"list",tokenize:w0,continuation:{tokenize:R0},exit:L0},N0={tokenize:D0,partial:!0},I0={tokenize:O0,partial:!0};function w0(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type===p.linePrefix?a[2].sliceSerialize(a[1],!0).length:0,s=0;return u;function u(m){S(r.containerState,"expected state");const _=r.containerState.type||(m===b.asterisk||m===b.plusSign||m===b.dash?p.listUnordered:p.listOrdered);if(_===p.listUnordered?!r.containerState.marker||m===r.containerState.marker:ei(m)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_===p.listUnordered)return e.enter(p.listItemPrefix),m===b.asterisk||m===b.dash?e.check(_r,n,l)(m):l(m);if(!r.interrupt||m===b.digit1)return e.enter(p.listItemPrefix),e.enter(p.listItemValue),c(m)}return n(m)}function c(m){return S(r.containerState,"expected state"),ei(m)&&++s<J.listItemValueSizeMax?(e.consume(m),c):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===b.rightParenthesis||m===b.dot)?(e.exit(p.listItemValue),l(m)):n(m)}function l(m){return S(r.containerState,"expected state"),S(m!==b.eof,"eof (`null`) is not a marker"),e.enter(p.listItemMarker),e.consume(m),e.exit(p.listItemMarker),r.containerState.marker=r.containerState.marker||m,e.check(Gr,r.interrupt?n:d,e.attempt(N0,h,f))}function d(m){return S(r.containerState,"expected state"),r.containerState.initialBlankLine=!0,i++,h(m)}function f(m){return Re(m)?(e.enter(p.listItemPrefixWhitespace),e.consume(m),e.exit(p.listItemPrefixWhitespace),h):n(m)}function h(m){return S(r.containerState,"expected state"),r.containerState.size=i+r.sliceSerialize(e.exit(p.listItemPrefix),!0).length,t(m)}}function R0(e,t,n){const r=this;return S(r.containerState,"expected state"),r.containerState._closeFlow=void 0,e.check(Gr,a,i);function a(u){return S(r.containerState,"expected state"),S(typeof r.containerState.size=="number","expected size"),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Be(e,t,p.listItemIndent,r.containerState.size+1)(u)}function i(u){return S(r.containerState,"expected state"),r.containerState.furtherBlankLines||!Re(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(I0,t,s)(u))}function s(u){return S(r.containerState,"expected state"),r.containerState._closeFlow=!0,r.interrupt=void 0,S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,e.attempt(st,t,n),p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize)(u)}}function O0(e,t,n){const r=this;return S(r.containerState,"expected state"),S(typeof r.containerState.size=="number","expected size"),Be(e,a,p.listItemIndent,r.containerState.size+1);function a(i){S(r.containerState,"expected state");const s=r.events[r.events.length-1];return s&&s[1].type===p.listItemIndent&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function L0(e){S(this.containerState,"expected state"),S(typeof this.containerState.type=="string","expected type"),e.exit(this.containerState.type)}function D0(e,t,n){const r=this;return S(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),Be(e,a,p.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes("codeIndented")?void 0:J.tabSize+1);function a(i){const s=r.events[r.events.length-1];return!Re(i)&&s&&s[1].type===p.listItemPrefixWhitespace?t(i):n(i)}}const js={name:"setextUnderline",tokenize:P0,resolveTo:k0};function k0(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type===p.content){r=n;break}e[n][1].type===p.paragraph&&(a=n)}else e[n][1].type===p.content&&e.splice(n,1),!i&&e[n][1].type===p.definition&&(i=n);S(a!==void 0,"expected a `text` index to be found"),S(r!==void 0,"expected a `text` index to be found");const s={type:p.setextHeading,start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[a][1].type=p.setextHeadingText,i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function P0(e,t,n){const r=this;let a;return i;function i(l){let d=r.events.length,f;for(S(l===b.dash||l===b.equalsTo,"expected `=` or `-`");d--;)if(r.events[d][1].type!==p.lineEnding&&r.events[d][1].type!==p.linePrefix&&r.events[d][1].type!==p.content){f=r.events[d][1].type===p.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter(p.setextHeadingLine),a=l,s(l)):n(l)}function s(l){return e.enter(p.setextHeadingLineSequence),u(l)}function u(l){return l===a?(e.consume(l),u):(e.exit(p.setextHeadingLineSequence),Re(l)?Be(e,c,p.lineSuffix)(l):c(l))}function c(l){return l===b.eof||ne(l)?(e.exit(p.setextHeadingLine),t(l)):n(l)}}const M0={tokenize:B0};function B0(e){const t=this,n=e.attempt(Gr,r,e.attempt(this.parser.constructs.flowInitial,a,Be(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Vh,a)),p.linePrefix)));return n;function r(i){if(S(i===b.eof||ne(i),"expected eol or eof"),i===b.eof){e.consume(i);return}return e.enter(p.lineEndingBlank),e.consume(i),e.exit(p.lineEndingBlank),t.currentConstruct=void 0,n}function a(i){if(S(i===b.eof||ne(i),"expected eol or eof"),i===b.eof){e.consume(i);return}return e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),t.currentConstruct=void 0,n}}const F0={resolveAll:ec()},H0=Zu("string"),U0=Zu("text");function Zu(e){return{tokenize:t,resolveAll:ec(e==="text"?j0:void 0)};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,u);return s;function s(d){return l(d)?i(d):u(d)}function u(d){if(d===b.eof){n.consume(d);return}return n.enter(p.data),n.consume(d),c}function c(d){return l(d)?(n.exit(p.data),i(d)):(n.consume(d),c)}function l(d){if(d===b.eof)return!0;const f=a[d];let h=-1;if(f)for(S(Array.isArray(f),"expected `disable.null` to be populated");++h<f.length;){const m=f[h];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function ec(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type===p.data&&(i=a,a++):(!n[a]||n[a][1].type!==p.data)&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function j0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===p.lineEnding)&&e[n-1][1].type===p.data){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,u=0,c;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===b.space;)u++,s--;if(s)break;s=-1}else if(l===b.horizontalTab)c=!0,u++;else if(l!==b.virtualSpace){i++;break}}if(u){const l={type:n===e.length||c||u<J.hardBreakPrefixSizeMin?p.lineSuffix:p.hardBreakTrailing,start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_index:r.start._index+i,_bufferIndex:i?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},l.start),r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}var br={exports:{}},Ea,Vs;function V0(){if(Vs)return Ea;Vs=1;var e=1e3,t=e*60,n=t*60,r=n*24,a=r*7,i=r*365.25;Ea=function(d,f){f=f||{};var h=typeof d;if(h==="string"&&d.length>0)return s(d);if(h==="number"&&isFinite(d))return f.long?c(d):u(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function s(d){if(d=String(d),!(d.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(f){var h=parseFloat(f[1]),m=(f[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return h*i;case"weeks":case"week":case"w":return h*a;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*n;case"minutes":case"minute":case"mins":case"min":case"m":return h*t;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function u(d){var f=Math.abs(d);return f>=r?Math.round(d/r)+"d":f>=n?Math.round(d/n)+"h":f>=t?Math.round(d/t)+"m":f>=e?Math.round(d/e)+"s":d+"ms"}function c(d){var f=Math.abs(d);return f>=r?l(d,f,r,"day"):f>=n?l(d,f,n,"hour"):f>=t?l(d,f,t,"minute"):f>=e?l(d,f,e,"second"):d+" ms"}function l(d,f,h,m){var _=f>=h*1.5;return Math.round(d/h)+" "+m+(_?"s":"")}return Ea}var Ta,zs;function z0(){if(zs)return Ta;zs=1;function e(t){r.debug=r,r.default=r,r.coerce=l,r.disable=u,r.enable=i,r.enabled=c,r.humanize=V0(),r.destroy=d,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function n(f){let h=0;for(let m=0;m<f.length;m++)h=(h<<5)-h+f.charCodeAt(m),h|=0;return r.colors[Math.abs(h)%r.colors.length]}r.selectColor=n;function r(f){let h,m=null,_,A;function O(...v){if(!O.enabled)return;const L=O,M=Number(new Date),V=M-(h||M);L.diff=V,L.prev=h,L.curr=M,h=M,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let R=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(ae,ge)=>{if(ae==="%%")return"%";R++;const ue=r.formatters[ge];if(typeof ue=="function"){const W=v[R];ae=ue.call(L,W),v.splice(R,1),R--}return ae}),r.formatArgs.call(L,v),(L.log||r.log).apply(L,v)}return O.namespace=f,O.useColors=r.useColors(),O.color=r.selectColor(f),O.extend=a,O.destroy=r.destroy,Object.defineProperty(O,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(_!==r.namespaces&&(_=r.namespaces,A=r.enabled(f)),A),set:v=>{m=v}}),typeof r.init=="function"&&r.init(O),O}function a(f,h){const m=r(this.namespace+(typeof h>"u"?":":h)+f);return m.log=this.log,m}function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];const h=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const m of h)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}function s(f,h){let m=0,_=0,A=-1,O=0;for(;m<f.length;)if(_<h.length&&(h[_]===f[m]||h[_]==="*"))h[_]==="*"?(A=_,O=m,_++):(m++,_++);else if(A!==-1)_=A+1,O++,m=O;else return!1;for(;_<h.length&&h[_]==="*";)_++;return _===h.length}function u(){const f=[...r.names,...r.skips.map(h=>"-"+h)].join(",");return r.enable(""),f}function c(f){for(const h of r.skips)if(s(f,h))return!1;for(const h of r.names)if(s(f,h))return!0;return!1}function l(f){return f instanceof Error?f.stack||f.message:f}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return Ta=e,Ta}var $s;function $0(){return $s||($s=1,(function(e,t){t.formatArgs=r,t.save=a,t.load=i,t.useColors=n,t.storage=s(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let d=0,f=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(d++,h==="%c"&&(f=d))}),c.splice(f,0,l)}t.log=console.debug||console.log||(()=>{});function a(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function s(){try{return localStorage}catch{}}e.exports=z0()(t);const{formatters:u}=e.exports;u.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(br,br.exports)),br.exports}var Y0=$0();const G0=Ur(Y0),Jt=G0("micromark");function q0(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const a={},i=[];let s=[],u=[],c=!0;const l={consume:V,enter:R,exit:D,attempt:ue(ae),check:ue(ge),interrupt:ue(ge,{interrupt:!0})},d={previous:b.eof,code:b.eof,containerState:{},events:[],parser:e,sliceStream:A,sliceSerialize:_,now:O,defineSkip:v,write:m};let f=t.tokenize.call(d,l),h;return t.resolveAll&&i.push(t),d;function m(F){return s=mt(s,F),L(),s[s.length-1]!==b.eof?[]:(W(t,0),d.events=Ni(i,d.events,d),d.events)}function _(F,H){return X0(A(F),H)}function A(F){return W0(s,F)}function O(){const{line:F,column:H,offset:Z,_index:he,_bufferIndex:de}=r;return{line:F,column:H,offset:Z,_index:he,_bufferIndex:de}}function v(F){a[F.line]=F.column,te(),Jt("position: define skip: `%j`",r)}function L(){let F;for(;r._index<s.length;){const H=s[r._index];if(typeof H=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<H.length;)M(H.charCodeAt(r._bufferIndex));else M(H)}}function M(F){S(c===!0,"expected character to be consumed"),c=void 0,Jt("main: passing `%s` to %s",F,f&&f.name),h=F,S(typeof f=="function","expected state"),f=f(F)}function V(F){S(F===h,"expected given code to equal expected code"),Jt("consume: `%s`",F),S(c===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),S(F===null?d.events.length===0||d.events[d.events.length-1][0]==="exit":d.events[d.events.length-1][0]==="enter","expected last token to be open"),ne(F)?(r.line++,r.column=1,r.offset+=F===b.carriageReturnLineFeed?2:1,te(),Jt("position: after eol: `%j`",r)):F!==b.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=F,c=!0}function R(F,H){const Z=H||{};return Z.type=F,Z.start=O(),S(typeof F=="string","expected string type"),S(F.length>0,"expected non-empty string"),Jt("enter: `%s`",F),d.events.push(["enter",Z,d]),u.push(Z),Z}function D(F){S(typeof F=="string","expected string type"),S(F.length>0,"expected non-empty string");const H=u.pop();return S(H,"cannot close w/o open tokens"),H.end=O(),S(F===H.type,"expected exit token to match current token"),S(!(H.start._index===H.end._index&&H.start._bufferIndex===H.end._bufferIndex),"expected non-empty token (`"+F+"`)"),Jt("exit: `%s`",H.type),d.events.push(["exit",H,d]),H}function ae(F,H){W(F,H.from)}function ge(F,H){H.restore()}function ue(F,H){return Z;function Z(he,de,Ce){let Fe,g,G,X;return Array.isArray(he)?ee(he):"tokenize"in he?ee([he]):x(he);function x(K){return le;function le(ce){const ke=ce!==null&&K[ce],Y=ce!==null&&K.null,He=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Y)?Y:Y?[Y]:[]];return ee(He)(ce)}}function ee(K){return Fe=K,g=0,K.length===0?(S(Ce,"expected `bogusState` to be given"),Ce):ie(K[g])}function ie(K){return le;function le(ce){return X=xe(),G=K,K.partial||(d.currentConstruct=K),S(d.parser.constructs.disable.null,"expected `disable.null` to be populated"),K.name&&d.parser.constructs.disable.null.includes(K.name)?se(ce):K.tokenize.call(H?Object.assign(Object.create(d),H):d,l,oe,se)(ce)}}function oe(K){return S(K===h,"expected code"),c=!0,F(G,X),de}function se(K){return S(K===h,"expected code"),c=!0,X.restore(),++g<Fe.length?ie(Fe[g]):Ce}}}function W(F,H){F.resolveAll&&!i.includes(F)&&i.push(F),F.resolve&&kt(d.events,H,d.events.length-H,F.resolve(d.events.slice(H),d)),F.resolveTo&&(d.events=F.resolveTo(d.events,d)),S(F.partial||d.events.length===0||d.events[d.events.length-1][0]==="exit","expected last token to end")}function xe(){const F=O(),H=d.previous,Z=d.currentConstruct,he=d.events.length,de=Array.from(u);return{restore:Ce,from:he};function Ce(){r=F,d.previous=H,d.currentConstruct=Z,d.events.length=he,u=de,te(),Jt("position: restore: `%j`",r)}}function te(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function W0(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)S(i>-1,"expected non-negative end buffer index"),S(r>-1,"expected non-negative start buffer index"),s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):(S(r===0,"expected `startBufferIndex` to be `0`"),s.shift())}i>0&&s.push(e[a].slice(0,i))}return s}function X0(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case b.carriageReturn:{s=wt.cr;break}case b.lineFeed:{s=wt.lf;break}case b.carriageReturnLineFeed:{s=wt.cr+wt.lf;break}case b.horizontalTab:{s=t?wt.space:wt.ht;break}case b.virtualSpace:{if(!t&&a)continue;s=wt.space;break}default:S(typeof i=="number","expected number"),s=String.fromCharCode(i)}a=i===b.horizontalTab,r.push(s)}return r.join("")}const Q0={[b.asterisk]:st,[b.plusSign]:st,[b.dash]:st,[b.digit0]:st,[b.digit1]:st,[b.digit2]:st,[b.digit3]:st,[b.digit4]:st,[b.digit5]:st,[b.digit6]:st,[b.digit7]:st,[b.digit8]:st,[b.digit9]:st,[b.greaterThan]:Yu},K0={[b.leftSquareBracket]:qh},J0={[b.horizontalTab]:ba,[b.virtualSpace]:ba,[b.space]:ba},Z0={[b.numberSign]:Zh,[b.asterisk]:_r,[b.dash]:[js,_r],[b.lessThan]:r0,[b.equalsTo]:js,[b.underscore]:_r,[b.graveAccent]:Hs,[b.tilde]:Hs},em={[b.ampersand]:qu,[b.backslash]:Gu},tm={[b.carriageReturn]:ga,[b.lineFeed]:ga,[b.carriageReturnLineFeed]:ga,[b.exclamationMark]:y0,[b.ampersand]:qu,[b.asterisk]:ti,[b.lessThan]:[_h,l0],[b.leftSquareBracket]:S0,[b.backslash]:[Kh,Gu],[b.rightSquareBracket]:Ii,[b.underscore]:ti,[b.graveAccent]:Fh},nm={null:[ti,F0]},rm={null:[b.asterisk,b.underscore]},am={null:[]},im=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rm,contentInitial:K0,disable:am,document:Q0,flow:Z0,flowInitial:J0,insideSpan:nm,string:em,text:tm},Symbol.toStringTag,{value:"Module"}));function sm(e){const n=lh([im,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:a(Eh),document:a(xh),flow:a(M0),string:a(H0),text:a(U0)};return r;function a(i){return s;function s(u){return q0(r,i,u)}}}function om(e){for(;!Xu(e););return e}const Ys=/[\0\t\n\r]/g;function um(){let e=1,t="",n=!0,r;return a;function a(i,s,u){const c=[];let l,d,f,h,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===b.byteOrderMarker&&f++,n=void 0);f<i.length;){if(Ys.lastIndex=f,l=Ys.exec(i),h=l&&l.index!==void 0?l.index:i.length,m=i.charCodeAt(h),!l){t=i.slice(f);break}if(m===b.lf&&f===h&&r)c.push(b.carriageReturnLineFeed),r=void 0;else switch(r&&(c.push(b.carriageReturn),r=void 0),f<h&&(c.push(i.slice(f,h)),e+=h-f),m){case b.nul:{c.push(b.replacementCharacter),e++;break}case b.ht:{for(d=Math.ceil(e/J.tabSize)*J.tabSize,c.push(b.horizontalTab);e++<d;)c.push(b.virtualSpace);break}case b.lf:{c.push(b.lineFeed),e=1;break}default:r=!0,e=1}f=h+1}return u&&(r&&c.push(b.carriageReturn),t&&c.push(t),c.push(b.eof)),c}}const cm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lm(e){return e.replace(cm,dm)}function dm(e,t,n){if(t)return t;if(n.charCodeAt(0)===b.numberSign){const a=n.charCodeAt(1),i=a===b.lowercaseX||a===b.uppercaseX;return $u(n.slice(i?2:1),i?J.numericBaseHexadecimal:J.numericBaseDecimal)}return vi(n)||e}const tc={}.hasOwnProperty;function fm(e,t,n){return typeof t!="string"&&(n=t,t=void 0),hm(n)(om(sm(n).document().write(um()(e,t,!0))))}function hm(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(_t),autolinkProtocol:ue,autolinkEmail:ue,atxHeading:i(Ye),blockQuote:i(le),characterEscape:ue,characterReference:ue,codeFenced:i(ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(ce,s),codeText:i(ke,s),codeTextData:ue,data:ue,codeFlowValue:ue,definition:i(Y),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(He),hardBreakEscape:i(Xe),hardBreakTrailing:i(Xe),htmlFlow:i(dt,s),htmlFlowData:ue,htmlText:i(dt,s),htmlTextData:ue,image:i(Qe),label:s,link:i(_t),listItem:i(me),listItemValue:h,listOrdered:i(ft,f),listUnordered:i(ft),paragraph:i(Te),reference:x,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Ye),strong:i(Ie),thematicBreak:i(Ue)},exit:{atxHeading:c(),atxHeadingSequence:R,autolink:c(),autolinkEmail:K,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:W,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:oe,codeFenced:c(O),codeFencedFence:A,codeFencedFenceInfo:m,codeFencedFenceMeta:_,codeFlowValue:W,codeIndented:c(v),codeText:c(Z),codeTextData:W,data:W,definition:c(),definitionDestinationString:V,definitionLabelString:L,definitionTitleString:M,emphasis:c(),hardBreakEscape:c(te),hardBreakTrailing:c(te),htmlFlow:c(F),htmlFlowData:W,htmlText:c(H),htmlTextData:W,image:c(de),label:Fe,labelText:Ce,lineEnding:xe,link:c(he),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ee,resourceDestinationString:g,resourceTitleString:G,resource:X,setextHeading:c(ge),setextHeadingLineSequence:ae,setextHeadingText:D,strong:c(),thematicBreak:c()}};nc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(I){let w={type:"root",children:[]};const q={stack:[w],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:d,data:n},pe=[];let _e=-1;for(;++_e<I.length;)if(I[_e][1].type===p.listOrdered||I[_e][1].type===p.listUnordered)if(I[_e][0]==="enter")pe.push(_e);else{const Ze=pe.pop();S(typeof Ze=="number","expected list ot be open"),_e=a(I,Ze,_e)}for(_e=-1;++_e<I.length;){const Ze=t[I[_e][0]];tc.call(Ze,I[_e][1].type)&&Ze[I[_e][1].type].call(Object.assign({sliceSerialize:I[_e][2].sliceSerialize},q),I[_e][1])}if(q.tokenStack.length>0){const Ze=q.tokenStack[q.tokenStack.length-1];(Ze[1]||Gs).call(q,void 0,Ze[0])}for(w.position={start:Ut(I.length>0?I[0][1].start:{line:1,column:1,offset:0}),end:Ut(I.length>0?I[I.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)w=t.transforms[_e](w)||w;return w}function a(I,w,q){let pe=w-1,_e=-1,Ze=!1,yt,Ct,Wt,Xt;for(;++pe<=q;){const nt=I[pe];switch(nt[1].type){case p.listUnordered:case p.listOrdered:case p.blockQuote:{nt[0]==="enter"?_e++:_e--,Xt=void 0;break}case p.lineEndingBlank:{nt[0]==="enter"&&(yt&&!Xt&&!_e&&!Wt&&(Wt=pe),Xt=void 0);break}case p.linePrefix:case p.listItemValue:case p.listItemMarker:case p.listItemPrefix:case p.listItemPrefixWhitespace:break;default:Xt=void 0}if(!_e&&nt[0]==="enter"&&nt[1].type===p.listItemPrefix||_e===-1&&nt[0]==="exit"&&(nt[1].type===p.listUnordered||nt[1].type===p.listOrdered)){if(yt){let Ht=pe;for(Ct=void 0;Ht--;){const St=I[Ht];if(St[1].type===p.lineEnding||St[1].type===p.lineEndingBlank){if(St[0]==="exit")continue;Ct&&(I[Ct][1].type=p.lineEndingBlank,Ze=!0),St[1].type=p.lineEnding,Ct=Ht}else if(!(St[1].type===p.linePrefix||St[1].type===p.blockQuotePrefix||St[1].type===p.blockQuotePrefixWhitespace||St[1].type===p.blockQuoteMarker||St[1].type===p.listItemIndent))break}Wt&&(!Ct||Wt<Ct)&&(yt._spread=!0),yt.end=Object.assign({},Ct?I[Ct][1].start:nt[1].end),I.splice(Ct||pe,0,["exit",yt,nt[2]]),pe++,q++}if(nt[1].type===p.listItemPrefix){const Ht={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};yt=Ht,I.splice(pe,0,["enter",Ht,nt[2]]),pe++,q++,Wt=void 0,Xt=!0}}}return I[w][1]._spread=Ze,q}function i(I,w){return q;function q(pe){u.call(this,I(pe),pe),w&&w.call(this,pe)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(I,w,q){const pe=this.stack[this.stack.length-1];S(pe,"expected `parent`"),S("children"in pe,"expected `parent`"),pe.children.push(I),this.stack.push(I),this.tokenStack.push([w,q]),I.position={start:Ut(w.start),end:void 0}}function c(I){return w;function w(q){I&&I.call(this,q),l.call(this,q)}}function l(I,w){const q=this.stack.pop();S(q,"expected `node`");const pe=this.tokenStack.pop();if(pe)pe[0].type!==I.type&&(w?w.call(this,I,pe[0]):(pe[1]||Gs).call(this,I,pe[0]));else throw new Error("Cannot close `"+I.type+"` ("+jn({start:I.start,end:I.end})+"): it’s not open");S(q.type!=="fragment","unexpected fragment `exit`ed"),S(q.position,"expected `position` to be defined"),q.position.end=Ut(I.end)}function d(){return uh(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(I){if(this.data.expectingFirstListItemValue){const w=this.stack[this.stack.length-2];S(w,"expected nodes on stack"),S(w.type==="list","expected list on stack"),w.start=Number.parseInt(this.sliceSerialize(I),J.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function m(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.lang=I}function _(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.meta=I}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.value=I.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="code","expected code on stack"),w.value=I.replace(/(\r?\n|\r)$/g,"")}function L(I){const w=this.resume(),q=this.stack[this.stack.length-1];S(q,"expected node on stack"),S(q.type==="definition","expected definition on stack"),q.label=w,q.identifier=yn(this.sliceSerialize(I)).toLowerCase()}function M(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="definition","expected definition on stack"),w.title=I}function V(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="definition","expected definition on stack"),w.url=I}function R(I){const w=this.stack[this.stack.length-1];if(S(w,"expected node on stack"),S(w.type==="heading","expected heading on stack"),!w.depth){const q=this.sliceSerialize(I).length;S(q===1||q===2||q===3||q===4||q===5||q===6,"expected `depth` between `1` and `6`"),w.depth=q}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function ae(I){const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="heading","expected heading on stack"),w.depth=this.sliceSerialize(I).codePointAt(0)===b.equalsTo?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function ue(I){const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S("children"in w,"expected parent on stack");const q=w.children;let pe=q[q.length-1];(!pe||pe.type!=="text")&&(pe=we(),pe.position={start:Ut(I.start),end:void 0},q.push(pe)),this.stack.push(pe)}function W(I){const w=this.stack.pop();S(w,"expected a `node` to be on the stack"),S("value"in w,"expected a `literal` to be on the stack"),S(w.position,"expected `node` to have an open position"),w.value+=this.sliceSerialize(I),w.position.end=Ut(I.end)}function xe(I){const w=this.stack[this.stack.length-1];if(S(w,"expected `node`"),this.data.atHardBreak){S("children"in w,"expected `parent`");const q=w.children[w.children.length-1];S(q.position,"expected tail to have a starting position"),q.position.end=Ut(I.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(w.type)&&(ue.call(this,I),W.call(this,I))}function te(){this.data.atHardBreak=!0}function F(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="html","expected html on stack"),w.value=I}function H(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="html","expected html on stack"),w.value=I}function Z(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="inlineCode","expected inline code on stack"),w.value=I}function he(){const I=this.stack[this.stack.length-1];if(S(I,"expected node on stack"),S(I.type==="link","expected link on stack"),this.data.inReference){const w=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=w,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function de(){const I=this.stack[this.stack.length-1];if(S(I,"expected node on stack"),S(I.type==="image","expected image on stack"),this.data.inReference){const w=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=w,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function Ce(I){const w=this.sliceSerialize(I),q=this.stack[this.stack.length-2];S(q,"expected ancestor on stack"),S(q.type==="image"||q.type==="link","expected image or link on stack"),q.label=lm(w),q.identifier=yn(w).toLowerCase()}function Fe(){const I=this.stack[this.stack.length-1];S(I,"expected node on stack"),S(I.type==="fragment","expected fragment on stack");const w=this.resume(),q=this.stack[this.stack.length-1];if(S(q,"expected node on stack"),S(q.type==="image"||q.type==="link","expected image or link on stack"),this.data.inReference=!0,q.type==="link"){const pe=I.children;q.children=pe}else q.alt=w}function g(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="image"||w.type==="link","expected image or link on stack"),w.url=I}function G(){const I=this.resume(),w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="image"||w.type==="link","expected image or link on stack"),w.title=I}function X(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ee(I){const w=this.resume(),q=this.stack[this.stack.length-1];S(q,"expected node on stack"),S(q.type==="image"||q.type==="link","expected image reference or link reference on stack"),q.label=w,q.identifier=yn(this.sliceSerialize(I)).toLowerCase(),this.data.referenceType="full"}function ie(I){S(I.type==="characterReferenceMarkerNumeric"||I.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=I.type}function oe(I){const w=this.sliceSerialize(I),q=this.data.characterReferenceType;let pe;if(q)pe=$u(w,q===p.characterReferenceMarkerNumeric?J.numericBaseDecimal:J.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const Ze=vi(w);S(Ze!==!1,"expected reference to decode"),pe=Ze}const _e=this.stack.pop();S(_e,"expected `node`"),S(_e.position,"expected `node.position`"),S("value"in _e,"expected `node.value`"),_e.value+=pe,_e.position.end=Ut(I.end)}function se(I){W.call(this,I);const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="link","expected link on stack"),w.url=this.sliceSerialize(I)}function K(I){W.call(this,I);const w=this.stack[this.stack.length-1];S(w,"expected node on stack"),S(w.type==="link","expected link on stack"),w.url="mailto:"+this.sliceSerialize(I)}function le(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function He(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function dt(){return{type:"html",value:""}}function Qe(){return{type:"image",title:null,url:"",alt:null}}function _t(){return{type:"link",title:null,url:"",children:[]}}function ft(I){return{type:"list",ordered:I.type==="listOrdered",start:null,spread:I._spread,children:[]}}function me(I){return{type:"listItem",spread:I._spread,checked:null,children:[]}}function Te(){return{type:"paragraph",children:[]}}function Ie(){return{type:"strong",children:[]}}function we(){return{type:"text",value:""}}function Ue(){return{type:"thematicBreak"}}}function Ut(e){return{line:e.line,column:e.column,offset:e.offset}}function nc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?nc(e,r):mm(e,r)}}function mm(e,t){let n;for(n in t)if(tc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Gs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+jn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+jn({start:t.start,end:t.end})+") is still open")}function pm(e){const t=this;t.parser=n;function n(r){return fm(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function bm(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
76
76
|
`}]}function Em(e,t){const n=t.value?t.value+`
|
|
77
77
|
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Tm(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xm(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ym(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=In(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Cm(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sm(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function rc(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=r:a.push({type:"text",value:r}),a}function Am(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rc(e,t);const a={src:In(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function _m(e,t){const n={src:In(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function vm(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Nm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rc(e,t);const a={href:In(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Im(e,t){const n={href:In(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wm(e,t,n){const r=e.all(t),a=n?Rm(n):ac(t),i={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const d=r[u];(a||u!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
78
78
|
`}),d.type==="element"&&d.tagName==="p"&&!a?s.push(...d.children):s.push(d)}const c=r[r.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
79
|
-
`});const l={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,l),e.applyData(t,l)}function Rm(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ac(n[r])}return t}function ac(e){const t=e.spread;return t??e.children.length>1}function Om(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Lm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function km(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pm(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Pt(t.children[1]),c=Yr(t.children[t.children.length-1]);u&&c&&(s.position={start:u,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function Mm(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let c=-1;const l=[];for(;++c<u;){const f=t.children[c],h={},m=s?s[c]:void 0;m&&(h.align=m);let
|
|
79
|
+
`});const l={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,l),e.applyData(t,l)}function Rm(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ac(n[r])}return t}function ac(e){const t=e.spread;return t??e.children.length>1}function Om(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Lm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function km(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pm(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Pt(t.children[1]),c=Yr(t.children[t.children.length-1]);u&&c&&(s.position={start:u,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function Mm(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let c=-1;const l=[];for(;++c<u;){const f=t.children[c],h={},m=s?s[c]:void 0;m&&(h.align=m);let _={type:"element",tagName:i,properties:h,children:[]};f&&(_.children=e.all(f),e.patch(f,_),_=e.applyData(f,_)),l.push(_)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function Bm(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qs=9,Ws=32;function Fm(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(Xs(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(Xs(t.slice(a),a>0,!1)),i.join("")}function Xs(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===qs||i===Ws;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===qs||i===Ws;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function Hm(e,t){const n={type:"text",value:Fm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Um(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const jm={blockquote:bm,break:gm,code:Em,delete:Tm,emphasis:xm,footnoteReference:ym,heading:Cm,html:Sm,imageReference:Am,image:_m,inlineCode:vm,linkReference:Nm,link:Im,listItem:wm,list:Om,paragraph:Lm,root:Dm,strong:km,table:Pm,tableCell:Bm,tableRow:Mm,text:Hm,thematicBreak:Um,toml:gr,yaml:gr,definition:gr,footnoteDefinition:gr};function gr(){}const ic=-1,qr=0,Ir=1,wr=2,wi=3,Ri=4,Oi=5,Li=6,sc=7,oc=8,Qs=typeof self=="object"?self:globalThis,Vm=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case qr:case ic:return n(s,a);case Ir:{const u=n([],a);for(const c of s)u.push(r(c));return u}case wr:{const u=n({},a);for(const[c,l]of s)u[r(c)]=r(l);return u}case wi:return n(new Date(s),a);case Ri:{const{source:u,flags:c}=s;return n(new RegExp(u,c),a)}case Oi:{const u=n(new Map,a);for(const[c,l]of s)u.set(r(c),r(l));return u}case Li:{const u=n(new Set,a);for(const c of s)u.add(r(c));return u}case sc:{const{name:u,message:c}=s;return n(new Qs[u](c),a)}case oc:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a)}return n(new Qs[i](s),a)};return r},Ks=e=>Vm(new Map,e)(0),mn="",{toString:zm}={},{keys:$m}=Object,Dn=e=>{const t=typeof e;if(t!=="object"||!e)return[qr,t];const n=zm.call(e).slice(8,-1);switch(n){case"Array":return[Ir,mn];case"Object":return[wr,mn];case"Date":return[wi,mn];case"RegExp":return[Ri,mn];case"Map":return[Oi,mn];case"Set":return[Li,mn]}return n.includes("Array")?[Ir,n]:n.includes("Error")?[sc,n]:[wr,n]},Er=([e,t])=>e===qr&&(t==="function"||t==="symbol"),Ym=(e,t,n,r)=>{const a=(s,u)=>{const c=r.push(s)-1;return n.set(u,c),c},i=s=>{if(n.has(s))return n.get(s);let[u,c]=Dn(s);switch(u){case qr:{let d=s;switch(c){case"bigint":u=oc,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return a([ic],s)}return a([u,d],s)}case Ir:{if(c)return a([c,[...s]],s);const d=[],f=a([u,d],s);for(const h of s)d.push(i(h));return f}case wr:{if(c)switch(c){case"BigInt":return a([c,s.toString()],s);case"Boolean":case"Number":case"String":return a([c,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const d=[],f=a([u,d],s);for(const h of $m(s))(e||!Er(Dn(s[h])))&&d.push([i(h),i(s[h])]);return f}case wi:return a([u,s.toISOString()],s);case Ri:{const{source:d,flags:f}=s;return a([u,{source:d,flags:f}],s)}case Oi:{const d=[],f=a([u,d],s);for(const[h,m]of s)(e||!(Er(Dn(h))||Er(Dn(m))))&&d.push([i(h),i(m)]);return f}case Li:{const d=[],f=a([u,d],s);for(const h of s)(e||!Er(Dn(h)))&&d.push(i(h));return f}}const{message:l}=s;return a([u,{name:c,message:l}],s)};return i},Js=(e,{json:t,lossy:n}={})=>{const r=[];return Ym(!(t||n),!!t,new Map,r)(e),r},An=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ks(Js(e,t)):structuredClone(e):(e,t)=>Ks(Js(e,t));function Gm(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function qm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Wm(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Gm,r=e.options.footnoteBackLabel||qm,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[c]);if(!l)continue;const d=e.all(l),f=String(l.identifier).toUpperCase(),h=In(f.toLowerCase());let m=0;const _=[],A=e.footnoteCounts.get(f);for(;A!==void 0&&++m<=A;){_.length>0&&_.push({type:"text",value:" "});let L=typeof n=="string"?n:n(c,m);typeof L=="string"&&(L={type:"text",value:L}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(L)?L:[L]})}const O=d[d.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const L=O.children[O.children.length-1];L&&L.type==="text"?L.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(..._)}else d.push(..._);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(l,v),u.push(v)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...An(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
80
80
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
81
|
-
`}]}}const uc=(function(e){if(e==null)return Jm;if(typeof e=="function")return Wr(e);if(typeof e=="object")return Array.isArray(e)?Xm(e):Qm(e);if(typeof e=="string")return Km(e);throw new Error("Expected function, string, or object as test")});function Xm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=uc(e[n]);return Wr(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Qm(e){const t=e;return Wr(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function Km(e){return Wr(t);function t(n){return n&&n.type===e}}function Wr(e){return t;function t(n,r,a){return!!(Zm(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Jm(){return!0}function Zm(e){return e!==null&&typeof e=="object"&&"type"in e}const cc=[],ep=!0,Zs=!1,tp="skip";function np(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=uc(a),s=r?-1:1;u(e,void 0,[])();function u(c,l,d){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=cc,A,
|
|
81
|
+
`}]}}const uc=(function(e){if(e==null)return Jm;if(typeof e=="function")return Wr(e);if(typeof e=="object")return Array.isArray(e)?Xm(e):Qm(e);if(typeof e=="string")return Km(e);throw new Error("Expected function, string, or object as test")});function Xm(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=uc(e[n]);return Wr(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Qm(e){const t=e;return Wr(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function Km(e){return Wr(t);function t(n){return n&&n.type===e}}function Wr(e){return t;function t(n,r,a){return!!(Zm(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Jm(){return!0}function Zm(e){return e!==null&&typeof e=="object"&&"type"in e}const cc=[],ep=!0,Zs=!1,tp="skip";function np(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=uc(a),s=r?-1:1;u(e,void 0,[])();function u(c,l,d){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=cc,_,A,O;if((!t||i(c,l,d[d.length-1]||void 0))&&(m=rp(n(c,d)),m[0]===Zs))return m;if("children"in c&&c.children){const v=c;if(v.children&&m[0]!==tp)for(A=(r?v.children.length:-1)+s,O=d.concat(v);A>-1&&A<v.children.length;){const L=v.children[A];if(_=u(L,A,O)(),_[0]===Zs)return _;A=typeof _[1]=="number"?_[1]:A+s}}return m}}}function rp(e){return Array.isArray(e)?e:typeof e=="number"?[ep,e]:e==null?cc:[e]}function Di(e,t,n,r){let a,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,a=n):(i=t,s=n,a=r),np(e,i,u,a);function u(c,l){const d=l[l.length-1],f=d?d.children.indexOf(c):void 0;return s(c,f,d)}}const ni={}.hasOwnProperty,ap={};function ip(e,t){const n=t||ap,r=new Map,a=new Map,i=new Map,s={...jm,...n.handlers},u={all:l,applyData:op,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:c,options:n,patch:sp,wrap:cp};return Di(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:a,h=String(d.identifier).toUpperCase();f.has(h)||f.set(h,d)}}),u;function c(d,f){const h=d.type,m=u.handlers[h];if(ni.call(u.handlers,h)&&m)return m(u,d,f);if(u.options.passThrough&&u.options.passThrough.includes(h)){if("children"in d){const{children:A,...O}=d,v=An(O);return v.children=u.all(d),v}return An(d)}return(u.options.unknownHandler||up)(u,d,f)}function l(d){const f=[];if("children"in d){const h=d.children;let m=-1;for(;++m<h.length;){const _=u.one(h[m],d);if(_){if(m&&h[m-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=eo(_.value)),!Array.isArray(_)&&_.type==="element")){const A=_.children[0];A&&A.type==="text"&&(A.value=eo(A.value))}Array.isArray(_)?f.push(..._):f.push(_)}}}return f}}function sp(e,t){e.position&&(t.position=Ff(e))}function op(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,An(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function up(e,t){const n=t.data||{},r="value"in t&&!(ni.call(n,"hProperties")||ni.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cp(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
82
82
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
83
83
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
84
84
|
`}),n}function eo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function to(e,t){const n=ip(e,t),r=n.one(e,void 0),a=Wm(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&(S("children"in i),i.children.push({type:"text",value:`
|
|
85
|
-
`},a)),i}function lp(e,t){return e&&"run"in e?async function(n,r){const a=to(n,{file:r,...t});await e.run(a,r)}:function(n,r){return to(n,{file:r,...t||e})}}function no(e){if(e)throw e}var xa,ro;function dp(){if(ro)return xa;ro=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),f=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!f)return!1;var h;for(h in l);return typeof h>"u"||e.call(l,h)},s=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},u=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return xa=function c(){var l,d,f,h,m,A,_=arguments[0],O=1,v=arguments.length,L=!1;for(typeof _=="boolean"&&(L=_,_=arguments[1]||{},O=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});O<v;++O)if(l=arguments[O],l!=null)for(d in l)f=u(_,d),h=u(l,d),_!==h&&(L&&h&&(i(h)||(m=a(h)))?(m?(m=!1,A=f&&a(f)?f:[]):A=f&&i(f)?f:{},s(_,{name:d,newValue:c(L,A,h)})):typeof h<"u"&&s(_,{name:d,newValue:h}));return _},xa}var fp=dp();const ya=Ur(fp);function ri(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hp(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...a);function u(c,...l){const d=e[++i];let f=-1;if(c){s(c);return}for(;++f<a.length;)(l[f]===null||l[f]===void 0)&&(l[f]=a[f]);a=l,d?mp(d,u)(...l):s(null,...l)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function mp(e,t){let n;return r;function r(...s){const u=e.length>s.length;let c;u&&s.push(a);try{c=e.apply(this,s)}catch(l){const d=l;if(u&&n)throw d;return a(d)}u||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...u){n||(n=!0,t(s,...u))}function i(s){a(null,s)}}const vt={basename:pp,dirname:bp,extname:gp,join:Ep,sep:"/"};function pp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ir(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function bp(e){if(ir(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gp(e){ir(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Ep(...e){let t=-1,n;for(;++t<e.length;)ir(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Tp(n)}function Tp(e){ir(e);const t=e.codePointAt(0)===47;let n=xp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xp(e,t){let n="",r=0,a=-1,i=0,s=-1,u,c;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else u===46&&i>-1?i++:i=-1}return n}function ir(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yp={cwd:Cp};function Cp(){return"/"}function ai(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Sp(e){if(typeof e=="string")e=new URL(e);else if(!ai(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ap(e)}function Ap(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Ca=["history","path","basename","stem","extname","dirname"];class lc{constructor(t){let n;t?ai(t)?n={path:t}:typeof t=="string"||_p(t)?n={value:t}:n=t:n={},this.cwd=yp.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ca.length;){const i=Ca[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)Ca.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?vt.basename(this.path):void 0}set basename(t){Aa(t,"basename"),Sa(t,"basename"),this.path=vt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vt.dirname(this.path):void 0}set dirname(t){ao(this.basename,"dirname"),this.path=vt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vt.extname(this.path):void 0}set extname(t){if(Sa(t,"extname"),ao(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ai(t)&&(t=Sp(t)),Aa(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vt.basename(this.path,this.extname):void 0}set stem(t){Aa(t,"stem"),Sa(t,"stem"),this.path=vt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new et(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sa(e,t){if(e&&e.includes(vt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vt.sep+"`")}function Aa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ao(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function _p(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vp=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};Object.setPrototypeOf(i,r);const s=Object.getOwnPropertyNames(a);for(const u of s){const c=Object.getOwnPropertyDescriptor(a,u);c&&Object.defineProperty(i,u,c)}return i}),Np={}.hasOwnProperty;class ki extends vp{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=hp()}copy(){const t=new ki;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ya(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Na("data",this.frozen),this.namespace[t]=n,this):Np.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Na("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Tr(t),r=this.parser||this.Parser;return _a("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),_a("process",this.parser||this.Parser),va("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const u=Tr(t),c=r.parse(u);r.run(c,u,function(d,f,h){if(d||!f||!h)return l(d);const m=f,A=r.stringify(m,h);Rp(A)?h.value=A:h.result=A,l(d,h)});function l(d,f){d||!f?s(d):i?i(f):(S(n,"`done` is defined if `resolve` is not"),n(void 0,f))}}}processSync(t){let n=!1,r;return this.freeze(),_a("processSync",this.parser||this.Parser),va("processSync",this.compiler||this.Compiler),this.process(t,a),so("processSync","process",n),S(r,"we either bailed on an error or have a tree"),r;function a(i,s){n=!0,no(i),r=s}}run(t,n,r){io(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,u){S(typeof n!="function","`file` can’t be a `done` anymore, we checked");const c=Tr(n);a.run(t,c,l);function l(d,f,h){const m=f||t;d?u(d):s?s(m):(S(r,"`done` is defined if `resolve` is not"),r(void 0,m,h))}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),so("runSync","run",r),S(a,"we either bailed on an error or have a tree"),a;function i(s,u){no(s),a=u,r=!0}}stringify(t,n){this.freeze();const r=Tr(n),a=this.compiler||this.Compiler;return va("stringify",a),io(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(Na("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...f]=l;c(d,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(l.plugins),l.settings&&(a.settings=ya(!0,a.settings,l.settings))}function u(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const f=l[d];i(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,d){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===l){h=f;break}if(h===-1)r.push([l,...d]);else if(d.length>0){let[m,...A]=d;const _=r[h][1];ri(_)&&ri(m)&&(m=ya(!0,_,m)),r[h]=[l,m,...A]}}}}const Ip=new ki().freeze();function _a(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function va(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Na(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function io(e){if(!ri(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function so(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tr(e){return wp(e)?e:new lc(e)}function wp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Rp(e){return typeof e=="string"||Op(e)}function Op(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lp="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",oo=[],uo={allowDangerousHtml:!0},Dp=/^(https?|ircs?|mailto|xmpp)$/i,kp=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function dc(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,i=e.components,s=e.disallowedElements,u=e.rehypePlugins||oo,c=e.remarkPlugins||oo,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uo}:uo,d=e.skipHtml,f=e.unwrapDisallowed,h=e.urlTransform||Pp,m=Ip().use(pm).use(c).use(lp,l).use(u),A=new lc;typeof r=="string"?A.value=r:fa("Unexpected value `"+r+"` for `children` prop, expected `string`"),t&&s&&fa("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");for(const L of kp)Object.hasOwn(e,L.from)&&fa("Unexpected `"+L.from+"` prop, "+(L.to?"use `"+L.to+"` instead":"remove it")+" (see <"+Lp+"#"+L.id+"> for more info)");const _=m.parse(A);let O=m.runSync(_,A);return a&&(O={type:"element",tagName:"div",properties:{className:a},children:O.type==="root"?O.children:[O]}),Di(O,v),$f(O,{Fragment:aa.Fragment,components:i,ignoreInvalidStyle:!0,jsx:aa.jsx,jsxs:aa.jsxs,passKeys:!0,passNode:!0});function v(L,M,z){if(L.type==="raw"&&z&&typeof M=="number")return d?z.children.splice(M,1):z.children[M]={type:"text",value:L.value},M;if(L.type==="element"){let R;for(R in pa)if(Object.hasOwn(pa,R)&&Object.hasOwn(L.properties,R)){const D=L.properties[R],ae=pa[R];(ae===null||ae.includes(L.tagName))&&(L.properties[R]=h(String(D||""),R,L))}}if(L.type==="element"){let R=t?!t.includes(L.tagName):s?s.includes(L.tagName):!1;if(!R&&n&&typeof M=="number"&&(R=!n(L,M,z)),R&&z&&typeof M=="number")return f&&L.children?z.children.splice(M,1,...L.children):z.children.splice(M,1),M}}}function Pp(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t<0||a>-1&&t>a||n>-1&&t>n||r>-1&&t>r||Dp.test(e.slice(0,t))?e:""}const co=/[#.]/g;function Mp(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){co.lastIndex=a;const u=co.exec(n),c=n.slice(a,u?u.index:n.length);c&&(i?i==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:s=c,a+=c.length),u&&(i=u[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const Bp=new Set(["button","menu","reset","submit"]),ii={}.hasOwnProperty;function fc(e,t,n){const r=n&&jp(n);function a(i,s,...u){let c=-1,l;if(i==null){l={type:"root",children:[]};const d=s;u.unshift(d)}else if(l=Mp(i,t),l.tagName=l.tagName.toLowerCase(),r&&ii.call(r,l.tagName)&&(l.tagName=r[l.tagName]),Fp(s,l.tagName)){let d;for(d in s)ii.call(s,d)&&Hp(e,l.properties,d,s[d])}else u.unshift(s);for(;++c<u.length;)si(l.children,u[c]);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return a}function Fp(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?Bp.has(e.type.toLowerCase()):!("value"in e)}function Hp(e,t,n,r){const a=$r(e,n);let i=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?a.spaceSeparated?s=vs(r):a.commaSeparated?s=ys(r):a.commaOrSpaceSeparated?s=vs(ys(r).join(" ")):s=lo(a,a.property,r):Array.isArray(r)?s=r.concat():s=a.property==="style"?Up(r):String(r);if(Array.isArray(s)){const u=[];for(;++i<s.length;){const c=lo(a,a.property,s[i]);u[i]=c}s=u}if(a.property==="className"&&Array.isArray(t.className)){const u=s;s=t.className.concat(u)}t[a.property]=s}}function si(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)si(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?si(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function lo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Xn(n)===Xn(t)))return!0}return n}function Up(e){const t=[];let n;for(n in e)ii.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function jp(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const zp=["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","solidColor","textArea","textPath"],Vp=fc(ar,"div"),$p=fc(Gt,"g",zp);function Yp(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const c=fo(t,n[s-1]);u=c===-1?t.length+1:c+1,n[s]=u}if(u>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const u=n[n.length-1],c=fo(t,u),l=c===-1?t.length+1:c+1;if(u===l)break;n.push(l)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function fo(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
86
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const tn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},hc={}.hasOwnProperty,Gp=Object.prototype;function qp(e,t){const n=t||{};return Pi({file:n.file||void 0,location:!1,schema:n.space==="svg"?Gt:ar,verbose:n.verbose||!1},e)}function Pi(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},vr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:mc(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=Yp(i),u=s.toPoint(0),c=s.toPoint(i.length);S(u,"expected `start`"),S(c,"expected `end`"),n.position={start:u,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},vr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},vr(e,r,n),n}default:return n=Wp(e,t),n}}function mc(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Pi(e,t[n]);r.push(a)}return r}function Wp(e,t){const n=e.schema;e.schema=t.namespaceURI===tn.svg?Gt:ar;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],c=(u.prefix?u.prefix+":":"")+u.name;hc.call(Gp,c)||(a[c]=u.value)}const s=(e.schema.space==="svg"?$p:Vp)(t.tagName,a,mc(e,t.childNodes));if(vr(e,t,s),s.tagName==="template"){const u=t,c=u.sourceCodeLocation,l=c&&c.startTag&&Tn(c.startTag),d=c&&c.endTag&&Tn(c.endTag),f=Pi(e,u.content);l&&d&&e.file&&(f.position={start:l.end,end:d.start}),s.content=f}return e.schema=n,s}function vr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Xp(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Xp(e,t,n){const r=Tn(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)hc.call(n.attrs,s)&&(i[$r(e.schema,s).property]=Tn(n.attrs[s]));S(n.startTag,"a start tag should exist");const u=Tn(n.startTag),c=n.endTag?Tn(n.endTag):void 0,l={opening:u};c&&(l.closing=c),l.properties=i,t.data={position:l}}}return r}function Tn(e){const t=ho({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ho({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ho(e){return e.line&&e.column?e:void 0}const mo={}.hasOwnProperty;function pc(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const u=r.handlers;if(a&&mo.call(a,e)){const c=String(a[e]);s=mo.call(u,c)?u[c]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Qp={},Kp={}.hasOwnProperty,bc=pc("type",{handlers:{root:Zp,element:ab,text:nb,comment:rb,doctype:tb}});function Jp(e,t){const r=(t||Qp).space;return bc(e,r==="svg"?Gt:ar)}function Zp(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Mi(e.children,n,t),wn(e,n),n}function eb(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Mi(e.children,n,t),wn(e,n),n}function tb(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return wn(e,t),t}function nb(e){const t={nodeName:"#text",value:e.value,parentNode:null};return wn(e,t),t}function rb(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return wn(e,t),t}function ab(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Gt);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&Kp.call(e.properties,i)){const c=ib(r,i,e.properties[i]);c&&a.push(c)}}const s=r.space;S(s);const u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:tn[s],childNodes:[],parentNode:null};return u.childNodes=Mi(e.children,u,r),wn(e,u),e.tagName==="template"&&e.content&&(u.content=eb(e.content,r)),u}function ib(e,t,n){const r=$r(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Iu(n):Bu(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=r.attribute.slice(0,i)),a.namespace=tn[r.space]}return a}function Mi(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=bc(e[r],n);i.parentNode=t,a.push(i)}return a}function wn(e,t){const n=e.position;n&&n.start&&n.end&&(S(typeof n.start.offset=="number"),S(typeof n.end.offset=="number"),t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const sb=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ob=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]),ze="�";var E;(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"})(E||(E={}));const it={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gc(e){return e>=55296&&e<=57343}function ub(e){return e>=56320&&e<=57343}function cb(e,t){return(e-55296)*1024+9216+t}function Ec(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Tc(e){return e>=64976&&e<=65007||ob.has(e)}var P;(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"})(P||(P={}));const lb=65536;class db{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=lb,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,n){const{line:r,col:a,offset:i}=this,s=a+n,u=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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 n=this.html.charCodeAt(this.pos+1);if(ub(n))return this.pos++,this._addGap(),cb(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(P.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,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const r=this.html.charCodeAt(n);return r===E.CARRIAGE_RETURN?E.LINE_FEED:r}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,E.EOF;let t=this.html.charCodeAt(this.pos);return t===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):t===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,gc(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===E.LINE_FEED||t===E.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Ec(t)?this._err(P.controlCharacterInInputStream):Tc(t)&&this._err(P.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ye;(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"})(ye||(ye={}));function xc(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const yc=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))),fb=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ia;const hb=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]]),mb=(Ia=String.fromCodePoint)!==null&&Ia!==void 0?Ia: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 pb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=hb.get(e))!==null&&t!==void 0?t:e}var Je;(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"})(Je||(Je={}));const bb=32;var Vt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Vt||(Vt={}));function oi(e){return e>=Je.ZERO&&e<=Je.NINE}function gb(e){return e>=Je.UPPER_A&&e<=Je.UPPER_F||e>=Je.LOWER_A&&e<=Je.LOWER_F}function Eb(e){return e>=Je.UPPER_A&&e<=Je.UPPER_Z||e>=Je.LOWER_A&&e<=Je.LOWER_Z||oi(e)}function Tb(e){return e===Je.EQUALS||Eb(e)}var Ke;(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"})(Ke||(Ke={}));var Ft;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ft||(Ft={}));class Cc{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ft.Strict}startEntity(t){this.decodeMode=t,this.state=Ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ke.EntityStart:return t.charCodeAt(n)===Je.NUM?(this.state=Ke.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ke.NamedEntity,this.stateNamedEntity(t,n));case Ke.NumericStart:return this.stateNumericStart(t,n);case Ke.NumericDecimal:return this.stateNumericDecimal(t,n);case Ke.NumericHex:return this.stateNumericHex(t,n);case Ke.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|bb)===Je.LOWER_X?(this.state=Ke.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ke.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const i=r-n;this.result=this.result*Math.pow(a,i)+parseInt(t.substr(n,i),a),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(oi(a)||gb(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(oi(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Je.SEMI)this.consumed+=1;else if(this.decodeMode===Ft.Strict)return 0;return this.emitCodePoint(pb(this.result),this.consumed),this.errors&&(t!==Je.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],i=(a&Vt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=xb(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ft.Attribute&&(i===0||Tb(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&Vt.VALUE_LENGTH)>>14,i!==0){if(s===Je.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Ft.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&Vt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Vt.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case Ke.NamedEntity:return this.result!==0&&(this.decodeMode!==Ft.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ke.NumericDecimal:return this.emitNumericEntity(0,2);case Ke.NumericHex:return this.emitNumericEntity(0,3);case Ke.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ke.EntityStart:return 0}}}function Sc(e){let t="";const n=new Cc(e,r=>t+=mb(r));return function(a,i){let s=0,u=0;for(;(u=a.indexOf("&",u))>=0;){t+=a.slice(s,u),n.startEntity(i);const l=n.write(a,u+1);if(l<0){s=u+n.end();break}s=u+l,u=l===0?s+1:s}const c=t+a.slice(s);return t="",c}}function xb(e,t,n,r){const a=(t&Vt.BRANCH_LENGTH)>>7,i=t&Vt.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const c=r-i;return c<0||c>=a?-1:e[n+c]-1}let s=n,u=s+a-1;for(;s<=u;){const c=s+u>>>1,l=e[c];if(l<r)s=c+1;else if(l>r)u=c-1;else return e[c+a]}return-1}Sc(yc);Sc(fb);var U;(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/"})(U||(U={}));var nn;(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"})(nn||(nn={}));var pt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(pt||(pt={}));var N;(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"})(N||(N={}));var o;(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"})(o||(o={}));const yb=new Map([[N.A,o.A],[N.ADDRESS,o.ADDRESS],[N.ANNOTATION_XML,o.ANNOTATION_XML],[N.APPLET,o.APPLET],[N.AREA,o.AREA],[N.ARTICLE,o.ARTICLE],[N.ASIDE,o.ASIDE],[N.B,o.B],[N.BASE,o.BASE],[N.BASEFONT,o.BASEFONT],[N.BGSOUND,o.BGSOUND],[N.BIG,o.BIG],[N.BLOCKQUOTE,o.BLOCKQUOTE],[N.BODY,o.BODY],[N.BR,o.BR],[N.BUTTON,o.BUTTON],[N.CAPTION,o.CAPTION],[N.CENTER,o.CENTER],[N.CODE,o.CODE],[N.COL,o.COL],[N.COLGROUP,o.COLGROUP],[N.DD,o.DD],[N.DESC,o.DESC],[N.DETAILS,o.DETAILS],[N.DIALOG,o.DIALOG],[N.DIR,o.DIR],[N.DIV,o.DIV],[N.DL,o.DL],[N.DT,o.DT],[N.EM,o.EM],[N.EMBED,o.EMBED],[N.FIELDSET,o.FIELDSET],[N.FIGCAPTION,o.FIGCAPTION],[N.FIGURE,o.FIGURE],[N.FONT,o.FONT],[N.FOOTER,o.FOOTER],[N.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[N.FORM,o.FORM],[N.FRAME,o.FRAME],[N.FRAMESET,o.FRAMESET],[N.H1,o.H1],[N.H2,o.H2],[N.H3,o.H3],[N.H4,o.H4],[N.H5,o.H5],[N.H6,o.H6],[N.HEAD,o.HEAD],[N.HEADER,o.HEADER],[N.HGROUP,o.HGROUP],[N.HR,o.HR],[N.HTML,o.HTML],[N.I,o.I],[N.IMG,o.IMG],[N.IMAGE,o.IMAGE],[N.INPUT,o.INPUT],[N.IFRAME,o.IFRAME],[N.KEYGEN,o.KEYGEN],[N.LABEL,o.LABEL],[N.LI,o.LI],[N.LINK,o.LINK],[N.LISTING,o.LISTING],[N.MAIN,o.MAIN],[N.MALIGNMARK,o.MALIGNMARK],[N.MARQUEE,o.MARQUEE],[N.MATH,o.MATH],[N.MENU,o.MENU],[N.META,o.META],[N.MGLYPH,o.MGLYPH],[N.MI,o.MI],[N.MO,o.MO],[N.MN,o.MN],[N.MS,o.MS],[N.MTEXT,o.MTEXT],[N.NAV,o.NAV],[N.NOBR,o.NOBR],[N.NOFRAMES,o.NOFRAMES],[N.NOEMBED,o.NOEMBED],[N.NOSCRIPT,o.NOSCRIPT],[N.OBJECT,o.OBJECT],[N.OL,o.OL],[N.OPTGROUP,o.OPTGROUP],[N.OPTION,o.OPTION],[N.P,o.P],[N.PARAM,o.PARAM],[N.PLAINTEXT,o.PLAINTEXT],[N.PRE,o.PRE],[N.RB,o.RB],[N.RP,o.RP],[N.RT,o.RT],[N.RTC,o.RTC],[N.RUBY,o.RUBY],[N.S,o.S],[N.SCRIPT,o.SCRIPT],[N.SEARCH,o.SEARCH],[N.SECTION,o.SECTION],[N.SELECT,o.SELECT],[N.SOURCE,o.SOURCE],[N.SMALL,o.SMALL],[N.SPAN,o.SPAN],[N.STRIKE,o.STRIKE],[N.STRONG,o.STRONG],[N.STYLE,o.STYLE],[N.SUB,o.SUB],[N.SUMMARY,o.SUMMARY],[N.SUP,o.SUP],[N.TABLE,o.TABLE],[N.TBODY,o.TBODY],[N.TEMPLATE,o.TEMPLATE],[N.TEXTAREA,o.TEXTAREA],[N.TFOOT,o.TFOOT],[N.TD,o.TD],[N.TH,o.TH],[N.THEAD,o.THEAD],[N.TITLE,o.TITLE],[N.TR,o.TR],[N.TRACK,o.TRACK],[N.TT,o.TT],[N.U,o.U],[N.UL,o.UL],[N.SVG,o.SVG],[N.VAR,o.VAR],[N.WBR,o.WBR],[N.XMP,o.XMP]]);function Rn(e){var t;return(t=yb.get(e))!==null&&t!==void 0?t:o.UNKNOWN}const j=o,Cb={[U.HTML]:new Set([j.ADDRESS,j.APPLET,j.AREA,j.ARTICLE,j.ASIDE,j.BASE,j.BASEFONT,j.BGSOUND,j.BLOCKQUOTE,j.BODY,j.BR,j.BUTTON,j.CAPTION,j.CENTER,j.COL,j.COLGROUP,j.DD,j.DETAILS,j.DIR,j.DIV,j.DL,j.DT,j.EMBED,j.FIELDSET,j.FIGCAPTION,j.FIGURE,j.FOOTER,j.FORM,j.FRAME,j.FRAMESET,j.H1,j.H2,j.H3,j.H4,j.H5,j.H6,j.HEAD,j.HEADER,j.HGROUP,j.HR,j.HTML,j.IFRAME,j.IMG,j.INPUT,j.LI,j.LINK,j.LISTING,j.MAIN,j.MARQUEE,j.MENU,j.META,j.NAV,j.NOEMBED,j.NOFRAMES,j.NOSCRIPT,j.OBJECT,j.OL,j.P,j.PARAM,j.PLAINTEXT,j.PRE,j.SCRIPT,j.SECTION,j.SELECT,j.SOURCE,j.STYLE,j.SUMMARY,j.TABLE,j.TBODY,j.TD,j.TEMPLATE,j.TEXTAREA,j.TFOOT,j.TH,j.THEAD,j.TITLE,j.TR,j.TRACK,j.UL,j.WBR,j.XMP]),[U.MATHML]:new Set([j.MI,j.MO,j.MN,j.MS,j.MTEXT,j.ANNOTATION_XML]),[U.SVG]:new Set([j.TITLE,j.FOREIGN_OBJECT,j.DESC]),[U.XLINK]:new Set,[U.XML]:new Set,[U.XMLNS]:new Set},ui=new Set([j.H1,j.H2,j.H3,j.H4,j.H5,j.H6]);N.STYLE,N.SCRIPT,N.XMP,N.IFRAME,N.NOEMBED,N.NOFRAMES,N.PLAINTEXT;var T;(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"})(T||(T={}));const $e={DATA:T.DATA,RCDATA:T.RCDATA,RAWTEXT:T.RAWTEXT,SCRIPT_DATA:T.SCRIPT_DATA,PLAINTEXT:T.PLAINTEXT,CDATA_SECTION:T.CDATA_SECTION};function Sb(e){return e>=E.DIGIT_0&&e<=E.DIGIT_9}function Fn(e){return e>=E.LATIN_CAPITAL_A&&e<=E.LATIN_CAPITAL_Z}function Ab(e){return e>=E.LATIN_SMALL_A&&e<=E.LATIN_SMALL_Z}function jt(e){return Ab(e)||Fn(e)}function po(e){return jt(e)||Sb(e)}function xr(e){return e+32}function Ac(e){return e===E.SPACE||e===E.LINE_FEED||e===E.TABULATION||e===E.FORM_FEED}function bo(e){return Ac(e)||e===E.SOLIDUS||e===E.GREATER_THAN_SIGN}function _b(e){return e===E.NULL?P.nullCharacterReference:e>1114111?P.characterReferenceOutsideUnicodeRange:gc(e)?P.surrogateCharacterReference:Tc(e)?P.noncharacterCharacterReference:Ec(e)||e===E.CARRIAGE_RETURN?P.controlCharacterReference:null}class vb{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=T.DATA,this.returnState=T.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new db(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Cc(yc,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(P.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(P.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=_b(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}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?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}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 n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ye.START_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ye.END_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ye.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ye.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(xc(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(P.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=Rn(t.tagName),t.type===ye.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(P.endTagWithAttributes),t.selfClosing&&this._err(P.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 ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ye.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:ye.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Ac(t)?ye.WHITESPACE_CHARACTER:t===E.NULL?ye.NULL_CHARACTER:ye.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ye.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=T.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ft.Attribute:Ft.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===T.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case T.DATA:{this._stateData(t);break}case T.RCDATA:{this._stateRcdata(t);break}case T.RAWTEXT:{this._stateRawtext(t);break}case T.SCRIPT_DATA:{this._stateScriptData(t);break}case T.PLAINTEXT:{this._statePlaintext(t);break}case T.TAG_OPEN:{this._stateTagOpen(t);break}case T.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case T.TAG_NAME:{this._stateTagName(t);break}case T.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case T.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case T.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case T.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case T.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case T.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case T.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case T.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case T.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case T.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case T.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case T.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case T.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case T.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case T.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case T.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case T.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case T.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case T.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case T.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case T.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case T.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case T.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case T.BOGUS_COMMENT:{this._stateBogusComment(t);break}case T.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case T.COMMENT_START:{this._stateCommentStart(t);break}case T.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case T.COMMENT:{this._stateComment(t);break}case T.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case T.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case T.COMMENT_END:{this._stateCommentEnd(t);break}case T.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case T.DOCTYPE:{this._stateDoctype(t);break}case T.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case T.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case T.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case T.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case T.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case T.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case T.CDATA_SECTION:{this._stateCdataSection(t);break}case T.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case T.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case T.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case T.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=T.TAG_OPEN;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitCodePoint(t);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case E.AMPERSAND:{this._startCharacterReference();break}case E.LESS_THAN_SIGN:{this.state=T.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(ze);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case E.LESS_THAN_SIGN:{this.state=T.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(ze);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(ze);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(ze);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(jt(t))this._createStartTagToken(),this.state=T.TAG_NAME,this._stateTagName(t);else switch(t){case E.EXCLAMATION_MARK:{this.state=T.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=T.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(P.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t);break}case E.EOF:{this._err(P.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(P.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=T.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(jt(t))this._createEndTagToken(),this.state=T.TAG_NAME,this._stateTagName(t);else switch(t){case E.GREATER_THAN_SIGN:{this._err(P.missingEndTagName),this.state=T.DATA;break}case E.EOF:{this._err(P.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(P.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.tagName+=ze;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fn(t)?xr(t):t)}}_stateRcdataLessThanSign(t){t===E.SOLIDUS?this.state=T.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){jt(t)?(this.state=T.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=T.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=T.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=T.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===E.SOLIDUS?this.state=T.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){jt(t)?(this.state=T.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case E.SOLIDUS:{this.state=T.SCRIPT_DATA_END_TAG_OPEN;break}case E.EXCLAMATION_MARK:{this.state=T.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=T.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){jt(t)?(this.state=T.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===E.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===E.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(ze);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(ze);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(ze);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===E.SOLIDUS?this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:jt(t)?(this._emitChars("<"),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){jt(t)?(this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(it.SCRIPT,!1)&&bo(this.preprocessor.peek(it.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<it.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(ze);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ze);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ze);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===E.SOLIDUS?(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(it.SCRIPT,!1)&&bo(this.preprocessor.peek(it.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<it.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._err(P.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=T.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this._leaveAttrName(),this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._leaveAttrName(),this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:{this._err(P.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.name+=ze;break}default:this.currentAttr.name+=String.fromCodePoint(Fn(t)?xr(t):t)}}_stateAfterAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case E.EQUALS_SIGN:{this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{this.state=T.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this.state=T.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingAttributeValue),this.state=T.DATA,this.emitCurrentTagToken();break}default:this.state=T.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case E.QUOTATION_MARK:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case E.APOSTROPHE:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=ze;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:{this._err(P.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this._leaveAttrValue(),this.state=T.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._err(P.missingWhitespaceBetweenAttributes),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case E.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=T.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._err(P.unexpectedSolidusInTag),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(n);break}case E.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.data+=ze;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(it.DASH_DASH,!0)?(this._createCommentToken(it.DASH_DASH.length+1),this.state=T.COMMENT_START):this._consumeSequenceIfMatch(it.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(it.DOCTYPE.length+1),this.state=T.DOCTYPE):this._consumeSequenceIfMatch(it.CDATA_START,!0)?this.inForeignNode?this.state=T.CDATA_SECTION:(this._err(P.cdataInHtmlContent),this._createCommentToken(it.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=T.BOGUS_COMMENT):this._ensureHibernation()||(this._err(P.incorrectlyOpenedComment),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_START_DASH;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptClosingOfEmptyComment),this.state=T.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=T.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptClosingOfEmptyComment),this.state=T.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=T.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_END_DASH;break}case E.LESS_THAN_SIGN:{n.data+="<",this.state=T.COMMENT_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.data+=ze;break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case E.EXCLAMATION_MARK:{n.data+="!",this.state=T.COMMENT_LESS_THAN_SIGN_BANG;break}case E.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=T.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===E.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=T.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===E.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=T.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==E.GREATER_THAN_SIGN&&t!==E.EOF&&this._err(P.nestedComment),this.state=T.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=T.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(n);break}case E.EXCLAMATION_MARK:{this.state=T.COMMENT_END_BANG;break}case E.HYPHEN_MINUS:{n.data+="-";break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=T.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{n.data+="--!",this.state=T.COMMENT_END_DASH;break}case E.GREATER_THAN_SIGN:{this._err(P.incorrectlyClosedComment),this.state=T.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=T.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case E.EOF:{this._err(P.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingWhitespaceBeforeDoctypeName),this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fn(t))this._createDoctypeToken(String.fromCharCode(xr(t))),this.state=T.DOCTYPE_NAME;else switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:{this._err(P.unexpectedNullCharacter),this._createDoctypeToken(ze),this.state=T.DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=T.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.AFTER_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.name+=ze;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fn(t)?xr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(it.PUBLIC,!1)?this.state=T.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(it.SYSTEM,!1)?this.state=T.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(P.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.publicId+=ze;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case E.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.publicId+=ze;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.QUOTATION_MARK:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.systemId+=ze;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case E.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.systemId+=ze;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.NULL:{this._err(P.unexpectedNullCharacter);break}case E.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case E.RIGHT_SQUARE_BRACKET:{this.state=T.CDATA_SECTION_BRACKET;break}case E.EOF:{this._err(P.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===E.RIGHT_SQUARE_BRACKET?this.state=T.CDATA_SECTION_END:(this._emitChars("]"),this.state=T.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case E.GREATER_THAN_SIGN:{this.state=T.DATA;break}case E.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=T.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(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&po(this.preprocessor.peek(1))?T.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){po(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===E.SEMICOLON&&this._err(P.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const _c=new Set([o.DD,o.DT,o.LI,o.OPTGROUP,o.OPTION,o.P,o.RB,o.RP,o.RT,o.RTC]),go=new Set([..._c,o.CAPTION,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]),Rr=new Set([o.APPLET,o.CAPTION,o.HTML,o.MARQUEE,o.OBJECT,o.TABLE,o.TD,o.TEMPLATE,o.TH]),Nb=new Set([...Rr,o.OL,o.UL]),Ib=new Set([...Rr,o.BUTTON]),Eo=new Set([o.ANNOTATION_XML,o.MI,o.MN,o.MO,o.MS,o.MTEXT]),To=new Set([o.DESC,o.FOREIGN_OBJECT,o.TITLE]),wb=new Set([o.TR,o.TEMPLATE,o.HTML]),Rb=new Set([o.TBODY,o.TFOOT,o.THEAD,o.TEMPLATE,o.HTML]),Ob=new Set([o.TABLE,o.TEMPLATE,o.HTML]),Lb=new Set([o.TD,o.TH]);class Db{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=o.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===U.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==U.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ui,U.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Lb,U.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Ob,U.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Rb,U.HTML)}clearBackToTableRowContext(){this.clearBackTo(wb,U.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===o.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===o.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case U.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case U.SVG:{if(To.has(a))return!1;break}case U.MATHML:{if(Eo.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Rr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Nb)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ib)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case U.HTML:{if(ui.has(n))return!0;if(Rr.has(n))return!1;break}case U.SVG:{if(To.has(n))return!1;break}case U.MATHML:{if(Eo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===U.HTML)switch(this.tagIDs[n]){case t:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===U.HTML)switch(this.tagIDs[t]){case o.TBODY:case o.THEAD:case o.TFOOT:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===U.HTML)switch(this.tagIDs[n]){case t:return!0;case o.OPTION:case o.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;_c.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;go.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&go.has(this.currentTagId);)this.pop()}}const wa=3;var Ot;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ot||(Ot={}));const xo={type:Ot.Marker};class kb{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,i=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const c=this.entries[u];if(c.type===Ot.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const d=this.treeAdapter.getAttrList(l);d.length===a&&r.push({idx:u,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<wa)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<wa)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(c=>a.get(c.name)===c.value)&&(i+=1,i>=wa&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(xo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ot.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ot.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(xo);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ot.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ot.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ot.Element&&n.element===t)}}const zt={createDocument(){return{nodeName:"#document",mode:pt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};zt.appendChild(e,i)}},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 n=e.childNodes[e.childNodes.length-1];if(zt.isTextNode(n)){n.value+=t;return}}zt.appendChild(e,zt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&zt.isTextNode(r)?r.value+=t:zt.insertBefore(e,zt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},vc="html",Pb="about:legacy-compat",Mb="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Nc=["+//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//"],Bb=[...Nc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Fb=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ic=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Hb=[...Ic,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function yo(e,t){return t.some(n=>e.startsWith(n))}function Ub(e){return e.name===vc&&e.publicId===null&&(e.systemId===null||e.systemId===Pb)}function jb(e){if(e.name!==vc)return pt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Mb)return pt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Fb.has(n))return pt.QUIRKS;let r=t===null?Bb:Nc;if(yo(n,r))return pt.QUIRKS;if(r=t===null?Ic:Hb,yo(n,r))return pt.LIMITED_QUIRKS}return pt.NO_QUIRKS}const Co={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},zb="definitionurl",Vb="definitionURL",$b=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])),Yb=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:U.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:U.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:U.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:U.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:U.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:U.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:U.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:U.XML}],["xml:space",{prefix:"xml",name:"space",namespace:U.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:U.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:U.XMLNS}]]),Gb=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])),qb=new Set([o.B,o.BIG,o.BLOCKQUOTE,o.BODY,o.BR,o.CENTER,o.CODE,o.DD,o.DIV,o.DL,o.DT,o.EM,o.EMBED,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HR,o.I,o.IMG,o.LI,o.LISTING,o.MENU,o.META,o.NOBR,o.OL,o.P,o.PRE,o.RUBY,o.S,o.SMALL,o.SPAN,o.STRONG,o.STRIKE,o.SUB,o.SUP,o.TABLE,o.TT,o.U,o.UL,o.VAR]);function Wb(e){const t=e.tagID;return t===o.FONT&&e.attrs.some(({name:r})=>r===nn.COLOR||r===nn.SIZE||r===nn.FACE)||qb.has(t)}function wc(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===zb){e.attrs[t].name=Vb;break}}function Rc(e){for(let t=0;t<e.attrs.length;t++){const n=$b.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Bi(e){for(let t=0;t<e.attrs.length;t++){const n=Yb.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Xb(e){const t=Gb.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Rn(e.tagName))}function Qb(e,t){return t===U.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function Kb(e,t,n){if(t===U.MATHML&&e===o.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===nn.ENCODING){const a=n[r].value.toLowerCase();return a===Co.TEXT_HTML||a===Co.APPLICATION_XML}}return t===U.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}function Jb(e,t,n,r){return(!r||r===U.HTML)&&Kb(e,t,n)||(!r||r===U.MATHML)&&Qb(e,t)}const Zb="hidden",eg=8,tg=3;var y;(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"})(y||(y={}));const ng={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Oc=new Set([o.TABLE,o.TBODY,o.TFOOT,o.THEAD,o.TR]),So={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:zt,onParseError:null};class Ao{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=y.INITIAL,this.originalInsertionMode=y.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={...So,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new vb(this.options,this),this.activeFormattingElements=new kb(this.treeAdapter),this.fragmentContextID=r?Rn(this.treeAdapter.getTagName(r)):o.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Db(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...So,...n};t??(t=r.treeAdapter.createElement(N.TEMPLATE,U.HTML,[]));const a=r.treeAdapter.createElement("documentmock",U.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===o.TEMPLATE&&i.tmplInsertionModeStack.unshift(y.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const i=(a=t.location)!==null&&a!==void 0?a:ng,s={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(t,n,r){var a,i;(i=(a=this.treeAdapter).onItemPush)===null||i===void 0||i.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===U.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,U.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=y.TEXT}switchToPlaintextParsing(){this.insertionMode=y.TEXT,this.originalInsertionMode=y.IN_BODY,this.tokenizer.state=$e.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)===N.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==U.HTML))switch(this.fragmentContextID){case o.TITLE:case o.TEXTAREA:{this.tokenizer.state=$e.RCDATA;break}case o.STYLE:case o.XMP:case o.IFRAME:case o.NOEMBED:case o.NOFRAMES:case o.NOSCRIPT:{this.tokenizer.state=$e.RAWTEXT;break}case o.SCRIPT:{this.tokenizer.state=$e.SCRIPT_DATA;break}case o.PLAINTEXT:{this.tokenizer.state=$e.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,U.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,U.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(N.HTML,U.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,o.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),i=r?a.lastIndexOf(r):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:c,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:c,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),i=n.type===ye.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===o.SVG&&this.treeAdapter.getTagName(n)===N.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===U.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===o.MGLYPH||t.tagID===o.MALIGNMARK)&&!this._isIntegrationPoint(r,n,U.HTML)}_processToken(t){switch(t.type){case ye.CHARACTER:{this.onCharacter(t);break}case ye.NULL_CHARACTER:{this.onNullCharacter(t);break}case ye.COMMENT:{this.onComment(t);break}case ye.DOCTYPE:{this.onDoctype(t);break}case ye.START_TAG:{this._processStartTag(t);break}case ye.END_TAG:{this.onEndTag(t);break}case ye.EOF:{this.onEof(t);break}case ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Jb(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===Ot.Marker||this.openElements.contains(a.element)),r=n<0?t-1:n-1;for(let a=r;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(o.P),this.openElements.popUntilTagNamePopped(o.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case o.TR:{this.insertionMode=y.IN_ROW;return}case o.TBODY:case o.THEAD:case o.TFOOT:{this.insertionMode=y.IN_TABLE_BODY;return}case o.CAPTION:{this.insertionMode=y.IN_CAPTION;return}case o.COLGROUP:{this.insertionMode=y.IN_COLUMN_GROUP;return}case o.TABLE:{this.insertionMode=y.IN_TABLE;return}case o.BODY:{this.insertionMode=y.IN_BODY;return}case o.FRAMESET:{this.insertionMode=y.IN_FRAMESET;return}case o.SELECT:{this._resetInsertionModeForSelect(t);return}case o.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case o.HTML:{this.insertionMode=this.headElement?y.AFTER_HEAD:y.BEFORE_HEAD;return}case o.TD:case o.TH:{if(t>0){this.insertionMode=y.IN_CELL;return}break}case o.HEAD:{if(t>0){this.insertionMode=y.IN_HEAD;return}break}}this.insertionMode=y.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===o.TEMPLATE)break;if(r===o.TABLE){this.insertionMode=y.IN_SELECT_IN_TABLE;return}}this.insertionMode=y.IN_SELECT}_isElementCausesFosterParenting(t){return Oc.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case o.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===U.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case o.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Cb[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){L1(this,t);return}switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{Vn(this,t);break}case y.BEFORE_HEAD:{$n(this,t);break}case y.IN_HEAD:{Yn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case y.AFTER_HEAD:{qn(this,t);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:{Dc(this,t);break}case y.TEXT:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Ra(this,t);break}case y.IN_TABLE_TEXT:{Hc(this,t);break}case y.IN_COLUMN_GROUP:{Or(this,t);break}case y.AFTER_BODY:{Lr(this,t);break}case y.AFTER_AFTER_BODY:{Nr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){O1(this,t);return}switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{Vn(this,t);break}case y.BEFORE_HEAD:{$n(this,t);break}case y.IN_HEAD:{Yn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case y.AFTER_HEAD:{qn(this,t);break}case y.TEXT:{this._insertCharacters(t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Ra(this,t);break}case y.IN_COLUMN_GROUP:{Or(this,t);break}case y.AFTER_BODY:{Lr(this,t);break}case y.AFTER_AFTER_BODY:{Nr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ci(this,t);return}switch(this.insertionMode){case y.INITIAL:case y.BEFORE_HTML:case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_TEMPLATE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{ci(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.AFTER_BODY:{cg(this,t);break}case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{lg(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case y.INITIAL:{dg(this,t);break}case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:{this._err(t,P.misplacedDoctype);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,P.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?D1(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{fg(this,t);break}case y.BEFORE_HEAD:{mg(this,t);break}case y.IN_HEAD:{At(this,t);break}case y.IN_HEAD_NO_SCRIPT:{gg(this,t);break}case y.AFTER_HEAD:{Tg(this,t);break}case y.IN_BODY:{tt(this,t);break}case y.IN_TABLE:{_n(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.IN_CAPTION:{p1(this,t);break}case y.IN_COLUMN_GROUP:{Ui(this,t);break}case y.IN_TABLE_BODY:{Kr(this,t);break}case y.IN_ROW:{Jr(this,t);break}case y.IN_CELL:{E1(this,t);break}case y.IN_SELECT:{zc(this,t);break}case y.IN_SELECT_IN_TABLE:{x1(this,t);break}case y.IN_TEMPLATE:{C1(this,t);break}case y.AFTER_BODY:{A1(this,t);break}case y.IN_FRAMESET:{_1(this,t);break}case y.AFTER_FRAMESET:{N1(this,t);break}case y.AFTER_AFTER_BODY:{w1(this,t);break}case y.AFTER_AFTER_FRAMESET:{R1(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?k1(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{hg(this,t);break}case y.BEFORE_HEAD:{pg(this,t);break}case y.IN_HEAD:{bg(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Eg(this,t);break}case y.AFTER_HEAD:{xg(this,t);break}case y.IN_BODY:{Qr(this,t);break}case y.TEXT:{i1(this,t);break}case y.IN_TABLE:{Kn(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.IN_CAPTION:{b1(this,t);break}case y.IN_COLUMN_GROUP:{g1(this,t);break}case y.IN_TABLE_BODY:{li(this,t);break}case y.IN_ROW:{jc(this,t);break}case y.IN_CELL:{T1(this,t);break}case y.IN_SELECT:{Vc(this,t);break}case y.IN_SELECT_IN_TABLE:{y1(this,t);break}case y.IN_TEMPLATE:{S1(this,t);break}case y.AFTER_BODY:{Yc(this,t);break}case y.IN_FRAMESET:{v1(this,t);break}case y.AFTER_FRAMESET:{I1(this,t);break}case y.AFTER_AFTER_BODY:{Nr(this,t);break}}}onEof(t){switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{Vn(this,t);break}case y.BEFORE_HEAD:{$n(this,t);break}case y.IN_HEAD:{Yn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case y.AFTER_HEAD:{qn(this,t);break}case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{Bc(this,t);break}case y.TEXT:{s1(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.IN_TEMPLATE:{$c(this,t);break}case y.AFTER_BODY:case y.IN_FRAMESET:case y.AFTER_FRAMESET:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{Hi(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===E.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 y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.TEXT:case y.IN_COLUMN_GROUP:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{this._insertCharacters(t);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:case y.AFTER_BODY:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{Lc(this,t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Ra(this,t);break}case y.IN_TABLE_TEXT:{Fc(this,t);break}}}}function rg(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Mc(e,t),n}function ag(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function ig(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),c=u&&i>=tg;!u||c?(c&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=sg(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function sg(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function og(e,t,n){const r=e.treeAdapter.getTagName(t),a=Rn(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===o.TEMPLATE&&i===U.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ug(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}function Fi(e,t){for(let n=0;n<eg;n++){const r=rg(e,t);if(!r)break;const a=ag(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=ig(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&og(e,s,i),ug(e,a,r)}}function ci(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function cg(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lg(e,t){e._appendCommentNode(t,e.document)}function Hi(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,t)}}}}function dg(e,t){e._setDocumentType(t);const n=t.forceQuirks?pt.QUIRKS:jb(t);Ub(t)||e._err(t,P.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=y.BEFORE_HTML}function kn(e,t){e._err(t,P.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,pt.QUIRKS),e.insertionMode=y.BEFORE_HTML,e._processToken(t)}function fg(e,t){t.tagID===o.HTML?(e._insertElement(t,U.HTML),e.insertionMode=y.BEFORE_HEAD):Vn(e,t)}function hg(e,t){const n=t.tagID;(n===o.HTML||n===o.HEAD||n===o.BODY||n===o.BR)&&Vn(e,t)}function Vn(e,t){e._insertFakeRootElement(),e.insertionMode=y.BEFORE_HEAD,e._processToken(t)}function mg(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.HEAD:{e._insertElement(t,U.HTML),e.headElement=e.openElements.current,e.insertionMode=y.IN_HEAD;break}default:$n(e,t)}}function pg(e,t){const n=t.tagID;n===o.HEAD||n===o.BODY||n===o.HTML||n===o.BR?$n(e,t):e._err(t,P.endTagWithoutMatchingOpenElement)}function $n(e,t){e._insertFakeElement(N.HEAD,o.HEAD),e.headElement=e.openElements.current,e.insertionMode=y.IN_HEAD,e._processToken(t)}function At(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.TITLE:{e._switchToTextParsing(t,$e.RCDATA);break}case o.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,$e.RAWTEXT):(e._insertElement(t,U.HTML),e.insertionMode=y.IN_HEAD_NO_SCRIPT);break}case o.NOFRAMES:case o.STYLE:{e._switchToTextParsing(t,$e.RAWTEXT);break}case o.SCRIPT:{e._switchToTextParsing(t,$e.SCRIPT_DATA);break}case o.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(y.IN_TEMPLATE);break}case o.HEAD:{e._err(t,P.misplacedStartTagForHeadElement);break}default:Yn(e,t)}}function bg(e,t){switch(t.tagID){case o.HEAD:{e.openElements.pop(),e.insertionMode=y.AFTER_HEAD;break}case o.BODY:case o.BR:case o.HTML:{Yn(e,t);break}case o.TEMPLATE:{cn(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function cn(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==o.TEMPLATE&&e._err(t,P.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,P.endTagWithoutMatchingOpenElement)}function Yn(e,t){e.openElements.pop(),e.insertionMode=y.AFTER_HEAD,e._processToken(t)}function gg(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.BASEFONT:case o.BGSOUND:case o.HEAD:case o.LINK:case o.META:case o.NOFRAMES:case o.STYLE:{At(e,t);break}case o.NOSCRIPT:{e._err(t,P.nestedNoscriptInHead);break}default:Gn(e,t)}}function Eg(e,t){switch(t.tagID){case o.NOSCRIPT:{e.openElements.pop(),e.insertionMode=y.IN_HEAD;break}case o.BR:{Gn(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function Gn(e,t){const n=t.type===ye.EOF?P.openElementsLeftAfterEof:P.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=y.IN_HEAD,e._processToken(t)}function Tg(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.BODY:{e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=y.IN_BODY;break}case o.FRAMESET:{e._insertElement(t,U.HTML),e.insertionMode=y.IN_FRAMESET;break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{e._err(t,P.abandonedHeadElementChild),e.openElements.push(e.headElement,o.HEAD),At(e,t),e.openElements.remove(e.headElement);break}case o.HEAD:{e._err(t,P.misplacedStartTagForHeadElement);break}default:qn(e,t)}}function xg(e,t){switch(t.tagID){case o.BODY:case o.HTML:case o.BR:{qn(e,t);break}case o.TEMPLATE:{cn(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function qn(e,t){e._insertFakeElement(N.BODY,o.BODY),e.insertionMode=y.IN_BODY,Xr(e,t)}function Xr(e,t){switch(t.type){case ye.CHARACTER:{Dc(e,t);break}case ye.WHITESPACE_CHARACTER:{Lc(e,t);break}case ye.COMMENT:{ci(e,t);break}case ye.START_TAG:{tt(e,t);break}case ye.END_TAG:{Qr(e,t);break}case ye.EOF:{Bc(e,t);break}}}function Lc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Dc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function yg(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Cg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Sg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_FRAMESET)}function Ag(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML)}function _g(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),ui.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,U.HTML)}function vg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ng(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),n||(e.formElement=e.openElements.current))}function Ig(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===o.LI&&a===o.LI||(n===o.DD||n===o.DT)&&(a===o.DD||a===o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==o.ADDRESS&&a!==o.DIV&&a!==o.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML)}function wg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.tokenizer.state=$e.PLAINTEXT}function Rg(e,t){e.openElements.hasInScope(o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.framesetOk=!1}function Og(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(N.A);n&&(Fi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Lg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Dg(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(o.NOBR)&&(Fi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function kg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Pg(e,t){e.treeAdapter.getDocumentMode(e.document)!==pt.QUIRKS&&e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=y.IN_TABLE}function kc(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,U.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Pc(e){const t=xc(e,nn.TYPE);return t!=null&&t.toLowerCase()===Zb}function Mg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,U.HTML),Pc(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Bg(e,t){e._appendElement(t,U.HTML),t.ackSelfClosing=!0}function Fg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._appendElement(t,U.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Hg(e,t){t.tagName=N.IMG,t.tagID=o.IMG,kc(e,t)}function Ug(e,t){e._insertElement(t,U.HTML),e.skipNextNewLine=!0,e.tokenizer.state=$e.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=y.TEXT}function jg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,$e.RAWTEXT)}function zg(e,t){e.framesetOk=!1,e._switchToTextParsing(t,$e.RAWTEXT)}function _o(e,t){e._switchToTextParsing(t,$e.RAWTEXT)}function Vg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===y.IN_TABLE||e.insertionMode===y.IN_CAPTION||e.insertionMode===y.IN_TABLE_BODY||e.insertionMode===y.IN_ROW||e.insertionMode===y.IN_CELL?y.IN_SELECT_IN_TABLE:y.IN_SELECT}function $g(e,t){e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML)}function Yg(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,U.HTML)}function Gg(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(o.RTC),e._insertElement(t,U.HTML)}function qg(e,t){e._reconstructActiveFormattingElements(),wc(t),Bi(t),t.selfClosing?e._appendElement(t,U.MATHML):e._insertElement(t,U.MATHML),t.ackSelfClosing=!0}function Wg(e,t){e._reconstructActiveFormattingElements(),Rc(t),Bi(t),t.selfClosing?e._appendElement(t,U.SVG):e._insertElement(t,U.SVG),t.ackSelfClosing=!0}function vo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML)}function tt(e,t){switch(t.tagID){case o.I:case o.S:case o.B:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.SMALL:case o.STRIKE:case o.STRONG:{Lg(e,t);break}case o.A:{Og(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{_g(e,t);break}case o.P:case o.DL:case o.OL:case o.UL:case o.DIV:case o.DIR:case o.NAV:case o.MAIN:case o.MENU:case o.ASIDE:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.DETAILS:case o.ADDRESS:case o.ARTICLE:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{Ag(e,t);break}case o.LI:case o.DD:case o.DT:{Ig(e,t);break}case o.BR:case o.IMG:case o.WBR:case o.AREA:case o.EMBED:case o.KEYGEN:{kc(e,t);break}case o.HR:{Fg(e,t);break}case o.RB:case o.RTC:{Yg(e,t);break}case o.RT:case o.RP:{Gg(e,t);break}case o.PRE:case o.LISTING:{vg(e,t);break}case o.XMP:{jg(e,t);break}case o.SVG:{Wg(e,t);break}case o.HTML:{yg(e,t);break}case o.BASE:case o.LINK:case o.META:case o.STYLE:case o.TITLE:case o.SCRIPT:case o.BGSOUND:case o.BASEFONT:case o.TEMPLATE:{At(e,t);break}case o.BODY:{Cg(e,t);break}case o.FORM:{Ng(e,t);break}case o.NOBR:{Dg(e,t);break}case o.MATH:{qg(e,t);break}case o.TABLE:{Pg(e,t);break}case o.INPUT:{Mg(e,t);break}case o.PARAM:case o.TRACK:case o.SOURCE:{Bg(e,t);break}case o.IMAGE:{Hg(e,t);break}case o.BUTTON:{Rg(e,t);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{kg(e,t);break}case o.IFRAME:{zg(e,t);break}case o.SELECT:{Vg(e,t);break}case o.OPTION:case o.OPTGROUP:{$g(e,t);break}case o.NOEMBED:case o.NOFRAMES:{_o(e,t);break}case o.FRAMESET:{Sg(e,t);break}case o.TEXTAREA:{Ug(e,t);break}case o.NOSCRIPT:{e.options.scriptingEnabled?_o(e,t):vo(e,t);break}case o.PLAINTEXT:{wg(e,t);break}case o.COL:case o.TH:case o.TD:case o.TR:case o.HEAD:case o.FRAME:case o.TBODY:case o.TFOOT:case o.THEAD:case o.CAPTION:case o.COLGROUP:break;default:vo(e,t)}}function Xg(e,t){if(e.openElements.hasInScope(o.BODY)&&(e.insertionMode=y.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Qg(e,t){e.openElements.hasInScope(o.BODY)&&(e.insertionMode=y.AFTER_BODY,Yc(e,t))}function Kg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Jg(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(o.FORM):n&&e.openElements.remove(n))}function Zg(e){e.openElements.hasInButtonScope(o.P)||e._insertFakeElement(N.P,o.P),e._closePElement()}function e1(e){e.openElements.hasInListItemScope(o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(o.LI),e.openElements.popUntilTagNamePopped(o.LI))}function t1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function n1(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function r1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function a1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(N.BR,o.BR),e.openElements.pop(),e.framesetOk=!1}function Mc(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(r===s&&(r!==o.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function Qr(e,t){switch(t.tagID){case o.A:case o.B:case o.I:case o.S:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.NOBR:case o.SMALL:case o.STRIKE:case o.STRONG:{Fi(e,t);break}case o.P:{Zg(e);break}case o.DL:case o.UL:case o.OL:case o.DIR:case o.DIV:case o.NAV:case o.PRE:case o.MAIN:case o.MENU:case o.ASIDE:case o.BUTTON:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.ADDRESS:case o.ARTICLE:case o.DETAILS:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.LISTING:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{Kg(e,t);break}case o.LI:{e1(e);break}case o.DD:case o.DT:{t1(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{n1(e);break}case o.BR:{a1(e);break}case o.BODY:{Xg(e,t);break}case o.HTML:{Qg(e,t);break}case o.FORM:{Jg(e);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{r1(e,t);break}case o.TEMPLATE:{cn(e,t);break}default:Mc(e,t)}}function Bc(e,t){e.tmplInsertionModeStack.length>0?$c(e,t):Hi(e,t)}function i1(e,t){var n;t.tagID===o.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function s1(e,t){e._err(t,P.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ra(e,t){if(Oc.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=y.IN_TABLE_TEXT,t.type){case ye.CHARACTER:{Hc(e,t);break}case ye.WHITESPACE_CHARACTER:{Fc(e,t);break}}else sr(e,t)}function o1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_CAPTION}function u1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_COLUMN_GROUP}function c1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.COLGROUP,o.COLGROUP),e.insertionMode=y.IN_COLUMN_GROUP,Ui(e,t)}function l1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_TABLE_BODY}function d1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.TBODY,o.TBODY),e.insertionMode=y.IN_TABLE_BODY,Kr(e,t)}function f1(e,t){e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function h1(e,t){Pc(t)?e._appendElement(t,U.HTML):sr(e,t),t.ackSelfClosing=!0}function m1(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,U.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function _n(e,t){switch(t.tagID){case o.TD:case o.TH:case o.TR:{d1(e,t);break}case o.STYLE:case o.SCRIPT:case o.TEMPLATE:{At(e,t);break}case o.COL:{c1(e,t);break}case o.FORM:{m1(e,t);break}case o.TABLE:{f1(e,t);break}case o.TBODY:case o.TFOOT:case o.THEAD:{l1(e,t);break}case o.INPUT:{h1(e,t);break}case o.CAPTION:{o1(e,t);break}case o.COLGROUP:{u1(e,t);break}default:sr(e,t)}}function Kn(e,t){switch(t.tagID){case o.TABLE:{e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode());break}case o.TEMPLATE:{cn(e,t);break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:sr(e,t)}}function sr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Xr(e,t),e.fosterParentingEnabled=n}function Fc(e,t){e.pendingCharacterTokens.push(t)}function Hc(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)sr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Uc=new Set([o.CAPTION,o.COL,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]);function p1(e,t){const n=t.tagID;Uc.has(n)?e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_TABLE,_n(e,t)):tt(e,t)}function b1(e,t){const n=t.tagID;switch(n){case o.CAPTION:case o.TABLE:{e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_TABLE,n===o.TABLE&&Kn(e,t));break}case o.BODY:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:Qr(e,t)}}function Ui(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.COL:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.TEMPLATE:{At(e,t);break}default:Or(e,t)}}function g1(e,t){switch(t.tagID){case o.COLGROUP:{e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=y.IN_TABLE);break}case o.TEMPLATE:{cn(e,t);break}case o.COL:break;default:Or(e,t)}}function Or(e,t){e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=y.IN_TABLE,e._processToken(t))}function Kr(e,t){switch(t.tagID){case o.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_ROW;break}case o.TH:case o.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(N.TR,o.TR),e.insertionMode=y.IN_ROW,Jr(e,t);break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE,_n(e,t));break}default:_n(e,t)}}function li(e,t){const n=t.tagID;switch(t.tagID){case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE);break}case o.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE,Kn(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:case o.TR:break;default:Kn(e,t)}}function Jr(e,t){switch(t.tagID){case o.TH:case o.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_CELL,e.activeFormattingElements.insertMarker();break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,Kr(e,t));break}default:_n(e,t)}}function jc(e,t){switch(t.tagID){case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY);break}case o.TABLE:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,li(e,t));break}case o.TBODY:case o.TFOOT:case o.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,li(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:break;default:Kn(e,t)}}function E1(e,t){const n=t.tagID;Uc.has(n)?(e.openElements.hasInTableScope(o.TD)||e.openElements.hasInTableScope(o.TH))&&(e._closeTableCell(),Jr(e,t)):tt(e,t)}function T1(e,t){const n=t.tagID;switch(n){case o.TD:case o.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_ROW);break}case o.TABLE:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),jc(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:break;default:Qr(e,t)}}function zc(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._insertElement(t,U.HTML);break}case o.OPTGROUP:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,U.HTML);break}case o.HR:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.INPUT:case o.KEYGEN:case o.TEXTAREA:case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),t.tagID!==o.SELECT&&e._processStartTag(t));break}case o.SCRIPT:case o.TEMPLATE:{At(e,t);break}}}function Vc(e,t){switch(t.tagID){case o.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop();break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop();break}case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode());break}case o.TEMPLATE:{cn(e,t);break}}}function x1(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):zc(e,t)}function y1(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Vc(e,t)}function C1(e,t){switch(t.tagID){case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{At(e,t);break}case o.CAPTION:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.tmplInsertionModeStack[0]=y.IN_TABLE,e.insertionMode=y.IN_TABLE,_n(e,t);break}case o.COL:{e.tmplInsertionModeStack[0]=y.IN_COLUMN_GROUP,e.insertionMode=y.IN_COLUMN_GROUP,Ui(e,t);break}case o.TR:{e.tmplInsertionModeStack[0]=y.IN_TABLE_BODY,e.insertionMode=y.IN_TABLE_BODY,Kr(e,t);break}case o.TD:case o.TH:{e.tmplInsertionModeStack[0]=y.IN_ROW,e.insertionMode=y.IN_ROW,Jr(e,t);break}default:e.tmplInsertionModeStack[0]=y.IN_BODY,e.insertionMode=y.IN_BODY,tt(e,t)}}function S1(e,t){t.tagID===o.TEMPLATE&&cn(e,t)}function $c(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Hi(e,t)}function A1(e,t){t.tagID===o.HTML?tt(e,t):Lr(e,t)}function Yc(e,t){var n;if(t.tagID===o.HTML){if(e.fragmentContext||(e.insertionMode=y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===o.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Lr(e,t)}function Lr(e,t){e.insertionMode=y.IN_BODY,Xr(e,t)}function _1(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.FRAMESET:{e._insertElement(t,U.HTML);break}case o.FRAME:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.NOFRAMES:{At(e,t);break}}}function v1(e,t){t.tagID===o.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==o.FRAMESET&&(e.insertionMode=y.AFTER_FRAMESET))}function N1(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.NOFRAMES:{At(e,t);break}}}function I1(e,t){t.tagID===o.HTML&&(e.insertionMode=y.AFTER_AFTER_FRAMESET)}function w1(e,t){t.tagID===o.HTML?tt(e,t):Nr(e,t)}function Nr(e,t){e.insertionMode=y.IN_BODY,Xr(e,t)}function R1(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.NOFRAMES:{At(e,t);break}}}function O1(e,t){t.chars=ze,e._insertCharacters(t)}function L1(e,t){e._insertCharacters(t),e.framesetOk=!1}function Gc(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==U.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function D1(e,t){if(Wb(t))Gc(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===U.MATHML?wc(t):r===U.SVG&&(Xb(t),Rc(t)),Bi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function k1(e,t){if(t.tagID===o.P||t.tagID===o.BR){Gc(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===U.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}N.AREA,N.BASE,N.BASEFONT,N.BGSOUND,N.BR,N.COL,N.EMBED,N.FRAME,N.HR,N.IMG,N.INPUT,N.KEYGEN,N.LINK,N.META,N.PARAM,N.SOURCE,N.TRACK,N.WBR;const P1=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),No={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function qc(e,t){const n=Y1(e),r=pc("type",{handlers:{root:M1,element:B1,text:F1,comment:Xc,doctype:H1,raw:j1},unknown:z1}),a={parser:n?new Ao(No):Ao.getFragmentParser(void 0,No),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),On(a,Pt());const i=n?a.parser.document:a.parser.getFragment(),s=qp(i,{file:a.options.file});return a.stitches&&Di(s,"comment",function(u,c,l){const d=u;if(d.value.stitch&&l&&c!==void 0){const f=l.children;return f[c]=d.value.stitch,c}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Wc(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function M1(e,t){Wc(e.children,t)}function B1(e,t){V1(e,t),Wc(e.children,t),$1(e,t)}function F1(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ye.CHARACTER,chars:e.value,location:or(e)};On(t,Pt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function H1(e,t){const n={type:ye.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:or(e)};On(t,Pt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function U1(e,t){t.stitches=!0;const n=G1(e);if("children"in e&&"children"in n){const r=qc({type:"root",children:e.children},t.options);n.children=r.children}Xc({type:"comment",value:{stitch:n}},t)}function Xc(e,t){const n=e.value,r={type:ye.COMMENT,data:n,location:or(e)};On(t,Pt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function j1(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Qc(t,Pt(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function z1(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))U1(n,t);else{let r="";throw P1.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function On(e,t){Qc(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=$e.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Qc(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function V1(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===$e.PLAINTEXT)return;On(t,Pt(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:tn.html;a===tn.html&&n==="svg"&&(a=tn.svg);const i=Jp({...e,children:[]},{space:a===tn.svg?"svg":"html"}),s={type:ye.START_TAG,tagName:n,tagID:Rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:or(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function $1(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&sb.includes(n)||t.parser.tokenizer.state===$e.PLAINTEXT)return;On(t,Yr(e));const r={type:ye.END_TAG,tagName:n,tagID:Rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:or(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===$e.RCDATA||t.parser.tokenizer.state===$e.RAWTEXT||t.parser.tokenizer.state===$e.SCRIPT_DATA)&&(t.parser.tokenizer.state=$e.DATA)}function Y1(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function or(e){const t=Pt(e)||{line:void 0,column:void 0,offset:void 0},n=Yr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function G1(e){return"children"in e?An({...e,children:[]}):An(e)}function Kc(e){return function(t,n){return qc(t,{...e,file:n})}}const q1=e=>We.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},We.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zM7.07 18.28c.43-.9 3.05-1.78 4.93-1.78s4.51.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93.59-6.36 2.33A7.95 7.95 0 0 1 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-.83 0-1.5-.67-1.5-1.5S11.17 8 12 8s1.5.67 1.5 1.5S12.83 11 12 11z"})),W1=({content:e,metaData:t})=>{const{chatlineLabelUserTranslation:n}=yi();return B.jsxDEV("div",{className:"flex px-3 justify-between mt-8 bg-gray-200 rounded-lg",children:[B.jsxDEV("div",{className:"w-10 mr-3 flex-col content-center",children:B.jsxDEV("div",{children:B.jsxDEV(q1,{fill:"#4564d6"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:24,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:23,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:22,columnNumber:7},void 0),B.jsxDEV("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":" text-gray-800"}`,children:[B.jsxDEV("p",{className:"font-bold",children:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:34,columnNumber:9},void 0),B.jsxDEV("div",{children:B.jsxDEV(dc,{rehypePlugins:[Kc],children:e&&e},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:36,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:35,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:27,columnNumber:7},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:21,columnNumber:5},void 0)},X1=({})=>{const{companySettings:e}=k.useContext(Zn);return B.jsxDEV("div",{className:`assistant
|
|
85
|
+
`},a)),i}function lp(e,t){return e&&"run"in e?async function(n,r){const a=to(n,{file:r,...t});await e.run(a,r)}:function(n,r){return to(n,{file:r,...t||e})}}function no(e){if(e)throw e}var xa,ro;function dp(){if(ro)return xa;ro=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),f=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!f)return!1;var h;for(h in l);return typeof h>"u"||e.call(l,h)},s=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},u=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return xa=function c(){var l,d,f,h,m,_,A=arguments[0],O=1,v=arguments.length,L=!1;for(typeof A=="boolean"&&(L=A,A=arguments[1]||{},O=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});O<v;++O)if(l=arguments[O],l!=null)for(d in l)f=u(A,d),h=u(l,d),A!==h&&(L&&h&&(i(h)||(m=a(h)))?(m?(m=!1,_=f&&a(f)?f:[]):_=f&&i(f)?f:{},s(A,{name:d,newValue:c(L,_,h)})):typeof h<"u"&&s(A,{name:d,newValue:h}));return A},xa}var fp=dp();const ya=Ur(fp);function ri(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function hp(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...a);function u(c,...l){const d=e[++i];let f=-1;if(c){s(c);return}for(;++f<a.length;)(l[f]===null||l[f]===void 0)&&(l[f]=a[f]);a=l,d?mp(d,u)(...l):s(null,...l)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function mp(e,t){let n;return r;function r(...s){const u=e.length>s.length;let c;u&&s.push(a);try{c=e.apply(this,s)}catch(l){const d=l;if(u&&n)throw d;return a(d)}u||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...u){n||(n=!0,t(s,...u))}function i(s){a(null,s)}}const vt={basename:pp,dirname:bp,extname:gp,join:Ep,sep:"/"};function pp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ir(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function bp(e){if(ir(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gp(e){ir(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Ep(...e){let t=-1,n;for(;++t<e.length;)ir(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Tp(n)}function Tp(e){ir(e);const t=e.codePointAt(0)===47;let n=xp(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xp(e,t){let n="",r=0,a=-1,i=0,s=-1,u,c;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else u===46&&i>-1?i++:i=-1}return n}function ir(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yp={cwd:Cp};function Cp(){return"/"}function ai(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Sp(e){if(typeof e=="string")e=new URL(e);else if(!ai(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Ap(e)}function Ap(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Ca=["history","path","basename","stem","extname","dirname"];class lc{constructor(t){let n;t?ai(t)?n={path:t}:typeof t=="string"||_p(t)?n={value:t}:n=t:n={},this.cwd=yp.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ca.length;){const i=Ca[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)Ca.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?vt.basename(this.path):void 0}set basename(t){Aa(t,"basename"),Sa(t,"basename"),this.path=vt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vt.dirname(this.path):void 0}set dirname(t){ao(this.basename,"dirname"),this.path=vt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vt.extname(this.path):void 0}set extname(t){if(Sa(t,"extname"),ao(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ai(t)&&(t=Sp(t)),Aa(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vt.basename(this.path,this.extname):void 0}set stem(t){Aa(t,"stem"),Sa(t,"stem"),this.path=vt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new et(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sa(e,t){if(e&&e.includes(vt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vt.sep+"`")}function Aa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ao(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function _p(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vp=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};Object.setPrototypeOf(i,r);const s=Object.getOwnPropertyNames(a);for(const u of s){const c=Object.getOwnPropertyDescriptor(a,u);c&&Object.defineProperty(i,u,c)}return i}),Np={}.hasOwnProperty;class ki extends vp{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=hp()}copy(){const t=new ki;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ya(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Na("data",this.frozen),this.namespace[t]=n,this):Np.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Na("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Tr(t),r=this.parser||this.Parser;return _a("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),_a("process",this.parser||this.Parser),va("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const u=Tr(t),c=r.parse(u);r.run(c,u,function(d,f,h){if(d||!f||!h)return l(d);const m=f,_=r.stringify(m,h);Rp(_)?h.value=_:h.result=_,l(d,h)});function l(d,f){d||!f?s(d):i?i(f):(S(n,"`done` is defined if `resolve` is not"),n(void 0,f))}}}processSync(t){let n=!1,r;return this.freeze(),_a("processSync",this.parser||this.Parser),va("processSync",this.compiler||this.Compiler),this.process(t,a),so("processSync","process",n),S(r,"we either bailed on an error or have a tree"),r;function a(i,s){n=!0,no(i),r=s}}run(t,n,r){io(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,u){S(typeof n!="function","`file` can’t be a `done` anymore, we checked");const c=Tr(n);a.run(t,c,l);function l(d,f,h){const m=f||t;d?u(d):s?s(m):(S(r,"`done` is defined if `resolve` is not"),r(void 0,m,h))}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),so("runSync","run",r),S(a,"we either bailed on an error or have a tree"),a;function i(s,u){no(s),a=u,r=!0}}stringify(t,n){this.freeze();const r=Tr(n),a=this.compiler||this.Compiler;return va("stringify",a),io(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(Na("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...f]=l;c(d,f)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(l.plugins),l.settings&&(a.settings=ya(!0,a.settings,l.settings))}function u(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const f=l[d];i(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,d){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===l){h=f;break}if(h===-1)r.push([l,...d]);else if(d.length>0){let[m,..._]=d;const A=r[h][1];ri(A)&&ri(m)&&(m=ya(!0,A,m)),r[h]=[l,m,..._]}}}}const Ip=new ki().freeze();function _a(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function va(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Na(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function io(e){if(!ri(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function so(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tr(e){return wp(e)?e:new lc(e)}function wp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Rp(e){return typeof e=="string"||Op(e)}function Op(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Lp="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",oo=[],uo={allowDangerousHtml:!0},Dp=/^(https?|ircs?|mailto|xmpp)$/i,kp=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function dc(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,i=e.components,s=e.disallowedElements,u=e.rehypePlugins||oo,c=e.remarkPlugins||oo,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uo}:uo,d=e.skipHtml,f=e.unwrapDisallowed,h=e.urlTransform||Pp,m=Ip().use(pm).use(c).use(lp,l).use(u),_=new lc;typeof r=="string"?_.value=r:fa("Unexpected value `"+r+"` for `children` prop, expected `string`"),t&&s&&fa("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other");for(const L of kp)Object.hasOwn(e,L.from)&&fa("Unexpected `"+L.from+"` prop, "+(L.to?"use `"+L.to+"` instead":"remove it")+" (see <"+Lp+"#"+L.id+"> for more info)");const A=m.parse(_);let O=m.runSync(A,_);return a&&(O={type:"element",tagName:"div",properties:{className:a},children:O.type==="root"?O.children:[O]}),Di(O,v),$f(O,{Fragment:aa.Fragment,components:i,ignoreInvalidStyle:!0,jsx:aa.jsx,jsxs:aa.jsxs,passKeys:!0,passNode:!0});function v(L,M,V){if(L.type==="raw"&&V&&typeof M=="number")return d?V.children.splice(M,1):V.children[M]={type:"text",value:L.value},M;if(L.type==="element"){let R;for(R in pa)if(Object.hasOwn(pa,R)&&Object.hasOwn(L.properties,R)){const D=L.properties[R],ae=pa[R];(ae===null||ae.includes(L.tagName))&&(L.properties[R]=h(String(D||""),R,L))}}if(L.type==="element"){let R=t?!t.includes(L.tagName):s?s.includes(L.tagName):!1;if(!R&&n&&typeof M=="number"&&(R=!n(L,M,V)),R&&V&&typeof M=="number")return f&&L.children?V.children.splice(M,1,...L.children):V.children.splice(M,1),M}}}function Pp(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t<0||a>-1&&t>a||n>-1&&t>n||r>-1&&t>r||Dp.test(e.slice(0,t))?e:""}const co=/[#.]/g;function Mp(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){co.lastIndex=a;const u=co.exec(n),c=n.slice(a,u?u.index:n.length);c&&(i?i==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:s=c,a+=c.length),u&&(i=u[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const Bp=new Set(["button","menu","reset","submit"]),ii={}.hasOwnProperty;function fc(e,t,n){const r=n&&jp(n);function a(i,s,...u){let c=-1,l;if(i==null){l={type:"root",children:[]};const d=s;u.unshift(d)}else if(l=Mp(i,t),l.tagName=l.tagName.toLowerCase(),r&&ii.call(r,l.tagName)&&(l.tagName=r[l.tagName]),Fp(s,l.tagName)){let d;for(d in s)ii.call(s,d)&&Hp(e,l.properties,d,s[d])}else u.unshift(s);for(;++c<u.length;)si(l.children,u[c]);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return a}function Fp(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?Bp.has(e.type.toLowerCase()):!("value"in e)}function Hp(e,t,n,r){const a=$r(e,n);let i=-1,s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?a.spaceSeparated?s=vs(r):a.commaSeparated?s=ys(r):a.commaOrSpaceSeparated?s=vs(ys(r).join(" ")):s=lo(a,a.property,r):Array.isArray(r)?s=r.concat():s=a.property==="style"?Up(r):String(r);if(Array.isArray(s)){const u=[];for(;++i<s.length;){const c=lo(a,a.property,s[i]);u[i]=c}s=u}if(a.property==="className"&&Array.isArray(t.className)){const u=s;s=t.className.concat(u)}t[a.property]=s}}function si(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)si(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?si(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function lo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Xn(n)===Xn(t)))return!0}return n}function Up(e){const t=[];let n;for(n in e)ii.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function jp(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const Vp=["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","solidColor","textArea","textPath"],zp=fc(ar,"div"),$p=fc(Gt,"g",Vp);function Yp(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const c=fo(t,n[s-1]);u=c===-1?t.length+1:c+1,n[s]=u}if(u>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const u=n[n.length-1],c=fo(t,u),l=c===-1?t.length+1:c+1;if(u===l)break;n.push(l)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function fo(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
86
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const tn={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},hc={}.hasOwnProperty,Gp=Object.prototype;function qp(e,t){const n=t||{};return Pi({file:n.file||void 0,location:!1,schema:n.space==="svg"?Gt:ar,verbose:n.verbose||!1},e)}function Pi(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},vr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:mc(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=Yp(i),u=s.toPoint(0),c=s.toPoint(i.length);S(u,"expected `start`"),S(c,"expected `end`"),n.position={start:u,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},vr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},vr(e,r,n),n}default:return n=Wp(e,t),n}}function mc(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Pi(e,t[n]);r.push(a)}return r}function Wp(e,t){const n=e.schema;e.schema=t.namespaceURI===tn.svg?Gt:ar;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],c=(u.prefix?u.prefix+":":"")+u.name;hc.call(Gp,c)||(a[c]=u.value)}const s=(e.schema.space==="svg"?$p:zp)(t.tagName,a,mc(e,t.childNodes));if(vr(e,t,s),s.tagName==="template"){const u=t,c=u.sourceCodeLocation,l=c&&c.startTag&&Tn(c.startTag),d=c&&c.endTag&&Tn(c.endTag),f=Pi(e,u.content);l&&d&&e.file&&(f.position={start:l.end,end:d.start}),s.content=f}return e.schema=n,s}function vr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Xp(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Xp(e,t,n){const r=Tn(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)hc.call(n.attrs,s)&&(i[$r(e.schema,s).property]=Tn(n.attrs[s]));S(n.startTag,"a start tag should exist");const u=Tn(n.startTag),c=n.endTag?Tn(n.endTag):void 0,l={opening:u};c&&(l.closing=c),l.properties=i,t.data={position:l}}}return r}function Tn(e){const t=ho({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ho({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ho(e){return e.line&&e.column?e:void 0}const mo={}.hasOwnProperty;function pc(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const u=r.handlers;if(a&&mo.call(a,e)){const c=String(a[e]);s=mo.call(u,c)?u[c]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Qp={},Kp={}.hasOwnProperty,bc=pc("type",{handlers:{root:Zp,element:ab,text:nb,comment:rb,doctype:tb}});function Jp(e,t){const r=(t||Qp).space;return bc(e,r==="svg"?Gt:ar)}function Zp(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Mi(e.children,n,t),wn(e,n),n}function eb(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Mi(e.children,n,t),wn(e,n),n}function tb(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return wn(e,t),t}function nb(e){const t={nodeName:"#text",value:e.value,parentNode:null};return wn(e,t),t}function rb(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return wn(e,t),t}function ab(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Gt);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&Kp.call(e.properties,i)){const c=ib(r,i,e.properties[i]);c&&a.push(c)}}const s=r.space;S(s);const u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:tn[s],childNodes:[],parentNode:null};return u.childNodes=Mi(e.children,u,r),wn(e,u),e.tagName==="template"&&e.content&&(u.content=eb(e.content,r)),u}function ib(e,t,n){const r=$r(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Iu(n):Bu(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=r.attribute.slice(0,i)),a.namespace=tn[r.space]}return a}function Mi(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=bc(e[r],n);i.parentNode=t,a.push(i)}return a}function wn(e,t){const n=e.position;n&&n.start&&n.end&&(S(typeof n.start.offset=="number"),S(typeof n.end.offset=="number"),t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const sb=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],ob=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]),Ve="�";var E;(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"})(E||(E={}));const it={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gc(e){return e>=55296&&e<=57343}function ub(e){return e>=56320&&e<=57343}function cb(e,t){return(e-55296)*1024+9216+t}function Ec(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Tc(e){return e>=64976&&e<=65007||ob.has(e)}var P;(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"})(P||(P={}));const lb=65536;class db{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=lb,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,n){const{line:r,col:a,offset:i}=this,s=a+n,u=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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 n=this.html.charCodeAt(this.pos+1);if(ub(n))return this.pos++,this._addGap(),cb(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(P.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,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const r=this.html.charCodeAt(n);return r===E.CARRIAGE_RETURN?E.LINE_FEED:r}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,E.EOF;let t=this.html.charCodeAt(this.pos);return t===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):t===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,gc(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===E.LINE_FEED||t===E.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Ec(t)?this._err(P.controlCharacterInInputStream):Tc(t)&&this._err(P.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ye;(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"})(ye||(ye={}));function xc(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const yc=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))),fb=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ia;const hb=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]]),mb=(Ia=String.fromCodePoint)!==null&&Ia!==void 0?Ia: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 pb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=hb.get(e))!==null&&t!==void 0?t:e}var Je;(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"})(Je||(Je={}));const bb=32;var zt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(zt||(zt={}));function oi(e){return e>=Je.ZERO&&e<=Je.NINE}function gb(e){return e>=Je.UPPER_A&&e<=Je.UPPER_F||e>=Je.LOWER_A&&e<=Je.LOWER_F}function Eb(e){return e>=Je.UPPER_A&&e<=Je.UPPER_Z||e>=Je.LOWER_A&&e<=Je.LOWER_Z||oi(e)}function Tb(e){return e===Je.EQUALS||Eb(e)}var Ke;(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"})(Ke||(Ke={}));var Ft;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ft||(Ft={}));class Cc{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ft.Strict}startEntity(t){this.decodeMode=t,this.state=Ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ke.EntityStart:return t.charCodeAt(n)===Je.NUM?(this.state=Ke.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ke.NamedEntity,this.stateNamedEntity(t,n));case Ke.NumericStart:return this.stateNumericStart(t,n);case Ke.NumericDecimal:return this.stateNumericDecimal(t,n);case Ke.NumericHex:return this.stateNumericHex(t,n);case Ke.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|bb)===Je.LOWER_X?(this.state=Ke.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ke.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const i=r-n;this.result=this.result*Math.pow(a,i)+parseInt(t.substr(n,i),a),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(oi(a)||gb(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(oi(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Je.SEMI)this.consumed+=1;else if(this.decodeMode===Ft.Strict)return 0;return this.emitCodePoint(pb(this.result),this.consumed),this.errors&&(t!==Je.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],i=(a&zt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=xb(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ft.Attribute&&(i===0||Tb(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&zt.VALUE_LENGTH)>>14,i!==0){if(s===Je.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Ft.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&zt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~zt.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case Ke.NamedEntity:return this.result!==0&&(this.decodeMode!==Ft.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ke.NumericDecimal:return this.emitNumericEntity(0,2);case Ke.NumericHex:return this.emitNumericEntity(0,3);case Ke.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ke.EntityStart:return 0}}}function Sc(e){let t="";const n=new Cc(e,r=>t+=mb(r));return function(a,i){let s=0,u=0;for(;(u=a.indexOf("&",u))>=0;){t+=a.slice(s,u),n.startEntity(i);const l=n.write(a,u+1);if(l<0){s=u+n.end();break}s=u+l,u=l===0?s+1:s}const c=t+a.slice(s);return t="",c}}function xb(e,t,n,r){const a=(t&zt.BRANCH_LENGTH)>>7,i=t&zt.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const c=r-i;return c<0||c>=a?-1:e[n+c]-1}let s=n,u=s+a-1;for(;s<=u;){const c=s+u>>>1,l=e[c];if(l<r)s=c+1;else if(l>r)u=c-1;else return e[c+a]}return-1}Sc(yc);Sc(fb);var U;(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/"})(U||(U={}));var nn;(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"})(nn||(nn={}));var pt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(pt||(pt={}));var N;(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"})(N||(N={}));var o;(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"})(o||(o={}));const yb=new Map([[N.A,o.A],[N.ADDRESS,o.ADDRESS],[N.ANNOTATION_XML,o.ANNOTATION_XML],[N.APPLET,o.APPLET],[N.AREA,o.AREA],[N.ARTICLE,o.ARTICLE],[N.ASIDE,o.ASIDE],[N.B,o.B],[N.BASE,o.BASE],[N.BASEFONT,o.BASEFONT],[N.BGSOUND,o.BGSOUND],[N.BIG,o.BIG],[N.BLOCKQUOTE,o.BLOCKQUOTE],[N.BODY,o.BODY],[N.BR,o.BR],[N.BUTTON,o.BUTTON],[N.CAPTION,o.CAPTION],[N.CENTER,o.CENTER],[N.CODE,o.CODE],[N.COL,o.COL],[N.COLGROUP,o.COLGROUP],[N.DD,o.DD],[N.DESC,o.DESC],[N.DETAILS,o.DETAILS],[N.DIALOG,o.DIALOG],[N.DIR,o.DIR],[N.DIV,o.DIV],[N.DL,o.DL],[N.DT,o.DT],[N.EM,o.EM],[N.EMBED,o.EMBED],[N.FIELDSET,o.FIELDSET],[N.FIGCAPTION,o.FIGCAPTION],[N.FIGURE,o.FIGURE],[N.FONT,o.FONT],[N.FOOTER,o.FOOTER],[N.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[N.FORM,o.FORM],[N.FRAME,o.FRAME],[N.FRAMESET,o.FRAMESET],[N.H1,o.H1],[N.H2,o.H2],[N.H3,o.H3],[N.H4,o.H4],[N.H5,o.H5],[N.H6,o.H6],[N.HEAD,o.HEAD],[N.HEADER,o.HEADER],[N.HGROUP,o.HGROUP],[N.HR,o.HR],[N.HTML,o.HTML],[N.I,o.I],[N.IMG,o.IMG],[N.IMAGE,o.IMAGE],[N.INPUT,o.INPUT],[N.IFRAME,o.IFRAME],[N.KEYGEN,o.KEYGEN],[N.LABEL,o.LABEL],[N.LI,o.LI],[N.LINK,o.LINK],[N.LISTING,o.LISTING],[N.MAIN,o.MAIN],[N.MALIGNMARK,o.MALIGNMARK],[N.MARQUEE,o.MARQUEE],[N.MATH,o.MATH],[N.MENU,o.MENU],[N.META,o.META],[N.MGLYPH,o.MGLYPH],[N.MI,o.MI],[N.MO,o.MO],[N.MN,o.MN],[N.MS,o.MS],[N.MTEXT,o.MTEXT],[N.NAV,o.NAV],[N.NOBR,o.NOBR],[N.NOFRAMES,o.NOFRAMES],[N.NOEMBED,o.NOEMBED],[N.NOSCRIPT,o.NOSCRIPT],[N.OBJECT,o.OBJECT],[N.OL,o.OL],[N.OPTGROUP,o.OPTGROUP],[N.OPTION,o.OPTION],[N.P,o.P],[N.PARAM,o.PARAM],[N.PLAINTEXT,o.PLAINTEXT],[N.PRE,o.PRE],[N.RB,o.RB],[N.RP,o.RP],[N.RT,o.RT],[N.RTC,o.RTC],[N.RUBY,o.RUBY],[N.S,o.S],[N.SCRIPT,o.SCRIPT],[N.SEARCH,o.SEARCH],[N.SECTION,o.SECTION],[N.SELECT,o.SELECT],[N.SOURCE,o.SOURCE],[N.SMALL,o.SMALL],[N.SPAN,o.SPAN],[N.STRIKE,o.STRIKE],[N.STRONG,o.STRONG],[N.STYLE,o.STYLE],[N.SUB,o.SUB],[N.SUMMARY,o.SUMMARY],[N.SUP,o.SUP],[N.TABLE,o.TABLE],[N.TBODY,o.TBODY],[N.TEMPLATE,o.TEMPLATE],[N.TEXTAREA,o.TEXTAREA],[N.TFOOT,o.TFOOT],[N.TD,o.TD],[N.TH,o.TH],[N.THEAD,o.THEAD],[N.TITLE,o.TITLE],[N.TR,o.TR],[N.TRACK,o.TRACK],[N.TT,o.TT],[N.U,o.U],[N.UL,o.UL],[N.SVG,o.SVG],[N.VAR,o.VAR],[N.WBR,o.WBR],[N.XMP,o.XMP]]);function Rn(e){var t;return(t=yb.get(e))!==null&&t!==void 0?t:o.UNKNOWN}const j=o,Cb={[U.HTML]:new Set([j.ADDRESS,j.APPLET,j.AREA,j.ARTICLE,j.ASIDE,j.BASE,j.BASEFONT,j.BGSOUND,j.BLOCKQUOTE,j.BODY,j.BR,j.BUTTON,j.CAPTION,j.CENTER,j.COL,j.COLGROUP,j.DD,j.DETAILS,j.DIR,j.DIV,j.DL,j.DT,j.EMBED,j.FIELDSET,j.FIGCAPTION,j.FIGURE,j.FOOTER,j.FORM,j.FRAME,j.FRAMESET,j.H1,j.H2,j.H3,j.H4,j.H5,j.H6,j.HEAD,j.HEADER,j.HGROUP,j.HR,j.HTML,j.IFRAME,j.IMG,j.INPUT,j.LI,j.LINK,j.LISTING,j.MAIN,j.MARQUEE,j.MENU,j.META,j.NAV,j.NOEMBED,j.NOFRAMES,j.NOSCRIPT,j.OBJECT,j.OL,j.P,j.PARAM,j.PLAINTEXT,j.PRE,j.SCRIPT,j.SECTION,j.SELECT,j.SOURCE,j.STYLE,j.SUMMARY,j.TABLE,j.TBODY,j.TD,j.TEMPLATE,j.TEXTAREA,j.TFOOT,j.TH,j.THEAD,j.TITLE,j.TR,j.TRACK,j.UL,j.WBR,j.XMP]),[U.MATHML]:new Set([j.MI,j.MO,j.MN,j.MS,j.MTEXT,j.ANNOTATION_XML]),[U.SVG]:new Set([j.TITLE,j.FOREIGN_OBJECT,j.DESC]),[U.XLINK]:new Set,[U.XML]:new Set,[U.XMLNS]:new Set},ui=new Set([j.H1,j.H2,j.H3,j.H4,j.H5,j.H6]);N.STYLE,N.SCRIPT,N.XMP,N.IFRAME,N.NOEMBED,N.NOFRAMES,N.PLAINTEXT;var T;(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"})(T||(T={}));const $e={DATA:T.DATA,RCDATA:T.RCDATA,RAWTEXT:T.RAWTEXT,SCRIPT_DATA:T.SCRIPT_DATA,PLAINTEXT:T.PLAINTEXT,CDATA_SECTION:T.CDATA_SECTION};function Sb(e){return e>=E.DIGIT_0&&e<=E.DIGIT_9}function Fn(e){return e>=E.LATIN_CAPITAL_A&&e<=E.LATIN_CAPITAL_Z}function Ab(e){return e>=E.LATIN_SMALL_A&&e<=E.LATIN_SMALL_Z}function jt(e){return Ab(e)||Fn(e)}function po(e){return jt(e)||Sb(e)}function xr(e){return e+32}function Ac(e){return e===E.SPACE||e===E.LINE_FEED||e===E.TABULATION||e===E.FORM_FEED}function bo(e){return Ac(e)||e===E.SOLIDUS||e===E.GREATER_THAN_SIGN}function _b(e){return e===E.NULL?P.nullCharacterReference:e>1114111?P.characterReferenceOutsideUnicodeRange:gc(e)?P.surrogateCharacterReference:Tc(e)?P.noncharacterCharacterReference:Ec(e)||e===E.CARRIAGE_RETURN?P.controlCharacterReference:null}class vb{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=T.DATA,this.returnState=T.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new db(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Cc(yc,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(P.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(P.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=_b(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}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?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}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 n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ye.START_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ye.END_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ye.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ye.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(xc(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(P.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=Rn(t.tagName),t.type===ye.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(P.endTagWithAttributes),t.selfClosing&&this._err(P.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 ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ye.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:ye.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Ac(t)?ye.WHITESPACE_CHARACTER:t===E.NULL?ye.NULL_CHARACTER:ye.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ye.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=T.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ft.Attribute:Ft.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===T.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===T.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case T.DATA:{this._stateData(t);break}case T.RCDATA:{this._stateRcdata(t);break}case T.RAWTEXT:{this._stateRawtext(t);break}case T.SCRIPT_DATA:{this._stateScriptData(t);break}case T.PLAINTEXT:{this._statePlaintext(t);break}case T.TAG_OPEN:{this._stateTagOpen(t);break}case T.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case T.TAG_NAME:{this._stateTagName(t);break}case T.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case T.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case T.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case T.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case T.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case T.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case T.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case T.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case T.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case T.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case T.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case T.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case T.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case T.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case T.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case T.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case T.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case T.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case T.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case T.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case T.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case T.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case T.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case T.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case T.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case T.BOGUS_COMMENT:{this._stateBogusComment(t);break}case T.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case T.COMMENT_START:{this._stateCommentStart(t);break}case T.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case T.COMMENT:{this._stateComment(t);break}case T.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case T.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case T.COMMENT_END:{this._stateCommentEnd(t);break}case T.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case T.DOCTYPE:{this._stateDoctype(t);break}case T.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case T.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case T.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case T.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case T.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case T.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case T.CDATA_SECTION:{this._stateCdataSection(t);break}case T.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case T.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case T.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case T.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=T.TAG_OPEN;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitCodePoint(t);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case E.AMPERSAND:{this._startCharacterReference();break}case E.LESS_THAN_SIGN:{this.state=T.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Ve);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case E.LESS_THAN_SIGN:{this.state=T.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Ve);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Ve);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Ve);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(jt(t))this._createStartTagToken(),this.state=T.TAG_NAME,this._stateTagName(t);else switch(t){case E.EXCLAMATION_MARK:{this.state=T.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=T.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(P.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t);break}case E.EOF:{this._err(P.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(P.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=T.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(jt(t))this._createEndTagToken(),this.state=T.TAG_NAME,this._stateTagName(t);else switch(t){case E.GREATER_THAN_SIGN:{this._err(P.missingEndTagName),this.state=T.DATA;break}case E.EOF:{this._err(P.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(P.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.tagName+=Ve;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fn(t)?xr(t):t)}}_stateRcdataLessThanSign(t){t===E.SOLIDUS?this.state=T.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){jt(t)?(this.state=T.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=T.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=T.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=T.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===E.SOLIDUS?this.state=T.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){jt(t)?(this.state=T.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case E.SOLIDUS:{this.state=T.SCRIPT_DATA_END_TAG_OPEN;break}case E.EXCLAMATION_MARK:{this.state=T.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=T.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){jt(t)?(this.state=T.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===E.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===E.HYPHEN_MINUS?(this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=T.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Ve);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(Ve);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_ESCAPED,this._emitChars(Ve);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===E.SOLIDUS?this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:jt(t)?(this._emitChars("<"),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){jt(t)?(this.state=T.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(it.SCRIPT,!1)&&bo(this.preprocessor.peek(it.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<it.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Ve);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ve);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.GREATER_THAN_SIGN:{this.state=T.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ve);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===E.SOLIDUS?(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(it.SCRIPT,!1)&&bo(this.preprocessor.peek(it.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<it.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=T.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=T.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._err(P.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=T.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this._leaveAttrName(),this.state=T.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._leaveAttrName(),this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:{this._err(P.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.name+=Ve;break}default:this.currentAttr.name+=String.fromCodePoint(Fn(t)?xr(t):t)}}_stateAfterAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:{this.state=T.SELF_CLOSING_START_TAG;break}case E.EQUALS_SIGN:{this.state=T.BEFORE_ATTRIBUTE_VALUE;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=T.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{this.state=T.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this.state=T.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingAttributeValue),this.state=T.DATA,this.emitCurrentTagToken();break}default:this.state=T.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case E.QUOTATION_MARK:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=Ve;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case E.APOSTROPHE:{this.state=T.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=Ve;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=Ve;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:{this._err(P.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=T.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this._leaveAttrValue(),this.state=T.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=T.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._err(P.missingWhitespaceBetweenAttributes),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case E.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=T.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._err(P.unexpectedSolidusInTag),this.state=T.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(n);break}case E.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.data+=Ve;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(it.DASH_DASH,!0)?(this._createCommentToken(it.DASH_DASH.length+1),this.state=T.COMMENT_START):this._consumeSequenceIfMatch(it.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(it.DOCTYPE.length+1),this.state=T.DOCTYPE):this._consumeSequenceIfMatch(it.CDATA_START,!0)?this.inForeignNode?this.state=T.CDATA_SECTION:(this._err(P.cdataInHtmlContent),this._createCommentToken(it.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=T.BOGUS_COMMENT):this._ensureHibernation()||(this._err(P.incorrectlyOpenedComment),this._createCommentToken(2),this.state=T.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_START_DASH;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptClosingOfEmptyComment),this.state=T.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=T.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptClosingOfEmptyComment),this.state=T.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=T.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_END_DASH;break}case E.LESS_THAN_SIGN:{n.data+="<",this.state=T.COMMENT_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.data+=Ve;break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case E.EXCLAMATION_MARK:{n.data+="!",this.state=T.COMMENT_LESS_THAN_SIGN_BANG;break}case E.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=T.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===E.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=T.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===E.HYPHEN_MINUS?this.state=T.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=T.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==E.GREATER_THAN_SIGN&&t!==E.EOF&&this._err(P.nestedComment),this.state=T.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=T.COMMENT_END;break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=T.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentComment(n);break}case E.EXCLAMATION_MARK:{this.state=T.COMMENT_END_BANG;break}case E.HYPHEN_MINUS:{n.data+="-";break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=T.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{n.data+="--!",this.state=T.COMMENT_END_DASH;break}case E.GREATER_THAN_SIGN:{this._err(P.incorrectlyClosedComment),this.state=T.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=T.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case E.EOF:{this._err(P.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingWhitespaceBeforeDoctypeName),this.state=T.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fn(t))this._createDoctypeToken(String.fromCharCode(xr(t))),this.state=T.DOCTYPE_NAME;else switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:{this._err(P.unexpectedNullCharacter),this._createDoctypeToken(Ve),this.state=T.DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=T.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.AFTER_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.name+=Ve;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fn(t)?xr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(it.PUBLIC,!1)?this.state=T.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(it.SYSTEM,!1)?this.state=T.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(P.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.publicId="",this.state=T.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.publicId+=Ve;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case E.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.publicId+=Ve;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case E.GREATER_THAN_SIGN:{this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.QUOTATION_MARK:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=T.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=T.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.systemId+=Ve;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case E.APOSTROPHE:{this.state=T.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.systemId+=Ve;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=T.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=T.DATA;break}case E.NULL:{this._err(P.unexpectedNullCharacter);break}case E.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case E.RIGHT_SQUARE_BRACKET:{this.state=T.CDATA_SECTION_BRACKET;break}case E.EOF:{this._err(P.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===E.RIGHT_SQUARE_BRACKET?this.state=T.CDATA_SECTION_END:(this._emitChars("]"),this.state=T.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case E.GREATER_THAN_SIGN:{this.state=T.DATA;break}case E.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=T.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(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&po(this.preprocessor.peek(1))?T.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){po(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===E.SEMICOLON&&this._err(P.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const _c=new Set([o.DD,o.DT,o.LI,o.OPTGROUP,o.OPTION,o.P,o.RB,o.RP,o.RT,o.RTC]),go=new Set([..._c,o.CAPTION,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]),Rr=new Set([o.APPLET,o.CAPTION,o.HTML,o.MARQUEE,o.OBJECT,o.TABLE,o.TD,o.TEMPLATE,o.TH]),Nb=new Set([...Rr,o.OL,o.UL]),Ib=new Set([...Rr,o.BUTTON]),Eo=new Set([o.ANNOTATION_XML,o.MI,o.MN,o.MO,o.MS,o.MTEXT]),To=new Set([o.DESC,o.FOREIGN_OBJECT,o.TITLE]),wb=new Set([o.TR,o.TEMPLATE,o.HTML]),Rb=new Set([o.TBODY,o.TFOOT,o.THEAD,o.TEMPLATE,o.HTML]),Ob=new Set([o.TABLE,o.TEMPLATE,o.HTML]),Lb=new Set([o.TD,o.TH]);class Db{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=o.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===U.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==U.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ui,U.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Lb,U.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Ob,U.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Rb,U.HTML)}clearBackToTableRowContext(){this.clearBackTo(wb,U.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===o.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===o.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case U.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case U.SVG:{if(To.has(a))return!1;break}case U.MATHML:{if(Eo.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Rr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Nb)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ib)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case U.HTML:{if(ui.has(n))return!0;if(Rr.has(n))return!1;break}case U.SVG:{if(To.has(n))return!1;break}case U.MATHML:{if(Eo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===U.HTML)switch(this.tagIDs[n]){case t:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===U.HTML)switch(this.tagIDs[t]){case o.TBODY:case o.THEAD:case o.TFOOT:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===U.HTML)switch(this.tagIDs[n]){case t:return!0;case o.OPTION:case o.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;_c.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;go.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&go.has(this.currentTagId);)this.pop()}}const wa=3;var Ot;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ot||(Ot={}));const xo={type:Ot.Marker};class kb{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,i=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const c=this.entries[u];if(c.type===Ot.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const d=this.treeAdapter.getAttrList(l);d.length===a&&r.push({idx:u,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<wa)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<wa)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(c=>a.get(c.name)===c.value)&&(i+=1,i>=wa&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(xo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ot.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ot.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(xo);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ot.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ot.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ot.Element&&n.element===t)}}const Vt={createDocument(){return{nodeName:"#document",mode:pt.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Vt.appendChild(e,i)}},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 n=e.childNodes[e.childNodes.length-1];if(Vt.isTextNode(n)){n.value+=t;return}}Vt.appendChild(e,Vt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Vt.isTextNode(r)?r.value+=t:Vt.insertBefore(e,Vt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},vc="html",Pb="about:legacy-compat",Mb="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Nc=["+//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//"],Bb=[...Nc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Fb=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ic=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Hb=[...Ic,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function yo(e,t){return t.some(n=>e.startsWith(n))}function Ub(e){return e.name===vc&&e.publicId===null&&(e.systemId===null||e.systemId===Pb)}function jb(e){if(e.name!==vc)return pt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Mb)return pt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Fb.has(n))return pt.QUIRKS;let r=t===null?Bb:Nc;if(yo(n,r))return pt.QUIRKS;if(r=t===null?Ic:Hb,yo(n,r))return pt.LIMITED_QUIRKS}return pt.NO_QUIRKS}const Co={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Vb="definitionurl",zb="definitionURL",$b=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])),Yb=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:U.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:U.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:U.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:U.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:U.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:U.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:U.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:U.XML}],["xml:space",{prefix:"xml",name:"space",namespace:U.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:U.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:U.XMLNS}]]),Gb=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])),qb=new Set([o.B,o.BIG,o.BLOCKQUOTE,o.BODY,o.BR,o.CENTER,o.CODE,o.DD,o.DIV,o.DL,o.DT,o.EM,o.EMBED,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HR,o.I,o.IMG,o.LI,o.LISTING,o.MENU,o.META,o.NOBR,o.OL,o.P,o.PRE,o.RUBY,o.S,o.SMALL,o.SPAN,o.STRONG,o.STRIKE,o.SUB,o.SUP,o.TABLE,o.TT,o.U,o.UL,o.VAR]);function Wb(e){const t=e.tagID;return t===o.FONT&&e.attrs.some(({name:r})=>r===nn.COLOR||r===nn.SIZE||r===nn.FACE)||qb.has(t)}function wc(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Vb){e.attrs[t].name=zb;break}}function Rc(e){for(let t=0;t<e.attrs.length;t++){const n=$b.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Bi(e){for(let t=0;t<e.attrs.length;t++){const n=Yb.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Xb(e){const t=Gb.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Rn(e.tagName))}function Qb(e,t){return t===U.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function Kb(e,t,n){if(t===U.MATHML&&e===o.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===nn.ENCODING){const a=n[r].value.toLowerCase();return a===Co.TEXT_HTML||a===Co.APPLICATION_XML}}return t===U.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}function Jb(e,t,n,r){return(!r||r===U.HTML)&&Kb(e,t,n)||(!r||r===U.MATHML)&&Qb(e,t)}const Zb="hidden",eg=8,tg=3;var y;(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"})(y||(y={}));const ng={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Oc=new Set([o.TABLE,o.TBODY,o.TFOOT,o.THEAD,o.TR]),So={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Vt,onParseError:null};class Ao{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=y.INITIAL,this.originalInsertionMode=y.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={...So,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new vb(this.options,this),this.activeFormattingElements=new kb(this.treeAdapter),this.fragmentContextID=r?Rn(this.treeAdapter.getTagName(r)):o.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Db(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...So,...n};t??(t=r.treeAdapter.createElement(N.TEMPLATE,U.HTML,[]));const a=r.treeAdapter.createElement("documentmock",U.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===o.TEMPLATE&&i.tmplInsertionModeStack.unshift(y.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const i=(a=t.location)!==null&&a!==void 0?a:ng,s={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(t,n,r){var a,i;(i=(a=this.treeAdapter).onItemPush)===null||i===void 0||i.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===U.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,U.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=y.TEXT}switchToPlaintextParsing(){this.insertionMode=y.TEXT,this.originalInsertionMode=y.IN_BODY,this.tokenizer.state=$e.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)===N.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==U.HTML))switch(this.fragmentContextID){case o.TITLE:case o.TEXTAREA:{this.tokenizer.state=$e.RCDATA;break}case o.STYLE:case o.XMP:case o.IFRAME:case o.NOEMBED:case o.NOFRAMES:case o.NOSCRIPT:{this.tokenizer.state=$e.RAWTEXT;break}case o.SCRIPT:{this.tokenizer.state=$e.SCRIPT_DATA;break}case o.PLAINTEXT:{this.tokenizer.state=$e.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,U.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,U.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(N.HTML,U.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,o.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),i=r?a.lastIndexOf(r):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:c,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:c,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),i=n.type===ye.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===o.SVG&&this.treeAdapter.getTagName(n)===N.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===U.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===o.MGLYPH||t.tagID===o.MALIGNMARK)&&!this._isIntegrationPoint(r,n,U.HTML)}_processToken(t){switch(t.type){case ye.CHARACTER:{this.onCharacter(t);break}case ye.NULL_CHARACTER:{this.onNullCharacter(t);break}case ye.COMMENT:{this.onComment(t);break}case ye.DOCTYPE:{this.onDoctype(t);break}case ye.START_TAG:{this._processStartTag(t);break}case ye.END_TAG:{this.onEndTag(t);break}case ye.EOF:{this.onEof(t);break}case ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Jb(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===Ot.Marker||this.openElements.contains(a.element)),r=n<0?t-1:n-1;for(let a=r;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(o.P),this.openElements.popUntilTagNamePopped(o.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case o.TR:{this.insertionMode=y.IN_ROW;return}case o.TBODY:case o.THEAD:case o.TFOOT:{this.insertionMode=y.IN_TABLE_BODY;return}case o.CAPTION:{this.insertionMode=y.IN_CAPTION;return}case o.COLGROUP:{this.insertionMode=y.IN_COLUMN_GROUP;return}case o.TABLE:{this.insertionMode=y.IN_TABLE;return}case o.BODY:{this.insertionMode=y.IN_BODY;return}case o.FRAMESET:{this.insertionMode=y.IN_FRAMESET;return}case o.SELECT:{this._resetInsertionModeForSelect(t);return}case o.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case o.HTML:{this.insertionMode=this.headElement?y.AFTER_HEAD:y.BEFORE_HEAD;return}case o.TD:case o.TH:{if(t>0){this.insertionMode=y.IN_CELL;return}break}case o.HEAD:{if(t>0){this.insertionMode=y.IN_HEAD;return}break}}this.insertionMode=y.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===o.TEMPLATE)break;if(r===o.TABLE){this.insertionMode=y.IN_SELECT_IN_TABLE;return}}this.insertionMode=y.IN_SELECT}_isElementCausesFosterParenting(t){return Oc.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case o.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===U.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case o.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return Cb[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){L1(this,t);return}switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{zn(this,t);break}case y.BEFORE_HEAD:{$n(this,t);break}case y.IN_HEAD:{Yn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case y.AFTER_HEAD:{qn(this,t);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:{Dc(this,t);break}case y.TEXT:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Ra(this,t);break}case y.IN_TABLE_TEXT:{Hc(this,t);break}case y.IN_COLUMN_GROUP:{Or(this,t);break}case y.AFTER_BODY:{Lr(this,t);break}case y.AFTER_AFTER_BODY:{Nr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){O1(this,t);return}switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{zn(this,t);break}case y.BEFORE_HEAD:{$n(this,t);break}case y.IN_HEAD:{Yn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case y.AFTER_HEAD:{qn(this,t);break}case y.TEXT:{this._insertCharacters(t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Ra(this,t);break}case y.IN_COLUMN_GROUP:{Or(this,t);break}case y.AFTER_BODY:{Lr(this,t);break}case y.AFTER_AFTER_BODY:{Nr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ci(this,t);return}switch(this.insertionMode){case y.INITIAL:case y.BEFORE_HTML:case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_TEMPLATE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{ci(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.AFTER_BODY:{cg(this,t);break}case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{lg(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case y.INITIAL:{dg(this,t);break}case y.BEFORE_HEAD:case y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:{this._err(t,P.misplacedDoctype);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,P.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?D1(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{fg(this,t);break}case y.BEFORE_HEAD:{mg(this,t);break}case y.IN_HEAD:{At(this,t);break}case y.IN_HEAD_NO_SCRIPT:{gg(this,t);break}case y.AFTER_HEAD:{Tg(this,t);break}case y.IN_BODY:{tt(this,t);break}case y.IN_TABLE:{_n(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.IN_CAPTION:{p1(this,t);break}case y.IN_COLUMN_GROUP:{Ui(this,t);break}case y.IN_TABLE_BODY:{Kr(this,t);break}case y.IN_ROW:{Jr(this,t);break}case y.IN_CELL:{E1(this,t);break}case y.IN_SELECT:{Vc(this,t);break}case y.IN_SELECT_IN_TABLE:{x1(this,t);break}case y.IN_TEMPLATE:{C1(this,t);break}case y.AFTER_BODY:{A1(this,t);break}case y.IN_FRAMESET:{_1(this,t);break}case y.AFTER_FRAMESET:{N1(this,t);break}case y.AFTER_AFTER_BODY:{w1(this,t);break}case y.AFTER_AFTER_FRAMESET:{R1(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?k1(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{hg(this,t);break}case y.BEFORE_HEAD:{pg(this,t);break}case y.IN_HEAD:{bg(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Eg(this,t);break}case y.AFTER_HEAD:{xg(this,t);break}case y.IN_BODY:{Qr(this,t);break}case y.TEXT:{i1(this,t);break}case y.IN_TABLE:{Kn(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.IN_CAPTION:{b1(this,t);break}case y.IN_COLUMN_GROUP:{g1(this,t);break}case y.IN_TABLE_BODY:{li(this,t);break}case y.IN_ROW:{jc(this,t);break}case y.IN_CELL:{T1(this,t);break}case y.IN_SELECT:{zc(this,t);break}case y.IN_SELECT_IN_TABLE:{y1(this,t);break}case y.IN_TEMPLATE:{S1(this,t);break}case y.AFTER_BODY:{Yc(this,t);break}case y.IN_FRAMESET:{v1(this,t);break}case y.AFTER_FRAMESET:{I1(this,t);break}case y.AFTER_AFTER_BODY:{Nr(this,t);break}}}onEof(t){switch(this.insertionMode){case y.INITIAL:{kn(this,t);break}case y.BEFORE_HTML:{zn(this,t);break}case y.BEFORE_HEAD:{$n(this,t);break}case y.IN_HEAD:{Yn(this,t);break}case y.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case y.AFTER_HEAD:{qn(this,t);break}case y.IN_BODY:case y.IN_TABLE:case y.IN_CAPTION:case y.IN_COLUMN_GROUP:case y.IN_TABLE_BODY:case y.IN_ROW:case y.IN_CELL:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:{Bc(this,t);break}case y.TEXT:{s1(this,t);break}case y.IN_TABLE_TEXT:{Pn(this,t);break}case y.IN_TEMPLATE:{$c(this,t);break}case y.AFTER_BODY:case y.IN_FRAMESET:case y.AFTER_FRAMESET:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{Hi(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===E.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 y.IN_HEAD:case y.IN_HEAD_NO_SCRIPT:case y.AFTER_HEAD:case y.TEXT:case y.IN_COLUMN_GROUP:case y.IN_SELECT:case y.IN_SELECT_IN_TABLE:case y.IN_FRAMESET:case y.AFTER_FRAMESET:{this._insertCharacters(t);break}case y.IN_BODY:case y.IN_CAPTION:case y.IN_CELL:case y.IN_TEMPLATE:case y.AFTER_BODY:case y.AFTER_AFTER_BODY:case y.AFTER_AFTER_FRAMESET:{Lc(this,t);break}case y.IN_TABLE:case y.IN_TABLE_BODY:case y.IN_ROW:{Ra(this,t);break}case y.IN_TABLE_TEXT:{Fc(this,t);break}}}}function rg(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Mc(e,t),n}function ag(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function ig(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),c=u&&i>=tg;!u||c?(c&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=sg(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function sg(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function og(e,t,n){const r=e.treeAdapter.getTagName(t),a=Rn(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===o.TEMPLATE&&i===U.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ug(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}function Fi(e,t){for(let n=0;n<eg;n++){const r=rg(e,t);if(!r)break;const a=ag(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=ig(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&og(e,s,i),ug(e,a,r)}}function ci(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function cg(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lg(e,t){e._appendCommentNode(t,e.document)}function Hi(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,t)}}}}function dg(e,t){e._setDocumentType(t);const n=t.forceQuirks?pt.QUIRKS:jb(t);Ub(t)||e._err(t,P.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=y.BEFORE_HTML}function kn(e,t){e._err(t,P.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,pt.QUIRKS),e.insertionMode=y.BEFORE_HTML,e._processToken(t)}function fg(e,t){t.tagID===o.HTML?(e._insertElement(t,U.HTML),e.insertionMode=y.BEFORE_HEAD):zn(e,t)}function hg(e,t){const n=t.tagID;(n===o.HTML||n===o.HEAD||n===o.BODY||n===o.BR)&&zn(e,t)}function zn(e,t){e._insertFakeRootElement(),e.insertionMode=y.BEFORE_HEAD,e._processToken(t)}function mg(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.HEAD:{e._insertElement(t,U.HTML),e.headElement=e.openElements.current,e.insertionMode=y.IN_HEAD;break}default:$n(e,t)}}function pg(e,t){const n=t.tagID;n===o.HEAD||n===o.BODY||n===o.HTML||n===o.BR?$n(e,t):e._err(t,P.endTagWithoutMatchingOpenElement)}function $n(e,t){e._insertFakeElement(N.HEAD,o.HEAD),e.headElement=e.openElements.current,e.insertionMode=y.IN_HEAD,e._processToken(t)}function At(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.TITLE:{e._switchToTextParsing(t,$e.RCDATA);break}case o.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,$e.RAWTEXT):(e._insertElement(t,U.HTML),e.insertionMode=y.IN_HEAD_NO_SCRIPT);break}case o.NOFRAMES:case o.STYLE:{e._switchToTextParsing(t,$e.RAWTEXT);break}case o.SCRIPT:{e._switchToTextParsing(t,$e.SCRIPT_DATA);break}case o.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(y.IN_TEMPLATE);break}case o.HEAD:{e._err(t,P.misplacedStartTagForHeadElement);break}default:Yn(e,t)}}function bg(e,t){switch(t.tagID){case o.HEAD:{e.openElements.pop(),e.insertionMode=y.AFTER_HEAD;break}case o.BODY:case o.BR:case o.HTML:{Yn(e,t);break}case o.TEMPLATE:{cn(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function cn(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==o.TEMPLATE&&e._err(t,P.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,P.endTagWithoutMatchingOpenElement)}function Yn(e,t){e.openElements.pop(),e.insertionMode=y.AFTER_HEAD,e._processToken(t)}function gg(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.BASEFONT:case o.BGSOUND:case o.HEAD:case o.LINK:case o.META:case o.NOFRAMES:case o.STYLE:{At(e,t);break}case o.NOSCRIPT:{e._err(t,P.nestedNoscriptInHead);break}default:Gn(e,t)}}function Eg(e,t){switch(t.tagID){case o.NOSCRIPT:{e.openElements.pop(),e.insertionMode=y.IN_HEAD;break}case o.BR:{Gn(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function Gn(e,t){const n=t.type===ye.EOF?P.openElementsLeftAfterEof:P.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=y.IN_HEAD,e._processToken(t)}function Tg(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.BODY:{e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=y.IN_BODY;break}case o.FRAMESET:{e._insertElement(t,U.HTML),e.insertionMode=y.IN_FRAMESET;break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{e._err(t,P.abandonedHeadElementChild),e.openElements.push(e.headElement,o.HEAD),At(e,t),e.openElements.remove(e.headElement);break}case o.HEAD:{e._err(t,P.misplacedStartTagForHeadElement);break}default:qn(e,t)}}function xg(e,t){switch(t.tagID){case o.BODY:case o.HTML:case o.BR:{qn(e,t);break}case o.TEMPLATE:{cn(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function qn(e,t){e._insertFakeElement(N.BODY,o.BODY),e.insertionMode=y.IN_BODY,Xr(e,t)}function Xr(e,t){switch(t.type){case ye.CHARACTER:{Dc(e,t);break}case ye.WHITESPACE_CHARACTER:{Lc(e,t);break}case ye.COMMENT:{ci(e,t);break}case ye.START_TAG:{tt(e,t);break}case ye.END_TAG:{Qr(e,t);break}case ye.EOF:{Bc(e,t);break}}}function Lc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Dc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function yg(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Cg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Sg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_FRAMESET)}function Ag(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML)}function _g(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),ui.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,U.HTML)}function vg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ng(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),n||(e.formElement=e.openElements.current))}function Ig(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===o.LI&&a===o.LI||(n===o.DD||n===o.DT)&&(a===o.DD||a===o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==o.ADDRESS&&a!==o.DIV&&a!==o.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML)}function wg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.tokenizer.state=$e.PLAINTEXT}function Rg(e,t){e.openElements.hasInScope(o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.framesetOk=!1}function Og(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(N.A);n&&(Fi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Lg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Dg(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(o.NOBR)&&(Fi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function kg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Pg(e,t){e.treeAdapter.getDocumentMode(e.document)!==pt.QUIRKS&&e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=y.IN_TABLE}function kc(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,U.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Pc(e){const t=xc(e,nn.TYPE);return t!=null&&t.toLowerCase()===Zb}function Mg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,U.HTML),Pc(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Bg(e,t){e._appendElement(t,U.HTML),t.ackSelfClosing=!0}function Fg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._appendElement(t,U.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Hg(e,t){t.tagName=N.IMG,t.tagID=o.IMG,kc(e,t)}function Ug(e,t){e._insertElement(t,U.HTML),e.skipNextNewLine=!0,e.tokenizer.state=$e.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=y.TEXT}function jg(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,$e.RAWTEXT)}function Vg(e,t){e.framesetOk=!1,e._switchToTextParsing(t,$e.RAWTEXT)}function _o(e,t){e._switchToTextParsing(t,$e.RAWTEXT)}function zg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===y.IN_TABLE||e.insertionMode===y.IN_CAPTION||e.insertionMode===y.IN_TABLE_BODY||e.insertionMode===y.IN_ROW||e.insertionMode===y.IN_CELL?y.IN_SELECT_IN_TABLE:y.IN_SELECT}function $g(e,t){e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML)}function Yg(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,U.HTML)}function Gg(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(o.RTC),e._insertElement(t,U.HTML)}function qg(e,t){e._reconstructActiveFormattingElements(),wc(t),Bi(t),t.selfClosing?e._appendElement(t,U.MATHML):e._insertElement(t,U.MATHML),t.ackSelfClosing=!0}function Wg(e,t){e._reconstructActiveFormattingElements(),Rc(t),Bi(t),t.selfClosing?e._appendElement(t,U.SVG):e._insertElement(t,U.SVG),t.ackSelfClosing=!0}function vo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML)}function tt(e,t){switch(t.tagID){case o.I:case o.S:case o.B:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.SMALL:case o.STRIKE:case o.STRONG:{Lg(e,t);break}case o.A:{Og(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{_g(e,t);break}case o.P:case o.DL:case o.OL:case o.UL:case o.DIV:case o.DIR:case o.NAV:case o.MAIN:case o.MENU:case o.ASIDE:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.DETAILS:case o.ADDRESS:case o.ARTICLE:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{Ag(e,t);break}case o.LI:case o.DD:case o.DT:{Ig(e,t);break}case o.BR:case o.IMG:case o.WBR:case o.AREA:case o.EMBED:case o.KEYGEN:{kc(e,t);break}case o.HR:{Fg(e,t);break}case o.RB:case o.RTC:{Yg(e,t);break}case o.RT:case o.RP:{Gg(e,t);break}case o.PRE:case o.LISTING:{vg(e,t);break}case o.XMP:{jg(e,t);break}case o.SVG:{Wg(e,t);break}case o.HTML:{yg(e,t);break}case o.BASE:case o.LINK:case o.META:case o.STYLE:case o.TITLE:case o.SCRIPT:case o.BGSOUND:case o.BASEFONT:case o.TEMPLATE:{At(e,t);break}case o.BODY:{Cg(e,t);break}case o.FORM:{Ng(e,t);break}case o.NOBR:{Dg(e,t);break}case o.MATH:{qg(e,t);break}case o.TABLE:{Pg(e,t);break}case o.INPUT:{Mg(e,t);break}case o.PARAM:case o.TRACK:case o.SOURCE:{Bg(e,t);break}case o.IMAGE:{Hg(e,t);break}case o.BUTTON:{Rg(e,t);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{kg(e,t);break}case o.IFRAME:{Vg(e,t);break}case o.SELECT:{zg(e,t);break}case o.OPTION:case o.OPTGROUP:{$g(e,t);break}case o.NOEMBED:case o.NOFRAMES:{_o(e,t);break}case o.FRAMESET:{Sg(e,t);break}case o.TEXTAREA:{Ug(e,t);break}case o.NOSCRIPT:{e.options.scriptingEnabled?_o(e,t):vo(e,t);break}case o.PLAINTEXT:{wg(e,t);break}case o.COL:case o.TH:case o.TD:case o.TR:case o.HEAD:case o.FRAME:case o.TBODY:case o.TFOOT:case o.THEAD:case o.CAPTION:case o.COLGROUP:break;default:vo(e,t)}}function Xg(e,t){if(e.openElements.hasInScope(o.BODY)&&(e.insertionMode=y.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Qg(e,t){e.openElements.hasInScope(o.BODY)&&(e.insertionMode=y.AFTER_BODY,Yc(e,t))}function Kg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Jg(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(o.FORM):n&&e.openElements.remove(n))}function Zg(e){e.openElements.hasInButtonScope(o.P)||e._insertFakeElement(N.P,o.P),e._closePElement()}function e1(e){e.openElements.hasInListItemScope(o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(o.LI),e.openElements.popUntilTagNamePopped(o.LI))}function t1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function n1(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function r1(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function a1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(N.BR,o.BR),e.openElements.pop(),e.framesetOk=!1}function Mc(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(r===s&&(r!==o.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function Qr(e,t){switch(t.tagID){case o.A:case o.B:case o.I:case o.S:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.NOBR:case o.SMALL:case o.STRIKE:case o.STRONG:{Fi(e,t);break}case o.P:{Zg(e);break}case o.DL:case o.UL:case o.OL:case o.DIR:case o.DIV:case o.NAV:case o.PRE:case o.MAIN:case o.MENU:case o.ASIDE:case o.BUTTON:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.ADDRESS:case o.ARTICLE:case o.DETAILS:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.LISTING:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{Kg(e,t);break}case o.LI:{e1(e);break}case o.DD:case o.DT:{t1(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{n1(e);break}case o.BR:{a1(e);break}case o.BODY:{Xg(e,t);break}case o.HTML:{Qg(e,t);break}case o.FORM:{Jg(e);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{r1(e,t);break}case o.TEMPLATE:{cn(e,t);break}default:Mc(e,t)}}function Bc(e,t){e.tmplInsertionModeStack.length>0?$c(e,t):Hi(e,t)}function i1(e,t){var n;t.tagID===o.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function s1(e,t){e._err(t,P.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ra(e,t){if(Oc.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=y.IN_TABLE_TEXT,t.type){case ye.CHARACTER:{Hc(e,t);break}case ye.WHITESPACE_CHARACTER:{Fc(e,t);break}}else sr(e,t)}function o1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_CAPTION}function u1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_COLUMN_GROUP}function c1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.COLGROUP,o.COLGROUP),e.insertionMode=y.IN_COLUMN_GROUP,Ui(e,t)}function l1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_TABLE_BODY}function d1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.TBODY,o.TBODY),e.insertionMode=y.IN_TABLE_BODY,Kr(e,t)}function f1(e,t){e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function h1(e,t){Pc(t)?e._appendElement(t,U.HTML):sr(e,t),t.ackSelfClosing=!0}function m1(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,U.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function _n(e,t){switch(t.tagID){case o.TD:case o.TH:case o.TR:{d1(e,t);break}case o.STYLE:case o.SCRIPT:case o.TEMPLATE:{At(e,t);break}case o.COL:{c1(e,t);break}case o.FORM:{m1(e,t);break}case o.TABLE:{f1(e,t);break}case o.TBODY:case o.TFOOT:case o.THEAD:{l1(e,t);break}case o.INPUT:{h1(e,t);break}case o.CAPTION:{o1(e,t);break}case o.COLGROUP:{u1(e,t);break}default:sr(e,t)}}function Kn(e,t){switch(t.tagID){case o.TABLE:{e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode());break}case o.TEMPLATE:{cn(e,t);break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:sr(e,t)}}function sr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Xr(e,t),e.fosterParentingEnabled=n}function Fc(e,t){e.pendingCharacterTokens.push(t)}function Hc(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Pn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)sr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Uc=new Set([o.CAPTION,o.COL,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]);function p1(e,t){const n=t.tagID;Uc.has(n)?e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_TABLE,_n(e,t)):tt(e,t)}function b1(e,t){const n=t.tagID;switch(n){case o.CAPTION:case o.TABLE:{e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_TABLE,n===o.TABLE&&Kn(e,t));break}case o.BODY:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:Qr(e,t)}}function Ui(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.COL:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.TEMPLATE:{At(e,t);break}default:Or(e,t)}}function g1(e,t){switch(t.tagID){case o.COLGROUP:{e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=y.IN_TABLE);break}case o.TEMPLATE:{cn(e,t);break}case o.COL:break;default:Or(e,t)}}function Or(e,t){e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=y.IN_TABLE,e._processToken(t))}function Kr(e,t){switch(t.tagID){case o.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_ROW;break}case o.TH:case o.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(N.TR,o.TR),e.insertionMode=y.IN_ROW,Jr(e,t);break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE,_n(e,t));break}default:_n(e,t)}}function li(e,t){const n=t.tagID;switch(t.tagID){case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE);break}case o.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE,Kn(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:case o.TR:break;default:Kn(e,t)}}function Jr(e,t){switch(t.tagID){case o.TH:case o.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,U.HTML),e.insertionMode=y.IN_CELL,e.activeFormattingElements.insertMarker();break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,Kr(e,t));break}default:_n(e,t)}}function jc(e,t){switch(t.tagID){case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY);break}case o.TABLE:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,li(e,t));break}case o.TBODY:case o.TFOOT:case o.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=y.IN_TABLE_BODY,li(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:break;default:Kn(e,t)}}function E1(e,t){const n=t.tagID;Uc.has(n)?(e.openElements.hasInTableScope(o.TD)||e.openElements.hasInTableScope(o.TH))&&(e._closeTableCell(),Jr(e,t)):tt(e,t)}function T1(e,t){const n=t.tagID;switch(n){case o.TD:case o.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=y.IN_ROW);break}case o.TABLE:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),jc(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:break;default:Qr(e,t)}}function Vc(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._insertElement(t,U.HTML);break}case o.OPTGROUP:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,U.HTML);break}case o.HR:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.INPUT:case o.KEYGEN:case o.TEXTAREA:case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),t.tagID!==o.SELECT&&e._processStartTag(t));break}case o.SCRIPT:case o.TEMPLATE:{At(e,t);break}}}function zc(e,t){switch(t.tagID){case o.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop();break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop();break}case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode());break}case o.TEMPLATE:{cn(e,t);break}}}function x1(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Vc(e,t)}function y1(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):zc(e,t)}function C1(e,t){switch(t.tagID){case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{At(e,t);break}case o.CAPTION:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.tmplInsertionModeStack[0]=y.IN_TABLE,e.insertionMode=y.IN_TABLE,_n(e,t);break}case o.COL:{e.tmplInsertionModeStack[0]=y.IN_COLUMN_GROUP,e.insertionMode=y.IN_COLUMN_GROUP,Ui(e,t);break}case o.TR:{e.tmplInsertionModeStack[0]=y.IN_TABLE_BODY,e.insertionMode=y.IN_TABLE_BODY,Kr(e,t);break}case o.TD:case o.TH:{e.tmplInsertionModeStack[0]=y.IN_ROW,e.insertionMode=y.IN_ROW,Jr(e,t);break}default:e.tmplInsertionModeStack[0]=y.IN_BODY,e.insertionMode=y.IN_BODY,tt(e,t)}}function S1(e,t){t.tagID===o.TEMPLATE&&cn(e,t)}function $c(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Hi(e,t)}function A1(e,t){t.tagID===o.HTML?tt(e,t):Lr(e,t)}function Yc(e,t){var n;if(t.tagID===o.HTML){if(e.fragmentContext||(e.insertionMode=y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===o.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Lr(e,t)}function Lr(e,t){e.insertionMode=y.IN_BODY,Xr(e,t)}function _1(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.FRAMESET:{e._insertElement(t,U.HTML);break}case o.FRAME:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case o.NOFRAMES:{At(e,t);break}}}function v1(e,t){t.tagID===o.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==o.FRAMESET&&(e.insertionMode=y.AFTER_FRAMESET))}function N1(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.NOFRAMES:{At(e,t);break}}}function I1(e,t){t.tagID===o.HTML&&(e.insertionMode=y.AFTER_AFTER_FRAMESET)}function w1(e,t){t.tagID===o.HTML?tt(e,t):Nr(e,t)}function Nr(e,t){e.insertionMode=y.IN_BODY,Xr(e,t)}function R1(e,t){switch(t.tagID){case o.HTML:{tt(e,t);break}case o.NOFRAMES:{At(e,t);break}}}function O1(e,t){t.chars=Ve,e._insertCharacters(t)}function L1(e,t){e._insertCharacters(t),e.framesetOk=!1}function Gc(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==U.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function D1(e,t){if(Wb(t))Gc(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===U.MATHML?wc(t):r===U.SVG&&(Xb(t),Rc(t)),Bi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function k1(e,t){if(t.tagID===o.P||t.tagID===o.BR){Gc(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===U.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}N.AREA,N.BASE,N.BASEFONT,N.BGSOUND,N.BR,N.COL,N.EMBED,N.FRAME,N.HR,N.IMG,N.INPUT,N.KEYGEN,N.LINK,N.META,N.PARAM,N.SOURCE,N.TRACK,N.WBR;const P1=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),No={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function qc(e,t){const n=Y1(e),r=pc("type",{handlers:{root:M1,element:B1,text:F1,comment:Xc,doctype:H1,raw:j1},unknown:V1}),a={parser:n?new Ao(No):Ao.getFragmentParser(void 0,No),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),On(a,Pt());const i=n?a.parser.document:a.parser.getFragment(),s=qp(i,{file:a.options.file});return a.stitches&&Di(s,"comment",function(u,c,l){const d=u;if(d.value.stitch&&l&&c!==void 0){const f=l.children;return f[c]=d.value.stitch,c}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Wc(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function M1(e,t){Wc(e.children,t)}function B1(e,t){z1(e,t),Wc(e.children,t),$1(e,t)}function F1(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ye.CHARACTER,chars:e.value,location:or(e)};On(t,Pt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function H1(e,t){const n={type:ye.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:or(e)};On(t,Pt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function U1(e,t){t.stitches=!0;const n=G1(e);if("children"in e&&"children"in n){const r=qc({type:"root",children:e.children},t.options);n.children=r.children}Xc({type:"comment",value:{stitch:n}},t)}function Xc(e,t){const n=e.value,r={type:ye.COMMENT,data:n,location:or(e)};On(t,Pt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function j1(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Qc(t,Pt(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function V1(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))U1(n,t);else{let r="";throw P1.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function On(e,t){Qc(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=$e.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Qc(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function z1(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===$e.PLAINTEXT)return;On(t,Pt(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:tn.html;a===tn.html&&n==="svg"&&(a=tn.svg);const i=Jp({...e,children:[]},{space:a===tn.svg?"svg":"html"}),s={type:ye.START_TAG,tagName:n,tagID:Rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:or(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function $1(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&sb.includes(n)||t.parser.tokenizer.state===$e.PLAINTEXT)return;On(t,Yr(e));const r={type:ye.END_TAG,tagName:n,tagID:Rn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:or(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===$e.RCDATA||t.parser.tokenizer.state===$e.RAWTEXT||t.parser.tokenizer.state===$e.SCRIPT_DATA)&&(t.parser.tokenizer.state=$e.DATA)}function Y1(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function or(e){const t=Pt(e)||{line:void 0,column:void 0,offset:void 0},n=Yr(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function G1(e){return"children"in e?An({...e,children:[]}):An(e)}function Kc(e){return function(t,n){return qc(t,{...e,file:n})}}const q1=e=>We.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},We.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zM7.07 18.28c.43-.9 3.05-1.78 4.93-1.78s4.51.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93.59-6.36 2.33A7.95 7.95 0 0 1 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-.83 0-1.5-.67-1.5-1.5S11.17 8 12 8s1.5.67 1.5 1.5S12.83 11 12 11z"})),W1=({content:e,metaData:t})=>{const{chatlineLabelUserTranslation:n}=yi();return B.jsxDEV("div",{className:"flex px-3 justify-between mt-8 bg-gray-200 rounded-lg",children:[B.jsxDEV("div",{className:"w-10 mr-3 flex-col content-center",children:B.jsxDEV("div",{children:B.jsxDEV(q1,{fill:"#4564d6"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:24,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:23,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:22,columnNumber:7},void 0),B.jsxDEV("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":" text-gray-800"}`,children:[B.jsxDEV("p",{className:"font-bold",children:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:34,columnNumber:9},void 0),B.jsxDEV("div",{children:B.jsxDEV(dc,{rehypePlugins:[Kc],children:e&&e},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:36,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:35,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:27,columnNumber:7},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.UserMessage.tsx",lineNumber:21,columnNumber:5},void 0)},X1=({})=>{const{companySettings:e}=k.useContext(Zn);return B.jsxDEV("div",{className:`assistant
|
|
87
87
|
transition
|
|
88
88
|
ease-in-out
|
|
89
89
|
delay-50
|
|
@@ -91,8 +91,8 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
91
91
|
flex
|
|
92
92
|
justify-center
|
|
93
93
|
items-center
|
|
94
|
-
`,children:B.jsxDEV(bi,{facet:e.agent.display[ot.AgentDisplayFacetRoleType.ASSISTANT]},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Assistant/Assistant.tsx",lineNumber:23,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Assistant/Assistant.tsx",lineNumber:12,columnNumber:5},void 0)},Io=new Set;function Q1(e){return Io.has(e)?!1:(Io.add(e),!0)}function K1(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:a=0,dedupeKey:i}={}){const s=k.useRef(!1),u=k.useRef();return k.useCallback(l=>{if(u.current?.(),u.current=void 0,!l||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{i&&!Q1(i)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const h=new IntersectionObserver((m,A)=>{m[0]?.isIntersecting&&(A.disconnect(),f())},{root:d,rootMargin:r,threshold:a});h.observe(l),u.current=()=>h.disconnect()},[t,n,r,a,i,e])}class Jn{constructor(){}static getApiUrl=()=>"http://localhost:3001";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:a={}})=>{const i={method:n,headers:this.getHeaders({contentType:t}),...a};return r&&(i.body=JSON.stringify(r)),i}}function J1({href:e="",children:t,context:n,onClick:r,seenRootEl:a,...i}){const s=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),u=Jn.getApiUrl(),c=()=>{const A=`${u}/tracking/clicked/${n.appToken}`,_={discussionId:n.discussionId,urlClicked:e};try{fetch(A,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(_),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},l=()=>{const A=`${u}/tracking/displayed/${n.appToken}`,_={discussionId:n.discussionId,urlSeen:e};try{fetch(A,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(_),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},d=k.useMemo(()=>`${n.appToken}::${n.discussionId}::${e}`,[n.appToken,n.discussionId,e]),f=K1(l,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:d}),h=A=>{c(),r?.(A)},m=s?{}:{target:"_blank",rel:"noopener noreferrer"};return s?B.jsxDEV("a",{ref:f,href:e,...i,onClick:h,className:"customLinkInternal",children:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/customHTMLComponents/ChatLine.custom.link.tsx",lineNumber:109,columnNumber:7},this):B.jsxDEV("a",{ref:f,href:e,...m,...i,onClick:h,className:"customLinkExternal",children:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/customHTMLComponents/ChatLine.custom.link.tsx",lineNumber:122,columnNumber:5},this)}const Z1=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:a}=yi();return B.jsxDEV("div",{className:"flex justify-between mt-8 px-3 chatLineAssistant",children:[B.jsxDEV("div",{className:"w-10 mr-3 mt-6",children:B.jsxDEV("div",{children:B.jsxDEV(X1,{},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:30,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:29,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:28,columnNumber:7},void 0),B.jsxDEV("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"bg-white text-gray-800"}`,children:[B.jsxDEV("p",{className:"font-bold",children:a},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:40,columnNumber:9},void 0),B.jsxDEV("div",{children:B.jsxDEV(dc,{rehypePlugins:[Kc],components:{a:({node:i,href:s,children:u,...c})=>B.jsxDEV(J1,{href:s??"",...c,context:n,seenRootEl:r,children:u},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:46,columnNumber:17},void 0)},children:e&&e},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:42,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:41,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:33,columnNumber:7},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:27,columnNumber:5},void 0)},eE=({userType:e,content:t,metaData:n,context:r,seenRootEl:a})=>{const i=e==="user",s=e==="assistant";return B.jsxDEV(B.Fragment,{children:[i&&B.jsxDEV(W1,{content:t,metaData:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/Chatline.tsx",lineNumber:34,columnNumber:18},void 0),s&&B.jsxDEV(Z1,{content:t,metaData:n,context:r,seenRootEl:a},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/Chatline.tsx",lineNumber:36,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/Chatline.tsx",lineNumber:33,columnNumber:5},void 0)};function tE(e,t,n){let[r,a]=k.useState(e||t),i=k.useRef(e!==void 0),s=e!==void 0;k.useEffect(()=>{let l=i.current;l!==s&&console.warn(`WARN: A component changed from ${l?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),i.current=s},[s]);let u=s?e:r,c=k.useCallback((l,...d)=>{let f=(h,...m)=>{n&&(Object.is(u,h)||n(h,...m)),s||(u=h)};typeof l=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((m,...A)=>{let _=l(s?u:m,...A);return f(_,...d),s?m:_})):(s||a(l),f(l,...d))},[s,u,n]);return[u,c]}const Dr={prefix:String(Math.round(Math.random()*1e10)),current:0},Jc=k.createContext(Dr),nE=k.createContext(!1);let rE=!!(typeof window<"u"&&window.document&&window.document.createElement),Oa=new WeakMap;function aE(e=!1){let t=k.useContext(Jc),n=k.useRef(null);if(n.current===null&&!e){var r,a;let i=(a=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(i){let s=Oa.get(i);s==null?Oa.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==s.state&&(t.current=s.id,Oa.delete(i))}n.current=++t.current}return n.current}function iE(e){let t=k.useContext(Jc);t===Dr&&!rE&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=aE(!!e),r=t===Dr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function sE(e){let t=k.useId(),[n]=k.useState(dE()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Dr.prefix}`;return e||`${r}-${t}`}const oE=typeof k.useId=="function"?sE:iE;function uE(){return!1}function cE(){return!0}function lE(e){return()=>{}}function dE(){return typeof k.useSyncExternalStore=="function"?k.useSyncExternalStore(lE,uE,cE):k.useContext(nE)}function Zc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Zc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fE(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Zc(e))&&(r&&(r+=" "),r+=t);return r}const ln=typeof document<"u"?k.useLayoutEffect:()=>{};function rn(e){const t=k.useRef(null);return ln(()=>{t.current=e},[e]),k.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function hE(e){let[t,n]=k.useState(e),r=k.useRef(null),a=rn(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?a():n(s.value)});ln(()=>{r.current&&a()});let i=rn(s=>{r.current=s(t),a()});return[t,i]}let mE=!!(typeof window<"u"&&window.document&&window.document.createElement),kr=new Map;function Pr(e){let[t,n]=k.useState(e),r=k.useRef(null),a=oE(t),i=k.useCallback(s=>{r.current=s},[]);return mE&&kr.set(a,i),ln(()=>{let s=a;return()=>{kr.delete(s)}},[a]),k.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),a}function pE(e,t){if(e===t)return e;let n=kr.get(e);if(n)return n(t),t;let r=kr.get(t);return r?(r(e),e):t}function wo(e=[]){let t=Pr(),[n,r]=hE(t),a=k.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return ln(a,[t,a,...e]),n}function bE(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ur=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Mr=e=>e&&"window"in e&&e.window===e?e:ur(e).defaultView||window;function Br(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let i=t[a],s=r[a];typeof i=="function"&&typeof s=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=bE(i,s):(a==="className"||a==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[a]=fE(i,s):a==="id"&&i&&s?t.id=pE(i,s):t[a]=s!==void 0?s:i}}return t}const gE=new Set(["id"]),EE=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),TE=new Set(["href","target","rel","download","ping","referrerPolicy"]),xE=/^(data-.*)$/;function yE(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,i={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(gE.has(s)||n&&EE.has(s)||r&&TE.has(s)||a?.has(s)||xE.test(s))&&(i[s]=e[s]);return i}function Ro(e){if(CE())e.focus({preventScroll:!0});else{let t=SE(e);e.focus(),AE(t)}}let yr=null;function CE(){if(yr==null){yr=!1;try{document.createElement("div").focus({get preventScroll(){return yr=!0,!0}})}catch{}}return yr}function SE(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function AE(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function _E(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function vE(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function NE(){return vE(/^Mac/i)}function IE(){return _E(/Android/i)}let gn=new Map,di=new Set;function Oo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=gn.get(r.target);a||(a=new Set,gn.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=gn.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),gn.delete(r.target)),gn.size===0)){for(let i of di)i();di.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Oo():document.addEventListener("DOMContentLoaded",Oo));function wE(e){requestAnimationFrame(()=>{gn.size===0?e():di.add(e)})}function RE(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Pr(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!r&&!a&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function OE(e,t){ln(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function LE(e){return e.mozInputSource===0&&e.isTrusted?!0:IE()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function DE(e,t,n){let r=k.useRef(t),a=rn(()=>{n&&n(r.current)});k.useEffect(()=>{var i;let s=e==null||(i=e.current)===null||i===void 0?void 0:i.form;return s?.addEventListener("reset",a),()=>{s?.removeEventListener("reset",a)}},[e,a])}const kE=k.createContext({register:()=>{}});kE.displayName="PressResponderContext";class PE{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function ME(e){let t=k.useRef({isFocused:!1,observer:null});ln(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=rn(r=>{e?.(r)});return k.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let a=r.target,i=s=>{t.current.isFocused=!1,a.disabled&&n(new PE("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};a.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&a.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let u=a===document.activeElement?null:document.activeElement;a.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function BE(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e;const i=k.useCallback(c=>{if(c.target===c.currentTarget)return r&&r(c),a&&a(!1),!0},[r,a]),s=ME(i),u=k.useCallback(c=>{c.target===c.currentTarget&&document.activeElement===c.target&&(n&&n(c),a&&a(!0),s(c))},[a,n,s]);return{focusProps:{onFocus:!t&&(n||a||r)?u:void 0,onBlur:!t&&(r||a)?i:void 0}}}let Ln=null,FE=new Set,Wn=new Map,sn=!1,fi=!1;function Zr(e,t){for(let n of FE)n(e,t)}function HE(e){return!(e.metaKey||!NE()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Fr(e){sn=!0,HE(e)&&(Ln="keyboard",Zr("keyboard",e))}function bt(e){Ln="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(sn=!0,Zr("pointer",e))}function el(e){LE(e)&&(sn=!0,Ln="virtual")}function tl(e){e.target===window||e.target===document||(!sn&&!fi&&(Ln="virtual",Zr("virtual",e)),sn=!1,fi=!1)}function nl(){sn=!1,fi=!0}function Lo(e){if(typeof window>"u"||Wn.get(Mr(e)))return;const t=Mr(e),n=ur(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){sn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Fr,!0),n.addEventListener("keyup",Fr,!0),n.addEventListener("click",el,!0),t.addEventListener("focus",tl,!0),t.addEventListener("blur",nl,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",bt,!0),n.addEventListener("pointermove",bt,!0),n.addEventListener("pointerup",bt,!0)):(n.addEventListener("mousedown",bt,!0),n.addEventListener("mousemove",bt,!0),n.addEventListener("mouseup",bt,!0)),t.addEventListener("beforeunload",()=>{rl(e)},{once:!0}),Wn.set(t,{focus:r})}const rl=(e,t)=>{const n=Mr(e),r=ur(e);t&&r.removeEventListener("DOMContentLoaded",t),Wn.has(n)&&(n.HTMLElement.prototype.focus=Wn.get(n).focus,r.removeEventListener("keydown",Fr,!0),r.removeEventListener("keyup",Fr,!0),r.removeEventListener("click",el,!0),n.removeEventListener("focus",tl,!0),n.removeEventListener("blur",nl,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",bt,!0),r.removeEventListener("pointermove",bt,!0),r.removeEventListener("pointerup",bt,!0)):(r.removeEventListener("mousedown",bt,!0),r.removeEventListener("mousemove",bt,!0),r.removeEventListener("mouseup",bt,!0)),Wn.delete(n))};function UE(e){const t=ur(e);let n;return t.readyState!=="loading"?Lo(e):(n=()=>{Lo(e)},t.addEventListener("DOMContentLoaded",n)),()=>rl(e,n)}typeof document<"u"&&UE();function jE(){return Ln}function zE(e){Ln=e,Zr(e,null)}function Do(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function VE(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Do(e.onKeyDown),onKeyUp:Do(e.onKeyUp)}}}function $E(e){const t=ur(e);if(jE()==="virtual"){let n=t.activeElement;wE(()=>{t.activeElement===n&&e.isConnected&&Ro(e)})}else Ro(e)}function YE(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class ji{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let i=new ko({scopeRef:t});a.addChild(i),i.parent=a,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&YE(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new ji;var r;for(let a of this.traverse())n.addTreeNode(a.scopeRef,(r=(t=a.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,a.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new ji;let GE=k.createContext(null);function qE(e){let t=k.useContext(GE)||{};OE(t,e);let{ref:n,...r}=t;return r}function WE(e,t){let{focusProps:n}=BE(e),{keyboardProps:r}=VE(e),a=Br(n,r),i=qE(t),s=e.isDisabled?{}:i,u=k.useRef(e.autoFocus);return k.useEffect(()=>{u.current&&t.current&&$E(t.current),u.current=!1},[t]),{focusableProps:Br({...a,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function XE(e,t,n){let{validationBehavior:r,focus:a}=e;ln(()=>{if(r==="native"&&n?.current){let c=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(c),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(KE(n.current))}});let i=rn(()=>{t.resetValidation()}),s=rn(c=>{var l;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(l=n.current)===null||l===void 0?void 0:l.form;if(!c.defaultPrevented&&n&&d&&JE(d)===n.current){var f;a?a():(f=n.current)===null||f===void 0||f.focus(),zE("keyboard")}c.preventDefault()}),u=rn(()=>{t.commitValidation()});k.useEffect(()=>{let c=n?.current;if(!c)return;let l=c.form;return c.addEventListener("invalid",s),c.addEventListener("change",u),l?.addEventListener("reset",i),()=>{c.removeEventListener("invalid",s),c.removeEventListener("change",u),l?.removeEventListener("reset",i)}},[n,s,u,i,r])}function QE(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function KE(e){return{isInvalid:!e.validity.valid,validationDetails:QE(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function JE(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const al={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},il={...al,customError:!0,valid:!1},Mn={isInvalid:!1,validationDetails:al,validationErrors:[]},ZE=k.createContext({}),Po="__formValidationState"+Date.now();function eT(e){if(e[Po]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:i}=e[Po];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:i}}return tT(e)}function tT(e){let{isInvalid:t,validationState:n,name:r,value:a,builtinValidation:i,validate:s,validationBehavior:u="aria"}=e;n&&(t||(t=n==="invalid"));let c=t?{isInvalid:!0,validationErrors:[],validationDetails:il}:null,l=k.useMemo(()=>Mo(nT(s,a)),[s,a]);i?.validationDetails.valid&&(i=null);let d=k.useContext(ZE),f=k.useMemo(()=>r?Array.isArray(r)?r.flatMap(W=>hi(d[W])):hi(d[r]):[],[d,r]),[h,m]=k.useState(d),[A,_]=k.useState(!1);d!==h&&(m(d),_(!1));let O=k.useMemo(()=>Mo(A?[]:f),[A,f]),v=k.useRef(Mn),[L,M]=k.useState(Mn),z=k.useRef(Mn),R=()=>{if(!D)return;ae(!1);let W=l||i||v.current;La(W,z.current)||(z.current=W,M(W))},[D,ae]=k.useState(!1);return k.useEffect(R),{realtimeValidation:c||O||l||i||Mn,displayValidation:u==="native"?c||O||L:c||O||l||i||L,updateValidation(W){u==="aria"&&!La(L,W)?M(W):v.current=W},resetValidation(){let W=Mn;La(W,z.current)||(z.current=W,M(W)),u==="native"&&ae(!1),_(!0)},commitValidation(){u==="native"&&ae(!0),_(!0)}}}function hi(e){return e?Array.isArray(e)?e:[e]:[]}function nT(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return hi(n)}return[]}function Mo(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:il}:null}function La(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function rT(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":a,labelElementType:i="label"}=e;t=Pr(t);let s=Pr(),u={};n?(r=r?`${s} ${r}`:s,u={id:s,htmlFor:i==="label"?t:void 0}):!r&&!a&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=RE({id:t,"aria-label":a,"aria-labelledby":r});return{labelProps:u,fieldProps:c}}function aT(e){let{description:t,errorMessage:n,isInvalid:r,validationState:a}=e,{labelProps:i,fieldProps:s}=rT(e),u=wo([!!t,!!n,r,a]),c=wo([!!t,!!n,r,a]);return s=Br(s,{"aria-describedby":[u,c,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:s,descriptionProps:{id:u},errorMessageProps:{id:c}}}function iT(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:a=!1,isReadOnly:i=!1,type:s="text",validationBehavior:u="aria"}=e,[c,l]=tE(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=WE(e,t),f=eT({...e,value:c}),{isInvalid:h,validationErrors:m,validationDetails:A}=f.displayValidation,{labelProps:_,fieldProps:O,descriptionProps:v,errorMessageProps:L}=aT({...e,isInvalid:h,errorMessage:e.errorMessage||m}),M=yE(e,{labelable:!0});const z={type:s,pattern:e.pattern};return DE(t,c,l),XE(e,f,t),k.useEffect(()=>{if(t.current instanceof Mr(t.current).HTMLTextAreaElement){let R=t.current;Object.defineProperty(R,"defaultValue",{get:()=>R.value,set:()=>{},configurable:!0})}},[t]),{labelProps:_,inputProps:Br(M,n==="input"&&z,{disabled:r,readOnly:i,required:a&&u==="native","aria-required":a&&u==="aria"||void 0,"aria-invalid":h||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:c,onChange:R=>l(R.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...O}),descriptionProps:v,errorMessageProps:L,isInvalid:h,validationErrors:m,validationDetails:A}}const sT=e=>e.charCodeAt(e.length-1)===10,oT=e=>{const[t,n]=k.useState(""),r=()=>{h.current&&(h.current.style.height=h.current.scrollHeight+"px")},a=()=>{h.current&&(h.current.style.height="48px")},i=z=>{n(z)};k.useEffect(r,[t]);let{label:s,SubmitComponent:u,onSubmit:c,isLoadingStream:l,LoadingComponent:d,onPressLoadingButton:f}=e,h=k.useRef(null),{labelProps:m,inputProps:A}=iT({...e,inputElementType:"textarea"},h);const _=z=>{sT(z.target.value)||i(z.target.value)},O=z=>{(z.code==="Enter"||z.code==="NumpadEnter")&&(z.shiftKey?i(t+`
|
|
95
|
-
`):L())};let v=e.isDisabled;e.shouldDisableIfInputIsEmpty&&(v=e.isDisabled||t.length===0);const L=()=>{a(),c&&c(t),i("")},M=()=>{f&&f()};return B.jsxDEV("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[B.jsxDEV("div",{style:{display:"flex",flexDirection:"column"},children:[B.jsxDEV("label",{...m,className:e.classNameLabel,children:s},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:111,columnNumber:9},void 0),B.jsxDEV("textarea",{...
|
|
94
|
+
`,children:B.jsxDEV(bi,{facet:e.agent.display[ot.AgentDisplayFacetRoleType.ASSISTANT]},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Assistant/Assistant.tsx",lineNumber:23,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Assistant/Assistant.tsx",lineNumber:12,columnNumber:5},void 0)},Io=new Set;function Q1(e){return Io.has(e)?!1:(Io.add(e),!0)}function K1(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:a=0,dedupeKey:i}={}){const s=k.useRef(!1),u=k.useRef();return k.useCallback(l=>{if(u.current?.(),u.current=void 0,!l||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{i&&!Q1(i)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const h=new IntersectionObserver((m,_)=>{m[0]?.isIntersecting&&(_.disconnect(),f())},{root:d,rootMargin:r,threshold:a});h.observe(l),u.current=()=>h.disconnect()},[t,n,r,a,i,e])}class Jn{constructor(){}static getApiUrl=()=>"http://localhost:3001";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:a={}})=>{const i={method:n,headers:this.getHeaders({contentType:t}),...a};return r&&(i.body=JSON.stringify(r)),i}}function J1({href:e="",children:t,context:n,onClick:r,seenRootEl:a,...i}){const s=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),u=Jn.getApiUrl(),c=()=>{const _=`${u}/tracking/clicked/${n.appToken}`,A={discussionId:n.discussionId,urlClicked:e};try{fetch(_,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(A),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},l=()=>{const _=`${u}/tracking/displayed/${n.appToken}`,A={discussionId:n.discussionId,urlSeen:e};try{fetch(_,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(A),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},d=k.useMemo(()=>`${n.appToken}::${n.discussionId}::${e}`,[n.appToken,n.discussionId,e]),f=K1(l,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:d}),h=_=>{c(),r?.(_)},m=s?{}:{target:"_blank",rel:"noopener noreferrer"};return s?B.jsxDEV("a",{ref:f,href:e,...i,onClick:h,className:"customLinkInternal",children:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/customHTMLComponents/ChatLine.custom.link.tsx",lineNumber:109,columnNumber:7},this):B.jsxDEV("a",{ref:f,href:e,...m,...i,onClick:h,className:"customLinkExternal",children:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/customHTMLComponents/ChatLine.custom.link.tsx",lineNumber:122,columnNumber:5},this)}const Z1=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:a}=yi();return B.jsxDEV("div",{className:"flex justify-between mt-8 px-3 chatLineAssistant",children:[B.jsxDEV("div",{className:"w-10 mr-3 mt-6",children:B.jsxDEV("div",{children:B.jsxDEV(X1,{},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:30,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:29,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:28,columnNumber:7},void 0),B.jsxDEV("div",{className:`w-full p-4 rounded-lg transition-all duration-300 ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"bg-white text-gray-800"}`,children:[B.jsxDEV("p",{className:"font-bold",children:a},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:40,columnNumber:9},void 0),B.jsxDEV("div",{children:B.jsxDEV(dc,{rehypePlugins:[Kc],components:{a:({node:i,href:s,children:u,...c})=>B.jsxDEV(J1,{href:s??"",...c,context:n,seenRootEl:r,children:u},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:46,columnNumber:17},void 0)},children:e&&e},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:42,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:41,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:33,columnNumber:7},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/chatline.assistantMessage.tsx",lineNumber:27,columnNumber:5},void 0)},eE=({userType:e,content:t,metaData:n,context:r,seenRootEl:a})=>{const i=e==="user",s=e==="assistant";return B.jsxDEV(B.Fragment,{children:[i&&B.jsxDEV(W1,{content:t,metaData:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/Chatline.tsx",lineNumber:34,columnNumber:18},void 0),s&&B.jsxDEV(Z1,{content:t,metaData:n,context:r,seenRootEl:a},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/Chatline.tsx",lineNumber:36,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/ChatLine/Chatline.tsx",lineNumber:33,columnNumber:5},void 0)};function tE(e,t,n){let[r,a]=k.useState(e||t),i=k.useRef(e!==void 0),s=e!==void 0;k.useEffect(()=>{let l=i.current;l!==s&&console.warn(`WARN: A component changed from ${l?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),i.current=s},[s]);let u=s?e:r,c=k.useCallback((l,...d)=>{let f=(h,...m)=>{n&&(Object.is(u,h)||n(h,...m)),s||(u=h)};typeof l=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((m,..._)=>{let A=l(s?u:m,..._);return f(A,...d),s?m:A})):(s||a(l),f(l,...d))},[s,u,n]);return[u,c]}const Dr={prefix:String(Math.round(Math.random()*1e10)),current:0},Jc=k.createContext(Dr),nE=k.createContext(!1);let rE=!!(typeof window<"u"&&window.document&&window.document.createElement),Oa=new WeakMap;function aE(e=!1){let t=k.useContext(Jc),n=k.useRef(null);if(n.current===null&&!e){var r,a;let i=(a=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(i){let s=Oa.get(i);s==null?Oa.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==s.state&&(t.current=s.id,Oa.delete(i))}n.current=++t.current}return n.current}function iE(e){let t=k.useContext(Jc);t===Dr&&!rE&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=aE(!!e),r=t===Dr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function sE(e){let t=k.useId(),[n]=k.useState(dE()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Dr.prefix}`;return e||`${r}-${t}`}const oE=typeof k.useId=="function"?sE:iE;function uE(){return!1}function cE(){return!0}function lE(e){return()=>{}}function dE(){return typeof k.useSyncExternalStore=="function"?k.useSyncExternalStore(lE,uE,cE):k.useContext(nE)}function Zc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Zc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fE(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Zc(e))&&(r&&(r+=" "),r+=t);return r}const ln=typeof document<"u"?k.useLayoutEffect:()=>{};function rn(e){const t=k.useRef(null);return ln(()=>{t.current=e},[e]),k.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function hE(e){let[t,n]=k.useState(e),r=k.useRef(null),a=rn(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?a():n(s.value)});ln(()=>{r.current&&a()});let i=rn(s=>{r.current=s(t),a()});return[t,i]}let mE=!!(typeof window<"u"&&window.document&&window.document.createElement),kr=new Map;function Pr(e){let[t,n]=k.useState(e),r=k.useRef(null),a=oE(t),i=k.useCallback(s=>{r.current=s},[]);return mE&&kr.set(a,i),ln(()=>{let s=a;return()=>{kr.delete(s)}},[a]),k.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),a}function pE(e,t){if(e===t)return e;let n=kr.get(e);if(n)return n(t),t;let r=kr.get(t);return r?(r(e),e):t}function wo(e=[]){let t=Pr(),[n,r]=hE(t),a=k.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return ln(a,[t,a,...e]),n}function bE(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ur=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Mr=e=>e&&"window"in e&&e.window===e?e:ur(e).defaultView||window;function Br(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let i=t[a],s=r[a];typeof i=="function"&&typeof s=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=bE(i,s):(a==="className"||a==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[a]=fE(i,s):a==="id"&&i&&s?t.id=pE(i,s):t[a]=s!==void 0?s:i}}return t}const gE=new Set(["id"]),EE=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),TE=new Set(["href","target","rel","download","ping","referrerPolicy"]),xE=/^(data-.*)$/;function yE(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,i={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(gE.has(s)||n&&EE.has(s)||r&&TE.has(s)||a?.has(s)||xE.test(s))&&(i[s]=e[s]);return i}function Ro(e){if(CE())e.focus({preventScroll:!0});else{let t=SE(e);e.focus(),AE(t)}}let yr=null;function CE(){if(yr==null){yr=!1;try{document.createElement("div").focus({get preventScroll(){return yr=!0,!0}})}catch{}}return yr}function SE(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function AE(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function _E(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function vE(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function NE(){return vE(/^Mac/i)}function IE(){return _E(/Android/i)}let gn=new Map,di=new Set;function Oo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=gn.get(r.target);a||(a=new Set,gn.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=gn.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),gn.delete(r.target)),gn.size===0)){for(let i of di)i();di.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Oo():document.addEventListener("DOMContentLoaded",Oo));function wE(e){requestAnimationFrame(()=>{gn.size===0?e():di.add(e)})}function RE(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Pr(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!r&&!a&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function OE(e,t){ln(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function LE(e){return e.mozInputSource===0&&e.isTrusted?!0:IE()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function DE(e,t,n){let r=k.useRef(t),a=rn(()=>{n&&n(r.current)});k.useEffect(()=>{var i;let s=e==null||(i=e.current)===null||i===void 0?void 0:i.form;return s?.addEventListener("reset",a),()=>{s?.removeEventListener("reset",a)}},[e,a])}const kE=k.createContext({register:()=>{}});kE.displayName="PressResponderContext";class PE{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function ME(e){let t=k.useRef({isFocused:!1,observer:null});ln(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=rn(r=>{e?.(r)});return k.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let a=r.target,i=s=>{t.current.isFocused=!1,a.disabled&&n(new PE("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};a.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&a.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let u=a===document.activeElement?null:document.activeElement;a.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),a.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(a,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function BE(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e;const i=k.useCallback(c=>{if(c.target===c.currentTarget)return r&&r(c),a&&a(!1),!0},[r,a]),s=ME(i),u=k.useCallback(c=>{c.target===c.currentTarget&&document.activeElement===c.target&&(n&&n(c),a&&a(!0),s(c))},[a,n,s]);return{focusProps:{onFocus:!t&&(n||a||r)?u:void 0,onBlur:!t&&(r||a)?i:void 0}}}let Ln=null,FE=new Set,Wn=new Map,sn=!1,fi=!1;function Zr(e,t){for(let n of FE)n(e,t)}function HE(e){return!(e.metaKey||!NE()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Fr(e){sn=!0,HE(e)&&(Ln="keyboard",Zr("keyboard",e))}function bt(e){Ln="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(sn=!0,Zr("pointer",e))}function el(e){LE(e)&&(sn=!0,Ln="virtual")}function tl(e){e.target===window||e.target===document||(!sn&&!fi&&(Ln="virtual",Zr("virtual",e)),sn=!1,fi=!1)}function nl(){sn=!1,fi=!0}function Lo(e){if(typeof window>"u"||Wn.get(Mr(e)))return;const t=Mr(e),n=ur(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){sn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Fr,!0),n.addEventListener("keyup",Fr,!0),n.addEventListener("click",el,!0),t.addEventListener("focus",tl,!0),t.addEventListener("blur",nl,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",bt,!0),n.addEventListener("pointermove",bt,!0),n.addEventListener("pointerup",bt,!0)):(n.addEventListener("mousedown",bt,!0),n.addEventListener("mousemove",bt,!0),n.addEventListener("mouseup",bt,!0)),t.addEventListener("beforeunload",()=>{rl(e)},{once:!0}),Wn.set(t,{focus:r})}const rl=(e,t)=>{const n=Mr(e),r=ur(e);t&&r.removeEventListener("DOMContentLoaded",t),Wn.has(n)&&(n.HTMLElement.prototype.focus=Wn.get(n).focus,r.removeEventListener("keydown",Fr,!0),r.removeEventListener("keyup",Fr,!0),r.removeEventListener("click",el,!0),n.removeEventListener("focus",tl,!0),n.removeEventListener("blur",nl,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",bt,!0),r.removeEventListener("pointermove",bt,!0),r.removeEventListener("pointerup",bt,!0)):(r.removeEventListener("mousedown",bt,!0),r.removeEventListener("mousemove",bt,!0),r.removeEventListener("mouseup",bt,!0)),Wn.delete(n))};function UE(e){const t=ur(e);let n;return t.readyState!=="loading"?Lo(e):(n=()=>{Lo(e)},t.addEventListener("DOMContentLoaded",n)),()=>rl(e,n)}typeof document<"u"&&UE();function jE(){return Ln}function VE(e){Ln=e,Zr(e,null)}function Do(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function zE(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Do(e.onKeyDown),onKeyUp:Do(e.onKeyUp)}}}function $E(e){const t=ur(e);if(jE()==="virtual"){let n=t.activeElement;wE(()=>{t.activeElement===n&&e.isConnected&&Ro(e)})}else Ro(e)}function YE(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class ji{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let i=new ko({scopeRef:t});a.addChild(i),i.parent=a,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&YE(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(i=>r&&r.addChild(i))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new ji;var r;for(let a of this.traverse())n.addTreeNode(a.scopeRef,(r=(t=a.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,a.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ko({scopeRef:null}),this.fastMap.set(null,this.root)}}class ko{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new ji;let GE=k.createContext(null);function qE(e){let t=k.useContext(GE)||{};OE(t,e);let{ref:n,...r}=t;return r}function WE(e,t){let{focusProps:n}=BE(e),{keyboardProps:r}=zE(e),a=Br(n,r),i=qE(t),s=e.isDisabled?{}:i,u=k.useRef(e.autoFocus);return k.useEffect(()=>{u.current&&t.current&&$E(t.current),u.current=!1},[t]),{focusableProps:Br({...a,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function XE(e,t,n){let{validationBehavior:r,focus:a}=e;ln(()=>{if(r==="native"&&n?.current){let c=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(c),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(KE(n.current))}});let i=rn(()=>{t.resetValidation()}),s=rn(c=>{var l;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(l=n.current)===null||l===void 0?void 0:l.form;if(!c.defaultPrevented&&n&&d&&JE(d)===n.current){var f;a?a():(f=n.current)===null||f===void 0||f.focus(),VE("keyboard")}c.preventDefault()}),u=rn(()=>{t.commitValidation()});k.useEffect(()=>{let c=n?.current;if(!c)return;let l=c.form;return c.addEventListener("invalid",s),c.addEventListener("change",u),l?.addEventListener("reset",i),()=>{c.removeEventListener("invalid",s),c.removeEventListener("change",u),l?.removeEventListener("reset",i)}},[n,s,u,i,r])}function QE(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function KE(e){return{isInvalid:!e.validity.valid,validationDetails:QE(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function JE(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const al={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},il={...al,customError:!0,valid:!1},Mn={isInvalid:!1,validationDetails:al,validationErrors:[]},ZE=k.createContext({}),Po="__formValidationState"+Date.now();function eT(e){if(e[Po]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:i}=e[Po];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:i}}return tT(e)}function tT(e){let{isInvalid:t,validationState:n,name:r,value:a,builtinValidation:i,validate:s,validationBehavior:u="aria"}=e;n&&(t||(t=n==="invalid"));let c=t?{isInvalid:!0,validationErrors:[],validationDetails:il}:null,l=k.useMemo(()=>Mo(nT(s,a)),[s,a]);i?.validationDetails.valid&&(i=null);let d=k.useContext(ZE),f=k.useMemo(()=>r?Array.isArray(r)?r.flatMap(W=>hi(d[W])):hi(d[r]):[],[d,r]),[h,m]=k.useState(d),[_,A]=k.useState(!1);d!==h&&(m(d),A(!1));let O=k.useMemo(()=>Mo(_?[]:f),[_,f]),v=k.useRef(Mn),[L,M]=k.useState(Mn),V=k.useRef(Mn),R=()=>{if(!D)return;ae(!1);let W=l||i||v.current;La(W,V.current)||(V.current=W,M(W))},[D,ae]=k.useState(!1);return k.useEffect(R),{realtimeValidation:c||O||l||i||Mn,displayValidation:u==="native"?c||O||L:c||O||l||i||L,updateValidation(W){u==="aria"&&!La(L,W)?M(W):v.current=W},resetValidation(){let W=Mn;La(W,V.current)||(V.current=W,M(W)),u==="native"&&ae(!1),A(!0)},commitValidation(){u==="native"&&ae(!0),A(!0)}}}function hi(e){return e?Array.isArray(e)?e:[e]:[]}function nT(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return hi(n)}return[]}function Mo(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:il}:null}function La(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function rT(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":a,labelElementType:i="label"}=e;t=Pr(t);let s=Pr(),u={};n?(r=r?`${s} ${r}`:s,u={id:s,htmlFor:i==="label"?t:void 0}):!r&&!a&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=RE({id:t,"aria-label":a,"aria-labelledby":r});return{labelProps:u,fieldProps:c}}function aT(e){let{description:t,errorMessage:n,isInvalid:r,validationState:a}=e,{labelProps:i,fieldProps:s}=rT(e),u=wo([!!t,!!n,r,a]),c=wo([!!t,!!n,r,a]);return s=Br(s,{"aria-describedby":[u,c,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:i,fieldProps:s,descriptionProps:{id:u},errorMessageProps:{id:c}}}function iT(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:a=!1,isReadOnly:i=!1,type:s="text",validationBehavior:u="aria"}=e,[c,l]=tE(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=WE(e,t),f=eT({...e,value:c}),{isInvalid:h,validationErrors:m,validationDetails:_}=f.displayValidation,{labelProps:A,fieldProps:O,descriptionProps:v,errorMessageProps:L}=aT({...e,isInvalid:h,errorMessage:e.errorMessage||m}),M=yE(e,{labelable:!0});const V={type:s,pattern:e.pattern};return DE(t,c,l),XE(e,f,t),k.useEffect(()=>{if(t.current instanceof Mr(t.current).HTMLTextAreaElement){let R=t.current;Object.defineProperty(R,"defaultValue",{get:()=>R.value,set:()=>{},configurable:!0})}},[t]),{labelProps:A,inputProps:Br(M,n==="input"&&V,{disabled:r,readOnly:i,required:a&&u==="native","aria-required":a&&u==="aria"||void 0,"aria-invalid":h||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:c,onChange:R=>l(R.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...d,...O}),descriptionProps:v,errorMessageProps:L,isInvalid:h,validationErrors:m,validationDetails:_}}const sT=e=>e.charCodeAt(e.length-1)===10,oT=e=>{const[t,n]=k.useState(""),r=()=>{h.current&&(h.current.style.height=h.current.scrollHeight+"px")},a=()=>{h.current&&(h.current.style.height="48px")},i=V=>{n(V)};k.useEffect(r,[t]);let{label:s,SubmitComponent:u,onSubmit:c,isLoadingStream:l,LoadingComponent:d,onPressLoadingButton:f}=e,h=k.useRef(null),{labelProps:m,inputProps:_}=iT({...e,inputElementType:"textarea"},h);const A=V=>{sT(V.target.value)||i(V.target.value)},O=V=>{(V.code==="Enter"||V.code==="NumpadEnter")&&(V.shiftKey?i(t+`
|
|
95
|
+
`):L())};let v=e.isDisabled;e.shouldDisableIfInputIsEmpty&&(v=e.isDisabled||t.length===0);const L=()=>{a(),c&&c(t),i("")},M=()=>{f&&f()};return B.jsxDEV("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[B.jsxDEV("div",{style:{display:"flex",flexDirection:"column"},children:[B.jsxDEV("label",{...m,className:e.classNameLabel,children:s},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:111,columnNumber:9},void 0),B.jsxDEV("textarea",{..._,ref:h,className:`${e.classNameTextarea} p-3`,onChange:A,value:t,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:"calc(100% - 30px)",resize:"none"},onKeyDown:O},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:114,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:110,columnNumber:7},void 0),!l&&u&&B.jsxDEV("div",{className:"relative",children:B.jsxDEV(u,{onSubmitButton:L,isDisabled:v},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:134,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:133,columnNumber:9},void 0),l&&d&&B.jsxDEV("div",{className:"relative",children:B.jsxDEV(d,{onPressLoadingButton:M},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:142,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:141,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/Textarea.tsx",lineNumber:106,columnNumber:5},void 0)},uT=({onSubmitButton:e,isDisabled:t})=>B.jsxDEV("div",{children:B.jsxDEV("button",{className:`absolute
|
|
96
96
|
bg-black
|
|
97
97
|
md:bottom-2
|
|
98
98
|
md:right-3
|
|
@@ -115,18 +115,18 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
115
115
|
flex
|
|
116
116
|
justify-center
|
|
117
117
|
items-center
|
|
118
|
-
`,children:B.jsxDEV(bi,{facet:e.agent.display[ot.AgentDisplayFacetRoleType.SEARCH]},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Search/Search.tsx",lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Search/Search.tsx",lineNumber:12,columnNumber:5},void 0)},TT=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getFunctionTranslated:a,stepTranslation:i,lookingForProductTranslation:s}=ul();return B.jsxDEV(B.Fragment,{children:e==="loadingIntermediaryStates"&&B.jsxDEV("div",{children:[B.jsxDEV("div",{children:[B.jsxDEV("p",{className:"text-center my-2 text-lg",children:[s,"..."]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:30,columnNumber:13},void 0),B.jsxDEV("p",{className:"text-center my-1 text-md",children:t&&`${a(t)}`},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:33,columnNumber:13},void 0),n&&B.jsxDEV("p",{className:"text-center my-2",children:[i,B.jsxDEV("span",{children:" "},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:39,columnNumber:17},void 0),n,"/",r]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:37,columnNumber:15},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:29,columnNumber:11},void 0),B.jsxDEV("div",{className:"flex justify-center",children:B.jsxDEV(ET,{},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:46,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:45,columnNumber:11},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:28,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:26,columnNumber:5},void 0)},xT=({onPressLoadingButton:e})=>B.jsxDEV("div",{children:B.jsxDEV("button",{className:"absolute bg-white md:bottom-2 md:right-3 dark:hover:bg-white right-2 bottom-1.5 disabled:opacity-10 disabled:text-gray-400 enabled:bg-white text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors","data-testid":"send-button",onClick:e,children:B.jsxDEV("span",{className:"","data-state":"closed",children:B.jsxDEV("svg",{fill:"#000000",height:"24",width:"24",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 297 297",children:[B.jsxDEV("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:26,columnNumber:13},void 0),B.jsxDEV("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:28,columnNumber:13},void 0),B.jsxDEV("g",{id:"SVGRepo_iconCarrier",children:[" ",B.jsxDEV("path",{d:"M148.5,0C66.486,0,0,66.486,0,148.5S66.486,297,148.5,297S297,230.514,297,148.5S230.514,0,148.5,0z M213.292,190.121 c0,12.912-10.467,23.379-23.378,23.379H106.67c-12.911,0-23.378-10.467-23.378-23.379v-83.242c0-12.912,10.467-23.379,23.378-23.379 h83.244c12.911,0,23.378,10.467,23.378,23.379V190.121z"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:36,columnNumber:15},void 0)," "]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:34,columnNumber:13},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:17,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:16,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:11,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:10,columnNumber:5},void 0),cl=k.createContext({conversation:[],setConversation:()=>{},discussionId:null,setDiscussionId:()=>{}}),yT=e=>{const t=k.useRef(null),[n,r]=k.useState(!1),a=k.useRef(!0),i=k.useRef(!1),s=k.useRef(0),u=()=>{const d=t.current,f=4;if(d){d.scrollTop<s.current-1&&(i.current=!1);const m=d.scrollHeight>d.clientHeight,
|
|
118
|
+
`,children:B.jsxDEV(bi,{facet:e.agent.display[ot.AgentDisplayFacetRoleType.SEARCH]},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Search/Search.tsx",lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Facets/Search/Search.tsx",lineNumber:12,columnNumber:5},void 0)},TT=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getFunctionTranslated:a,stepTranslation:i,lookingForProductTranslation:s}=ul();return B.jsxDEV(B.Fragment,{children:e==="loadingIntermediaryStates"&&B.jsxDEV("div",{children:[B.jsxDEV("div",{children:[B.jsxDEV("p",{className:"text-center my-2 text-lg",children:[s,"..."]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:30,columnNumber:13},void 0),B.jsxDEV("p",{className:"text-center my-1 text-md",children:t&&`${a(t)}`},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:33,columnNumber:13},void 0),n&&B.jsxDEV("p",{className:"text-center my-2",children:[i,B.jsxDEV("span",{children:" "},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:39,columnNumber:17},void 0),n,"/",r]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:37,columnNumber:15},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:29,columnNumber:11},void 0),B.jsxDEV("div",{className:"flex justify-center",children:B.jsxDEV(ET,{},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:46,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:45,columnNumber:11},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:28,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/LoadingPart/LoadingPart.tsx",lineNumber:26,columnNumber:5},void 0)},xT=({onPressLoadingButton:e})=>B.jsxDEV("div",{children:B.jsxDEV("button",{className:"absolute bg-white md:bottom-2 md:right-3 dark:hover:bg-white right-2 bottom-1.5 disabled:opacity-10 disabled:text-gray-400 enabled:bg-white text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors","data-testid":"send-button",onClick:e,children:B.jsxDEV("span",{className:"","data-state":"closed",children:B.jsxDEV("svg",{fill:"#000000",height:"24",width:"24",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 297 297",children:[B.jsxDEV("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:26,columnNumber:13},void 0),B.jsxDEV("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:28,columnNumber:13},void 0),B.jsxDEV("g",{id:"SVGRepo_iconCarrier",children:[" ",B.jsxDEV("path",{d:"M148.5,0C66.486,0,0,66.486,0,148.5S66.486,297,148.5,297S297,230.514,297,148.5S230.514,0,148.5,0z M213.292,190.121 c0,12.912-10.467,23.379-23.378,23.379H106.67c-12.911,0-23.378-10.467-23.378-23.379v-83.242c0-12.912,10.467-23.379,23.378-23.379 h83.244c12.911,0,23.378,10.467,23.378,23.379V190.121z"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:36,columnNumber:15},void 0)," "]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:34,columnNumber:13},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:17,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:16,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:11,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/BaseComponents/Textarea/StopButton.tsx",lineNumber:10,columnNumber:5},void 0),cl=k.createContext({conversation:[],setConversation:()=>{},discussionId:null,setDiscussionId:()=>{}}),yT=e=>{const t=k.useRef(null),[n,r]=k.useState(!1),a=k.useRef(!0),i=k.useRef(!1),s=k.useRef(0),u=()=>{const d=t.current,f=4;if(d){d.scrollTop<s.current-1&&(i.current=!1);const m=d.scrollHeight>d.clientHeight,_=d.scrollHeight-d.scrollTop<=d.clientHeight+f;r(m&&!_),a.current=_,s.current=d.scrollTop}},c=({smooth:d=!1,sticky:f=!1})=>{const h=t.current;f?(i.current=!0,a.current=!0):h&&h.scrollTo({top:h.scrollHeight,behavior:d?"smooth":"auto"}),h&&i.current&&h.scrollTo({top:h.scrollHeight,behavior:d?"smooth":"auto"})};return k.useEffect(()=>{u()},[e]),k.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",u),u(),()=>{d.removeEventListener("scroll",u)}},[]),k.useLayoutEffect(()=>{i.current&&c({smooth:!1})},[e]),{scrollToBottom:c,removeStickyNess:()=>{i.current=!1},messagesContainerRef:t,showScrollButton:n}},CT=()=>{const e=tr(),t=e.formatMessage({defaultMessage:"Discussion limit reached",id:"chatbot.DiscussionLimitReached.title"}),n=e.formatMessage({defaultMessage:"The discussion has reached its maximum number of messages. Please start a new one.",id:"chatbot.DiscussionLimitReached.explaination"}),r=e.formatMessage({defaultMessage:"Restart",id:"chatbot.DiscussionLimitReached.cta"});return{DiscussionLimitReachedTitleTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedCtaTranslation:r}},ST=e=>We.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},We.createElement("g",{clipPath:"url(#clip0_1276_7761)"},We.createElement("path",{d:"M19.7285 10.9288C20.4413 13.5978 19.7507 16.5635 17.6569 18.6573C15.1798 21.1344 11.4826 21.6475 8.5 20.1966M18.364 8.05071L17.6569 7.3436C14.5327 4.21941 9.46736 4.21941 6.34316 7.3436C3.42964 10.2571 3.23318 14.8588 5.75376 18M18.364 8.05071H14.1213M18.364 8.05071V3.80807",stroke:"#1C274C",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),We.createElement("defs",null,We.createElement("clipPath",{id:"clip0_1276_7761"},We.createElement("rect",{width:24,height:24,fill:"white"})))),AT=({resetDiscussion:e})=>{const{DiscussionLimitReachedCtaTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedTitleTranslation:r}=CT();return B.jsxDEV(B.Fragment,{children:B.jsxDEV("div",{className:"px-3 mt-4",children:B.jsxDEV("div",{role:"status","aria-live":"polite",className:"info-banner not-prose flex items-start gap-3 rounded-lg bg-blue-50 border-l-4 border-blue-500 p-4 shadow-sm",children:[B.jsxDEV("div",{className:"flex flex-col justify-center items-center mx-3",children:B.jsxDEV("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"!w-5 !h-5 mt-0.5 flex-shrink-0 pointer-events-none",children:B.jsxDEV("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16Zm.75-11.5a.75.75 0 10-1.5 0 .75.75 0 001.5 0ZM9 8.75A.75.75 0 019.75 8h.5a.75.75 0 01.75.75v5a.75.75 0 01-.75.75h-.5A.75.75 0 019 13.75v-5Z",clipRule:"evenodd"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:35,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:27,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:26,columnNumber:11},void 0),B.jsxDEV("div",{className:"flex-1 min-w-0",children:[B.jsxDEV("p",{className:"font-semibold",children:r},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:44,columnNumber:13},void 0),B.jsxDEV("p",{className:"text-sm break-words",children:n},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:47,columnNumber:13},void 0),B.jsxDEV("div",{className:"my-2",children:B.jsxDEV("button",{type:"button",onClick:e,title:t,"aria-label":t,className:`group inline-flex items-center gap-2 rounded-full px-3 py-1.5
|
|
119
119
|
font-medium text-blue-700 dark:text-blue-300
|
|
120
120
|
bg-blue-50/70 hover:bg-blue-100 dark:bg-blue-900/20 dark:hover:bg-blue-900/30
|
|
121
121
|
ring-1 ring-inset ring-blue-600/20 hover:ring-blue-600/30
|
|
122
122
|
shadow-sm transition-all duration-200
|
|
123
123
|
focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/50
|
|
124
|
-
active:scale-[0.98]`,children:[B.jsxDEV(ST,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:64,columnNumber:17},void 0),B.jsxDEV("span",{children:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:68,columnNumber:17},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:51,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:50,columnNumber:13},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:43,columnNumber:11},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:20,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:19,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:18,columnNumber:5},void 0)};let Cr=new AbortController;const ll=({appToken:e,containerClassName:t})=>{e||console.log("Dev - Admin settings");const n=k.useRef(null),{placeholderTranslation:r,genericErrorTranslation:a,tooManyRequestsTranslation:i,conflictErrorTranslation:s}=yi(),{conversation:u,setConversation:c,discussionId:l,setDiscussionId:d}=k.useContext(cl),[f,h]=k.useState("notLoading"),{defaultStartingStep:m}=ul(),[A
|
|
124
|
+
active:scale-[0.98]`,children:[B.jsxDEV(ST,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:64,columnNumber:17},void 0),B.jsxDEV("span",{children:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:68,columnNumber:17},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:51,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:50,columnNumber:13},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:43,columnNumber:11},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:20,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:19,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/components/MessageIsAtMaxMessage.tsx",lineNumber:18,columnNumber:5},void 0)};let Cr=new AbortController;const ll=({appToken:e,containerClassName:t})=>{e||console.log("Dev - Admin settings");const n=k.useRef(null),{placeholderTranslation:r,genericErrorTranslation:a,tooManyRequestsTranslation:i,conflictErrorTranslation:s}=yi(),{conversation:u,setConversation:c,discussionId:l,setDiscussionId:d}=k.useContext(cl),[f,h]=k.useState("notLoading"),{defaultStartingStep:m}=ul(),[_,A]=k.useState(null),[O,v]=k.useState(m),[L,M]=k.useState(null),{companySettings:V}=k.useContext(Zn),{appCurrentLang:R}=k.useContext(sl),ae={...f!=="notLoading"||(u?.length??0)>0?{maxHeight:"100vh"}:{height:"250px"}},ge=pT(u)>=V?.api?.settings?.maxUserMessagesPerDiscussion,{scrollToBottom:ue,showScrollButton:W,messagesContainerRef:xe,removeStickyNess:te}=yT(u),F=(de,Ce,Fe)=>{c(g=>[...g,{content:de,userType:Ce,metaData:Fe}])},H=()=>{Cr.abort("cancelling"),console.log("Stream request aborted"),h("notLoading"),c(de=>de.filter(Ce=>!(Ce.content?.length===0&&Ce.userType==="assistant")))},{resetDiscussion:Z}=Ef({companySettings:V,setConversation:c,setDiscussionId:d}),he=async de=>{h("loadingIntermediaryStates");const Ce=Jn.getApiUrl(),Fe={query:de,language:R.locale};c(X=>[...X,{userType:"assistant",content:""}]),requestAnimationFrame(()=>ue({smooth:!1,sticky:!1})),l&&(Fe.discussionId=l);const g=Cr.signal,G=Jn.getFetchConfig({httpVerb:"POST",body:Fe,contentType:"application/json",options:{signal:g}});fetch(`${Ce}/ai/prompt/${e}`,G).then(async X=>{const x=X?.body?.getReader(),ee=new TextDecoder;let ie="",oe="",se=!1,K=!1,le=null;const ce=X.headers.get("discussionId");d(parseInt(ce,10)),await new ReadableStream({start(Y){return He();async function He(){if(!X.ok){h("notLoading");let Ye=a;X.status===409?Ye=s:X.status===429?Ye=i:(X.status,Ye=a),c(Xe=>(Xe.pop(),Xe)),F(Ye,"assistant",{isErrorMessage:!0}),Cr=new AbortController;return}return x?.read().then(Ye=>{const{done:Xe,value:dt}=Ye,Qe=ee.decode(dt),_t=pn.transformStringifiedObjectIntoArrayOfObjects(Qe);pn.containsObjectWithLastAnswerToTrue(_t)&&h("loadingFinalAnswer");for(const me of _t)if(pn.isObjectOutputstreamTextDTO(me)){const{content:Te,isLastAnswer:Ie,streamSourceUuid:we,shouldStopStream:Ue}=me;le&&le!==we&&(ie+='<span style="display:block;height:1rem;"></span>'),le=we,(Ie||Ue)&&(K=!0),Y.enqueue(Te),mT(Te)?(oe+=Te,ie+=oe,oe="",se=!1):se||hT(Te)?(oe+=Te,se=!0):ie+=Te,c(I=>{const w=[...I],q=w.length-1,pe=w[q];return w[q]={...pe,content:pe.content=ie,metaData:{isErrorMessage:Ue}},[...w]})}else if(pn.isObjectOutputstreamLoadingCurrentStepNumberDTO(me)){const{content:Te}=me;Y.enqueue(Te),M(Te)}else if(pn.isObjectOutputstreamLoadingCurrentStepNameDTO(me)){const{content:Te}=me;Y.enqueue(Te),v(Te)}else if(pn.isObjectOutputstreamLoadingNumberOfStepsDTO(me)){const{content:Te}=me;Y.enqueue(Te),A(Te)}else console.warn(`Object not handled - ${me}`);if(Xe&&K){Y.close(),h("notLoading"),v(m),M(null);return}return He()})}}}).pipeTo(new WritableStream)}).catch(X=>{console.error(X),console.log("Cancelling stream"),h("notLoading"),Cr=new AbortController})};return B.jsxDEV("div",{className:["relative p-2","flex flex-col min-h-0 overflow-hidden","h-auto",t??"max-w-[90%] mx-auto"].join(" "),ref:n,style:ae,children:[B.jsxDEV("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:xe,children:[u.map((de,Ce)=>B.jsxDEV(eE,{content:de.content,userType:de.userType,metaData:de.metaData,context:{discussionId:l,messageIndex:Ce,appToken:e},seenRootEl:xe.current},Ce,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:392,columnNumber:11},void 0)),B.jsxDEV(TT,{currentStepName:O,currentStepNumber:L,loadingStatus:f,numberOfSteps:_},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:405,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:387,columnNumber:7},void 0),W&&B.jsxDEV("button",{onClick:()=>ue({smooth:!0,sticky:!0}),className:"absolute bottom-[120px] right-4 bg-blue-500 hover:bg-blue-600 text-white p-3 rounded-full shadow-lg transition-all duration-300 z-10","aria-label":"Scroll to bottom",children:B.jsxDEV("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:B.jsxDEV("path",{d:"M12 16L6 10L7.4 8.6L12 13.2L16.6 8.6L18 10L12 16Z",fill:"currentColor"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:430,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:423,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:413,columnNumber:9},void 0),ge&&B.jsxDEV(AT,{resetDiscussion:Z},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:438,columnNumber:9},void 0),B.jsxDEV("div",{className:"flex-shrink-0",children:B.jsxDEV(oT,{classNameTextarea:"",classNameContainer:"relative mt-6 mt-3 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:uT,isDisabled:f!=="notLoading"||ge,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:de=>{if(bT(de)){const Ce=gT(de,l);F(Ce,"user"),te(),ue({smooth:!0,sticky:!1})}else F(de,"user"),te(),ue({smooth:!0,sticky:!1}),he(de)},placeholder:r,autoFocus:!0,isLoadingStream:f==="loadingFinalAnswer"||f==="loadingIntermediaryStates",LoadingComponent:xT,onPressLoadingButton:H},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:442,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:441,columnNumber:7},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Chatbox/Chatbox.tsx",lineNumber:376,columnNumber:5},void 0)};function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hr.apply(this,arguments)}function dl(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function mi(e,t){return mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},mi(e,t)}function fl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mi(e,t)}var Sr={exports:{}};/*
|
|
125
125
|
object-assign
|
|
126
126
|
(c) Sindre Sorhus
|
|
127
127
|
@license MIT
|
|
128
|
-
*/var Da,Bo;function _T(){if(Bo)return Da;Bo=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Da=a()?Object.assign:function(i,s){for(var u,c=r(i),l,d=1;d<arguments.length;d++){u=Object(arguments[d]);for(var f in u)t.call(u,f)&&(c[f]=u[f]);if(e){l=e(u);for(var h=0;h<l.length;h++)n.call(u,l[h])&&(c[l[h]]=u[l[h]])}}return c},Da}var ka,Fo;function
|
|
129
|
-
Valid keys: `+JSON.stringify(Object.keys(g),null," "));var Y=ke(se,ce,ee,ie,oe+"."+ce,n);if(Y)return Y}return null}return O(G)}function H(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(H);if(g===null||u(g))return!0;var G=f(g);if(G){var X=G.call(g),x;if(G!==g.entries){for(;!(x=X.next()).done;)if(!H(x.value))return!1}else for(;!(x=X.next()).done;){var ee=x.value;if(ee&&!H(ee[1]))return!1}}else return!1;return!0;default:return!1}}function Z(g,G){return g==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function he(g){var G=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":Z(G,g)?"symbol":G}function de(g){if(typeof g>"u"||g===null)return""+g;var G=he(g);if(G==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return G}function Ce(g){var G=de(g);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Fe(g){return!g.constructor||!g.constructor.name?h:g.constructor.name}return m.checkPropTypes=a,m.resetWarningCache=a.resetWarningCache,m.PropTypes=m,m},Ba}var Fa,zo;function IT(){if(zo)return Fa;zo=1;var e=zi();function t(){}function n(){}return n.resetWarningCache=t,Fa=function(){function r(s,u,c,l,d,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Fa}var Vo;function wT(){if(Vo)return Sr.exports;if(Vo=1,process.env.NODE_ENV!=="production"){var e=gi(),t=!0;Sr.exports=NT()(e.isElement,t)}else Sr.exports=IT()();return Sr.exports}var RT=wT();const be=Ur(RT);function OT(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function LT(e,t){e.classList?e.classList.add(t):OT(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $o(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function DT(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$o(e.className,t):e.setAttribute("class",$o(e.className&&e.className.baseVal||"",t))}const Yo={disabled:!1};var kT=process.env.NODE_ENV!=="production"?be.oneOfType([be.number,be.shape({enter:be.number,exit:be.number,appear:be.number}).isRequired]):null,PT=process.env.NODE_ENV!=="production"?be.oneOfType([be.string,be.shape({enter:be.string,exit:be.string,active:be.string}),be.shape({enter:be.string,enterDone:be.string,enterActive:be.string,exit:be.string,exitDone:be.string,exitActive:be.string})]):null;const ml=k.createContext(null);var pl=function(t){return t.scrollTop},Un="unmounted",Zt="exited",en="entering",En="entered",pi="exiting",Mt=(function(e){fl(t,e);function t(r,a){var i;i=e.call(this,r,a)||this;var s=a,u=s&&!s.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?u?(c=Zt,i.appearStatus=en):c=En:r.unmountOnExit||r.mountOnEnter?c=Un:c=Zt,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var s=a.in;return s&&i.status===Un?{status:Zt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var i=null;if(a!==this.props){var s=this.state.status;this.props.in?s!==en&&s!==En&&(i=en):(s===en||s===En)&&(i=pi)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,i,s,u;return i=s=u=a,a!=null&&typeof a!="number"&&(i=a.exit,s=a.enter,u=a.appear!==void 0?a.appear:s),{exit:i,enter:s,appear:u}},n.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===en){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Bn.findDOMNode(this);s&&pl(s)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Zt&&this.setState({status:Un})},n.performEnter=function(a){var i=this,s=this.props.enter,u=this.context?this.context.isMounting:a,c=this.props.nodeRef?[u]:[Bn.findDOMNode(this),u],l=c[0],d=c[1],f=this.getTimeouts(),h=u?f.appear:f.enter;if(!a&&!s||Yo.disabled){this.safeSetState({status:En},function(){i.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:en},function(){i.props.onEntering(l,d),i.onTransitionEnd(h,function(){i.safeSetState({status:En},function(){i.props.onEntered(l,d)})})})},n.performExit=function(){var a=this,i=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:Bn.findDOMNode(this);if(!i||Yo.disabled){this.safeSetState({status:Zt},function(){a.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:pi},function(){a.props.onExiting(u),a.onTransitionEnd(s.exit,function(){a.safeSetState({status:Zt},function(){a.props.onExited(u)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},n.setNextCallback=function(a){var i=this,s=!0;return this.nextCallback=function(u){s&&(s=!1,i.nextCallback=null,a(u))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(a,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Bn.findDOMNode(this),u=a==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=c[0],d=c[1];this.props.addEndListener(l,d)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===Un)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var u=dl(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(ml.Provider,{value:null},typeof s=="function"?s(a,u):k.cloneElement(k.Children.only(s),u))},t})(k.Component);Mt.contextType=ml;Mt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:be.shape({current:typeof Element>"u"?be.any:function(e,t,n,r,a,i){var s=e[t];return be.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,a,i)}}),children:be.oneOfType([be.func.isRequired,be.element.isRequired]).isRequired,in:be.bool,mountOnEnter:be.bool,unmountOnExit:be.bool,appear:be.bool,enter:be.bool,exit:be.bool,timeout:function(t){var n=kT;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];return n.apply(void 0,[t].concat(a))},addEndListener:be.func,onEnter:be.func,onEntering:be.func,onEntered:be.func,onExit:be.func,onExiting:be.func,onExited:be.func}:{};function bn(){}Mt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bn,onEntering:bn,onEntered:bn,onExit:bn,onExiting:bn,onExited:bn};Mt.UNMOUNTED=Un;Mt.EXITED=Zt;Mt.ENTERING=en;Mt.ENTERED=En;Mt.EXITING=pi;var MT=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return LT(t,r)})},Ha=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return DT(t,r)})},Vi=(function(e){fl(t,e);function t(){for(var r,a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(u,c){var l=r.resolveArguments(u,c),d=l[0],f=l[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(u,c)},r.onEntering=function(u,c){var l=r.resolveArguments(u,c),d=l[0],f=l[1],h=f?"appear":"enter";r.addClass(d,h,"active"),r.props.onEntering&&r.props.onEntering(u,c)},r.onEntered=function(u,c){var l=r.resolveArguments(u,c),d=l[0],f=l[1],h=f?"appear":"enter";r.removeClasses(d,h),r.addClass(d,h,"done"),r.props.onEntered&&r.props.onEntered(u,c)},r.onExit=function(u){var c=r.resolveArguments(u),l=c[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(u)},r.onExiting=function(u){var c=r.resolveArguments(u),l=c[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(u)},r.onExited=function(u){var c=r.resolveArguments(u),l=c[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(u)},r.resolveArguments=function(u,c){return r.props.nodeRef?[r.props.nodeRef.current,u]:[u,c]},r.getClassNames=function(u){var c=r.props.classNames,l=typeof c=="string",d=l&&c?c+"-":"",f=l?""+d+u:c[u],h=l?f+"-active":c[u+"Active"],m=l?f+"-done":c[u+"Done"];return{baseClassName:f,activeClassName:h,doneClassName:m}},r}var n=t.prototype;return n.addClass=function(a,i,s){var u=this.getClassNames(i)[s+"ClassName"],c=this.getClassNames("enter"),l=c.doneClassName;i==="appear"&&s==="done"&&l&&(u+=" "+l),s==="active"&&a&&pl(a),u&&(this.appliedClasses[i][s]=u,MT(a,u))},n.removeClasses=function(a,i){var s=this.appliedClasses[i],u=s.base,c=s.active,l=s.done;this.appliedClasses[i]={},u&&Ha(a,u),c&&Ha(a,c),l&&Ha(a,l)},n.render=function(){var a=this.props;a.classNames;var i=dl(a,["classNames"]);return k.createElement(Mt,Hr({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(k.Component);Vi.defaultProps={classNames:""};Vi.propTypes=process.env.NODE_ENV!=="production"?Hr({},Mt.propTypes,{classNames:PT,onEnter:be.func,onEntering:be.func,onEntered:be.func,onExit:be.func,onExiting:be.func,onExited:be.func}):{};const BT=k.forwardRef(({props:e},t)=>B.jsxDEV("div",{ref:t,className:`chatBox
|
|
128
|
+
*/var Da,Bo;function _T(){if(Bo)return Da;Bo=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(d){l[d]=d}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Da=a()?Object.assign:function(i,s){for(var u,c=r(i),l,d=1;d<arguments.length;d++){u=Object(arguments[d]);for(var f in u)t.call(u,f)&&(c[f]=u[f]);if(e){l=e(u);for(var h=0;h<l.length;h++)n.call(u,l[h])&&(c[l[h]]=u[l[h]])}}return c},Da}var ka,Fo;function Vi(){if(Fo)return ka;Fo=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ka=e,ka}var Pa,Ho;function hl(){return Ho||(Ho=1,Pa=Function.call.bind(Object.prototype.hasOwnProperty)),Pa}var Ma,Uo;function vT(){if(Uo)return Ma;Uo=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vi(),n={},r=hl();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(i,s,u,c,l){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var h=Error((c||"React class")+": "+u+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[d](s,d,c,u,null,t)}catch(_){f=_}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+u+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var m=l?l():"";e("Failed "+u+" type: "+f.message+(m??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ma=a,Ma}var Ba,jo;function NT(){if(jo)return Ba;jo=1;var e=gi(),t=_T(),n=Vi(),r=hl(),a=vT(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(u){var c="Warning: "+u;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Ba=function(u,c){var l=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(g){var G=g&&(l&&g[l]||g[d]);if(typeof G=="function")return G}var h="<<anonymous>>",m={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:L(),arrayOf:M,element:V(),elementType:R(),instanceOf:D,node:W(),objectOf:ge,oneOf:ae,oneOfType:ue,shape:te,exact:F};function _(g,G){return g===G?g!==0||1/g===1/G:g!==g&&G!==G}function A(g,G){this.message=g,this.data=G&&typeof G=="object"?G:{},this.stack=""}A.prototype=Error.prototype;function O(g){if(process.env.NODE_ENV!=="production")var G={},X=0;function x(ie,oe,se,K,le,ce,ke){if(K=K||h,ce=ce||se,ke!==n){if(c){var Y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Y.name="Invariant Violation",Y}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var He=K+":"+se;!G[He]&&X<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ce+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),G[He]=!0,X++)}}return oe[se]==null?ie?oe[se]===null?new A("The "+le+" `"+ce+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new A("The "+le+" `"+ce+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:g(oe,se,K,le,ce)}var ee=x.bind(null,!1);return ee.isRequired=x.bind(null,!0),ee}function v(g){function G(X,x,ee,ie,oe,se){var K=X[x],le=he(K);if(le!==g){var ce=de(K);return new A("Invalid "+ie+" `"+oe+"` of type "+("`"+ce+"` supplied to `"+ee+"`, expected ")+("`"+g+"`."),{expectedType:g})}return null}return O(G)}function L(){return O(s)}function M(g){function G(X,x,ee,ie,oe){if(typeof g!="function")return new A("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var se=X[x];if(!Array.isArray(se)){var K=he(se);return new A("Invalid "+ie+" `"+oe+"` of type "+("`"+K+"` supplied to `"+ee+"`, expected an array."))}for(var le=0;le<se.length;le++){var ce=g(se,le,ee,ie,oe+"["+le+"]",n);if(ce instanceof Error)return ce}return null}return O(G)}function V(){function g(G,X,x,ee,ie){var oe=G[X];if(!u(oe)){var se=he(oe);return new A("Invalid "+ee+" `"+ie+"` of type "+("`"+se+"` supplied to `"+x+"`, expected a single ReactElement."))}return null}return O(g)}function R(){function g(G,X,x,ee,ie){var oe=G[X];if(!e.isValidElementType(oe)){var se=he(oe);return new A("Invalid "+ee+" `"+ie+"` of type "+("`"+se+"` supplied to `"+x+"`, expected a single ReactElement type."))}return null}return O(g)}function D(g){function G(X,x,ee,ie,oe){if(!(X[x]instanceof g)){var se=g.name||h,K=Fe(X[x]);return new A("Invalid "+ie+" `"+oe+"` of type "+("`"+K+"` supplied to `"+ee+"`, expected ")+("instance of `"+se+"`."))}return null}return O(G)}function ae(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function G(X,x,ee,ie,oe){for(var se=X[x],K=0;K<g.length;K++)if(_(se,g[K]))return null;var le=JSON.stringify(g,function(ke,Y){var He=de(Y);return He==="symbol"?String(Y):Y});return new A("Invalid "+ie+" `"+oe+"` of value `"+String(se)+"` "+("supplied to `"+ee+"`, expected one of "+le+"."))}return O(G)}function ge(g){function G(X,x,ee,ie,oe){if(typeof g!="function")return new A("Property `"+oe+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var se=X[x],K=he(se);if(K!=="object")return new A("Invalid "+ie+" `"+oe+"` of type "+("`"+K+"` supplied to `"+ee+"`, expected an object."));for(var le in se)if(r(se,le)){var ce=g(se,le,ee,ie,oe+"."+le,n);if(ce instanceof Error)return ce}return null}return O(G)}function ue(g){if(!Array.isArray(g))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var G=0;G<g.length;G++){var X=g[G];if(typeof X!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ce(X)+" at index "+G+"."),s}function x(ee,ie,oe,se,K){for(var le=[],ce=0;ce<g.length;ce++){var ke=g[ce],Y=ke(ee,ie,oe,se,K,n);if(Y==null)return null;Y.data&&r(Y.data,"expectedType")&&le.push(Y.data.expectedType)}var He=le.length>0?", expected one of type ["+le.join(", ")+"]":"";return new A("Invalid "+se+" `"+K+"` supplied to "+("`"+oe+"`"+He+"."))}return O(x)}function W(){function g(G,X,x,ee,ie){return H(G[X])?null:new A("Invalid "+ee+" `"+ie+"` supplied to "+("`"+x+"`, expected a ReactNode."))}return O(g)}function xe(g,G,X,x,ee){return new A((g||"React class")+": "+G+" type `"+X+"."+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function te(g){function G(X,x,ee,ie,oe){var se=X[x],K=he(se);if(K!=="object")return new A("Invalid "+ie+" `"+oe+"` of type `"+K+"` "+("supplied to `"+ee+"`, expected `object`."));for(var le in g){var ce=g[le];if(typeof ce!="function")return xe(ee,ie,oe,le,de(ce));var ke=ce(se,le,ee,ie,oe+"."+le,n);if(ke)return ke}return null}return O(G)}function F(g){function G(X,x,ee,ie,oe){var se=X[x],K=he(se);if(K!=="object")return new A("Invalid "+ie+" `"+oe+"` of type `"+K+"` "+("supplied to `"+ee+"`, expected `object`."));var le=t({},X[x],g);for(var ce in le){var ke=g[ce];if(r(g,ce)&&typeof ke!="function")return xe(ee,ie,oe,ce,de(ke));if(!ke)return new A("Invalid "+ie+" `"+oe+"` key `"+ce+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(X[x],null," ")+`
|
|
129
|
+
Valid keys: `+JSON.stringify(Object.keys(g),null," "));var Y=ke(se,ce,ee,ie,oe+"."+ce,n);if(Y)return Y}return null}return O(G)}function H(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(H);if(g===null||u(g))return!0;var G=f(g);if(G){var X=G.call(g),x;if(G!==g.entries){for(;!(x=X.next()).done;)if(!H(x.value))return!1}else for(;!(x=X.next()).done;){var ee=x.value;if(ee&&!H(ee[1]))return!1}}else return!1;return!0;default:return!1}}function Z(g,G){return g==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function he(g){var G=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":Z(G,g)?"symbol":G}function de(g){if(typeof g>"u"||g===null)return""+g;var G=he(g);if(G==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return G}function Ce(g){var G=de(g);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Fe(g){return!g.constructor||!g.constructor.name?h:g.constructor.name}return m.checkPropTypes=a,m.resetWarningCache=a.resetWarningCache,m.PropTypes=m,m},Ba}var Fa,Vo;function IT(){if(Vo)return Fa;Vo=1;var e=Vi();function t(){}function n(){}return n.resetWarningCache=t,Fa=function(){function r(s,u,c,l,d,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Fa}var zo;function wT(){if(zo)return Sr.exports;if(zo=1,process.env.NODE_ENV!=="production"){var e=gi(),t=!0;Sr.exports=NT()(e.isElement,t)}else Sr.exports=IT()();return Sr.exports}var RT=wT();const be=Ur(RT);function OT(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function LT(e,t){e.classList?e.classList.add(t):OT(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $o(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function DT(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$o(e.className,t):e.setAttribute("class",$o(e.className&&e.className.baseVal||"",t))}const Yo={disabled:!1};var kT=process.env.NODE_ENV!=="production"?be.oneOfType([be.number,be.shape({enter:be.number,exit:be.number,appear:be.number}).isRequired]):null,PT=process.env.NODE_ENV!=="production"?be.oneOfType([be.string,be.shape({enter:be.string,exit:be.string,active:be.string}),be.shape({enter:be.string,enterDone:be.string,enterActive:be.string,exit:be.string,exitDone:be.string,exitActive:be.string})]):null;const ml=k.createContext(null);var pl=function(t){return t.scrollTop},Un="unmounted",Zt="exited",en="entering",En="entered",pi="exiting",Mt=(function(e){fl(t,e);function t(r,a){var i;i=e.call(this,r,a)||this;var s=a,u=s&&!s.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?u?(c=Zt,i.appearStatus=en):c=En:r.unmountOnExit||r.mountOnEnter?c=Un:c=Zt,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var s=a.in;return s&&i.status===Un?{status:Zt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var i=null;if(a!==this.props){var s=this.state.status;this.props.in?s!==en&&s!==En&&(i=en):(s===en||s===En)&&(i=pi)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,i,s,u;return i=s=u=a,a!=null&&typeof a!="number"&&(i=a.exit,s=a.enter,u=a.appear!==void 0?a.appear:s),{exit:i,enter:s,appear:u}},n.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===en){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Bn.findDOMNode(this);s&&pl(s)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Zt&&this.setState({status:Un})},n.performEnter=function(a){var i=this,s=this.props.enter,u=this.context?this.context.isMounting:a,c=this.props.nodeRef?[u]:[Bn.findDOMNode(this),u],l=c[0],d=c[1],f=this.getTimeouts(),h=u?f.appear:f.enter;if(!a&&!s||Yo.disabled){this.safeSetState({status:En},function(){i.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:en},function(){i.props.onEntering(l,d),i.onTransitionEnd(h,function(){i.safeSetState({status:En},function(){i.props.onEntered(l,d)})})})},n.performExit=function(){var a=this,i=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:Bn.findDOMNode(this);if(!i||Yo.disabled){this.safeSetState({status:Zt},function(){a.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:pi},function(){a.props.onExiting(u),a.onTransitionEnd(s.exit,function(){a.safeSetState({status:Zt},function(){a.props.onExited(u)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},n.setNextCallback=function(a){var i=this,s=!0;return this.nextCallback=function(u){s&&(s=!1,i.nextCallback=null,a(u))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(a,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Bn.findDOMNode(this),u=a==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],l=c[0],d=c[1];this.props.addEndListener(l,d)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===Un)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var u=dl(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(ml.Provider,{value:null},typeof s=="function"?s(a,u):k.cloneElement(k.Children.only(s),u))},t})(k.Component);Mt.contextType=ml;Mt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:be.shape({current:typeof Element>"u"?be.any:function(e,t,n,r,a,i){var s=e[t];return be.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,a,i)}}),children:be.oneOfType([be.func.isRequired,be.element.isRequired]).isRequired,in:be.bool,mountOnEnter:be.bool,unmountOnExit:be.bool,appear:be.bool,enter:be.bool,exit:be.bool,timeout:function(t){var n=kT;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];return n.apply(void 0,[t].concat(a))},addEndListener:be.func,onEnter:be.func,onEntering:be.func,onEntered:be.func,onExit:be.func,onExiting:be.func,onExited:be.func}:{};function bn(){}Mt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bn,onEntering:bn,onEntered:bn,onExit:bn,onExiting:bn,onExited:bn};Mt.UNMOUNTED=Un;Mt.EXITED=Zt;Mt.ENTERING=en;Mt.ENTERED=En;Mt.EXITING=pi;var MT=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return LT(t,r)})},Ha=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return DT(t,r)})},zi=(function(e){fl(t,e);function t(){for(var r,a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(u,c){var l=r.resolveArguments(u,c),d=l[0],f=l[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(u,c)},r.onEntering=function(u,c){var l=r.resolveArguments(u,c),d=l[0],f=l[1],h=f?"appear":"enter";r.addClass(d,h,"active"),r.props.onEntering&&r.props.onEntering(u,c)},r.onEntered=function(u,c){var l=r.resolveArguments(u,c),d=l[0],f=l[1],h=f?"appear":"enter";r.removeClasses(d,h),r.addClass(d,h,"done"),r.props.onEntered&&r.props.onEntered(u,c)},r.onExit=function(u){var c=r.resolveArguments(u),l=c[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(u)},r.onExiting=function(u){var c=r.resolveArguments(u),l=c[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(u)},r.onExited=function(u){var c=r.resolveArguments(u),l=c[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(u)},r.resolveArguments=function(u,c){return r.props.nodeRef?[r.props.nodeRef.current,u]:[u,c]},r.getClassNames=function(u){var c=r.props.classNames,l=typeof c=="string",d=l&&c?c+"-":"",f=l?""+d+u:c[u],h=l?f+"-active":c[u+"Active"],m=l?f+"-done":c[u+"Done"];return{baseClassName:f,activeClassName:h,doneClassName:m}},r}var n=t.prototype;return n.addClass=function(a,i,s){var u=this.getClassNames(i)[s+"ClassName"],c=this.getClassNames("enter"),l=c.doneClassName;i==="appear"&&s==="done"&&l&&(u+=" "+l),s==="active"&&a&&pl(a),u&&(this.appliedClasses[i][s]=u,MT(a,u))},n.removeClasses=function(a,i){var s=this.appliedClasses[i],u=s.base,c=s.active,l=s.done;this.appliedClasses[i]={},u&&Ha(a,u),c&&Ha(a,c),l&&Ha(a,l)},n.render=function(){var a=this.props;a.classNames;var i=dl(a,["classNames"]);return k.createElement(Mt,Hr({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(k.Component);zi.defaultProps={classNames:""};zi.propTypes=process.env.NODE_ENV!=="production"?Hr({},Mt.propTypes,{classNames:PT,onEnter:be.func,onEntering:be.func,onEntered:be.func,onExit:be.func,onExiting:be.func,onExited:be.func}):{};const BT=k.forwardRef(({props:e},t)=>B.jsxDEV("div",{ref:t,className:`chatBox
|
|
130
130
|
fixed
|
|
131
131
|
z-[99999999]
|
|
132
132
|
md:bottom-[110px]
|
|
@@ -146,7 +146,7 @@ Valid keys: `+JSON.stringify(Object.keys(g),null," "));var Y=ke(se,ce,ee,ie,oe+
|
|
|
146
146
|
shadow-lg
|
|
147
147
|
pb-2
|
|
148
148
|
bg-white
|
|
149
|
-
`,children:[B.jsxDEV("div",{className:"bg-violet-700 py-2 text-white text-center flex justify-center items-center",children:"Assistant"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/Widget.tsx",lineNumber:37,columnNumber:9},void 0),B.jsxDEV(ll,{appToken:e.appToken},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/Widget.tsx",lineNumber:42,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/Widget.tsx",lineNumber:13,columnNumber:7},void 0)),FT=({isWidgetOpen:e,appToken:t})=>{const n=k.useRef(null);return B.jsxDEV("div",{children:B.jsxDEV(
|
|
149
|
+
`,children:[B.jsxDEV("div",{className:"bg-violet-700 py-2 text-white text-center flex justify-center items-center",children:"Assistant"},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/Widget.tsx",lineNumber:37,columnNumber:9},void 0),B.jsxDEV(ll,{appToken:e.appToken},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/Widget.tsx",lineNumber:42,columnNumber:9},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/Widget.tsx",lineNumber:13,columnNumber:7},void 0)),FT=({isWidgetOpen:e,appToken:t})=>{const n=k.useRef(null);return B.jsxDEV("div",{children:B.jsxDEV(zi,{nodeRef:n,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:B.jsxDEV(BT,{ref:n,props:{appToken:t}},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/WidgetContainer.tsx",lineNumber:22,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/WidgetContainer.tsx",lineNumber:15,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/Widget/WidgetContainer.tsx",lineNumber:14,columnNumber:5},void 0)},bl=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),HT=()=>{const[e,t]=k.useState(bl());return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:()=>{t(a=>({...a,hasFetchedSettings:!0}))},setHasDisplayedCss:()=>{t(a=>({...a,hasDisplayedCSS:!0}))}}},gl=k.createContext({appInternalContext:bl(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}}),UT=({displayMode:e,appToken:t})=>{const[n,r]=k.useState(!1),{appInternalContext:a}=k.useContext(gl);return B.jsxDEV(B.Fragment,{children:[e===vn.LAUNCHER&&a.hasFetchedSettings&&B.jsxDEV(B.Fragment,{children:[B.jsxDEV(Gl,{isWidgetOpen:n,setIsWidgetOpen:r},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/ChatDisplay.tsx",lineNumber:22,columnNumber:13},void 0),B.jsxDEV(FT,{isWidgetOpen:n,appToken:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/ChatDisplay.tsx",lineNumber:26,columnNumber:13},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/ChatDisplay.tsx",lineNumber:21,columnNumber:11},void 0),e===vn.CHATBOX&&a.hasFetchedSettings&&B.jsxDEV("div",{className:"chatBox",children:B.jsxDEV(ll,{appToken:t},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/ChatDisplay.tsx",lineNumber:33,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/ChatDisplay.tsx",lineNumber:32,columnNumber:11},void 0)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/ChatDisplay/ChatDisplay.tsx",lineNumber:18,columnNumber:5},void 0)},jT=e=>Object.values(vn).includes(e),VT=e=>jT(e)?e:(console.warn(`Display mode not valid. Using ${vn.LAUNCHER} as default.`),vn.LAUNCHER),zT=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(fT)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},$T=(e,t)=>{const[n,r]=k.useState(e[t]),a=i=>{Object.keys(e).includes(i?.locale)?r(i):r(e[gt.ENGLISH])};return k.useEffect(()=>{let i=zT(e,t);i.locale!==t&&r(e[i.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:a}},YT=e=>Object.values(gt).includes(e),GT=e=>YT(e)?e:(console.log(`Language ${e} not handled for now. Using ${gt.ENGLISH}.`),gt.ENGLISH),qT=({agentId:e,appToken:t,onFetched:n})=>{const[r,a]=k.useState({}),i={companySettings:r,setCompanySettings:a},[s,u]=k.useState([]),[c,l]=k.useState(null),d={conversation:s,setConversation:u,discussionId:c,setDiscussionId:l};return k.useEffect(()=>{const f=Jn.getApiUrl(),h=Jn.getFetchConfig({httpVerb:"GET",contentType:"application/json"});fetch(`${f}/company/settings/${t}/${e}`,h).then(async m=>{const _=await m.json();a(_),u([{userType:"assistant",content:_.agent.text.initialText}]),n?.()}).catch(m=>console.log("error in settings fetch",m))},[t,e]),{contextCompanySettings:i,contextInitialChatbotStartingText:d}};function WT(e,t={},n,r){const{id:a,nonce:i,target:s,disableConstructable:u}=t,c=s??document.head,l=k.useRef(null),d=k.useRef(null);k.useEffect(()=>{if(!e){n&&(console.log("No custom css found."),r?.());return}if(!u&&"adoptedStyleSheets"in c&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return l.current||(l.current=new CSSStyleSheet,c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.current]),l.current.replaceSync(e),console.log("Loading custom css via stylesheet."),r?.(),()=>{const h=c.adoptedStyleSheets||[],m=h.indexOf(l.current);if(m>=0){const _=h.slice();_.splice(m,1),c.adoptedStyleSheets=_}l.current=null};if(!d.current){const h=document.createElement("style");h.type="text/css",a&&(h.id=a),i&&(h.nonce=i),(c instanceof Document&&c.head||c).appendChild(h),d.current=h}return d.current.textContent=e,console.log("Loading custom css via style tag."),r?.(),()=>{d.current?.parentNode?.removeChild(d.current),d.current=null}},[e,a,i,s,u])}function XT(e){const{manifest:t,origins:n}=QT(e);n.forEach(Ml),Fl(t),Pl(t)}function QT(e){const t=KT(e),n=new Set,r=new Set,a=new Set,i=new Set;for(const{url:c,mode:l}of t)switch(JT(l,c)){case"svg":r.add(c);break;case"lottie":a.add(c);break;case"spritesheet":i.add(c);break;case"image":n.add(c);break}const s={images:Array.from(n),svgs:Array.from(r),lotties:Array.from(a),sprites:Array.from(i)},u=ZT(s);return{manifest:s,origins:u}}function KT(e){if(!e?.agent?.display)return[];const t=e.agent.display,n=[t.launcher,t.assistant,t.search].filter(Boolean),r=[];for(const a of n)a?.assetUrl&&r.push({url:a.assetUrl,mode:a.mode});return r}function JT(e,t){if(e)switch(e){case"svg":return"svg";case"lottie":return"lottie";case"spritesheet":return"spritesheet";case"image":return"image";case"video":return"video"}try{const r=new URL(t,document.baseURI).pathname.toLowerCase();if(r.endsWith(".svg"))return"svg";if(r.endsWith(".lottie")||r.endsWith(".zip")||r.endsWith(".json"))return r.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(r))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(r))return"video"}catch(n){console.log("error in normalizeKind:",n)}return"unknown"}function ZT(e){const t=new Set,n=r=>{if(r)try{const a=new URL(r,document.baseURI);t.add(`${a.protocol}//${a.host}`)}catch(a){console.log("error in uniqueOriginsFromManifest",a)}};return(e.images??[]).forEach(n),(e.svgs??[]).forEach(n),(e.lotties??[]).forEach(n),(e.sprites??[]).forEach(n),Array.from(t)}const e2=({children:e,appToken:t,agentId:n})=>{var r=navigator.language;console.log("Brower language",r);const a=GT(r),{appCurrentLang:i,handleSetContextCurrentLang:s}=$T(ea,a),u={appCurrentLang:i,setAppCurrentLang:s},c=HT(),{contextCompanySettings:l,contextInitialChatbotStartingText:d}=qT({agentId:n,appToken:t,onFetched:c.setHasFetchedSettings});return XT(l.companySettings),WT(l.companySettings?.agent?.display?.CSSRules,{id:`${n}`},c.appInternalContext.hasFetchedSettings,c.setHasDisplayedCss),B.jsxDEV(B.Fragment,{children:B.jsxDEV(gf,{locale:i?.locale,messages:i?.translatedText,children:B.jsxDEV(sl.Provider,{value:u,children:B.jsxDEV(gl.Provider,{value:c,children:B.jsxDEV(Zn.Provider,{value:l,children:B.jsxDEV(cl.Provider,{value:d,children:c.appInternalContext.hasDisplayedCSS&&e},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",lineNumber:72,columnNumber:15},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",lineNumber:71,columnNumber:13},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",lineNumber:70,columnNumber:11},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",lineNumber:69,columnNumber:9},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",lineNumber:65,columnNumber:7},void 0)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",lineNumber:64,columnNumber:5},void 0)};var vn=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(vn||{});function t2({appToken:e,displayMode:t="launcher",agentId:n}){e||console.warn("appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC");const r=VT(t);return console.log(`App boot in ${r} mode.`),B.jsxDEV("div",{className:"chatSystemWidget",id:"chatSystemWidget",children:B.jsxDEV(e2,{appToken:e,agentId:n,children:B.jsxDEV(UT,{displayMode:r,appToken:e},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/modules/app/AppContent.tsx",lineNumber:49,columnNumber:9},this)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/modules/app/AppContent.tsx",lineNumber:48,columnNumber:7},this)},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/modules/app/AppContent.tsx",lineNumber:47,columnNumber:5},this)}const n2=`*, ::before, ::after {
|
|
150
150
|
--tw-border-spacing-x: 0;
|
|
151
151
|
--tw-border-spacing-y: 0;
|
|
152
152
|
--tw-translate-x: 0;
|
|
@@ -1645,5 +1645,5 @@ textarea::placeholder {
|
|
|
1645
1645
|
fill: #32cf56;
|
|
1646
1646
|
}`,Go=`${n2}
|
|
1647
1647
|
${r2}
|
|
1648
|
-
${a2}`;function i2({cssHref:e,appToken:t,agentId:n,displayMode:r,...a}){const i=k.useRef(null),[
|
|
1648
|
+
${a2}`;function i2({cssHref:e,appToken:t,agentId:n,displayMode:r,...a}){const i=r==="launcher"?"body":"inline",s=k.useRef(null),u=k.useRef(null),[c,l]=k.useState(null);return k.useLayoutEffect(()=>{if(typeof document>"u")return;const d=i==="inline"?s.current:document.body;if(!d)return;const f=document.createElement("div");d.appendChild(f),u.current=f;const h=f.attachShadow({mode:"open",delegatesFocus:!0});let m=!1;try{if("adoptedStyleSheets"in Document.prototype&&!e){const A=new CSSStyleSheet;A.replaceSync(Go),h.adoptedStyleSheets=[...h.adoptedStyleSheets??[],A],m=!0}}catch{}if(!m)if(e){const A=document.createElement("link");A.rel="stylesheet",A.href=e,h.appendChild(A)}else{const A=document.createElement("style");A.textContent=Go,h.appendChild(A)}const _=document.createElement("div");return h.appendChild(_),l(_),()=>{l(null),f.remove(),u.current=null}},[i,e]),B.jsxDEV(B.Fragment,{children:[i==="inline"&&B.jsxDEV("div",{ref:s},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/modules/app/App.tsx",lineNumber:87,columnNumber:30},this)," ",c&&Bn.createPortal(B.jsxDEV(t2,{...a,appToken:t,agentId:n,displayMode:r},void 0,!1,{fileName:"/home/yoann/dev/aibot-client/lib/src/modules/app/App.tsx",lineNumber:90,columnNumber:11},this),c)]},void 0,!0,{fileName:"/home/yoann/dev/aibot-client/lib/src/modules/app/App.tsx",lineNumber:86,columnNumber:5},this)}exports.App=i2;
|
|
1649
1649
|
//# sourceMappingURL=index.cjs.map
|