@chatsystem/client 1.2.3 → 1.2.5

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 CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),C=require("react"),Mn=require("react-dom"),Qd=require("lottie-react"),Kd=require("@lottiefiles/dotlottie-react");function Jd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ye=Jd(C),pu=e=>Ye.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},Ye.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"}));function xa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var si={},ms;function Zd(){return ms||(ms=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatCustomerSupportProviderText=e.IDENTITY_GATE_VERSION_HEADER=e.IDENTITY_GATE_REQUIRED_EVENT=e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V2=e.IDENTITY_GATE_PROTOCOL_V1=e.OutputStreamTypesEnum=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE=e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=e.readOptionalNullableString=e.readOptionalString=e.readOptionalNullableNumber=e.readOptionalNumber=e.isUnknownRecord=e.INTERACTIVE_WIDGET_TYPES=e.INTERACTIVE_WIDGET_EVENTS=e.AgentDisplayFacetRoleType=e.AgentDisplayFacetModeType=void 0;var t;(function(h){h.SPRITESHEET="spritesheet",h.LOTTIE="lottie",h.IMAGE="image",h.SVG="svg",h.VIDEO="video"})(t||(e.AgentDisplayFacetModeType=t={}));var n;(function(h){h.LAUNCHER="launcher",h.ASSISTANT="assistant",h.SEARCH="search"})(n||(e.AgentDisplayFacetRoleType=n={})),e.INTERACTIVE_WIDGET_EVENTS={requested:"interactiveWidget.requested"},e.INTERACTIVE_WIDGET_TYPES={directChatCustomerSupport:"direct_chat_customer_support"};const r=h=>typeof h=="object"&&h!==null&&!Array.isArray(h);e.isUnknownRecord=r;const i=h=>typeof h=="number"&&Number.isFinite(h)?h:void 0;e.readOptionalNumber=i;const a=h=>h===null?null:(0,e.readOptionalNumber)(h);e.readOptionalNullableNumber=a;const s=h=>typeof h=="string"?h:void 0;e.readOptionalString=s;const o=h=>h===null?null:(0,e.readOptionalString)(h);e.readOptionalNullableString=o,e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=5,e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE="Europe/Paris",e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=[{dayOfWeek:1,key:"monday",defaultLabel:"Monday"},{dayOfWeek:2,key:"tuesday",defaultLabel:"Tuesday"},{dayOfWeek:3,key:"wednesday",defaultLabel:"Wednesday"},{dayOfWeek:4,key:"thursday",defaultLabel:"Thursday"},{dayOfWeek:5,key:"friday",defaultLabel:"Friday"},{dayOfWeek:6,key:"saturday",defaultLabel:"Saturday"},{dayOfWeek:7,key:"sunday",defaultLabel:"Sunday"}],e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=[1,2,3,4,5];var u;(function(h){h.OUTPUT_STREAM_MESSAGE_START="message_start",h.OUTPUT_STREAM_MESSAGE_DELTA="message_delta",h.OUTPUT_STREAM_MESSAGE_END="message_end",h.OUTPUT_STREAM_CLIENT_EVENT="client_event",h.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE="number_of_steps",h.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE="current_step_number",h.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE="current_step_name",h.OUTPUT_STREAM_ERROR="error"})(u||(e.OutputStreamTypesEnum=u={})),e.IDENTITY_GATE_PROTOCOL_V1=1,e.IDENTITY_GATE_PROTOCOL_V2=2,e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V1,e.IDENTITY_GATE_REQUIRED_EVENT="identity.required",e.IDENTITY_GATE_VERSION_HEADER="X-ChatSystem-Identity-Gate-Version";const c={"+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",clap:"👏",wave:"👋",raised_hands:"🙌",pray:"🙏",muscle:"💪",ok_hand:"👌",point_up:"☝️",point_down:"👇",point_left:"👈",point_right:"👉",eyes:"👀",brain:"🧠",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",broken_heart:"💔",fire:"🔥",tada:"🎉",sparkles:"✨",star:"⭐",white_check_mark:"✅",heavy_check_mark:"✔️",x:"❌",warning:"⚠️",information_source:"ℹ️",question:"❓",exclamation:"❗",bulb:"💡",memo:"📝",pushpin:"📌",paperclip:"📎",link:"🔗",lock:"🔒",unlock:"🔓",bell:"🔔",phone:"☎️",email:"✉️",incoming_envelope:"📨",package:"📦",truck:"🚚",moneybag:"💰",credit_card:"💳",gift:"🎁",shopping_bags:"🛍️",clock3:"🕒",hourglass_flowing_sand:"⏳",rocket:"🚀",smile:"😄",smiley:"😃",grinning:"😀",slightly_smiling_face:"🙂",wink:"😉",blush:"😊",relaxed:"☺️",heart_eyes:"😍",thinking_face:"🤔",neutral_face:"😐",confused:"😕",worried:"😟",cry:"😢",sob:"😭",sweat_smile:"😅",joy:"😂",rofl:"🤣",upside_down_face:"🙃",sunglasses:"😎",tada_face:"🥳",angry:"😠",rage:"😡",face_with_symbols_on_mouth:"🤬",scream:"😱",zipper_mouth_face:"🤐",skin_tone_2:"🏻",skin_tone_3:"🏼",skin_tone_4:"🏽",skin_tone_5:"🏾",skin_tone_6:"🏿"},d=h=>h.replace(/-/g,"_"),f=h=>h.replace(/:([a-zA-Z0-9_+\-]+):/g,(b,y)=>c[d(y)]??b),p=({text:h,provider:b})=>b==="slack"?f(h):h;e.formatCustomerSupportProviderText=p})(si)),si}var ee=Zd();const oi=e=>({mode:ee.AgentDisplayFacetModeType.SVG,role:e}),ef=()=>({interactiveWidgets:{available:[{widgetType:ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport,enabled:!0}]},agent:{display:{name:"",CSSRules:"",[ee.AgentDisplayFacetRoleType.LAUNCHER]:oi(ee.AgentDisplayFacetRoleType.LAUNCHER),[ee.AgentDisplayFacetRoleType.ASSISTANT]:oi(ee.AgentDisplayFacetRoleType.ASSISTANT),[ee.AgentDisplayFacetRoleType.SEARCH]:oi(ee.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:""},customNameToDisplay:"",isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),rn=C.createContext({companySettings:ef(),setCompanySettings:()=>{}}),_a=()=>{const e=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:3080"),t=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:5173");return e||t};class mu{enabled;constructor({isLocalDev:t,shouldDisplayLogs:n}){this.enabled=t||n}log(...t){this.enabled&&console.log(...t)}warn(...t){this.enabled&&console.warn(...t)}error(...t){this.enabled&&console.error(...t)}}let gu=new mu({isLocalDev:_a(),shouldDisplayLogs:!1});const tf=e=>new mu({isLocalDev:_a(),shouldDisplayLogs:!!e}),nf=e=>{gu=e},Ct=()=>gu,En=globalThis;En.__WIDGET_ASSET_CACHE__||(En.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});En.__WIDGET_PRELOAD_KEYS__||(En.__WIDGET_PRELOAD_KEYS__=new Set);const ui=En.__WIDGET_PRELOAD_KEYS__,zt=En.__WIDGET_ASSET_CACHE__,rf="widget-assets-v1";async function Mr(e,t){const n=Ct();try{const r=await caches.open(rf),i=await r.match(e,{ignoreSearch:!1});if(i)return i.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 r.put(e,a.clone()),a}catch(r){return n.warn("error while fetching",r),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function bu(e){const t=zt.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Mr(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),o=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return zt.svg.set(e,{promise:n,ts:Date.now()}),n}function Eu(e){const t=zt.img.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Mr(e)).blob();return{blobUrl:URL.createObjectURL(i)}})();return zt.img.set(e,{promise:n,ts:Date.now()}),n}function Tu(e){const t=zt.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Mr(e)).arrayBuffer(),a=new Uint8Array(i);if(a.length>=4&&a[0]===80&&a[1]===75&&a[2]===3&&a[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([i],{type:"application/zip"}))};const o=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(o)}})();return zt.lot.set(e,{promise:n,ts:Date.now()}),n}function yu(e){const t=zt.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Mr(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:o,height:u}=await new Promise((c,d)=>{const f=URL.createObjectURL(i),p=new Image;p.crossOrigin="anonymous",p.onload=()=>{const h=p.naturalWidth,b=p.naturalHeight;c({imgEl:p,width:h,height:b})},p.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},p.src=f,p.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:o,height:u}})();return zt.spr.set(e,{promise:n,ts:Date.now()}),n}function af(e){e.images?.forEach(t=>void Eu(t)),e.svgs?.forEach(t=>void bu(t)),e.lotties?.forEach(t=>void Tu(t)),e.sprites?.forEach(t=>void yu(t))}function sf(e){const t=Ct();try{const n=document.createElement("link");n.rel="preconnect",n.href=e,n.crossOrigin="anonymous",document.head.appendChild(n);const r=document.createElement("link");r.rel="dns-prefetch",r.href=e,document.head.appendChild(r)}catch(n){t.warn("error in injectPreconnect",n)}}function xu(e){return new URL(e,document.baseURI).toString()}function of(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 ar(e,t,n,r){const i=xu(n),a=`${e}|${t??""}|${i}`;if(ui.has(a))return;if(of(t,i)){ui.add(a);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=i,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),ui.add(a)}function uf(e){const t=s=>Array.from(new Set((s??[]).map(xu))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>ar("preload","image",s)),r.forEach(s=>ar("preload","fetch",s,"image/svg+xml")),i.forEach(s=>ar("preload","fetch",s,"application/zip")),a.forEach(s=>ar("preload","fetch",s))}const lf=({src:e})=>{const[t,n]=C.useState(null);return C.useEffect(()=>{let r=!1;return Eu(e).then(({blobUrl:i})=>{n(i)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),x.jsx("img",{src:t??e,decoding:"async",loading:"eager"})};function cf(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function df({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:o,onError:u}){const[c,d]=C.useState({kind:"loading"});return C.useEffect(()=>{let f=null,p=!1;return d({kind:"loading"}),Tu(e).then(async h=>{if(!p)if(h.kind==="zip"){const b=cf(h)?h.blob:await(await fetch(h.blobUrl)).blob();f=URL.createObjectURL(b),d({kind:"lottieZip",blobUrl:f}),o?.(f)}else d({kind:"json",data:h.data}),o?.(h.data)}).catch(h=>!p&&(d({kind:"error",err:h}),u?.(h))),()=>{p=!0,f&&URL.revokeObjectURL(f)}},[e]),c.kind==="loading"?x.jsx("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...i},children:a??"Loading animation…"}):c.kind==="error"?x.jsx("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...i},children:s??"Failed to load animation"}):c.kind==="json"?x.jsx(Qd,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):x.jsx(Kd.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function ff(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:i=3,debug:a=!1}=t,s=Ct();if(e.width<n*2||e.height<n*2)return a&&s.warn("detectGrid: image too small"),null;const o=document.createElement("canvas");o.width=e.naturalWidth,o.height=e.naturalHeight;const u=o.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,o.width,o.height),d=o.width,f=o.height,p=new Uint8ClampedArray(d*f);for(let U=0;U<f;U++){const z=U*d;for(let B=0;B<d;B++){const $=(z+B)*4;p[z+B]=.299*c[$]+.587*c[$+1]+.114*c[$+2]|0}}const h=new Float32Array(d),b=new Float32Array(f);for(let U=1;U<d-1;U++){let z=0;for(let B=0;B<f;B++){const $=B*d+U,K=p[$+1]-p[$-1];z+=Math.abs(K)}h[U]=z}for(let U=1;U<f-1;U++){let z=0;for(let B=0;B<d;B++){const $=U*d+B,K=p[$+d]-p[$-d];z+=Math.abs(K)}b[U]=z}const y=gs(h,n,Math.min(r,d/2)),w=gs(b,n,Math.min(r,f/2));if(!y||!w)return a&&s.warn("detectGrid: could not find periods"),null;const S=Math.max(1,Math.round(d/y)),v=Math.max(1,Math.round(f/w)),k=bs(h,y,S,i),L=bs(b,w,v,i),A=Math.max(1,y-k),N=Math.max(1,w-L);if(A*S>d+2||N*v>f+2)return a&&s.warn("detectGrid: sanity check failed"),null;const Y=$i(h,60),X=$i(b,60),ne=Math.max(0,Es(h,Y)),I=Math.max(0,Es(b,X));return a&&s.log({periodX:y,periodY:w,columns:S,rows:v,gutterX:k,gutterY:L,frameWidth:A,frameHeight:N,originX:ne,originY:I}),{columns:S,rows:v,frameWidth:A,frameHeight:N,gutterX:k,gutterY:L,originX:ne,originY:I}}function gs(e,t,n){const r=_u(e);let i=0;for(let h=0;h<e.length;h++){const b=e[h]-r;i+=b*b}if(i===0)return null;const a=new Float32Array(n+1);let s=0,o=-1/0;for(let h=t;h<=n;h++){let b=0;for(let w=0;w+h<e.length;w++)b+=(e[w]-r)*(e[w+h]-r);const y=b/i;a[h]=y,y>o&&(o=y,s=h)}if(s<=t||s>=n)return s||null;const u=a[s-1],c=a[s],d=a[s+1],f=u-2*c+d,p=f===0?0:.5*(u-d)/f;return s+p}function bs(e,t,n,r){const i=[];for(let o=1;o<n;o++){const u=o*t;let c=1/0,d=u;for(let f=-r;f<=r;f++){const p=u+f;if(p<=0||p>=e.length)continue;const h=e[p];h<c&&(c=h,d=p)}i.push(d)}if(i.length<1)return 0;const a=[];for(const o of i){const u=e[o]*1.5+$i(e,10)*.5;let c=o,d=o;for(;c>1&&e[c-1]<=u;)c--;for(;d<e.length-2&&e[d+1]<=u;)d++;a.push(Math.max(0,d-c+1))}const s=Math.round(_u(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function _u(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function $i(e,t){const n=Array.from(e);n.sort((i,a)=>i-a);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function Es(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function hf(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let o=3;o<a.length;o+=4)s+=a[o];return s/(255*(a.length/4))<.03}const Su=C.createContext(Ct()),Sn=()=>C.useContext(Su),pf=C.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:o=0,frameCount:u,atlasFrames:c,fps:d=12,autoplay:f=!0,loop:p=!0,startFrame:h=0,direction:b="forward",scale:y=1,backgroundColor:w,className:S,style:v,pauseWhenHidden:k=!1,originX:L,originY:A,onLoad:N,onEnd:Y,onFrame:X},ne){const I=Sn(),U=C.useRef(null),z=C.useRef(null),[B,$]=C.useState(null),[K,he]=C.useState(null),[pe,Se]=C.useState(null),[Le,m]=C.useState(!1),[G,re]=C.useState(!!f),[T,W]=C.useState(h),ce=C.useRef(1),[V,oe]=C.useState(null),ae=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));C.useEffect(()=>{let be=!1;return m(!1),yu(t).then(({imgEl:Ie,bitmap:H})=>{be||($(Ie),he(H),Se({w:Ie.naturalWidth,h:Ie.naturalHeight}),m(!0),N?.())}).catch(()=>{}),()=>{be=!0}},[t,N]),C.useEffect(()=>{let be=!1;return(async()=>{if(!B)return;if(c&&c.length){oe(null);return}if(!(!n||!r||!i||!a)){oe(null);return}const H=await ff(B,{debug:!0});be||(H?oe({frameWidth:H.frameWidth,frameHeight:H.frameHeight,columns:H.columns,rows:H.rows,gutterX:H.gutterX,gutterY:H.gutterY}):(oe(null),I.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{be=!0}},[B,c,n,r,i,a,I]);const de=V?.frameWidth??n,ie=V?.frameHeight??r,ke=V?.columns??i,q=V?.rows??a,Ne=V?.gutterX??s,qe=V?.gutterY??o,Be=V?.originX??L??0,He=V?.originY??A??0,vt=C.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!pe||!de||!ie)return{cols:0,rows:0};const be=ke??Math.floor((pe.w+Ne)/(de+Ne)),Ie=q??Math.floor((pe.h+qe)/(ie+qe));return{cols:Math.max(0,be),rows:Math.max(0,Ie)}},[c,pe,de,ie,ke,q,Ne,qe]),je=C.useMemo(()=>{if(c?.length)return c;if(!de||!ie)return[];const{cols:be,rows:Ie}=vt;if(!be||!Ie)return[];const H=Math.min(u??be*Ie,be*Ie),J=[];for(let O=0;O<H;O++){const P=O%be,Q=Math.floor(O/be),ue=Be+P*(de+Ne),Z=He+Q*(ie+qe);J.push({x:ue,y:Z,w:de,h:ie})}if(B&&J.length){const O=document.createElement("canvas");O.width=B.naturalWidth,O.height=B.naturalHeight;const P=O.getContext("2d");if(P){P.drawImage(B,0,0);let Q=J.length;for(;Q>0&&hf(P,J[Q-1].x,J[Q-1].y,J[Q-1].w,J[Q-1].h);)Q--;return J.slice(0,Q)}}return J},[c,vt,u,de,ie,Ne,qe,B,Be,He]),Dt=()=>{const be=U.current;if(!be||je.length===0)return;const Ie=je[Math.max(0,Math.min(T,je.length-1))],H=Math.max(1,Math.round(Ie.w*y)),J=Math.max(1,Math.round(Ie.h*y));be.style.width=H+"px",be.style.height=J+"px",be.width=H*ae,be.height=J*ae};C.useEffect(()=>{Dt()},[Le,y,je.length,ae,T]);const kt=be=>{const Ie=K??B??null,H=U.current;if(!H||!Ie||je.length===0)return;const J=H.getContext("2d");if(!J)return;J.save(),J.setTransform(1,0,0,1,0,0),J.clearRect(0,0,H.width,H.height),w&&(J.fillStyle=w,J.fillRect(0,0,H.width,H.height));const O=je[be];J.scale(ae,ae),J.drawImage(Ie,O.x,O.y,O.w,O.h,0,0,Math.round(O.w*y),Math.round(O.h*y)),J.restore()};return C.useEffect(()=>{if(!Le||je.length===0)return;let be=performance.now();const Ie=1e3/Math.max(1,Math.min(120,d)),H=J=>{if(z.current=requestAnimationFrame(H),!G){kt(T);return}const O=J-be;if(O<Ie){kt(T);return}be=J-O%Ie,W(P=>{const Q=je.length-1;let ue=P;return b==="forward"?ue=P+1:b==="backward"?ue=P-1:((P>=Q&&ce.current===1||P<=0&&ce.current===-1)&&(ce.current*=-1),ue=P+ce.current),(ue>Q||ue<0)&&(p?ue=b==="backward"?Q:0:(ue=Math.max(0,Math.min(ue,Q)),re(!1),Y?.())),ue})};return z.current=requestAnimationFrame(H),()=>{z.current&&cancelAnimationFrame(z.current)}},[Le,d,G,p,b,je.length,T]),C.useEffect(()=>{kt(T),X?.(T)},[T,Le,y,ae]),C.useEffect(()=>{if(!k)return;const be=()=>{document.hidden&&re(!1)};return document.addEventListener("visibilitychange",be),()=>document.removeEventListener("visibilitychange",be)},[k]),C.useImperativeHandle(ne,()=>({play:()=>re(!0),pause:()=>re(!1),toggle:()=>re(be=>!be),gotoFrame:be=>W(()=>Math.max(0,Math.min(be,Math.max(0,je.length-1)))),isPlaying:()=>G,currentFrame:()=>T}),[G,T,je.length]),x.jsx("div",{className:S,style:v,children:x.jsx("canvas",{ref:U,"aria-label":"spritesheet animation"})})});function mf({url:e,className:t}){const[n,r]=C.useState(""),[i,a]=C.useState(null);return C.useEffect(()=>{let s=!1;return bu(e).then(({sanitized:o})=>{s||(r(o),a(null))}).catch(o=>!s&&a(o.message??"Failed to load")),()=>{s=!0}},[e]),i?x.jsxs("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",i]}):n?x.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:n}}):x.jsx("div",{className:t})}function gf({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=C.useState(n);return C.useEffect(()=>{if(typeof window>"u")return;const a=[{mq:window.matchMedia("(max-width: 639px)"),value:e},{mq:window.matchMedia("(min-width: 640px) and (max-width: 1023px)"),value:t},{mq:window.matchMedia("(min-width: 1024px)"),value:n}],s=()=>{for(const{mq:o,value:u}of a)if(o.matches){i(u);break}};return a.forEach(({mq:o})=>o.addEventListener("change",s)),s(),()=>{a.forEach(({mq:o})=>o.removeEventListener("change",s))}},[e,t,n]),r}const Sa=({facet:e})=>{const t=Sn(),{mode:n,assetUrl:r,spr_columns:i,spr_fps:a,spr_frameCount:s,spr_frameHeight:o,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:d,spr_rows:f,spr_originX:p,spr_originY:h,spr_scaleDesktop:b,spr_scaleMobile:y,spr_scaleTablet:w}=e,S=gf({mobile:y??.6,tablet:w??.8,desktop:b??1});return x.jsxs("div",{className:"assetContainer",children:[n===ee.AgentDisplayFacetModeType.LOTTIE&&x.jsx(df,{src:r,autoplay:!0,onError:v=>t.error(v)}),n===ee.AgentDisplayFacetModeType.SVG&&x.jsx("div",{children:x.jsx(mf,{url:r})}),n===ee.AgentDisplayFacetModeType.IMAGE&&x.jsx(lf,{src:r}),n===ee.AgentDisplayFacetModeType.SPRITESHEET&&x.jsx(pf,{src:r,frameCount:s,columns:i,rows:f,fps:a,frameHeight:o,frameWidth:u,gutterX:c,gutterY:d,originX:p,originY:h,scale:S,autoplay:!0})]})},bf=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=C.useContext(rn);return x.jsxs("div",{className:`launcher
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),S=require("react"),Bn=require("react-dom"),nf=require("lottie-react"),rf=require("@lottiefiles/dotlottie-react");function af(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ye=af(S),Eu=e=>Ye.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},Ye.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"}));function Sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oi={},Ts;function sf(){return Ts||(Ts=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatCustomerSupportProviderText=e.IDENTITY_GATE_VERSION_HEADER=e.IDENTITY_GATE_REQUIRED_EVENT=e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V2=e.IDENTITY_GATE_PROTOCOL_V1=e.OutputStreamTypesEnum=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE=e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=e.readOptionalNullableString=e.readOptionalString=e.readOptionalNullableNumber=e.readOptionalNumber=e.isUnknownRecord=e.INTERACTIVE_WIDGET_TYPES=e.INTERACTIVE_WIDGET_EVENTS=e.AgentDisplayFacetRoleType=e.AgentDisplayFacetModeType=void 0;var t;(function(h){h.SPRITESHEET="spritesheet",h.LOTTIE="lottie",h.IMAGE="image",h.SVG="svg",h.VIDEO="video"})(t||(e.AgentDisplayFacetModeType=t={}));var n;(function(h){h.LAUNCHER="launcher",h.ASSISTANT="assistant",h.SEARCH="search"})(n||(e.AgentDisplayFacetRoleType=n={})),e.INTERACTIVE_WIDGET_EVENTS={requested:"interactiveWidget.requested"},e.INTERACTIVE_WIDGET_TYPES={directChatCustomerSupport:"direct_chat_customer_support"};const r=h=>typeof h=="object"&&h!==null&&!Array.isArray(h);e.isUnknownRecord=r;const i=h=>typeof h=="number"&&Number.isFinite(h)?h:void 0;e.readOptionalNumber=i;const a=h=>h===null?null:(0,e.readOptionalNumber)(h);e.readOptionalNullableNumber=a;const s=h=>typeof h=="string"?h:void 0;e.readOptionalString=s;const o=h=>h===null?null:(0,e.readOptionalString)(h);e.readOptionalNullableString=o,e.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES=5,e.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE="Europe/Paris",e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_WEEK_DAYS=[{dayOfWeek:1,key:"monday",defaultLabel:"Monday"},{dayOfWeek:2,key:"tuesday",defaultLabel:"Tuesday"},{dayOfWeek:3,key:"wednesday",defaultLabel:"Wednesday"},{dayOfWeek:4,key:"thursday",defaultLabel:"Thursday"},{dayOfWeek:5,key:"friday",defaultLabel:"Friday"},{dayOfWeek:6,key:"saturday",defaultLabel:"Saturday"},{dayOfWeek:7,key:"sunday",defaultLabel:"Sunday"}],e.DIRECT_CHAT_CUSTOMER_SUPPORT_BUSINESS_HOURS_DEFAULT_OPEN_WEEK_DAY_NUMBERS=[1,2,3,4,5];var u;(function(h){h.OUTPUT_STREAM_MESSAGE_START="message_start",h.OUTPUT_STREAM_MESSAGE_DELTA="message_delta",h.OUTPUT_STREAM_MESSAGE_END="message_end",h.OUTPUT_STREAM_CLIENT_EVENT="client_event",h.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE="number_of_steps",h.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE="current_step_number",h.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE="current_step_name",h.OUTPUT_STREAM_ERROR="error"})(u||(e.OutputStreamTypesEnum=u={})),e.IDENTITY_GATE_PROTOCOL_V1=1,e.IDENTITY_GATE_PROTOCOL_V2=2,e.IDENTITY_GATE_PROTOCOL_VERSION=e.IDENTITY_GATE_PROTOCOL_V1,e.IDENTITY_GATE_REQUIRED_EVENT="identity.required",e.IDENTITY_GATE_VERSION_HEADER="X-ChatSystem-Identity-Gate-Version";const c={"+1":"👍",thumbsup:"👍","-1":"👎",thumbsdown:"👎",clap:"👏",wave:"👋",raised_hands:"🙌",pray:"🙏",muscle:"💪",ok_hand:"👌",point_up:"☝️",point_down:"👇",point_left:"👈",point_right:"👉",eyes:"👀",brain:"🧠",heart:"❤️",orange_heart:"🧡",yellow_heart:"💛",green_heart:"💚",blue_heart:"💙",purple_heart:"💜",broken_heart:"💔",fire:"🔥",tada:"🎉",sparkles:"✨",star:"⭐",white_check_mark:"✅",heavy_check_mark:"✔️",x:"❌",warning:"⚠️",information_source:"ℹ️",question:"❓",exclamation:"❗",bulb:"💡",memo:"📝",pushpin:"📌",paperclip:"📎",link:"🔗",lock:"🔒",unlock:"🔓",bell:"🔔",phone:"☎️",email:"✉️",incoming_envelope:"📨",package:"📦",truck:"🚚",moneybag:"💰",credit_card:"💳",gift:"🎁",shopping_bags:"🛍️",clock3:"🕒",hourglass_flowing_sand:"⏳",rocket:"🚀",smile:"😄",smiley:"😃",grinning:"😀",slightly_smiling_face:"🙂",wink:"😉",blush:"😊",relaxed:"☺️",heart_eyes:"😍",thinking_face:"🤔",neutral_face:"😐",confused:"😕",worried:"😟",cry:"😢",sob:"😭",sweat_smile:"😅",joy:"😂",rofl:"🤣",upside_down_face:"🙃",sunglasses:"😎",tada_face:"🥳",angry:"😠",rage:"😡",face_with_symbols_on_mouth:"🤬",scream:"😱",zipper_mouth_face:"🤐",skin_tone_2:"🏻",skin_tone_3:"🏼",skin_tone_4:"🏽",skin_tone_5:"🏾",skin_tone_6:"🏿"},d=h=>h.replace(/-/g,"_"),f=h=>h.replace(/:([a-zA-Z0-9_+\-]+):/g,(b,x)=>c[d(x)]??b),p=({text:h,provider:b})=>b==="slack"?f(h):h;e.formatCustomerSupportProviderText=p})(oi)),oi}var ee=sf();const ui=e=>({mode:ee.AgentDisplayFacetModeType.SVG,role:e}),of=()=>({branding:{poweredByChatSystemVisible:!0},interactiveWidgets:{available:[{widgetType:ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport,enabled:!0}]},agent:{display:{name:"",CSSRules:"",[ee.AgentDisplayFacetRoleType.LAUNCHER]:ui(ee.AgentDisplayFacetRoleType.LAUNCHER),[ee.AgentDisplayFacetRoleType.ASSISTANT]:ui(ee.AgentDisplayFacetRoleType.ASSISTANT),[ee.AgentDisplayFacetRoleType.SEARCH]:ui(ee.AgentDisplayFacetRoleType.SEARCH)},text:{initialText:"",conversationStarters:[]},customNameToDisplay:"",isAudioAllowed:!0},api:{settings:{maxUserMessagesPerDiscussion:20},tracking:{queryParamToAppend:""}}}),Yt=S.createContext({companySettings:of(),setCompanySettings:()=>{}}),Ca=()=>{const e=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:3080"),t=typeof document<"u"&&new URL(document.URL)?.host.includes("localhost:5173");return e||t};class Tu{enabled;constructor({isLocalDev:t,shouldDisplayLogs:n}){this.enabled=t||n}log(...t){this.enabled&&console.log(...t)}warn(...t){this.enabled&&console.warn(...t)}error(...t){this.enabled&&console.error(...t)}}let yu=new Tu({isLocalDev:Ca(),shouldDisplayLogs:!1});const uf=e=>new Tu({isLocalDev:Ca(),shouldDisplayLogs:!!e}),lf=e=>{yu=e},wt=()=>yu;async function cf(e,t=URL.createObjectURL){if(!e.ok)throw new Error(`IMAGE_PRELOAD_FAILED_HTTP_${e.status}`);const n=await e.blob();return t(n)}const Tn=globalThis;Tn.__WIDGET_ASSET_CACHE__||(Tn.__WIDGET_ASSET_CACHE__={svg:new Map,img:new Map,lot:new Map,spr:new Map});Tn.__WIDGET_PRELOAD_KEYS__||(Tn.__WIDGET_PRELOAD_KEYS__=new Set);const li=Tn.__WIDGET_PRELOAD_KEYS__,$t=Tn.__WIDGET_ASSET_CACHE__,df="widget-assets-v1";async function Br(e,t){const n=wt();try{const r=await caches.open(df),i=await r.match(e,{ignoreSearch:!1});if(i)return i.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 r.put(e,a.clone()),a}catch(r){return n.warn("error while fetching",r),new Response(null,{status:520,statusText:"Error in client - Fetch failed"})}}async function xu(e){const t=$t.svg.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).text();if(typeof globalThis.DOMPurify<"u"&&typeof globalThis.DOMPurify.sanitize=="function")try{const s=new DOMParser().parseFromString(i,"image/svg+xml"),o=new XMLSerializer().serializeToString(s.documentElement);return{sanitized:globalThis.DOMPurify.sanitize(o,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}catch{return{sanitized:globalThis.DOMPurify.sanitize(i,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}else return{sanitized:i}})();return $t.svg.set(e,{promise:n,ts:Date.now()}),n}function _u(e){const t=$t.img.get(e);if(t)return t.promise;const n=(async()=>{const r=await Br(e);return{blobUrl:await cf(r)}})();return $t.img.set(e,{promise:n,ts:Date.now()}),n}function Su(e){const t=$t.lot.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).arrayBuffer(),a=new Uint8Array(i);if(a.length>=4&&a[0]===80&&a[1]===75&&a[2]===3&&a[3]===4||e.endsWith(".lottie"))return{kind:"zip",blobUrl:URL.createObjectURL(new Blob([i],{type:"application/zip"}))};const o=new TextDecoder().decode(a);return{kind:"json",data:JSON.parse(o)}})();return $t.lot.set(e,{promise:n,ts:Date.now()}),n}function Cu(e){const t=$t.spr.get(e);if(t)return t.promise;const n=(async()=>{const i=await(await Br(e)).blob();let a=null;try{a=await createImageBitmap(i)}catch{a=null}const{imgEl:s,width:o,height:u}=await new Promise((c,d)=>{const f=URL.createObjectURL(i),p=new Image;p.crossOrigin="anonymous",p.onload=()=>{const h=p.naturalWidth,b=p.naturalHeight;c({imgEl:p,width:h,height:b})},p.onerror=()=>{URL.revokeObjectURL(f),d(new Error("Spritesheet image decode failed"))},p.src=f,p.decode?.().catch(()=>{})});return{imgEl:s,bitmap:a,width:o,height:u}})();return $t.spr.set(e,{promise:n,ts:Date.now()}),n}function ff(e){e.images?.forEach(t=>void _u(t)),e.svgs?.forEach(t=>void xu(t)),e.lotties?.forEach(t=>void Su(t)),e.sprites?.forEach(t=>void Cu(t))}function hf(e){const t=wt();try{const n=document.createElement("link");n.rel="preconnect",n.href=e,n.crossOrigin="anonymous",document.head.appendChild(n);const r=document.createElement("link");r.rel="dns-prefetch",r.href=e,document.head.appendChild(r)}catch(n){t.warn("error in injectPreconnect",n)}}function Au(e){return new URL(e,document.baseURI).toString()}function pf(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 or(e,t,n,r){const i=Au(n),a=`${e}|${t??""}|${i}`;if(li.has(a))return;if(pf(t,i)){li.add(a);return}const s=document.createElement("link");s.rel=e,t&&(s.as=t),s.href=i,s.crossOrigin="anonymous",r&&(s.type=r),s.setAttribute("data-chatsystem-preload","1"),document.head.appendChild(s),li.add(a)}function mf(e){const t=s=>Array.from(new Set((s??[]).map(Au))),n=t(e.images),r=t(e.svgs),i=t(e.lotties),a=t(e.sprites);n.forEach(s=>or("preload","image",s)),r.forEach(s=>or("preload","fetch",s,"image/svg+xml")),i.forEach(s=>or("preload","fetch",s,"application/zip")),a.forEach(s=>or("preload","fetch",s))}const gf=({src:e})=>{const[t,n]=S.useState(null);return S.useEffect(()=>{let r=!1;return _u(e).then(({blobUrl:i})=>{n(i)}).catch(()=>n(null)),()=>{t&&!r&&(URL.revokeObjectURL(t),r=!0)}},[e]),y.jsx("img",{src:t??e,decoding:"async",loading:"eager"})};function bf(e){return!!e&&typeof e=="object"&&"blob"in e&&e.blob instanceof Blob}function Ef({src:e,autoplay:t=!0,loop:n=!0,className:r,style:i,placeholder:a,fallback:s,onLoaded:o,onError:u}){const[c,d]=S.useState({kind:"loading"});return S.useEffect(()=>{let f=null,p=!1;return d({kind:"loading"}),Su(e).then(async h=>{if(!p)if(h.kind==="zip"){const b=bf(h)?h.blob:await(await fetch(h.blobUrl)).blob();f=URL.createObjectURL(b),d({kind:"lottieZip",blobUrl:f}),o?.(f)}else d({kind:"json",data:h.data}),o?.(h.data)}).catch(h=>!p&&(d({kind:"error",err:h}),u?.(h))),()=>{p=!0,f&&URL.revokeObjectURL(f)}},[e]),c.kind==="loading"?y.jsx("div",{className:"flex items-center justify-center rounded-xl border border-dashed p-6 text-sm opacity-70 "+(r??""),style:{minHeight:96,...i},children:a??"Loading animation…"}):c.kind==="error"?y.jsx("div",{className:"flex items-center justify-center rounded-xl border p-6 text-sm text-red-600 "+(r??""),style:{minHeight:96,...i},children:s??"Failed to load animation"}):c.kind==="json"?y.jsx(nf,{animationData:c.data,loop:n,autoplay:t,className:r,style:i,rendererSettings:{preserveAspectRatio:"xMidYMid meet"}}):y.jsx(rf.DotLottieReact,{src:c.blobUrl,loop:n,autoplay:t,className:r,style:i})}async function Tf(e,t={}){const{minPeriod:n=8,maxPeriod:r=Math.floor(Math.min(e.width,e.height)/2),gutterSearchRadius:i=3,debug:a=!1}=t,s=wt();if(e.width<n*2||e.height<n*2)return a&&s.warn("detectGrid: image too small"),null;const o=document.createElement("canvas");o.width=e.naturalWidth,o.height=e.naturalHeight;const u=o.getContext("2d");if(!u)return null;u.drawImage(e,0,0);const{data:c}=u.getImageData(0,0,o.width,o.height),d=o.width,f=o.height,p=new Uint8ClampedArray(d*f);for(let U=0;U<f;U++){const z=U*d;for(let F=0;F<d;F++){const $=(z+F)*4;p[z+F]=.299*c[$]+.587*c[$+1]+.114*c[$+2]|0}}const h=new Float32Array(d),b=new Float32Array(f);for(let U=1;U<d-1;U++){let z=0;for(let F=0;F<f;F++){const $=F*d+U,Q=p[$+1]-p[$-1];z+=Math.abs(Q)}h[U]=z}for(let U=1;U<f-1;U++){let z=0;for(let F=0;F<d;F++){const $=U*d+F,Q=p[$+d]-p[$-d];z+=Math.abs(Q)}b[U]=z}const x=ys(h,n,Math.min(r,d/2)),w=ys(b,n,Math.min(r,f/2));if(!x||!w)return a&&s.warn("detectGrid: could not find periods"),null;const C=Math.max(1,Math.round(d/x)),k=Math.max(1,Math.round(f/w)),I=xs(h,x,C,i),L=xs(b,w,k,i),A=Math.max(1,x-I),N=Math.max(1,w-L);if(A*C>d+2||N*k>f+2)return a&&s.warn("detectGrid: sanity check failed"),null;const Y=Yi(h,60),V=Yi(b,60),re=Math.max(0,_s(h,Y)),v=Math.max(0,_s(b,V));return a&&s.log({periodX:x,periodY:w,columns:C,rows:k,gutterX:I,gutterY:L,frameWidth:A,frameHeight:N,originX:re,originY:v}),{columns:C,rows:k,frameWidth:A,frameHeight:N,gutterX:I,gutterY:L,originX:re,originY:v}}function ys(e,t,n){const r=wu(e);let i=0;for(let h=0;h<e.length;h++){const b=e[h]-r;i+=b*b}if(i===0)return null;const a=new Float32Array(n+1);let s=0,o=-1/0;for(let h=t;h<=n;h++){let b=0;for(let w=0;w+h<e.length;w++)b+=(e[w]-r)*(e[w+h]-r);const x=b/i;a[h]=x,x>o&&(o=x,s=h)}if(s<=t||s>=n)return s||null;const u=a[s-1],c=a[s],d=a[s+1],f=u-2*c+d,p=f===0?0:.5*(u-d)/f;return s+p}function xs(e,t,n,r){const i=[];for(let o=1;o<n;o++){const u=o*t;let c=1/0,d=u;for(let f=-r;f<=r;f++){const p=u+f;if(p<=0||p>=e.length)continue;const h=e[p];h<c&&(c=h,d=p)}i.push(d)}if(i.length<1)return 0;const a=[];for(const o of i){const u=e[o]*1.5+Yi(e,10)*.5;let c=o,d=o;for(;c>1&&e[c-1]<=u;)c--;for(;d<e.length-2&&e[d+1]<=u;)d++;a.push(Math.max(0,d-c+1))}const s=Math.round(wu(a));return Math.max(0,Math.min(s,Math.floor(t/4)))}function wu(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function Yi(e,t){const n=Array.from(e);n.sort((i,a)=>i-a);const r=Math.max(0,Math.min(n.length-1,Math.floor(t/100*n.length)));return n[r]}function _s(e,t){for(let n=0;n<e.length;n++)if(e[n]>t)return n;return 0}function yf(e,t,n,r,i){const{data:a}=e.getImageData(t,n,r,i);let s=0;for(let o=3;o<a.length;o+=4)s+=a[o];return s/(255*(a.length/4))<.03}const Iu=S.createContext(wt()),Cn=()=>S.useContext(Iu),xf=S.forwardRef(function({src:t,frameWidth:n,frameHeight:r,columns:i,rows:a,gutterX:s=0,gutterY:o=0,frameCount:u,atlasFrames:c,fps:d=12,autoplay:f=!0,loop:p=!0,startFrame:h=0,direction:b="forward",scale:x=1,backgroundColor:w,className:C,style:k,pauseWhenHidden:I=!1,originX:L,originY:A,onLoad:N,onEnd:Y,onFrame:V},re){const v=Cn(),U=S.useRef(null),z=S.useRef(null),[F,$]=S.useState(null),[Q,he]=S.useState(null),[pe,Ae]=S.useState(null),[Ne,m]=S.useState(!1),[G,ie]=S.useState(!!f),[T,ne]=S.useState(h),J=S.useRef(1),[W,se]=S.useState(null),ue=Math.max(1,Math.floor(typeof window<"u"&&window.devicePixelRatio||1));S.useEffect(()=>{let be=!1;return m(!1),Cu(t).then(({imgEl:ve,bitmap:H})=>{be||($(ve),he(H),Ae({w:ve.naturalWidth,h:ve.naturalHeight}),m(!0),N?.())}).catch(()=>{}),()=>{be=!0}},[t,N]),S.useEffect(()=>{let be=!1;return(async()=>{if(!F)return;if(c&&c.length){se(null);return}if(!(!n||!r||!i||!a)){se(null);return}const H=await Tf(F,{debug:!0});be||(H?se({frameWidth:H.frameWidth,frameHeight:H.frameHeight,columns:H.columns,rows:H.rows,gutterX:H.gutterX,gutterY:H.gutterY}):(se(null),v.warn("RemoteSpritesheet: auto-detect failed; please provide grid props.")))})(),()=>{be=!0}},[F,c,n,r,i,a,v]);const de=W?.frameWidth??n,ae=W?.frameHeight??r,Re=W?.columns??i,q=W?.rows??a,Me=W?.gutterX??s,Be=W?.gutterY??o,Ke=W?.originX??L??0,je=W?.originY??A??0,qe=S.useMemo(()=>{if(c&&c.length>0)return{cols:0,rows:0};if(!pe||!de||!ae)return{cols:0,rows:0};const be=Re??Math.floor((pe.w+Me)/(de+Me)),ve=q??Math.floor((pe.h+Be)/(ae+Be));return{cols:Math.max(0,be),rows:Math.max(0,ve)}},[c,pe,de,ae,Re,q,Me,Be]),Ue=S.useMemo(()=>{if(c?.length)return c;if(!de||!ae)return[];const{cols:be,rows:ve}=qe;if(!be||!ve)return[];const H=Math.min(u??be*ve,be*ve),K=[];for(let O=0;O<H;O++){const M=O%be,X=Math.floor(O/be),le=Ke+M*(de+Me),Z=je+X*(ae+Be);K.push({x:le,y:Z,w:de,h:ae})}if(F&&K.length){const O=document.createElement("canvas");O.width=F.naturalWidth,O.height=F.naturalHeight;const M=O.getContext("2d");if(M){M.drawImage(F,0,0);let X=K.length;for(;X>0&&yf(M,K[X-1].x,K[X-1].y,K[X-1].w,K[X-1].h);)X--;return K.slice(0,X)}}return K},[c,qe,u,de,ae,Me,Be,F,Ke,je]),Pt=()=>{const be=U.current;if(!be||Ue.length===0)return;const ve=Ue[Math.max(0,Math.min(T,Ue.length-1))],H=Math.max(1,Math.round(ve.w*x)),K=Math.max(1,Math.round(ve.h*x));be.style.width=H+"px",be.style.height=K+"px",be.width=H*ue,be.height=K*ue};S.useEffect(()=>{Pt()},[Ne,x,Ue.length,ue,T]);const Nt=be=>{const ve=Q??F??null,H=U.current;if(!H||!ve||Ue.length===0)return;const K=H.getContext("2d");if(!K)return;K.save(),K.setTransform(1,0,0,1,0,0),K.clearRect(0,0,H.width,H.height),w&&(K.fillStyle=w,K.fillRect(0,0,H.width,H.height));const O=Ue[be];K.scale(ue,ue),K.drawImage(ve,O.x,O.y,O.w,O.h,0,0,Math.round(O.w*x),Math.round(O.h*x)),K.restore()};return S.useEffect(()=>{if(!Ne||Ue.length===0)return;let be=performance.now();const ve=1e3/Math.max(1,Math.min(120,d)),H=K=>{if(z.current=requestAnimationFrame(H),!G){Nt(T);return}const O=K-be;if(O<ve){Nt(T);return}be=K-O%ve,ne(M=>{const X=Ue.length-1;let le=M;return b==="forward"?le=M+1:b==="backward"?le=M-1:((M>=X&&J.current===1||M<=0&&J.current===-1)&&(J.current*=-1),le=M+J.current),(le>X||le<0)&&(p?le=b==="backward"?X:0:(le=Math.max(0,Math.min(le,X)),ie(!1),Y?.())),le})};return z.current=requestAnimationFrame(H),()=>{z.current&&cancelAnimationFrame(z.current)}},[Ne,d,G,p,b,Ue.length,T]),S.useEffect(()=>{Nt(T),V?.(T)},[T,Ne,x,ue]),S.useEffect(()=>{if(!I)return;const be=()=>{document.hidden&&ie(!1)};return document.addEventListener("visibilitychange",be),()=>document.removeEventListener("visibilitychange",be)},[I]),S.useImperativeHandle(re,()=>({play:()=>ie(!0),pause:()=>ie(!1),toggle:()=>ie(be=>!be),gotoFrame:be=>ne(()=>Math.max(0,Math.min(be,Math.max(0,Ue.length-1)))),isPlaying:()=>G,currentFrame:()=>T}),[G,T,Ue.length]),y.jsx("div",{className:C,style:k,children:y.jsx("canvas",{ref:U,"aria-label":"spritesheet animation"})})});function _f({url:e,className:t}){const[n,r]=S.useState(""),[i,a]=S.useState(null);return S.useEffect(()=>{let s=!1;return xu(e).then(({sanitized:o})=>{s||(r(o),a(null))}).catch(o=>!s&&a(o.message??"Failed to load")),()=>{s=!0}},[e]),i?y.jsxs("div",{className:t,role:"alert",children:["Couldn’t load SVG: ",i]}):n?y.jsx("div",{className:t,dangerouslySetInnerHTML:{__html:n}}):y.jsx("div",{className:t})}function Sf({mobile:e=.6,tablet:t=.8,desktop:n=1}){const[r,i]=S.useState(n);return S.useEffect(()=>{if(typeof window>"u")return;const a=[{mq:window.matchMedia("(max-width: 639px)"),value:e},{mq:window.matchMedia("(min-width: 640px) and (max-width: 1023px)"),value:t},{mq:window.matchMedia("(min-width: 1024px)"),value:n}],s=()=>{for(const{mq:o,value:u}of a)if(o.matches){i(u);break}};return a.forEach(({mq:o})=>o.addEventListener("change",s)),s(),()=>{a.forEach(({mq:o})=>o.removeEventListener("change",s))}},[e,t,n]),r}const Aa=({facet:e})=>{const t=Cn(),{mode:n,assetUrl:r,spr_columns:i,spr_fps:a,spr_frameCount:s,spr_frameHeight:o,spr_frameWidth:u,spr_gutterX:c,spr_gutterY:d,spr_rows:f,spr_originX:p,spr_originY:h,spr_scaleDesktop:b,spr_scaleMobile:x,spr_scaleTablet:w}=e,C=Sf({mobile:x??.6,tablet:w??.8,desktop:b??1});return y.jsxs("div",{className:"assetContainer",children:[n===ee.AgentDisplayFacetModeType.LOTTIE&&y.jsx(Ef,{src:r,autoplay:!0,onError:k=>t.error(k)}),n===ee.AgentDisplayFacetModeType.SVG&&y.jsx("div",{children:y.jsx(_f,{url:r})}),n===ee.AgentDisplayFacetModeType.IMAGE&&y.jsx(gf,{src:r}),n===ee.AgentDisplayFacetModeType.SPRITESHEET&&y.jsx(xf,{src:r,frameCount:s,columns:i,rows:f,fps:a,frameHeight:o,frameWidth:u,gutterX:c,gutterY:d,originX:p,originY:h,scale:C,autoplay:!0})]})},Cf=({isWidgetOpen:e,setIsWidgetOpen:t})=>{const{companySettings:n}=S.useContext(Yt);return y.jsxs("div",{className:`launcher
2
2
  fixed
3
3
  z-[999999999]
4
4
  transition
@@ -9,71 +9,71 @@
9
9
  flex
10
10
  justify-center
11
11
  items-center
12
- `,onClick:()=>t(!e),children:[!e&&x.jsx(Sa,{facet:n.agent.display[ee.AgentDisplayFacetRoleType.LAUNCHER]}),e&&x.jsx(pu,{className:"w-6 h-6",fill:"white"})]})};var Yi=function(e,t){return Yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Yi(e,t)};function ct(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yi(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var te=function(){return te=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},te.apply(this,arguments)};function Br(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var sr={exports:{}},Ae={};/** @license React v16.13.1
12
+ `,onClick:()=>t(!e),children:[!e&&y.jsx(Aa,{facet:n.agent.display[ee.AgentDisplayFacetRoleType.LAUNCHER]}),e&&y.jsx(Eu,{className:"w-6 h-6",fill:"white"})]})};var Gi=function(e,t){return Gi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Gi(e,t)};function ht(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Gi(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var te=function(){return te=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},te.apply(this,arguments)};function Fr(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function St(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ur={exports:{}},Se={};/** @license React v16.13.1
13
13
  * react-is.production.min.js
14
14
  *
15
15
  * Copyright (c) Facebook, Inc. and its affiliates.
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var Ts;function Ef(){if(Ts)return Ae;Ts=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,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function k(A){if(typeof A=="object"&&A!==null){var N=A.$$typeof;switch(N){case t:switch(A=A.type,A){case u:case c:case r:case a:case i:case f:return A;default:switch(A=A&&A.$$typeof,A){case o:case d:case b:case h:case s:return A;default:return N}}case n:return N}}}function L(A){return k(A)===c}return Ae.AsyncMode=u,Ae.ConcurrentMode=c,Ae.ContextConsumer=o,Ae.ContextProvider=s,Ae.Element=t,Ae.ForwardRef=d,Ae.Fragment=r,Ae.Lazy=b,Ae.Memo=h,Ae.Portal=n,Ae.Profiler=a,Ae.StrictMode=i,Ae.Suspense=f,Ae.isAsyncMode=function(A){return L(A)||k(A)===u},Ae.isConcurrentMode=L,Ae.isContextConsumer=function(A){return k(A)===o},Ae.isContextProvider=function(A){return k(A)===s},Ae.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===t},Ae.isForwardRef=function(A){return k(A)===d},Ae.isFragment=function(A){return k(A)===r},Ae.isLazy=function(A){return k(A)===b},Ae.isMemo=function(A){return k(A)===h},Ae.isPortal=function(A){return k(A)===n},Ae.isProfiler=function(A){return k(A)===a},Ae.isStrictMode=function(A){return k(A)===i},Ae.isSuspense=function(A){return k(A)===f},Ae.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===r||A===c||A===a||A===i||A===f||A===p||typeof A=="object"&&A!==null&&(A.$$typeof===b||A.$$typeof===h||A.$$typeof===s||A.$$typeof===o||A.$$typeof===d||A.$$typeof===w||A.$$typeof===S||A.$$typeof===v||A.$$typeof===y)},Ae.typeOf=k,Ae}var we={};/** @license React v16.13.1
19
+ */var Ss;function Af(){if(Ss)return Se;Ss=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,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function I(A){if(typeof A=="object"&&A!==null){var N=A.$$typeof;switch(N){case t:switch(A=A.type,A){case u:case c:case r:case a:case i:case f:return A;default:switch(A=A&&A.$$typeof,A){case o:case d:case b:case h:case s:return A;default:return N}}case n:return N}}}function L(A){return I(A)===c}return Se.AsyncMode=u,Se.ConcurrentMode=c,Se.ContextConsumer=o,Se.ContextProvider=s,Se.Element=t,Se.ForwardRef=d,Se.Fragment=r,Se.Lazy=b,Se.Memo=h,Se.Portal=n,Se.Profiler=a,Se.StrictMode=i,Se.Suspense=f,Se.isAsyncMode=function(A){return L(A)||I(A)===u},Se.isConcurrentMode=L,Se.isContextConsumer=function(A){return I(A)===o},Se.isContextProvider=function(A){return I(A)===s},Se.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===t},Se.isForwardRef=function(A){return I(A)===d},Se.isFragment=function(A){return I(A)===r},Se.isLazy=function(A){return I(A)===b},Se.isMemo=function(A){return I(A)===h},Se.isPortal=function(A){return I(A)===n},Se.isProfiler=function(A){return I(A)===a},Se.isStrictMode=function(A){return I(A)===i},Se.isSuspense=function(A){return I(A)===f},Se.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===r||A===c||A===a||A===i||A===f||A===p||typeof A=="object"&&A!==null&&(A.$$typeof===b||A.$$typeof===h||A.$$typeof===s||A.$$typeof===o||A.$$typeof===d||A.$$typeof===w||A.$$typeof===C||A.$$typeof===k||A.$$typeof===x)},Se.typeOf=I,Se}var Ce={};/** @license React v16.13.1
20
20
  * react-is.development.js
21
21
  *
22
22
  * Copyright (c) Facebook, Inc. and its affiliates.
23
23
  *
24
24
  * This source code is licensed under the MIT license found in the
25
25
  * LICENSE file in the root directory of this source tree.
26
- */var ys;function Tf(){return ys||(ys=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,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function k(q){return typeof q=="string"||typeof q=="function"||q===r||q===c||q===a||q===i||q===f||q===p||typeof q=="object"&&q!==null&&(q.$$typeof===b||q.$$typeof===h||q.$$typeof===s||q.$$typeof===o||q.$$typeof===d||q.$$typeof===w||q.$$typeof===S||q.$$typeof===v||q.$$typeof===y)}function L(q){if(typeof q=="object"&&q!==null){var Ne=q.$$typeof;switch(Ne){case t:var qe=q.type;switch(qe){case u:case c:case r:case a:case i:case f:return qe;default:var Be=qe&&qe.$$typeof;switch(Be){case o:case d:case b:case h:case s:return Be;default:return Ne}}case n:return Ne}}}var A=u,N=c,Y=o,X=s,ne=t,I=d,U=r,z=b,B=h,$=n,K=a,he=i,pe=f,Se=!1;function Le(q){return Se||(Se=!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.")),m(q)||L(q)===u}function m(q){return L(q)===c}function G(q){return L(q)===o}function re(q){return L(q)===s}function T(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function W(q){return L(q)===d}function ce(q){return L(q)===r}function V(q){return L(q)===b}function oe(q){return L(q)===h}function ae(q){return L(q)===n}function de(q){return L(q)===a}function ie(q){return L(q)===i}function ke(q){return L(q)===f}we.AsyncMode=A,we.ConcurrentMode=N,we.ContextConsumer=Y,we.ContextProvider=X,we.Element=ne,we.ForwardRef=I,we.Fragment=U,we.Lazy=z,we.Memo=B,we.Portal=$,we.Profiler=K,we.StrictMode=he,we.Suspense=pe,we.isAsyncMode=Le,we.isConcurrentMode=m,we.isContextConsumer=G,we.isContextProvider=re,we.isElement=T,we.isForwardRef=W,we.isFragment=ce,we.isLazy=V,we.isMemo=oe,we.isPortal=ae,we.isProfiler=de,we.isStrictMode=ie,we.isSuspense=ke,we.isValidElementType=k,we.typeOf=L})()),we}var xs;function Ca(){return xs||(xs=1,process.env.NODE_ENV==="production"?sr.exports=Ef():sr.exports=Tf()),sr.exports}var li,_s;function yf(){if(_s)return li;_s=1;var e=Ca(),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},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function s(b){return e.isMemo(b)?i:a[b.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(b,y,w){if(typeof y!="string"){if(p){var S=f(y);S&&S!==p&&h(b,S,w)}var v=u(y);c&&(v=v.concat(c(y)));for(var k=s(b),L=s(y),A=0;A<v.length;++A){var N=v[A];if(!n[N]&&!(w&&w[N])&&!(L&&L[N])&&!(k&&k[N])){var Y=d(y,N);try{o(b,N,Y)}catch{}}}}return b}return li=h,li}yf();function Cu(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var Te;(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"})(Te||(Te={}));var Oe;(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"})(Oe||(Oe={}));var Tn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Tn||(Tn={}));function Ss(e){return e.type===Oe.literal}function xf(e){return e.type===Oe.argument}function Au(e){return e.type===Oe.number}function wu(e){return e.type===Oe.date}function Iu(e){return e.type===Oe.time}function vu(e){return e.type===Oe.select}function ku(e){return e.type===Oe.plural}function _f(e){return e.type===Oe.pound}function Nu(e){return e.type===Oe.tag}function Ru(e){return!!(e&&typeof e=="object"&&e.type===Tn.number)}function Gi(e){return!!(e&&typeof e=="object"&&e.type===Tn.dateTime)}var Ou=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Sf=/(?:[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 Cf(e){var t={};return e.replace(Sf,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 Af=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function wf(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Af).filter(function(p){return p.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),c=0,d=u;c<d.length;c++){var f=d[c];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function If(e){return e.replace(/^(.*?)-/,"")}var Cs=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Lu=/^(@+)?(\+|#+)?[rs]?$/g,vf=/(\*)(0+)|(#+)(0+)|(0+)/g,Du=/^(0+)$/;function As(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Lu,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Pu(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 kf(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)),!Du.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ws(e){var t={},n=Pu(e);return n||t}function Nf(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=If(i.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=te(te(te({},t),{notation:"scientific"}),i.options.reduce(function(u,c){return te(te({},u),ws(c))},{}));continue;case"engineering":t=te(te(te({},t),{notation:"engineering"}),i.options.reduce(function(u,c){return te(te({},u),ws(c))},{}));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(i.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(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(vf,function(u,c,d,f,p,h){if(c)t.minimumIntegerDigits=d.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Du.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Cs.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Cs,function(u,c,d,f,p,h){return d==="*"?t.minimumFractionDigits=c.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:p&&h?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+h.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=i.options[0];a==="w"?t=te(te({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=te(te({},t),As(a)));continue}if(Lu.test(i.stem)){t=te(te({},t),As(i.stem));continue}var s=Pu(i.stem);s&&(t=te(te({},t),s));var o=kf(i.stem);o&&(t=te(te({},t),o))}return t}var or={"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 Rf(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",c=Of(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=u;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function Of(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 i=or[r||""]||or[n||""]||or["".concat(n,"-001")]||or["001"];return i[0]}var ci,Lf=new RegExp("^".concat(Ou.source,"*")),Df=new RegExp("".concat(Ou.source,"*$"));function ye(e,t){return{start:e,end:t}}var Pf=!!String.prototype.startsWith&&"_a".startsWith("a",1),Mf=!!String.fromCodePoint,Bf=!!Object.fromEntries,Ff=!!String.prototype.codePointAt,Hf=!!String.prototype.trimStart,Uf=!!String.prototype.trimEnd,jf=!!Number.isSafeInteger,zf=jf?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qi=!0;try{var $f=Bu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");qi=((ci=$f.exec("a"))===null||ci===void 0?void 0:ci[0])==="a"}catch{qi=!1}var Is=Pf?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Vi=Mf?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],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},vs=Bf?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},Mu=Ff?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Yf=Hf?function(t){return t.trimStart()}:function(t){return t.replace(Lf,"")},Gf=Uf?function(t){return t.trimEnd()}:function(t){return t.replace(Df,"")};function Bu(e,t){return new RegExp(e,t)}var Wi;if(qi){var ks=Bu("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Wi=function(t,n){var r;ks.lastIndex=n;var i=ks.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Wi=function(t,n){for(var r=[];;){var i=Mu(t,n);if(i===void 0||Fu(i)||Xf(i))break;r.push(i),n+=i>=65536?2:1}return Vi.apply(void 0,r)};var qf=(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 i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Oe.pound,location:ye(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Te.UNMATCHED_CLOSING_TAG,ye(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Xi(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Oe.literal,value:"<".concat(i,"/>"),location:ye(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Xi(this.char()))return this.error(Te.INVALID_TAG,ye(o,this.clonePosition()));var u=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(Te.UNMATCHED_CLOSING_TAG,ye(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Oe.tag,value:i,children:s,location:ye(r,this.clonePosition())},err:null}:this.error(Te.INVALID_TAG,ye(o,this.clonePosition())))}else return this.error(Te.UNCLOSED_TAG,ye(r,this.clonePosition()))}else return this.error(Te.INVALID_TAG,ye(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Wf(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=ye(r,this.clonePosition());return{val:{type:Oe.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Vf(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 Vi.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(),Vi(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Te.EMPTY_ARGUMENT,ye(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Te.MALFORMED_ARGUMENT,ye(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Oe.argument,value:i,location:ye(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(Te.MALFORMED_ARGUMENT,ye(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Wi(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=ye(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(Te.EXPECT_ARGUMENT_TYPE,ye(s,u));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=Gf(f.val);if(p.length===0)return this.error(Te.EXPECT_ARGUMENT_STYLE,ye(this.clonePosition(),this.clonePosition()));var h=ye(d,this.clonePosition());c={style:p,styleLocation:h}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var y=ye(i,this.clonePosition());if(c&&Is(c?.style,"::",0)){var w=Yf(c.style.slice(2));if(o==="number"){var f=this.parseNumberSkeletonFromString(w,c.styleLocation);return f.err?f:{val:{type:Oe.number,value:r,location:y,style:f.val},err:null}}else{if(w.length===0)return this.error(Te.EXPECT_DATE_TIME_SKELETON,y);var S=w;this.locale&&(S=Rf(w,this.locale));var p={type:Tn.dateTime,pattern:S,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Cf(S):{}},v=o==="date"?Oe.date:Oe.time;return{val:{type:v,value:r,location:y,style:p},err:null}}}return{val:{type:o==="number"?Oe.number:o==="date"?Oe.date:Oe.time,value:r,location:y,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var k=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Te.EXPECT_SELECT_ARGUMENT_OPTIONS,ye(k,te({},k)));this.bumpSpace();var L=this.parseIdentifierIfPossible(),A=0;if(o!=="select"&&L.value==="offset"){if(!this.bumpIf(":"))return this.error(Te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(Te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Te.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),L=this.parseIdentifierIfPossible(),A=f.val}var N=this.tryParsePluralOrSelectOptions(t,o,n,L);if(N.err)return N;var b=this.tryParseArgumentClose(i);if(b.err)return b;var Y=ye(i,this.clonePosition());return o==="select"?{val:{type:Oe.select,value:r,options:vs(N.val),location:Y},err:null}:{val:{type:Oe.plural,value:r,options:vs(N.val),offset:A,pluralType:o==="plural"?"cardinal":"ordinal",location:Y},err:null}}default:return this.error(Te.INVALID_ARGUMENT_TYPE,ye(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(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 i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Te.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ye(i,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=wf(t)}catch{return this.error(Te.INVALID_NUMBER_SKELETON,n)}return{val:{type:Tn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Nf(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],u=new Set,c=i.value,d=i.location;;){if(c.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(Te.EXPECT_PLURAL_ARGUMENT_SELECTOR,Te.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;d=ye(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}else break}if(u.has(c))return this.error(n==="select"?Te.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Te.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);c==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Te.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Te.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ye(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,n,r);if(b.err)return b;var y=this.tryParseArgumentClose(h);if(y.err)return y;o.push([c,{value:b.val,location:ye(h,this.clonePosition())}]),u.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,d=a.location}return o.length===0?this.error(n==="select"?Te.EXPECT_SELECT_ARGUMENT_SELECTOR:Te.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Te.MISSING_OTHER_CLAUSE,ye(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=ye(i,this.clonePosition());return a?(s*=r,zf(s)?{val:s,err:null}:this.error(n,u)):this.error(t,u)},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=Mu(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(Is(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()&&Fu(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 Xi(e){return e>=97&&e<=122||e>=65&&e<=90}function Vf(e){return Xi(e)||e===47}function Wf(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 Fu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Xf(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 Qi(e){e.forEach(function(t){if(delete t.location,vu(t)||ku(t))for(var n in t.options)delete t.options[n].location,Qi(t.options[n].value);else Au(t)&&Ru(t.style)||(wu(t)||Iu(t))&&Gi(t.style)?delete t.style.location:Nu(t)&&Qi(t.children)})}function Qf(e,t){t===void 0&&(t={}),t=te({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new qf(e,t).parse();if(n.err){var r=SyntaxError(Te[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Qi(n.val),n.val}function Et(e,t){var n=t&&t.cache?t.cache:nh,r=t&&t.serializer?t.serializer:th,i=t&&t.strategy?t.strategy:Zf;return i(e,{cache:n,serializer:r})}function Kf(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Jf(e,t,n,r){var i=Kf(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Hu(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Uu(e,t,n,r,i){return n.bind(t,e,r,i)}function Zf(e,t){var n=e.length===1?Jf:Hu;return Uu(e,this,n,t.cache.create(),t.serializer)}function eh(e,t){return Uu(e,this,Hu,t.cache.create(),t.serializer)}var th=function(){return JSON.stringify(arguments)};function Aa(){this.cache=Object.create(null)}Aa.prototype.get=function(e){return this.cache[e]};Aa.prototype.set=function(e,t){this.cache[e]=t};var nh={create:function(){return new Aa}},Tt={variadic:eh},St;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(St||(St={}));var $t=(function(e){ct(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),Ns=(function(e){ct(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),St.INVALID_VALUE,a)||this}return t})($t),rh=(function(e){ct(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),St.INVALID_VALUE,i)||this}return t})($t),ih=(function(e){ct(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,'"'),St.MISSING_VALUE,r)||this}return t})($t),Je;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Je||(Je={}));function ah(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Je.literal||n.type!==Je.literal?t.push(n):r.value+=n.value,t},[])}function ju(e){return typeof e=="function"}function Er(e,t,n,r,i,a,s){if(e.length===1&&Ss(e[0]))return[{type:Je.literal,value:e[0].value}];for(var o=[],u=0,c=e;u<c.length;u++){var d=c[u];if(Ss(d)){o.push({type:Je.literal,value:d.value});continue}if(_f(d)){typeof a=="number"&&o.push({type:Je.literal,value:n.getNumberFormat(t).format(a)});continue}var f=d.value;if(!(i&&f in i))throw new ih(f,s);var p=i[f];if(xf(d)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),o.push({type:typeof p=="string"?Je.literal:Je.object,value:p});continue}if(wu(d)){var h=typeof d.style=="string"?r.date[d.style]:Gi(d.style)?d.style.parsedOptions:void 0;o.push({type:Je.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(Iu(d)){var h=typeof d.style=="string"?r.time[d.style]:Gi(d.style)?d.style.parsedOptions:r.time.medium;o.push({type:Je.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(Au(d)){var h=typeof d.style=="string"?r.number[d.style]:Ru(d.style)?d.style.parsedOptions:void 0;h&&h.scale&&(p=p*(h.scale||1)),o.push({type:Je.literal,value:n.getNumberFormat(t,h).format(p)});continue}if(Nu(d)){var b=d.children,y=d.value,w=i[y];if(!ju(w))throw new rh(y,"function",s);var S=Er(b,t,n,r,i,a),v=w(S.map(function(A){return A.value}));Array.isArray(v)||(v=[v]),o.push.apply(o,v.map(function(A){return{type:typeof A=="string"?Je.literal:Je.object,value:A}}))}if(vu(d)){var k=d.options[p]||d.options.other;if(!k)throw new Ns(d.value,p,Object.keys(d.options),s);o.push.apply(o,Er(k.value,t,n,r,i));continue}if(ku(d)){var k=d.options["=".concat(p)];if(!k){if(!Intl.PluralRules)throw new $t(`Intl.PluralRules is not available in this environment.
26
+ */var Cs;function wf(){return Cs||(Cs=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,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function I(q){return typeof q=="string"||typeof q=="function"||q===r||q===c||q===a||q===i||q===f||q===p||typeof q=="object"&&q!==null&&(q.$$typeof===b||q.$$typeof===h||q.$$typeof===s||q.$$typeof===o||q.$$typeof===d||q.$$typeof===w||q.$$typeof===C||q.$$typeof===k||q.$$typeof===x)}function L(q){if(typeof q=="object"&&q!==null){var Me=q.$$typeof;switch(Me){case t:var Be=q.type;switch(Be){case u:case c:case r:case a:case i:case f:return Be;default:var Ke=Be&&Be.$$typeof;switch(Ke){case o:case d:case b:case h:case s:return Ke;default:return Me}}case n:return Me}}}var A=u,N=c,Y=o,V=s,re=t,v=d,U=r,z=b,F=h,$=n,Q=a,he=i,pe=f,Ae=!1;function Ne(q){return Ae||(Ae=!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.")),m(q)||L(q)===u}function m(q){return L(q)===c}function G(q){return L(q)===o}function ie(q){return L(q)===s}function T(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function ne(q){return L(q)===d}function J(q){return L(q)===r}function W(q){return L(q)===b}function se(q){return L(q)===h}function ue(q){return L(q)===n}function de(q){return L(q)===a}function ae(q){return L(q)===i}function Re(q){return L(q)===f}Ce.AsyncMode=A,Ce.ConcurrentMode=N,Ce.ContextConsumer=Y,Ce.ContextProvider=V,Ce.Element=re,Ce.ForwardRef=v,Ce.Fragment=U,Ce.Lazy=z,Ce.Memo=F,Ce.Portal=$,Ce.Profiler=Q,Ce.StrictMode=he,Ce.Suspense=pe,Ce.isAsyncMode=Ne,Ce.isConcurrentMode=m,Ce.isContextConsumer=G,Ce.isContextProvider=ie,Ce.isElement=T,Ce.isForwardRef=ne,Ce.isFragment=J,Ce.isLazy=W,Ce.isMemo=se,Ce.isPortal=ue,Ce.isProfiler=de,Ce.isStrictMode=ae,Ce.isSuspense=Re,Ce.isValidElementType=I,Ce.typeOf=L})()),Ce}var As;function wa(){return As||(As=1,process.env.NODE_ENV==="production"?ur.exports=Af():ur.exports=wf()),ur.exports}var ci,ws;function If(){if(ws)return ci;ws=1;var e=wa(),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},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function s(b){return e.isMemo(b)?i:a[b.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function h(b,x,w){if(typeof x!="string"){if(p){var C=f(x);C&&C!==p&&h(b,C,w)}var k=u(x);c&&(k=k.concat(c(x)));for(var I=s(b),L=s(x),A=0;A<k.length;++A){var N=k[A];if(!n[N]&&!(w&&w[N])&&!(L&&L[N])&&!(I&&I[N])){var Y=d(x,N);try{o(b,N,Y)}catch{}}}}return b}return ci=h,ci}If();function vu(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var Te;(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"})(Te||(Te={}));var Oe;(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"})(Oe||(Oe={}));var yn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(yn||(yn={}));function Is(e){return e.type===Oe.literal}function vf(e){return e.type===Oe.argument}function ku(e){return e.type===Oe.number}function Nu(e){return e.type===Oe.date}function Ru(e){return e.type===Oe.time}function Ou(e){return e.type===Oe.select}function Lu(e){return e.type===Oe.plural}function kf(e){return e.type===Oe.pound}function Du(e){return e.type===Oe.tag}function Pu(e){return!!(e&&typeof e=="object"&&e.type===yn.number)}function qi(e){return!!(e&&typeof e=="object"&&e.type===yn.dateTime)}var Mu=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Nf=/(?:[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 Rf(e){var t={};return e.replace(Nf,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 Of=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Lf(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Of).filter(function(p){return p.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),c=0,d=u;c<d.length;c++){var f=d[c];if(f.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function Df(e){return e.replace(/^(.*?)-/,"")}var vs=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Bu=/^(@+)?(\+|#+)?[rs]?$/g,Pf=/(\*)(0+)|(#+)(0+)|(0+)/g,Fu=/^(0+)$/;function ks(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Bu,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Hu(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 Mf(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)),!Fu.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ns(e){var t={},n=Hu(e);return n||t}function Bf(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.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=Df(i.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=te(te(te({},t),{notation:"scientific"}),i.options.reduce(function(u,c){return te(te({},u),Ns(c))},{}));continue;case"engineering":t=te(te(te({},t),{notation:"engineering"}),i.options.reduce(function(u,c){return te(te({},u),Ns(c))},{}));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(i.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(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Pf,function(u,c,d,f,p,h){if(c)t.minimumIntegerDigits=d.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Fu.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(vs.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(vs,function(u,c,d,f,p,h){return d==="*"?t.minimumFractionDigits=c.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:p&&h?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+h.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=i.options[0];a==="w"?t=te(te({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=te(te({},t),ks(a)));continue}if(Bu.test(i.stem)){t=te(te({},t),ks(i.stem));continue}var s=Hu(i.stem);s&&(t=te(te({},t),s));var o=Mf(i.stem);o&&(t=te(te({},t),o))}return t}var lr={"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 Ff(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",c=Hf(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=u;for(;s-- >0;)n=c+n}else i==="J"?n+="H":n+=i}return n}function Hf(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 i=lr[r||""]||lr[n||""]||lr["".concat(n,"-001")]||lr["001"];return i[0]}var di,Uf=new RegExp("^".concat(Mu.source,"*")),jf=new RegExp("".concat(Mu.source,"*$"));function ye(e,t){return{start:e,end:t}}var zf=!!String.prototype.startsWith&&"_a".startsWith("a",1),$f=!!String.fromCodePoint,Yf=!!Object.fromEntries,Gf=!!String.prototype.codePointAt,qf=!!String.prototype.trimStart,Vf=!!String.prototype.trimEnd,Wf=!!Number.isSafeInteger,Xf=Wf?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Vi=!0;try{var Qf=ju("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Vi=((di=Qf.exec("a"))===null||di===void 0?void 0:di[0])==="a"}catch{Vi=!1}var Rs=zf?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Wi=$f?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],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},Os=Yf?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},Uu=Gf?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Kf=qf?function(t){return t.trimStart()}:function(t){return t.replace(Uf,"")},Jf=Vf?function(t){return t.trimEnd()}:function(t){return t.replace(jf,"")};function ju(e,t){return new RegExp(e,t)}var Xi;if(Vi){var Ls=ju("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Xi=function(t,n){var r;Ls.lastIndex=n;var i=Ls.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Xi=function(t,n){for(var r=[];;){var i=Uu(t,n);if(i===void 0||zu(i)||nh(i))break;r.push(i),n+=i>=65536?2:1}return Wi.apply(void 0,r)};var Zf=(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 i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Oe.pound,location:ye(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(Te.UNMATCHED_CLOSING_TAG,ye(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Qi(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Oe.literal,value:"<".concat(i,"/>"),location:ye(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Qi(this.char()))return this.error(Te.INVALID_TAG,ye(o,this.clonePosition()));var u=this.clonePosition(),c=this.parseTagName();return i!==c?this.error(Te.UNMATCHED_CLOSING_TAG,ye(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Oe.tag,value:i,children:s,location:ye(r,this.clonePosition())},err:null}:this.error(Te.INVALID_TAG,ye(o,this.clonePosition())))}else return this.error(Te.UNCLOSED_TAG,ye(r,this.clonePosition()))}else return this.error(Te.INVALID_TAG,ye(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&th(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=ye(r,this.clonePosition());return{val:{type:Oe.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!eh(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 Wi.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(),Wi(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Te.EMPTY_ARGUMENT,ye(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Te.MALFORMED_ARGUMENT,ye(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Oe.argument,value:i,location:ye(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(Te.MALFORMED_ARGUMENT,ye(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Xi(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=ye(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(Te.EXPECT_ARGUMENT_TYPE,ye(s,u));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=Jf(f.val);if(p.length===0)return this.error(Te.EXPECT_ARGUMENT_STYLE,ye(this.clonePosition(),this.clonePosition()));var h=ye(d,this.clonePosition());c={style:p,styleLocation:h}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var x=ye(i,this.clonePosition());if(c&&Rs(c?.style,"::",0)){var w=Kf(c.style.slice(2));if(o==="number"){var f=this.parseNumberSkeletonFromString(w,c.styleLocation);return f.err?f:{val:{type:Oe.number,value:r,location:x,style:f.val},err:null}}else{if(w.length===0)return this.error(Te.EXPECT_DATE_TIME_SKELETON,x);var C=w;this.locale&&(C=Ff(w,this.locale));var p={type:yn.dateTime,pattern:C,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Rf(C):{}},k=o==="date"?Oe.date:Oe.time;return{val:{type:k,value:r,location:x,style:p},err:null}}}return{val:{type:o==="number"?Oe.number:o==="date"?Oe.date:Oe.time,value:r,location:x,style:(a=c?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var I=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Te.EXPECT_SELECT_ARGUMENT_OPTIONS,ye(I,te({},I)));this.bumpSpace();var L=this.parseIdentifierIfPossible(),A=0;if(o!=="select"&&L.value==="offset"){if(!this.bumpIf(":"))return this.error(Te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(Te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Te.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),L=this.parseIdentifierIfPossible(),A=f.val}var N=this.tryParsePluralOrSelectOptions(t,o,n,L);if(N.err)return N;var b=this.tryParseArgumentClose(i);if(b.err)return b;var Y=ye(i,this.clonePosition());return o==="select"?{val:{type:Oe.select,value:r,options:Os(N.val),location:Y},err:null}:{val:{type:Oe.plural,value:r,options:Os(N.val),offset:A,pluralType:o==="plural"?"cardinal":"ordinal",location:Y},err:null}}default:return this.error(Te.INVALID_ARGUMENT_TYPE,ye(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(Te.EXPECT_ARGUMENT_CLOSING_BRACE,ye(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 i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Te.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ye(i,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=Lf(t)}catch{return this.error(Te.INVALID_NUMBER_SKELETON,n)}return{val:{type:yn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Bf(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],u=new Set,c=i.value,d=i.location;;){if(c.length===0){var f=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(Te.EXPECT_PLURAL_ARGUMENT_SELECTOR,Te.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;d=ye(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}else break}if(u.has(c))return this.error(n==="select"?Te.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Te.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);c==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Te.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Te.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ye(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(t+1,n,r);if(b.err)return b;var x=this.tryParseArgumentClose(h);if(x.err)return x;o.push([c,{value:b.val,location:ye(h,this.clonePosition())}]),u.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,d=a.location}return o.length===0?this.error(n==="select"?Te.EXPECT_SELECT_ARGUMENT_SELECTOR:Te.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(Te.MISSING_OTHER_CLAUSE,ye(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=ye(i,this.clonePosition());return a?(s*=r,Xf(s)?{val:s,err:null}:this.error(n,u)):this.error(t,u)},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=Uu(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(Rs(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()&&zu(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 Qi(e){return e>=97&&e<=122||e>=65&&e<=90}function eh(e){return Qi(e)||e===47}function th(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 zu(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function nh(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 Ki(e){e.forEach(function(t){if(delete t.location,Ou(t)||Lu(t))for(var n in t.options)delete t.options[n].location,Ki(t.options[n].value);else ku(t)&&Pu(t.style)||(Nu(t)||Ru(t))&&qi(t.style)?delete t.style.location:Du(t)&&Ki(t.children)})}function rh(e,t){t===void 0&&(t={}),t=te({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Zf(e,t).parse();if(n.err){var r=SyntaxError(Te[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Ki(n.val),n.val}function xt(e,t){var n=t&&t.cache?t.cache:lh,r=t&&t.serializer?t.serializer:uh,i=t&&t.strategy?t.strategy:sh;return i(e,{cache:n,serializer:r})}function ih(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ah(e,t,n,r){var i=ih(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function $u(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Yu(e,t,n,r,i){return n.bind(t,e,r,i)}function sh(e,t){var n=e.length===1?ah:$u;return Yu(e,this,n,t.cache.create(),t.serializer)}function oh(e,t){return Yu(e,this,$u,t.cache.create(),t.serializer)}var uh=function(){return JSON.stringify(arguments)};function Ia(){this.cache=Object.create(null)}Ia.prototype.get=function(e){return this.cache[e]};Ia.prototype.set=function(e,t){this.cache[e]=t};var lh={create:function(){return new Ia}},_t={variadic:oh},At;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(At||(At={}));var Gt=(function(e){ht(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),Ds=(function(e){ht(t,e);function t(n,r,i,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),At.INVALID_VALUE,a)||this}return t})(Gt),ch=(function(e){ht(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),At.INVALID_VALUE,i)||this}return t})(Gt),dh=(function(e){ht(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,'"'),At.MISSING_VALUE,r)||this}return t})(Gt),Je;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Je||(Je={}));function fh(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Je.literal||n.type!==Je.literal?t.push(n):r.value+=n.value,t},[])}function Gu(e){return typeof e=="function"}function Tr(e,t,n,r,i,a,s){if(e.length===1&&Is(e[0]))return[{type:Je.literal,value:e[0].value}];for(var o=[],u=0,c=e;u<c.length;u++){var d=c[u];if(Is(d)){o.push({type:Je.literal,value:d.value});continue}if(kf(d)){typeof a=="number"&&o.push({type:Je.literal,value:n.getNumberFormat(t).format(a)});continue}var f=d.value;if(!(i&&f in i))throw new dh(f,s);var p=i[f];if(vf(d)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),o.push({type:typeof p=="string"?Je.literal:Je.object,value:p});continue}if(Nu(d)){var h=typeof d.style=="string"?r.date[d.style]:qi(d.style)?d.style.parsedOptions:void 0;o.push({type:Je.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(Ru(d)){var h=typeof d.style=="string"?r.time[d.style]:qi(d.style)?d.style.parsedOptions:r.time.medium;o.push({type:Je.literal,value:n.getDateTimeFormat(t,h).format(p)});continue}if(ku(d)){var h=typeof d.style=="string"?r.number[d.style]:Pu(d.style)?d.style.parsedOptions:void 0;h&&h.scale&&(p=p*(h.scale||1)),o.push({type:Je.literal,value:n.getNumberFormat(t,h).format(p)});continue}if(Du(d)){var b=d.children,x=d.value,w=i[x];if(!Gu(w))throw new ch(x,"function",s);var C=Tr(b,t,n,r,i,a),k=w(C.map(function(A){return A.value}));Array.isArray(k)||(k=[k]),o.push.apply(o,k.map(function(A){return{type:typeof A=="string"?Je.literal:Je.object,value:A}}))}if(Ou(d)){var I=d.options[p]||d.options.other;if(!I)throw new Ds(d.value,p,Object.keys(d.options),s);o.push.apply(o,Tr(I.value,t,n,r,i));continue}if(Lu(d)){var I=d.options["=".concat(p)];if(!I){if(!Intl.PluralRules)throw new Gt(`Intl.PluralRules is not available in this environment.
27
27
  Try polyfilling it using "@formatjs/intl-pluralrules"
28
- `,St.MISSING_INTL_API,s);var L=n.getPluralRules(t,{type:d.pluralType}).select(p-(d.offset||0));k=d.options[L]||d.options.other}if(!k)throw new Ns(d.value,p,Object.keys(d.options),s);o.push.apply(o,Er(k.value,t,n,r,i,p-(d.offset||0)));continue}}return ah(o)}function sh(e,t){return t?te(te(te({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=te(te({},e[r]),t[r]||{}),n},{})):e}function oh(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=sh(e[r],t[r]),n},te({},e)):e}function di(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function uh(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Et(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,yt([void 0],n,!1)))},{cache:di(e.number),strategy:Tt.variadic}),getDateTimeFormat:Et(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,yt([void 0],n,!1)))},{cache:di(e.dateTime),strategy:Tt.variadic}),getPluralRules:Et(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,yt([void 0],n,!1)))},{cache:di(e.pluralRules),strategy:Tt.variadic})}}var zu=(function(){function e(t,n,r,i){var a=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=a.formatToParts(u);if(c.length===1)return c[0].value;var d=c.reduce(function(f,p){return!f.length||p.type!==Je.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(u){return Er(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.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=i||{};s.formatters;var o=Br(s,["formatters"]);this.ast=e.__parse(t,te(te({},o),{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=oh(e.formats,r),this.formatters=i&&i.formatters||uh(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=Qf,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})(),Zt;(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"})(Zt||(Zt={}));var Qn=(function(e){ct(t,e);function t(n,r,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
28
+ `,At.MISSING_INTL_API,s);var L=n.getPluralRules(t,{type:d.pluralType}).select(p-(d.offset||0));I=d.options[L]||d.options.other}if(!I)throw new Ds(d.value,p,Object.keys(d.options),s);o.push.apply(o,Tr(I.value,t,n,r,i,p-(d.offset||0)));continue}}return fh(o)}function hh(e,t){return t?te(te(te({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=te(te({},e[r]),t[r]||{}),n},{})):e}function ph(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=hh(e[r],t[r]),n},te({},e)):e}function fi(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function mh(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:xt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,St([void 0],n,!1)))},{cache:fi(e.number),strategy:_t.variadic}),getDateTimeFormat:xt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,St([void 0],n,!1)))},{cache:fi(e.dateTime),strategy:_t.variadic}),getPluralRules:xt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,St([void 0],n,!1)))},{cache:fi(e.pluralRules),strategy:_t.variadic})}}var qu=(function(){function e(t,n,r,i){var a=this;if(n===void 0&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=a.formatToParts(u);if(c.length===1)return c[0].value;var d=c.reduce(function(f,p){return!f.length||p.type!==Je.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(u){return Tr(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.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=i||{};s.formatters;var o=Fr(s,["formatters"]);this.ast=e.__parse(t,te(te({},o),{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=ph(e.formats,r),this.formatters=i&&i.formatters||mh(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=rh,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})(),tn;(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"})(tn||(tn={}));var Kn=(function(e){ht(t,e);function t(n,r,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
29
29
  `).concat(s?`
30
30
  `.concat(s.message,`
31
- `).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),lh=(function(e){ct(t,e);function t(n,r){return e.call(this,Zt.UNSUPPORTED_FORMATTER,n,r)||this}return t})(Qn),ch=(function(e){ct(t,e);function t(n,r){return e.call(this,Zt.INVALID_CONFIG,n,r)||this}return t})(Qn),Rs=(function(e){ct(t,e);function t(n,r){return e.call(this,Zt.MISSING_DATA,n,r)||this}return t})(Qn),dt=(function(e){ct(t,e);function t(n,r,i){var a=e.call(this,Zt.FORMAT_ERROR,"".concat(n,`
31
+ `).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t})(Error),gh=(function(e){ht(t,e);function t(n,r){return e.call(this,tn.UNSUPPORTED_FORMATTER,n,r)||this}return t})(Kn),bh=(function(e){ht(t,e);function t(n,r){return e.call(this,tn.INVALID_CONFIG,n,r)||this}return t})(Kn),Ps=(function(e){ht(t,e);function t(n,r){return e.call(this,tn.MISSING_DATA,n,r)||this}return t})(Kn),pt=(function(e){ht(t,e);function t(n,r,i){var a=e.call(this,tn.FORMAT_ERROR,"".concat(n,`
32
32
  Locale: `).concat(r,`
33
- `),i)||this;return a.locale=r,a}return t})(Qn),fi=(function(e){ct(t,e);function t(n,r,i,a){var s=e.call(this,"".concat(n,`
33
+ `),i)||this;return a.locale=r,a}return t})(Kn),hi=(function(e){ht(t,e);function t(n,r,i,a){var s=e.call(this,"".concat(n,`
34
34
  MessageID: `).concat(i?.id,`
35
35
  Default Message: `).concat(i?.defaultMessage,`
36
36
  Description: `).concat(i?.description,`
37
- `),r,a)||this;return s.descriptor=i,s.locale=r,s}return t})(dt),dh=(function(e){ct(t,e);function t(n,r){var i=e.call(this,Zt.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(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t})(Qn);function an(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var fh=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},hh=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},$u={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:fh,onWarn:hh};function Yu(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function qt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function ph(e){e===void 0&&(e=Yu());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=Et(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,yt([void 0],u,!1)))},{cache:qt(e.dateTime),strategy:Tt.variadic}),a=Et(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,yt([void 0],u,!1)))},{cache:qt(e.number),strategy:Tt.variadic}),s=Et(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,yt([void 0],u,!1)))},{cache:qt(e.pluralRules),strategy:Tt.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:Et(function(o,u,c,d){return new zu(o,u,c,te({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},d||{}))},{cache:qt(e.message),strategy:Tt.variadic}),getRelativeTimeFormat:Et(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(t.bind.apply(t,yt([void 0],o,!1)))},{cache:qt(e.relativeTime),strategy:Tt.variadic}),getPluralRules:s,getListFormat:Et(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(n.bind.apply(n,yt([void 0],o,!1)))},{cache:qt(e.list),strategy:Tt.variadic}),getDisplayNames:Et(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(r.bind.apply(r,yt([void 0],o,!1)))},{cache:qt(e.displayNames),strategy:Tt.variadic})}}function wa(e,t,n,r){var i=e&&e[t],a;if(i&&(a=i[n]),a)return a;r(new lh("No ".concat(t," format named: ").concat(n)))}function ur(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=te({timeZone:t},e[r]),n},{})}function Os(e,t){var n=Object.keys(te(te({},e),t));return n.reduce(function(r,i){return r[i]=te(te({},e[i]||{}),t[i]||{}),r},{})}function Ls(e,t){if(!t)return e;var n=zu.formats;return te(te(te({},n),e),{date:Os(ur(n.date,t),ur(e.date||{},t)),time:Os(ur(n.time,t),ur(e.time||{},t))})}var Ki=function(e,t,n,r,i){var a=e.locale,s=e.formats,o=e.messages,u=e.defaultLocale,c=e.defaultFormats,d=e.fallbackOnEmptyString,f=e.onError,p=e.timeZone,h=e.defaultRichTextElements;n===void 0&&(n={id:""});var b=n.id,y=n.defaultMessage;Cu(!!b,"[@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 w=String(b),S=o&&Object.prototype.hasOwnProperty.call(o,w)&&o[w];if(Array.isArray(S)&&S.length===1&&S[0].type===Oe.literal)return S[0].value;if(!r&&S&&typeof S=="string"&&!h)return S.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=te(te({},h),r||{}),s=Ls(s,p),c=Ls(c,p),!S){if(d===!1&&S==="")return S;if((!y||a&&a.toLowerCase()!==u.toLowerCase())&&f(new dh(n,a)),y)try{var v=t.getMessageFormat(y,u,c,i);return v.format(r)}catch(k){return f(new fi('Error formatting default message for: "'.concat(w,'", rendering default message verbatim'),a,n,k)),typeof y=="string"?y:w}return w}try{var v=t.getMessageFormat(S,a,s,te({formatters:t},i||{}));return v.format(r)}catch(k){f(new fi('Error formatting message: "'.concat(w,'", using ').concat(y?"default message":"id"," as fallback."),a,n,k))}if(y)try{var v=t.getMessageFormat(y,u,c,i);return v.format(r)}catch(k){f(new fi('Error formatting the default message for: "'.concat(w,'", rendering message verbatim'),a,n,k))}return typeof S=="string"?S:typeof y=="string"?y:w},Gu=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Fr(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,o=e.timeZone;r===void 0&&(r={});var u=r.format,c=te(te({},o&&{timeZone:o}),u&&wa(a,t,u,s)),d=an(r,Gu,c);return t==="time"&&!d.hour&&!d.minute&&!d.second&&!d.timeStyle&&!d.dateStyle&&(d=te(te({},d),{hour:"numeric",minute:"numeric"})),n(i,d)}function mh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Fr(e,"date",t,s).format(o)}catch(u){e.onError(new dt("Error formatting date.",e.locale,u))}return String(o)}function gh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Fr(e,"time",t,s).format(o)}catch(u){e.onError(new dt("Error formatting time.",e.locale,u))}return String(o)}function bh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=n[2],o=s===void 0?{}:s,u=e.timeZone,c=e.locale,d=e.onError,f=an(o,Gu,u?{timeZone:u}:{});try{return t(c,f).formatRange(i,a)}catch(p){d(new dt("Error formatting date time range.",e.locale,p))}return String(i)}function Eh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Fr(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new dt("Error formatting date.",e.locale,u))}return[]}function Th(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Fr(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new dt("Error formatting time.",e.locale,u))}return[]}var yh=["style","type","fallback","languageDisplay"];function xh(e,t,n,r){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new $t(`Intl.DisplayNames is not available in this environment.
37
+ `),r,a)||this;return s.descriptor=i,s.locale=r,s}return t})(pt),Eh=(function(e){ht(t,e);function t(n,r){var i=e.call(this,tn.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(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t})(Kn);function sn(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var Th=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},yh=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},Vu={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Th,onWarn:yh};function Wu(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Wt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function xh(e){e===void 0&&(e=Wu());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=xt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,St([void 0],u,!1)))},{cache:Wt(e.dateTime),strategy:_t.variadic}),a=xt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,St([void 0],u,!1)))},{cache:Wt(e.number),strategy:_t.variadic}),s=xt(function(){for(var o,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,St([void 0],u,!1)))},{cache:Wt(e.pluralRules),strategy:_t.variadic});return{getDateTimeFormat:i,getNumberFormat:a,getMessageFormat:xt(function(o,u,c,d){return new qu(o,u,c,te({formatters:{getNumberFormat:a,getDateTimeFormat:i,getPluralRules:s}},d||{}))},{cache:Wt(e.message),strategy:_t.variadic}),getRelativeTimeFormat:xt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(t.bind.apply(t,St([void 0],o,!1)))},{cache:Wt(e.relativeTime),strategy:_t.variadic}),getPluralRules:s,getListFormat:xt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(n.bind.apply(n,St([void 0],o,!1)))},{cache:Wt(e.list),strategy:_t.variadic}),getDisplayNames:xt(function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return new(r.bind.apply(r,St([void 0],o,!1)))},{cache:Wt(e.displayNames),strategy:_t.variadic})}}function va(e,t,n,r){var i=e&&e[t],a;if(i&&(a=i[n]),a)return a;r(new gh("No ".concat(t," format named: ").concat(n)))}function cr(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=te({timeZone:t},e[r]),n},{})}function Ms(e,t){var n=Object.keys(te(te({},e),t));return n.reduce(function(r,i){return r[i]=te(te({},e[i]||{}),t[i]||{}),r},{})}function Bs(e,t){if(!t)return e;var n=qu.formats;return te(te(te({},n),e),{date:Ms(cr(n.date,t),cr(e.date||{},t)),time:Ms(cr(n.time,t),cr(e.time||{},t))})}var Ji=function(e,t,n,r,i){var a=e.locale,s=e.formats,o=e.messages,u=e.defaultLocale,c=e.defaultFormats,d=e.fallbackOnEmptyString,f=e.onError,p=e.timeZone,h=e.defaultRichTextElements;n===void 0&&(n={id:""});var b=n.id,x=n.defaultMessage;vu(!!b,"[@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 w=String(b),C=o&&Object.prototype.hasOwnProperty.call(o,w)&&o[w];if(Array.isArray(C)&&C.length===1&&C[0].type===Oe.literal)return C[0].value;if(!r&&C&&typeof C=="string"&&!h)return C.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=te(te({},h),r||{}),s=Bs(s,p),c=Bs(c,p),!C){if(d===!1&&C==="")return C;if((!x||a&&a.toLowerCase()!==u.toLowerCase())&&f(new Eh(n,a)),x)try{var k=t.getMessageFormat(x,u,c,i);return k.format(r)}catch(I){return f(new hi('Error formatting default message for: "'.concat(w,'", rendering default message verbatim'),a,n,I)),typeof x=="string"?x:w}return w}try{var k=t.getMessageFormat(C,a,s,te({formatters:t},i||{}));return k.format(r)}catch(I){f(new hi('Error formatting message: "'.concat(w,'", using ').concat(x?"default message":"id"," as fallback."),a,n,I))}if(x)try{var k=t.getMessageFormat(x,u,c,i);return k.format(r)}catch(I){f(new hi('Error formatting the default message for: "'.concat(w,'", rendering message verbatim'),a,n,I))}return typeof C=="string"?C:typeof x=="string"?x:w},Xu=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Hr(e,t,n,r){var i=e.locale,a=e.formats,s=e.onError,o=e.timeZone;r===void 0&&(r={});var u=r.format,c=te(te({},o&&{timeZone:o}),u&&va(a,t,u,s)),d=sn(r,Xu,c);return t==="time"&&!d.hour&&!d.minute&&!d.second&&!d.timeStyle&&!d.dateStyle&&(d=te(te({},d),{hour:"numeric",minute:"numeric"})),n(i,d)}function _h(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"date",t,s).format(o)}catch(u){e.onError(new pt("Error formatting date.",e.locale,u))}return String(o)}function Sh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"time",t,s).format(o)}catch(u){e.onError(new pt("Error formatting time.",e.locale,u))}return String(o)}function Ch(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=n[2],o=s===void 0?{}:s,u=e.timeZone,c=e.locale,d=e.onError,f=sn(o,Xu,u?{timeZone:u}:{});try{return t(c,f).formatRange(i,a)}catch(p){d(new pt("Error formatting date time range.",e.locale,p))}return String(i)}function Ah(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"date",t,s).formatToParts(o)}catch(u){e.onError(new pt("Error formatting date.",e.locale,u))}return[]}function wh(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],a=n[1],s=a===void 0?{}:a,o=typeof i=="string"?new Date(i||0):i;try{return Hr(e,"time",t,s).formatToParts(o)}catch(u){e.onError(new pt("Error formatting time.",e.locale,u))}return[]}var Ih=["style","type","fallback","languageDisplay"];function vh(e,t,n,r){var i=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new Gt(`Intl.DisplayNames is not available in this environment.
38
38
  Try polyfilling it using "@formatjs/intl-displaynames"
39
- `,St.MISSING_INTL_API));var o=an(r,yh);try{return t(i,o).of(n)}catch(u){a(new dt("Error formatting display name.",i,u))}}var _h=["type","style"],Ds=Date.now();function Sh(e){return"".concat(Ds,"_").concat(e,"_").concat(Ds)}function Ch(e,t,n,r){r===void 0&&(r={});var i=qu(e,t,n,r).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return i.length===1?i[0]:i.length===0?"":i}function qu(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||a(new $t(`Intl.ListFormat is not available in this environment.
39
+ `,At.MISSING_INTL_API));var o=sn(r,Ih);try{return t(i,o).of(n)}catch(u){a(new pt("Error formatting display name.",i,u))}}var kh=["type","style"],Fs=Date.now();function Nh(e){return"".concat(Fs,"_").concat(e,"_").concat(Fs)}function Rh(e,t,n,r){r===void 0&&(r={});var i=Qu(e,t,n,r).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return i.length===1?i[0]:i.length===0?"":i}function Qu(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||a(new Gt(`Intl.ListFormat is not available in this environment.
40
40
  Try polyfilling it using "@formatjs/intl-listformat"
41
- `,St.MISSING_INTL_API));var o=an(r,_h);try{var u={},c=n.map(function(d,f){if(typeof d=="object"){var p=Sh(f);return u[p]=d,p}return String(d)});return t(i,o).formatToParts(c).map(function(d){return d.type==="literal"?d:te(te({},d),{value:u[d.value]||d.value})})}catch(d){a(new dt("Error formatting list.",i,d))}return n}var Ah=["type"];function wh(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={}),Intl.PluralRules||a(new $t(`Intl.PluralRules is not available in this environment.
41
+ `,At.MISSING_INTL_API));var o=sn(r,kh);try{var u={},c=n.map(function(d,f){if(typeof d=="object"){var p=Nh(f);return u[p]=d,p}return String(d)});return t(i,o).formatToParts(c).map(function(d){return d.type==="literal"?d:te(te({},d),{value:u[d.value]||d.value})})}catch(d){a(new pt("Error formatting list.",i,d))}return n}var Oh=["type"];function Lh(e,t,n,r){var i=e.locale,a=e.onError;r===void 0&&(r={}),Intl.PluralRules||a(new Gt(`Intl.PluralRules is not available in this environment.
42
42
  Try polyfilling it using "@formatjs/intl-pluralrules"
43
- `,St.MISSING_INTL_API));var s=an(r,Ah);try{return t(i,s).select(n)}catch(o){a(new dt("Error formatting plural.",i,o))}return"other"}var Ih=["numeric","style"];function vh(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=!!s&&wa(i,"relative",s,a)||{},u=an(n,Ih,o);return t(r,u)}function kh(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||e.onError(new $t(`Intl.RelativeTimeFormat is not available in this environment.
43
+ `,At.MISSING_INTL_API));var s=sn(r,Oh);try{return t(i,s).select(n)}catch(o){a(new pt("Error formatting plural.",i,o))}return"other"}var Dh=["numeric","style"];function Ph(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=!!s&&va(i,"relative",s,a)||{},u=sn(n,Dh,o);return t(r,u)}function Mh(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||e.onError(new Gt(`Intl.RelativeTimeFormat is not available in this environment.
44
44
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
45
- `,St.MISSING_INTL_API));try{return vh(e,t,i).format(n,r)}catch(s){e.onError(new dt("Error formatting relative time.",e.locale,s))}return String(n)}var Nh=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function Vu(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=s&&wa(i,"number",s,a)||{},u=an(n,Nh,o);return t(r,u)}function Rh(e,t,n,r){r===void 0&&(r={});try{return Vu(e,t,r).format(n)}catch(i){e.onError(new dt("Error formatting number.",e.locale,i))}return String(n)}function Oh(e,t,n,r){r===void 0&&(r={});try{return Vu(e,t,r).formatToParts(n)}catch(i){e.onError(new dt("Error formatting number.",e.locale,i))}return[]}function Lh(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function Dh(e){e.onWarn&&e.defaultRichTextElements&&Lh(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
45
+ `,At.MISSING_INTL_API));try{return Ph(e,t,i).format(n,r)}catch(s){e.onError(new pt("Error formatting relative time.",e.locale,s))}return String(n)}var Bh=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function Ku(e,t,n){var r=e.locale,i=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=s&&va(i,"number",s,a)||{},u=sn(n,Bh,o);return t(r,u)}function Fh(e,t,n,r){r===void 0&&(r={});try{return Ku(e,t,r).format(n)}catch(i){e.onError(new pt("Error formatting number.",e.locale,i))}return String(n)}function Hh(e,t,n,r){r===void 0&&(r={});try{return Ku(e,t,r).formatToParts(n)}catch(i){e.onError(new pt("Error formatting number.",e.locale,i))}return[]}function Uh(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function jh(e){e.onWarn&&e.defaultRichTextElements&&Uh(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
46
46
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
47
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Ph(e,t){var n=ph(t),r=te(te({},$u),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Rs('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Rs('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new ch('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),Dh(r),te(te({},r),{formatters:n,formatNumber:Rh.bind(null,r,n.getNumberFormat),formatNumberToParts:Oh.bind(null,r,n.getNumberFormat),formatRelativeTime:kh.bind(null,r,n.getRelativeTimeFormat),formatDate:mh.bind(null,r,n.getDateTimeFormat),formatDateToParts:Eh.bind(null,r,n.getDateTimeFormat),formatTime:gh.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:bh.bind(null,r,n.getDateTimeFormat),formatTimeToParts:Th.bind(null,r,n.getDateTimeFormat),formatPlural:wh.bind(null,r,n.getPluralRules),formatMessage:Ki.bind(null,r,n),$t:Ki.bind(null,r,n),formatList:Ch.bind(null,r,n.getListFormat),formatListToParts:qu.bind(null,r,n.getListFormat),formatDisplayName:xh.bind(null,r,n.getDisplayNames)})}function Wu(e){Cu(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Xu=te(te({},$u),{textComponent:Ye.Fragment});function Mh(e){return function(t){return e(Ye.Children.toArray(t))}}function Bh(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var a=0;a<i;a++){var s=n[a];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var Ia=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Ye.createContext(null)):Ye.createContext(null);Ia.Consumer;var Fh=Ia.Provider,Hh=Fh,Uh=Ia;function sn(){var e=Ye.useContext(Uh);return Wu(e),e}var Ji;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Ji||(Ji={}));var Zi;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Zi||(Zi={}));function Qu(e){var t=function(n){var r=sn(),i=n.value,a=n.children,s=Br(n,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?r.formatDateToParts(o,s):r.formatTimeToParts(o,s);return a(u)};return t.displayName=Zi[e],t}function Kn(e){var t=function(n){var r=sn(),i=n.value,a=n.children,s=Br(n,["value","children"]),o=r[e](i,s);if(typeof a=="function")return a(o);var u=r.textComponent||Ye.Fragment;return Ye.createElement(u,null,o)};return t.displayName=Ji[e],t}function Ku(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=ju(r)?Mh(r):r,t},{})}var Ps=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=Ku(r),o=Ki.apply(void 0,yt([e,t,n,s],i,!1));return Array.isArray(o)?Ye.Children.toArray(o):o},Ms=function(e,t){var n=e.defaultRichTextElements,r=Br(e,["defaultRichTextElements"]),i=Ku(n),a=Ph(te(te(te({},Xu),r),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return te(te({},a),{formatMessage:Ps.bind(null,s,a.formatters),$t:Ps.bind(null,s,a.formatters)})};function hi(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 jh=(function(e){ct(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Yu(),n.state={cache:n.cache,intl:Ms(hi(n.props),n.cache),prevConfig:hi(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=hi(n);return Bh(i,s)?null:{intl:Ms(s,a),prevConfig:s}},t.prototype.render=function(){return Wu(this.state.intl),Ye.createElement(Hh,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Xu,t})(Ye.PureComponent);Kn("formatDate");Kn("formatTime");Kn("formatNumber");Kn("formatList");Kn("formatDisplayName");Qu("formatDate");Qu("formatTime");const Ju=()=>{const e=sn(),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"}),i=e.formatMessage({defaultMessage:"Customer support",id:"chatbot.chatline.label.customerSupport"}),a=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),s=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),o=e.formatMessage({defaultMessage:"Oups ! The discussion is full. Please start a new one.",id:"chatbot.error.api.409"}),u=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),c=e.formatMessage({defaultMessage:"You have an archived discussion.",id:"chatbot.infobanner.cta"}),d=e.formatMessage({defaultMessage:"Transferring your request to customer support...",id:"chatbot.customerSupport.connecting"}),f=e.formatMessage({defaultMessage:"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.",id:"chatbot.customerSupport.connected"}),p=e.formatMessage({defaultMessage:"Customer support is not available right now. Please try again later.",id:"chatbot.customerSupport.connectionError"}),h=e.formatMessage({defaultMessage:"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.",id:"chatbot.customerSupport.providerUnavailable"}),b=e.formatMessage({defaultMessage:"Your customer support conversation is now complete. Start a new conversation whenever you need more help.",id:"chatbot.customerSupport.closed"}),y=e.formatMessage({defaultMessage:"Restart",id:"chatbot.customerSupport.restart"}),w=e.formatMessage({defaultMessage:"Leave your contact details",id:"chatbot.customerSupport.fallback.title"}),S=e.formatMessage({defaultMessage:"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.",id:"chatbot.customerSupport.fallback.description"}),v=e.formatMessage({defaultMessage:"Email",id:"chatbot.customerSupport.fallback.email"}),k=e.formatMessage({defaultMessage:"Phone",id:"chatbot.customerSupport.fallback.phone"}),L=e.formatMessage({defaultMessage:"Send",id:"chatbot.customerSupport.fallback.submit"}),A=e.formatMessage({defaultMessage:"Sending...",id:"chatbot.customerSupport.fallback.submitting"}),N=e.formatMessage({defaultMessage:"Your contact details have been saved. Customer support will contact you soon.",id:"chatbot.customerSupport.fallback.success"}),Y=e.formatMessage({defaultMessage:"We could not save your contact details. Please try again.",id:"chatbot.customerSupport.fallback.error"}),X=e.formatMessage({defaultMessage:"Customer support is currently closed",id:"chatbot.customerSupport.closedHours.title"}),ne=e.formatMessage({defaultMessage:"Leave your email, phone number and request. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.description"}),I=e.formatMessage({defaultMessage:"Today:",id:"chatbot.customerSupport.closedHours.schedulePrefix"}),U=e.formatMessage({defaultMessage:"Reason for your request",id:"chatbot.customerSupport.closedHours.reason"}),z=e.formatMessage({defaultMessage:"Your request has been saved. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.success"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,chatlineLabelCustomerSupportTranslation:i,tooManyRequestsTranslation:a,genericErrorTranslation:s,discussionFullErrorTranslation:o,infoBannerTitleTranslation:u,infoBannerExplainationTranslation:c,customerSupportConnectingTranslation:d,customerSupportConnectedTranslation:f,customerSupportConnectionErrorTranslation:p,customerSupportProviderUnavailableTranslation:h,customerSupportClosedTranslation:b,customerSupportRestartTranslation:y,customerSupportFallbackTitleTranslation:w,customerSupportFallbackDescriptionTranslation:S,customerSupportFallbackEmailTranslation:v,customerSupportFallbackPhoneTranslation:k,customerSupportFallbackSubmitTranslation:L,customerSupportFallbackSubmittingTranslation:A,customerSupportFallbackSuccessTranslation:N,customerSupportFallbackErrorTranslation:Y,customerSupportClosedHoursTitleTranslation:X,customerSupportClosedHoursDescriptionTranslation:ne,customerSupportClosedHoursSchedulePrefixTranslation:I,customerSupportClosedHoursReasonTranslation:U,customerSupportClosedHoursSuccessTranslation:z}};function Bs(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function Zu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const zh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$h=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yh={};function Fs(e,t){return(Yh.jsx?$h:zh).test(e)}const Gh=/[ \t\n\f\r]/g;function qh(e){return typeof e=="object"?e.type==="text"?Hs(e.value):!1:Hs(e)}function Hs(e){return e.replace(Gh,"")===""}class Jn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Jn.prototype.property={};Jn.prototype.normal={};Jn.prototype.space=null;function el(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Jn(n,r,t)}function Vn(e){return e.toLowerCase()}class ft{constructor(t,n){this.property=t,this.attribute=n}}ft.prototype.space=null;ft.prototype.boolean=!1;ft.prototype.booleanish=!1;ft.prototype.overloadedBoolean=!1;ft.prototype.number=!1;ft.prototype.commaSeparated=!1;ft.prototype.spaceSeparated=!1;ft.prototype.commaOrSpaceSeparated=!1;ft.prototype.mustUseProperty=!1;ft.prototype.defined=!1;let Vh=0;const me=on(),Ue=on(),tl=on(),j=on(),Re=on(),bn=on(),rt=on();function on(){return 2**++Vh}const ea=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:Ue,commaOrSpaceSeparated:rt,commaSeparated:bn,number:j,overloadedBoolean:tl,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),pi=Object.keys(ea);class va extends ft{constructor(t,n,r,i){let a=-1;if(super(t,n),Us(this,"space",i),typeof r=="number")for(;++a<pi.length;){const s=pi[a];Us(this,pi[a],(r&ea[s])===ea[s])}}}va.prototype.defined=!0;function Us(e,t,n){n&&(e[t]=n)}const Wh={}.hasOwnProperty;function Cn(e){const t={},n={};let r;for(r in e.properties)if(Wh.call(e.properties,r)){const i=e.properties[r],a=new va(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Vn(r)]=r,n[Vn(a.attribute)]=r}return new Jn(t,n,e.space)}const nl=Cn({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}}),rl=Cn({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function il(e,t){return t in e?e[t]:t}function al(e,t){return il(e,t.toLowerCase())}const sl=Cn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:al,properties:{xmlns:null,xmlnsXLink:null}}),ol=Cn({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Re,ariaCurrent:null,ariaDescribedBy:Re,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Re,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Re,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Re,ariaLevel:j,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Re,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Re,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Ue,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null}}),Xh=Cn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:al,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bn,acceptCharset:Re,accessKey:Re,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:Re,autoFocus:me,autoPlay:me,blocking:Re,capture:null,charSet:null,checked:me,cite:null,className:Re,cols:j,colSpan:null,content:null,contentEditable:Ue,controls:me,controlsList:Re,coords:j|bn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:tl,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:Re,height:j,hidden:me,high:j,href:null,hrefLang:null,htmlFor:Re,httpEquiv:Re,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:Re,itemRef:Re,itemScope:me,itemType:Re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,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:me,optimum:j,pattern:null,ping:Re,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:Re,required:me,reversed:me,rows:j,rowSpan:j,sandbox:Re,scope:null,scoped:me,seamless:me,selected:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:Ue,width:j,wrap:null,align:null,aLink:null,archive:Re,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:j,security:null,unselectable:null}}),Qh=Cn({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:il,properties:{about:rt,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:Re,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:bn,g2:bn,glyphName:bn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rt,rev:rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rt,requiredFeatures:rt,requiredFonts:rt,requiredFormats:rt,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rt,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Kh=/^data[-\w.:]+$/i,js=/-[a-z]/g,Jh=/[A-Z]/g;function Hr(e,t){const n=Vn(t);let r=t,i=ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Kh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(js,e0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!js.test(a)){let s=a.replace(Jh,Zh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=va}return new i(r,t)}function Zh(e){return"-"+e.toLowerCase()}function e0(e){return e.charAt(1).toUpperCase()}const t0={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"},Zn=el([rl,nl,sl,ol,Xh],"html"),Yt=el([rl,nl,sl,ol,Qh],"svg");function zs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ul(e){return e.join(" ").trim()}var cn={},mi,$s;function n0(){if($s)return mi;$s=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
48
- `,c="/",d="*",f="",p="comment",h="declaration";mi=function(y,w){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];w=w||{};var S=1,v=1;function k(B){var $=B.match(t);$&&(S+=$.length);var K=B.lastIndexOf(u);v=~K?B.length-K:v+B.length}function L(){var B={line:S,column:v};return function($){return $.position=new A(B),X(),$}}function A(B){this.start=B,this.end={line:S,column:v},this.source=w.source}A.prototype.content=y;function N(B){var $=new Error(w.source+":"+S+":"+v+": "+B);if($.reason=B,$.filename=w.source,$.line=S,$.column=v,$.source=y,!w.silent)throw $}function Y(B){var $=B.exec(y);if($){var K=$[0];return k(K),y=y.slice(K.length),$}}function X(){Y(n)}function ne(B){var $;for(B=B||[];$=I();)$!==!1&&B.push($);return B}function I(){var B=L();if(!(c!=y.charAt(0)||d!=y.charAt(1))){for(var $=2;f!=y.charAt($)&&(d!=y.charAt($)||c!=y.charAt($+1));)++$;if($+=2,f===y.charAt($-1))return N("End of comment missing");var K=y.slice(2,$-2);return v+=2,k(K),y=y.slice($),v+=2,B({type:p,comment:K})}}function U(){var B=L(),$=Y(r);if($){if(I(),!Y(i))return N("property missing ':'");var K=Y(a),he=B({type:h,property:b($[0].replace(e,f)),value:K?b(K[0].replace(e,f)):f});return Y(s),he}}function z(){var B=[];ne(B);for(var $;$=U();)$!==!1&&(B.push($),ne(B));return B}return X(),z()};function b(y){return y?y.replace(o,f):f}return mi}var Ys;function r0(){if(Ys)return cn;Ys=1;var e=cn&&cn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cn,"__esModule",{value:!0});var t=e(n0());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,d=u.value;o?i(c,d,u):d&&(a=a||{},a[c]=d)}}),a}return cn.default=n,cn}var i0=r0();const Gs=xa(i0),a0=Gs.default||Gs,Ur=ll("end"),At=ll("start");function ll(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 s0(e){const t=At(e),n=Ur(e);if(t&&n)return{start:t,end:n}}function Hn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?qs(e.position):"start"in e||"end"in e?qs(e):"line"in e||"column"in e?ta(e):""}function ta(e){return Vs(e&&e.line)+":"+Vs(e&&e.column)}function qs(e){return ta(e&&e.start)+"-"+ta(e&&e.end)}function Vs(e){return e&&typeof e=="number"?e:1}class Xe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=Hn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Xe.prototype.file="";Xe.prototype.name="";Xe.prototype.reason="";Xe.prototype.message="";Xe.prototype.stack="";Xe.prototype.column=void 0;Xe.prototype.line=void 0;Xe.prototype.ancestors=void 0;Xe.prototype.cause=void 0;Xe.prototype.fatal=void 0;Xe.prototype.place=void 0;Xe.prototype.ruleId=void 0;Xe.prototype.source=void 0;const ka={}.hasOwnProperty,o0=new Map,u0=/[A-Z]/g,l0=/-([a-z])/g,c0=new Set(["table","tbody","thead","tfoot","tr"]),d0=new Set(["td","th"]),cl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function f0(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=y0(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=T0(n,t.jsx,t.jsxs)}const i={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"?Yt:Zn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=dl(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function dl(e,t,n){if(t.type==="element")return h0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return p0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return g0(e,t,n);if(t.type==="mdxjsEsm")return m0(e,t);if(t.type==="root")return b0(e,t,n);if(t.type==="text")return E0(e,t)}function h0(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Yt,e.schema=i),e.ancestors.push(t);const a=hl(e,t.tagName,!1),s=x0(e,t);let o=Ra(e,t);return c0.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!qh(u):!0})),fl(e,s,a,t),Na(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function p0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Wn(e,t.position)}function m0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wn(e,t.position)}function g0(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Yt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:hl(e,t.name,!0),s=_0(e,t),o=Ra(e,t);return fl(e,s,a,t),Na(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function b0(e,t,n){const r={};return Na(r,Ra(e,t)),e.create(t,e.Fragment,r,n)}function E0(e,t){return t.value}function fl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Na(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function T0(e,t,n){return r;function r(i,a,s,o){const c=Array.isArray(s.children)?n:t;return o?c(a,s,o):c(a,s)}}function y0(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=At(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function x0(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ka.call(t.properties,i)){const a=S0(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&d0.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Wn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Wn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Ra(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:o0;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const o=dl(e,a,s);o!==void 0&&n.push(o)}return n}function S0(e,t,n){const r=Hr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Zu(n):ul(n)),r.property==="style"){let i=typeof n=="object"?n:C0(e,String(n));return e.stylePropertyNameCase==="css"&&(i=A0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?t0[r.property]||r.property:r.attribute,n]}}function C0(e,t){const n={};try{a0(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new Xe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=cl+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(l0,I0)),n[s]=a}}function hl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=Fs(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=Fs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ka.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wn(e)}function Wn(e,t){const n=new Xe("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=cl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function A0(e){const t={};let n;for(n in e)ka.call(e,n)&&(t[w0(n)]=e[n]);return t}function w0(e){let t=e.replace(u0,v0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function I0(e,t){return t.toUpperCase()}function v0(e){return"-"+e.toLowerCase()}const gi={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"]},k0={};function Oa(e,t){const n=k0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pl(e,r,i)}function pl(e,t,n){if(N0(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 Ws(e.children,t,n)}return Array.isArray(e)?Ws(e,t,n):""}function Ws(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=pl(e[i],t,n);return r.join("")}function N0(e){return!!(e&&typeof e=="object")}const Xs=document.createElement("i");function La(e){const t="&"+e+";";Xs.innerHTML=t;const n=Xs.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function it(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function st(e,t){return e.length>0?(it(e,e.length,0,t),e):t}const Qs={}.hasOwnProperty;function ml(e){const t={};let n=-1;for(;++n<e.length;)R0(t,e[n]);return t}function R0(e,t){let n;for(n in t){const i=(Qs.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Qs.call(i,s)||(i[s]=[]);const o=a[s];O0(i[s],Array.isArray(o)?o:o?[o]:[])}}}function O0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);it(e,0,0,r)}function gl(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function mt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ze=Gt(/[A-Za-z]/),We=Gt(/[\dA-Za-z]/),L0=Gt(/[#-'*+\--9=?A-Z^-~]/);function _r(e){return e!==null&&(e<32||e===127)}const na=Gt(/\d/),D0=Gt(/[\dA-Fa-f]/),P0=Gt(/[!-/:-@[-`{-~]/);function se(e){return e!==null&&e<-2}function ve(e){return e!==null&&(e<0||e===32)}function Ee(e){return e===-2||e===-1||e===32}const jr=Gt(new RegExp("\\p{P}|\\p{S}","u")),en=Gt(/\s/);function Gt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function An(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&We(e.charCodeAt(n+1))&&We(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return Ee(u)?(e.enter(n),o(u)):t(u)}function o(u){return Ee(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const M0={tokenize:B0};function B0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return se(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const F0={tokenize:H0},Ks={tokenize:U0};function H0(e){const t=this,n=[];let r=0,i,a,s;return o;function o(k){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,u,c)(k)}return c(k)}function u(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const L=t.events.length;let A=L,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){N=t.events[A][1].end;break}S(r);let Y=L;for(;Y<t.events.length;)t.events[Y][1].end=Object.assign({},N),Y++;return it(t.events,A+1,0,t.events.slice(L)),t.events.length=Y,c(k)}return o(k)}function c(k){if(r===n.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ks,d,f)(k)}function d(k){return i&&v(),S(r),p(k)}function f(k){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(k)}function p(k){return t.containerState={},e.attempt(Ks,h,b)(k)}function h(k){return r++,n.push([t.currentConstruct,t.containerState]),p(k)}function b(k){if(k===null){i&&v(),S(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),y(k)}function y(k){if(k===null){w(e.exit("chunkFlow"),!0),S(0),e.consume(k);return}return se(k)?(e.consume(k),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(k),y)}function w(k,L){const A=t.sliceStream(k);if(L&&A.push(null),k.previous=a,a&&(a.next=k),a=k,i.defineSkip(k.start),i.write(A),t.parser.lazy[k.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<s&&(!i.events[N][1].end||i.events[N][1].end.offset>s))return;const Y=t.events.length;let X=Y,ne,I;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){if(ne){I=t.events[X][1].end;break}ne=!0}for(S(r),N=Y;N<t.events.length;)t.events[N][1].end=Object.assign({},I),N++;it(t.events,X+1,0,t.events.slice(Y)),t.events.length=N}}function S(k){let L=n.length;for(;L-- >k;){const A=n[L];t.containerState=A[1],A[0].exit.call(t,e)}n.length=k}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function U0(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Sr(e){if(e===null||ve(e)||en(e))return 1;if(jr(e))return 2}function zr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ra={name:"attention",tokenize:z0,resolveAll:j0};function j0(e,t){let n=-1,r,i,a,s,o,u,c,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;u=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),p=Object.assign({},e[n][1].start);Js(f,-u),Js(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=st(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=st(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=st(c,zr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=st(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=st(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,it(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function z0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Sr(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const c=e.exit("attentionSequence"),d=Sr(u),f=!d||d===2&&i||n.includes(u),p=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?f:f&&(i||!p)),c._close=!!(a===42?p:p&&(d||!f)),t(u)}}function Js(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $0={name:"autolink",tokenize:Y0};function Y0(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Ze(h)?(e.consume(h),s):c(h)}function s(h){return h===43||h===45||h===46||We(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||We(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||_r(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),d):L0(h)?(e.consume(h),c):n(h)}function d(h){return We(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||We(h))&&r++<63){const b=h===45?p:f;return e.consume(h),b}return n(h)}}const er={tokenize:G0,partial:!0};function G0(e,t,n){return r;function r(a){return Ee(a)?xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||se(a)?t(a):n(a)}}const bl={name:"blockQuote",tokenize:q0,continuation:{tokenize:V0},exit:W0};function q0(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return Ee(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function V0(e,t,n){const r=this;return i;function i(s){return Ee(s)?xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(bl,t,n)(s)}}function W0(e){e.exit("blockQuote")}const El={name:"characterEscape",tokenize:X0};function X0(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return P0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Tl={name:"characterReference",tokenize:Q0};function Q0(e,t,n){const r=this;let i=0,a,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=We,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=D0,d):(e.enter("characterReferenceValue"),a=7,s=na,d(f))}function d(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===We&&!La(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const Zs={tokenize:J0,partial:!0},eo={name:"codeFenced",tokenize:K0,concrete:!0};function K0(e,t,n){const r=this,i={tokenize:A,partial:!0};let a=0,s=0,o;return u;function u(N){return c(N)}function c(N){const Y=r.events[r.events.length-1];return a=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===o?(s++,e.consume(N),d):s<3?n(N):(e.exit("codeFencedFenceSequence"),Ee(N)?xe(e,f,"whitespace")(N):f(N))}function f(N){return N===null||se(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Zs,y,L)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||se(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(N)):Ee(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,h,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),p)}function h(N){return N===null||se(N)?f(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===null||se(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(N)):N===96&&N===o?n(N):(e.consume(N),b)}function y(N){return e.attempt(i,L,w)(N)}function w(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),S}function S(N){return a>0&&Ee(N)?xe(e,v,"linePrefix",a+1)(N):v(N)}function v(N){return N===null||se(N)?e.check(Zs,y,L)(N):(e.enter("codeFlowValue"),k(N))}function k(N){return N===null||se(N)?(e.exit("codeFlowValue"),v(N)):(e.consume(N),k)}function L(N){return e.exit("codeFenced"),t(N)}function A(N,Y,X){let ne=0;return I;function I(K){return N.enter("lineEnding"),N.consume(K),N.exit("lineEnding"),U}function U(K){return N.enter("codeFencedFence"),Ee(K)?xe(N,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):z(K)}function z(K){return K===o?(N.enter("codeFencedFenceSequence"),B(K)):X(K)}function B(K){return K===o?(ne++,N.consume(K),B):ne>=s?(N.exit("codeFencedFenceSequence"),Ee(K)?xe(N,$,"whitespace")(K):$(K)):X(K)}function $(K){return K===null||se(K)?(N.exit("codeFencedFence"),Y(K)):X(K)}}}function J0(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const bi={name:"codeIndented",tokenize:ep},Z0={tokenize:tp,partial:!0};function ep(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),xe(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):se(c)?e.attempt(Z0,s,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||se(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function tp(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):se(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):xe(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):se(s)?i(s):n(s)}}const np={name:"codeText",tokenize:ap,resolve:rp,previous:ip};function rp(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ip(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ap(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):se(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||se(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}function yl(e){const t={};let n=-1,r,i,a,s,o,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,sp(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=e[a],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},e[i][1].start),o=e.slice(i,n),o.unshift(r),it(e,i,n-i+1,o))}}return!c}function sp(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),o=s.events,u=[],c={};let d,f,p=-1,h=n,b=0,y=0;const w=[y];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(y=p+1,w.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const S=o.slice(w[p],w[p+1]),v=a.pop();u.unshift([v,v+S.length-1]),it(e,v,2,S)}for(p=-1;++p<u.length;)c[b+u[p][0]]=b+u[p][1],b+=u[p][1]-u[p][0]-1;return c}const op={tokenize:cp,resolve:lp},up={tokenize:dp,partial:!0};function lp(e){return yl(e),e}function cp(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):se(o)?e.check(up,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function dp(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),xe(e,a,"linePrefix")}function a(s){if(s===null||se(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function xl(e,t,n,r,i,a,s,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(S){return S===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(S),e.exit(a),p):S===null||S===32||S===41||_r(S)?n(S):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(S))}function p(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===62?(e.exit("chunkString"),e.exit(o),p(S)):S===null||S===60||se(S)?n(S):(e.consume(S),S===92?b:h)}function b(S){return S===60||S===62||S===92?(e.consume(S),h):h(S)}function y(S){return!d&&(S===null||S===41||ve(S))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(S)):d<c&&S===40?(e.consume(S),d++,y):S===41?(e.consume(S),d--,y):S===null||S===32||S===40||_r(S)?n(S):(e.consume(S),S===92?w:y)}function w(S){return S===40||S===41||S===92?(e.consume(S),y):y(S)}}function _l(e,t,n,r,i,a){const s=this;let o=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):se(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||se(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),u||(u=!Ee(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function Sl(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===s?(e.exit(a),u(s)):p===null?n(p):se(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),xe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||se(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:d)}function f(p){return p===s||p===92?(e.consume(p),d):d(p)}}function Un(e,t){let n;return r;function r(i){return se(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ee(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const fp={name:"definition",tokenize:pp},hp={tokenize:mp,partial:!0};function pp(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return _l.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return ve(h)?Un(e,c)(h):c(h)}function c(h){return xl(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(hp,f,f)(h)}function f(h){return Ee(h)?xe(e,p,"whitespace")(h):p(h)}function p(h){return h===null||se(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function mp(e,t,n){return r;function r(o){return ve(o)?Un(e,i)(o):n(o)}function i(o){return Sl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return Ee(o)?xe(e,s,"whitespace")(o):s(o)}function s(o){return o===null||se(o)?t(o):n(o)}}const gp={name:"hardBreakEscape",tokenize:bp};function bp(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return se(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Ep={name:"headingAtx",tokenize:yp,resolve:Tp};function Tp(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},it(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function yp(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||ve(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||se(d)?(e.exit("atxHeading"),t(d)):Ee(d)?xe(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||ve(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const xp=["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"],to=["pre","script","style","textarea"],_p={name:"htmlFlow",tokenize:wp,resolveTo:Ap,concrete:!0},Sp={tokenize:vp,partial:!0},Cp={tokenize:Ip,partial:!0};function Ap(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="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 wp(e,t,n){const r=this;let i,a,s,o,u;return c;function c(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),a=!0,y):T===63?(e.consume(T),i=3,r.interrupt?t:m):Ze(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function p(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,o=0,b):Ze(T)?(e.consume(T),i=4,r.interrupt?t:m):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:m):n(T)}function b(T){const W="CDATA[";return T===W.charCodeAt(o++)?(e.consume(T),o===W.length?r.interrupt?t:z:b):n(T)}function y(T){return Ze(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||ve(T)){const W=T===47,ce=s.toLowerCase();return!W&&!a&&to.includes(ce)?(i=1,r.interrupt?t(T):z(T)):xp.includes(s.toLowerCase())?(i=6,W?(e.consume(T),S):r.interrupt?t(T):z(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?v(T):k(T))}return T===45||We(T)?(e.consume(T),s+=String.fromCharCode(T),w):n(T)}function S(T){return T===62?(e.consume(T),r.interrupt?t:z):n(T)}function v(T){return Ee(T)?(e.consume(T),v):I(T)}function k(T){return T===47?(e.consume(T),I):T===58||T===95||Ze(T)?(e.consume(T),L):Ee(T)?(e.consume(T),k):I(T)}function L(T){return T===45||T===46||T===58||T===95||We(T)?(e.consume(T),L):A(T)}function A(T){return T===61?(e.consume(T),N):Ee(T)?(e.consume(T),A):k(T)}function N(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),u=T,Y):Ee(T)?(e.consume(T),N):X(T)}function Y(T){return T===u?(e.consume(T),u=null,ne):T===null||se(T)?n(T):(e.consume(T),Y)}function X(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||ve(T)?A(T):(e.consume(T),X)}function ne(T){return T===47||T===62||Ee(T)?k(T):n(T)}function I(T){return T===62?(e.consume(T),U):n(T)}function U(T){return T===null||se(T)?z(T):Ee(T)?(e.consume(T),U):n(T)}function z(T){return T===45&&i===2?(e.consume(T),he):T===60&&i===1?(e.consume(T),pe):T===62&&i===4?(e.consume(T),G):T===63&&i===3?(e.consume(T),m):T===93&&i===5?(e.consume(T),Le):se(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Sp,re,B)(T)):T===null||se(T)?(e.exit("htmlFlowData"),B(T)):(e.consume(T),z)}function B(T){return e.check(Cp,$,re)(T)}function $(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),K}function K(T){return T===null||se(T)?B(T):(e.enter("htmlFlowData"),z(T))}function he(T){return T===45?(e.consume(T),m):z(T)}function pe(T){return T===47?(e.consume(T),s="",Se):z(T)}function Se(T){if(T===62){const W=s.toLowerCase();return to.includes(W)?(e.consume(T),G):z(T)}return Ze(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),Se):z(T)}function Le(T){return T===93?(e.consume(T),m):z(T)}function m(T){return T===62?(e.consume(T),G):T===45&&i===2?(e.consume(T),m):z(T)}function G(T){return T===null||se(T)?(e.exit("htmlFlowData"),re(T)):(e.consume(T),G)}function re(T){return e.exit("htmlFlow"),t(T)}}function Ip(e,t,n){const r=this;return i;function i(s){return se(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function vp(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(er,t,n)}}const kp={name:"htmlText",tokenize:Np};function Np(e,t,n){const r=this;let i,a,s;return o;function o(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),A):m===63?(e.consume(m),k):Ze(m)?(e.consume(m),X):n(m)}function c(m){return m===45?(e.consume(m),d):m===91?(e.consume(m),a=0,b):Ze(m)?(e.consume(m),v):n(m)}function d(m){return m===45?(e.consume(m),h):n(m)}function f(m){return m===null?n(m):m===45?(e.consume(m),p):se(m)?(s=f,pe(m)):(e.consume(m),f)}function p(m){return m===45?(e.consume(m),h):f(m)}function h(m){return m===62?he(m):m===45?p(m):f(m)}function b(m){const G="CDATA[";return m===G.charCodeAt(a++)?(e.consume(m),a===G.length?y:b):n(m)}function y(m){return m===null?n(m):m===93?(e.consume(m),w):se(m)?(s=y,pe(m)):(e.consume(m),y)}function w(m){return m===93?(e.consume(m),S):y(m)}function S(m){return m===62?he(m):m===93?(e.consume(m),S):y(m)}function v(m){return m===null||m===62?he(m):se(m)?(s=v,pe(m)):(e.consume(m),v)}function k(m){return m===null?n(m):m===63?(e.consume(m),L):se(m)?(s=k,pe(m)):(e.consume(m),k)}function L(m){return m===62?he(m):k(m)}function A(m){return Ze(m)?(e.consume(m),N):n(m)}function N(m){return m===45||We(m)?(e.consume(m),N):Y(m)}function Y(m){return se(m)?(s=Y,pe(m)):Ee(m)?(e.consume(m),Y):he(m)}function X(m){return m===45||We(m)?(e.consume(m),X):m===47||m===62||ve(m)?ne(m):n(m)}function ne(m){return m===47?(e.consume(m),he):m===58||m===95||Ze(m)?(e.consume(m),I):se(m)?(s=ne,pe(m)):Ee(m)?(e.consume(m),ne):he(m)}function I(m){return m===45||m===46||m===58||m===95||We(m)?(e.consume(m),I):U(m)}function U(m){return m===61?(e.consume(m),z):se(m)?(s=U,pe(m)):Ee(m)?(e.consume(m),U):ne(m)}function z(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,B):se(m)?(s=z,pe(m)):Ee(m)?(e.consume(m),z):(e.consume(m),$)}function B(m){return m===i?(e.consume(m),i=void 0,K):m===null?n(m):se(m)?(s=B,pe(m)):(e.consume(m),B)}function $(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||ve(m)?ne(m):(e.consume(m),$)}function K(m){return m===47||m===62||ve(m)?ne(m):n(m)}function he(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function pe(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Se}function Se(m){return Ee(m)?xe(e,Le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):Le(m)}function Le(m){return e.enter("htmlTextData"),s(m)}}const Da={name:"labelEnd",tokenize:Mp,resolveTo:Pp,resolveAll:Dp},Rp={tokenize:Bp},Op={tokenize:Fp},Lp={tokenize:Hp};function Dp(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function Pp(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return o=[["enter",u,t],["enter",c,t]],o=st(o,e.slice(a+1,a+r+3)),o=st(o,[["enter",d,t]]),o=st(o,zr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=st(o,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),o=st(o,e.slice(s+1)),o=st(o,[["exit",u,t]]),it(e,a,e.length,o),e}function Mp(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?f(p):(s=r.parser.defined.includes(mt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(Rp,d,s?d:f)(p):p===91?e.attempt(Op,d,s?c:f)(p):s?d(p):f(p)}function c(p){return e.attempt(Lp,d,f)(p)}function d(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function Bp(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return ve(f)?Un(e,a)(f):a(f)}function a(f){return f===41?d(f):xl(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return ve(f)?Un(e,u)(f):d(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?Sl(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return ve(f)?Un(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Fp(e,t,n){const r=this;return i;function i(o){return _l.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function Hp(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Up={name:"labelStartImage",tokenize:jp,resolveAll:Da.resolveAll};function jp(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const zp={name:"labelStartLink",tokenize:$p,resolveAll:Da.resolveAll};function $p(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ei={name:"lineEnding",tokenize:Yp};function Yp(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const Tr={name:"thematicBreak",tokenize:Gp};function Gp(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||se(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),Ee(c)?xe(e,o,"whitespace")(c):o(c))}}const nt={name:"list",tokenize:Wp,continuation:{tokenize:Xp},exit:Kp},qp={tokenize:Jp,partial:!0},Vp={tokenize:Qp,partial:!0};function Wp(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const b=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:na(h)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Tr,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return na(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(er,r.interrupt?n:d,e.attempt(qp,p,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function f(h){return Ee(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Xp(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(er,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!Ee(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Vp,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(nt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Qp(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Kp(e){e.exit(this.containerState.type)}function Jp(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!Ee(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const no={name:"setextUnderline",tokenize:em,resolveTo:Zp};function Zp(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function em(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),Ee(c)?xe(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||se(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const tm={tokenize:nm};function nm(e){const t=this,n=e.attempt(er,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(op,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rm={resolveAll:Al()},im=Cl("string"),am=Cl("text");function Cl(e){return{tokenize:t,resolveAll:Al(e==="text"?sm:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return c(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Al(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function sm(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)u=!0,o++;else if(c!==-1){a++;break}}if(o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function om(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],o=[];const u={consume:v,enter:k,exit:L,attempt:Y(A),check:Y(N),interrupt:Y(N,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:p,now:b,defineSkip:y,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(U){return s=st(s,U),w(),s[s.length-1]!==null?[]:(X(t,0),c.events=zr(a,c.events,c),c.events)}function p(U,z){return lm(h(U),z)}function h(U){return um(s,U)}function b(){const{line:U,column:z,offset:B,_index:$,_bufferIndex:K}=r;return{line:U,column:z,offset:B,_index:$,_bufferIndex:K}}function y(U){i[U.line]=U.column,I()}function w(){let U;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<z.length;)S(z.charCodeAt(r._bufferIndex));else S(z)}}function S(U){d=d(U)}function v(U){se(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,I()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function k(U,z){const B=z||{};return B.type=U,B.start=b(),c.events.push(["enter",B,c]),o.push(B),B}function L(U){const z=o.pop();return z.end=b(),c.events.push(["exit",z,c]),z}function A(U,z){X(U,z.from)}function N(U,z){z.restore()}function Y(U,z){return B;function B($,K,he){let pe,Se,Le,m;return Array.isArray($)?re($):"tokenize"in $?re([$]):G($);function G(V){return oe;function oe(ae){const de=ae!==null&&V[ae],ie=ae!==null&&V.null,ke=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return re(ke)(ae)}}function re(V){return pe=V,Se=0,V.length===0?he:T(V[Se])}function T(V){return oe;function oe(ae){return m=ne(),Le=V,V.partial||(c.currentConstruct=V),V.name&&c.parser.constructs.disable.null.includes(V.name)?ce():V.tokenize.call(z?Object.assign(Object.create(c),z):c,u,W,ce)(ae)}}function W(V){return U(Le,m),K}function ce(V){return m.restore(),++Se<pe.length?T(pe[Se]):he}}}function X(U,z){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&it(c.events,z,c.events.length-z,U.resolve(c.events.slice(z),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function ne(){const U=b(),z=c.previous,B=c.currentConstruct,$=c.events.length,K=Array.from(o);return{restore:he,from:$};function he(){r=U,c.previous=z,c.currentConstruct=B,c.events.length=$,o=K,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function um(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function lm(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
47
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function zh(e,t){var n=xh(t),r=te(te({},Vu),e),i=r.locale,a=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Ps('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Ps('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new bh('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),jh(r),te(te({},r),{formatters:n,formatNumber:Fh.bind(null,r,n.getNumberFormat),formatNumberToParts:Hh.bind(null,r,n.getNumberFormat),formatRelativeTime:Mh.bind(null,r,n.getRelativeTimeFormat),formatDate:_h.bind(null,r,n.getDateTimeFormat),formatDateToParts:Ah.bind(null,r,n.getDateTimeFormat),formatTime:Sh.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Ch.bind(null,r,n.getDateTimeFormat),formatTimeToParts:wh.bind(null,r,n.getDateTimeFormat),formatPlural:Lh.bind(null,r,n.getPluralRules),formatMessage:Ji.bind(null,r,n),$t:Ji.bind(null,r,n),formatList:Rh.bind(null,r,n.getListFormat),formatListToParts:Qu.bind(null,r,n.getListFormat),formatDisplayName:vh.bind(null,r,n.getDisplayNames)})}function Ju(e){vu(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Zu=te(te({},Vu),{textComponent:Ye.Fragment});function $h(e){return function(t){return e(Ye.Children.toArray(t))}}function Yh(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var a=0;a<i;a++){var s=n[a];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var ka=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Ye.createContext(null)):Ye.createContext(null);ka.Consumer;var Gh=ka.Provider,qh=Gh,Vh=ka;function on(){var e=Ye.useContext(Vh);return Ju(e),e}var Zi;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Zi||(Zi={}));var ea;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(ea||(ea={}));function el(e){var t=function(n){var r=on(),i=n.value,a=n.children,s=Fr(n,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?r.formatDateToParts(o,s):r.formatTimeToParts(o,s);return a(u)};return t.displayName=ea[e],t}function Jn(e){var t=function(n){var r=on(),i=n.value,a=n.children,s=Fr(n,["value","children"]),o=r[e](i,s);if(typeof a=="function")return a(o);var u=r.textComponent||Ye.Fragment;return Ye.createElement(u,null,o)};return t.displayName=Zi[e],t}function tl(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=Gu(r)?$h(r):r,t},{})}var Hs=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=tl(r),o=Ji.apply(void 0,St([e,t,n,s],i,!1));return Array.isArray(o)?Ye.Children.toArray(o):o},Us=function(e,t){var n=e.defaultRichTextElements,r=Fr(e,["defaultRichTextElements"]),i=tl(n),a=zh(te(te(te({},Zu),r),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return te(te({},a),{formatMessage:Hs.bind(null,s,a.formatters),$t:Hs.bind(null,s,a.formatters)})};function pi(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 Wh=(function(e){ht(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Wu(),n.state={cache:n.cache,intl:Us(pi(n.props),n.cache),prevConfig:pi(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,a=r.cache,s=pi(n);return Yh(i,s)?null:{intl:Us(s,a),prevConfig:s}},t.prototype.render=function(){return Ju(this.state.intl),Ye.createElement(qh,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Zu,t})(Ye.PureComponent);Jn("formatDate");Jn("formatTime");Jn("formatNumber");Jn("formatList");Jn("formatDisplayName");el("formatDate");el("formatTime");const nl=()=>{const e=on(),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"}),i=e.formatMessage({defaultMessage:"Customer support",id:"chatbot.chatline.label.customerSupport"}),a=e.formatMessage({defaultMessage:"⏳ The chatbot is a little busy at the time. Please try again later.",id:"chatbot.error.api.429"}),s=e.formatMessage({defaultMessage:"Oops ! There has been an error. Please try again later.",id:"chatbot.error.api.500"}),o=e.formatMessage({defaultMessage:"Oups ! The discussion is full. Please start a new one.",id:"chatbot.error.api.409"}),u=e.formatMessage({defaultMessage:"See",id:"chatbot.infobanner.title"}),c=e.formatMessage({defaultMessage:"You have an archived discussion.",id:"chatbot.infobanner.cta"}),d=e.formatMessage({defaultMessage:"Transferring your request to customer support...",id:"chatbot.customerSupport.connecting"}),f=e.formatMessage({defaultMessage:"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.",id:"chatbot.customerSupport.connected"}),p=e.formatMessage({defaultMessage:"Customer support is not available right now. Please try again later.",id:"chatbot.customerSupport.connectionError"}),h=e.formatMessage({defaultMessage:"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.",id:"chatbot.customerSupport.providerUnavailable"}),b=e.formatMessage({defaultMessage:"Your customer support conversation is now complete. Start a new conversation whenever you need more help.",id:"chatbot.customerSupport.closed"}),x=e.formatMessage({defaultMessage:"Restart",id:"chatbot.customerSupport.restart"}),w=e.formatMessage({defaultMessage:"Leave your contact details",id:"chatbot.customerSupport.fallback.title"}),C=e.formatMessage({defaultMessage:"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.",id:"chatbot.customerSupport.fallback.description"}),k=e.formatMessage({defaultMessage:"Email",id:"chatbot.customerSupport.fallback.email"}),I=e.formatMessage({defaultMessage:"Phone",id:"chatbot.customerSupport.fallback.phone"}),L=e.formatMessage({defaultMessage:"Send",id:"chatbot.customerSupport.fallback.submit"}),A=e.formatMessage({defaultMessage:"Sending...",id:"chatbot.customerSupport.fallback.submitting"}),N=e.formatMessage({defaultMessage:"Your contact details have been saved. Customer support will contact you soon.",id:"chatbot.customerSupport.fallback.success"}),Y=e.formatMessage({defaultMessage:"We could not save your contact details. Please try again.",id:"chatbot.customerSupport.fallback.error"}),V=e.formatMessage({defaultMessage:"Customer support is currently closed",id:"chatbot.customerSupport.closedHours.title"}),re=e.formatMessage({defaultMessage:"Leave your email, phone number and request. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.description"}),v=e.formatMessage({defaultMessage:"Today:",id:"chatbot.customerSupport.closedHours.schedulePrefix"}),U=e.formatMessage({defaultMessage:"Reason for your request",id:"chatbot.customerSupport.closedHours.reason"}),z=e.formatMessage({defaultMessage:"Your request has been saved. Customer support will contact you during opening hours.",id:"chatbot.customerSupport.closedHours.success"});return{placeholderTranslation:t,chatlineLabelUserTranslation:n,chatlineLabelAssistantTranslation:r,chatlineLabelCustomerSupportTranslation:i,tooManyRequestsTranslation:a,genericErrorTranslation:s,discussionFullErrorTranslation:o,infoBannerTitleTranslation:u,infoBannerExplainationTranslation:c,customerSupportConnectingTranslation:d,customerSupportConnectedTranslation:f,customerSupportConnectionErrorTranslation:p,customerSupportProviderUnavailableTranslation:h,customerSupportClosedTranslation:b,customerSupportRestartTranslation:x,customerSupportFallbackTitleTranslation:w,customerSupportFallbackDescriptionTranslation:C,customerSupportFallbackEmailTranslation:k,customerSupportFallbackPhoneTranslation:I,customerSupportFallbackSubmitTranslation:L,customerSupportFallbackSubmittingTranslation:A,customerSupportFallbackSuccessTranslation:N,customerSupportFallbackErrorTranslation:Y,customerSupportClosedHoursTitleTranslation:V,customerSupportClosedHoursDescriptionTranslation:re,customerSupportClosedHoursSchedulePrefixTranslation:v,customerSupportClosedHoursReasonTranslation:U,customerSupportClosedHoursSuccessTranslation:z}};function js(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function rl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Xh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kh={};function zs(e,t){return(Kh.jsx?Qh:Xh).test(e)}const Jh=/[ \t\n\f\r]/g;function Zh(e){return typeof e=="object"?e.type==="text"?$s(e.value):!1:$s(e)}function $s(e){return e.replace(Jh,"")===""}class Zn{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zn.prototype.property={};Zn.prototype.normal={};Zn.prototype.space=null;function il(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zn(n,r,t)}function Wn(e){return e.toLowerCase()}class mt{constructor(t,n){this.property=t,this.attribute=n}}mt.prototype.space=null;mt.prototype.boolean=!1;mt.prototype.booleanish=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.number=!1;mt.prototype.commaSeparated=!1;mt.prototype.spaceSeparated=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.mustUseProperty=!1;mt.prototype.defined=!1;let e0=0;const me=un(),He=un(),al=un(),j=un(),ke=un(),En=un(),at=un();function un(){return 2**++e0}const ta=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:He,commaOrSpaceSeparated:at,commaSeparated:En,number:j,overloadedBoolean:al,spaceSeparated:ke},Symbol.toStringTag,{value:"Module"})),mi=Object.keys(ta);class Na extends mt{constructor(t,n,r,i){let a=-1;if(super(t,n),Ys(this,"space",i),typeof r=="number")for(;++a<mi.length;){const s=mi[a];Ys(this,mi[a],(r&ta[s])===ta[s])}}}Na.prototype.defined=!0;function Ys(e,t,n){n&&(e[t]=n)}const t0={}.hasOwnProperty;function An(e){const t={},n={};let r;for(r in e.properties)if(t0.call(e.properties,r)){const i=e.properties[r],a=new Na(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Wn(r)]=r,n[Wn(a.attribute)]=r}return new Zn(t,n,e.space)}const sl=An({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}}),ol=An({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ul(e,t){return t in e?e[t]:t}function ll(e,t){return ul(e,t.toLowerCase())}const cl=An({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ll,properties:{xmlns:null,xmlnsXLink:null}}),dl=An({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:ke,ariaCurrent:null,ariaDescribedBy:ke,ariaDetails:null,ariaDisabled:He,ariaDropEffect:ke,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:ke,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ke,ariaLevel:j,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:ke,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:ke,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:He,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null}}),n0=An({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ll,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:En,acceptCharset:ke,accessKey:ke,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:ke,autoFocus:me,autoPlay:me,blocking:ke,capture:null,charSet:null,checked:me,cite:null,className:ke,cols:j,colSpan:null,content:null,contentEditable:He,controls:me,controlsList:ke,coords:j|En,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:al,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:ke,height:j,hidden:me,high:j,href:null,hrefLang:null,htmlFor:ke,httpEquiv:ke,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:ke,itemRef:ke,itemScope:me,itemType:ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,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:me,optimum:j,pattern:null,ping:ke,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:ke,required:me,reversed:me,rows:j,rowSpan:j,sandbox:ke,scope:null,scoped:me,seamless:me,selected:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:He,width:j,wrap:null,align:null,aLink:null,archive:ke,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:j,security:null,unselectable:null}}),r0=An({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:ul,properties:{about:at,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:ke,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:En,g2:En,glyphName:En,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:at,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:at,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:at,rev:at,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:at,requiredFeatures:at,requiredFonts:at,requiredFormats:at,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:at,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:at,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:at,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),i0=/^data[-\w.:]+$/i,Gs=/-[a-z]/g,a0=/[A-Z]/g;function Ur(e,t){const n=Wn(t);let r=t,i=mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&i0.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Gs,o0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Gs.test(a)){let s=a.replace(a0,s0);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Na}return new i(r,t)}function s0(e){return"-"+e.toLowerCase()}function o0(e){return e.charAt(1).toUpperCase()}const u0={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"},er=il([ol,sl,cl,dl,n0],"html"),qt=il([ol,sl,cl,dl,r0],"svg");function qs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function fl(e){return e.join(" ").trim()}var dn={},gi,Vs;function l0(){if(Vs)return gi;Vs=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
48
+ `,c="/",d="*",f="",p="comment",h="declaration";gi=function(x,w){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];w=w||{};var C=1,k=1;function I(F){var $=F.match(t);$&&(C+=$.length);var Q=F.lastIndexOf(u);k=~Q?F.length-Q:k+F.length}function L(){var F={line:C,column:k};return function($){return $.position=new A(F),V(),$}}function A(F){this.start=F,this.end={line:C,column:k},this.source=w.source}A.prototype.content=x;function N(F){var $=new Error(w.source+":"+C+":"+k+": "+F);if($.reason=F,$.filename=w.source,$.line=C,$.column=k,$.source=x,!w.silent)throw $}function Y(F){var $=F.exec(x);if($){var Q=$[0];return I(Q),x=x.slice(Q.length),$}}function V(){Y(n)}function re(F){var $;for(F=F||[];$=v();)$!==!1&&F.push($);return F}function v(){var F=L();if(!(c!=x.charAt(0)||d!=x.charAt(1))){for(var $=2;f!=x.charAt($)&&(d!=x.charAt($)||c!=x.charAt($+1));)++$;if($+=2,f===x.charAt($-1))return N("End of comment missing");var Q=x.slice(2,$-2);return k+=2,I(Q),x=x.slice($),k+=2,F({type:p,comment:Q})}}function U(){var F=L(),$=Y(r);if($){if(v(),!Y(i))return N("property missing ':'");var Q=Y(a),he=F({type:h,property:b($[0].replace(e,f)),value:Q?b(Q[0].replace(e,f)):f});return Y(s),he}}function z(){var F=[];re(F);for(var $;$=U();)$!==!1&&(F.push($),re(F));return F}return V(),z()};function b(x){return x?x.replace(o,f):f}return gi}var Ws;function c0(){if(Ws)return dn;Ws=1;var e=dn&&dn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(dn,"__esModule",{value:!0});var t=e(l0());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var s=(0,t.default)(r),o=typeof i=="function";return s.forEach(function(u){if(u.type==="declaration"){var c=u.property,d=u.value;o?i(c,d,u):d&&(a=a||{},a[c]=d)}}),a}return dn.default=n,dn}var d0=c0();const Xs=Sa(d0),f0=Xs.default||Xs,jr=hl("end"),It=hl("start");function hl(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 h0(e){const t=It(e),n=jr(e);if(t&&n)return{start:t,end:n}}function Un(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qs(e.position):"start"in e||"end"in e?Qs(e):"line"in e||"column"in e?na(e):""}function na(e){return Ks(e&&e.line)+":"+Ks(e&&e.column)}function Qs(e){return na(e&&e.start)+"-"+na(e&&e.end)}function Ks(e){return e&&typeof e=="number"?e:1}class Xe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=Un(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Xe.prototype.file="";Xe.prototype.name="";Xe.prototype.reason="";Xe.prototype.message="";Xe.prototype.stack="";Xe.prototype.column=void 0;Xe.prototype.line=void 0;Xe.prototype.ancestors=void 0;Xe.prototype.cause=void 0;Xe.prototype.fatal=void 0;Xe.prototype.place=void 0;Xe.prototype.ruleId=void 0;Xe.prototype.source=void 0;const Ra={}.hasOwnProperty,p0=new Map,m0=/[A-Z]/g,g0=/-([a-z])/g,b0=new Set(["table","tbody","thead","tfoot","tr"]),E0=new Set(["td","th"]),pl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function T0(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=I0(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=w0(n,t.jsx,t.jsxs)}const i={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"?qt:er,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ml(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ml(e,t,n){if(t.type==="element")return y0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return x0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return S0(e,t,n);if(t.type==="mdxjsEsm")return _0(e,t);if(t.type==="root")return C0(e,t,n);if(t.type==="text")return A0(e,t)}function y0(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qt,e.schema=i),e.ancestors.push(t);const a=bl(e,t.tagName,!1),s=v0(e,t);let o=La(e,t);return b0.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Zh(u):!0})),gl(e,s,a,t),Oa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function x0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Xn(e,t.position)}function _0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xn(e,t.position)}function S0(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:bl(e,t.name,!0),s=k0(e,t),o=La(e,t);return gl(e,s,a,t),Oa(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function C0(e,t,n){const r={};return Oa(r,La(e,t)),e.create(t,e.Fragment,r,n)}function A0(e,t){return t.value}function gl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Oa(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function w0(e,t,n){return r;function r(i,a,s,o){const c=Array.isArray(s.children)?n:t;return o?c(a,s,o):c(a,s)}}function I0(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=It(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function v0(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ra.call(t.properties,i)){const a=N0(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&E0.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function k0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Xn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Xn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function La(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:p0;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const o=ml(e,a,s);o!==void 0&&n.push(o)}return n}function N0(e,t,n){const r=Ur(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?rl(n):fl(n)),r.property==="style"){let i=typeof n=="object"?n:R0(e,String(n));return e.stylePropertyNameCase==="css"&&(i=O0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?u0[r.property]||r.property:r.attribute,n]}}function R0(e,t){const n={};try{f0(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,s=new Xe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=pl+"#cannot-parse-style-attribute",s}}return n;function r(i,a){let s=i;s.slice(0,2)!=="--"&&(s.slice(0,4)==="-ms-"&&(s="ms-"+s.slice(4)),s=s.replace(g0,D0)),n[s]=a}}function bl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=zs(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=zs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ra.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xn(e)}function Xn(e,t){const n=new Xe("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=pl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function O0(e){const t={};let n;for(n in e)Ra.call(e,n)&&(t[L0(n)]=e[n]);return t}function L0(e){let t=e.replace(m0,P0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function D0(e,t){return t.toUpperCase()}function P0(e){return"-"+e.toLowerCase()}const bi={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"]},M0={};function Da(e,t){const n=M0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return El(e,r,i)}function El(e,t,n){if(B0(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 Js(e.children,t,n)}return Array.isArray(e)?Js(e,t,n):""}function Js(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=El(e[i],t,n);return r.join("")}function B0(e){return!!(e&&typeof e=="object")}const Zs=document.createElement("i");function Pa(e){const t="&"+e+";";Zs.innerHTML=t;const n=Zs.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function st(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function lt(e,t){return e.length>0?(st(e,e.length,0,t),e):t}const eo={}.hasOwnProperty;function Tl(e){const t={};let n=-1;for(;++n<e.length;)F0(t,e[n]);return t}function F0(e,t){let n;for(n in t){const i=(eo.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){eo.call(i,s)||(i[s]=[]);const o=a[s];H0(i[s],Array.isArray(o)?o:o?[o]:[])}}}function H0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);st(e,0,0,r)}function yl(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Et(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ze=Vt(/[A-Za-z]/),We=Vt(/[\dA-Za-z]/),U0=Vt(/[#-'*+\--9=?A-Z^-~]/);function Sr(e){return e!==null&&(e<32||e===127)}const ra=Vt(/\d/),j0=Vt(/[\dA-Fa-f]/),z0=Vt(/[!-/:-@[-`{-~]/);function ce(e){return e!==null&&e<-2}function Ie(e){return e!==null&&(e<0||e===32)}function Ee(e){return e===-2||e===-1||e===32}const zr=Vt(new RegExp("\\p{P}|\\p{S}","u")),nn=Vt(/\s/);function Vt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function wn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&We(e.charCodeAt(n+1))&&We(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function xe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return Ee(u)?(e.enter(n),o(u)):t(u)}function o(u){return Ee(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const $0={tokenize:Y0};function Y0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),xe(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ce(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const G0={tokenize:q0},to={tokenize:V0};function q0(e){const t=this,n=[];let r=0,i,a,s;return o;function o(I){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,u,c)(I)}return c(I)}function u(I){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const L=t.events.length;let A=L,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){N=t.events[A][1].end;break}C(r);let Y=L;for(;Y<t.events.length;)t.events[Y][1].end=Object.assign({},N),Y++;return st(t.events,A+1,0,t.events.slice(L)),t.events.length=Y,c(I)}return o(I)}function c(I){if(r===n.length){if(!i)return p(I);if(i.currentConstruct&&i.currentConstruct.concrete)return b(I);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(to,d,f)(I)}function d(I){return i&&k(),C(r),p(I)}function f(I){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(I)}function p(I){return t.containerState={},e.attempt(to,h,b)(I)}function h(I){return r++,n.push([t.currentConstruct,t.containerState]),p(I)}function b(I){if(I===null){i&&k(),C(0),e.consume(I);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),x(I)}function x(I){if(I===null){w(e.exit("chunkFlow"),!0),C(0),e.consume(I);return}return ce(I)?(e.consume(I),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(I),x)}function w(I,L){const A=t.sliceStream(I);if(L&&A.push(null),I.previous=a,a&&(a.next=I),a=I,i.defineSkip(I.start),i.write(A),t.parser.lazy[I.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<s&&(!i.events[N][1].end||i.events[N][1].end.offset>s))return;const Y=t.events.length;let V=Y,re,v;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(re){v=t.events[V][1].end;break}re=!0}for(C(r),N=Y;N<t.events.length;)t.events[N][1].end=Object.assign({},v),N++;st(t.events,V+1,0,t.events.slice(Y)),t.events.length=N}}function C(I){let L=n.length;for(;L-- >I;){const A=n[L];t.containerState=A[1],A[0].exit.call(t,e)}n.length=I}function k(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function V0(e,t,n){return xe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Cr(e){if(e===null||Ie(e)||nn(e))return 1;if(zr(e))return 2}function $r(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const ia={name:"attention",tokenize:X0,resolveAll:W0};function W0(e,t){let n=-1,r,i,a,s,o,u,c,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;u=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),p=Object.assign({},e[n][1].start);no(f,-u),no(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},a={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=lt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=lt(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=lt(c,$r(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=lt(c,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=lt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,st(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function X0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Cr(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const c=e.exit("attentionSequence"),d=Cr(u),f=!d||d===2&&i||n.includes(u),p=!i||i===2&&d||n.includes(r);return c._open=!!(a===42?f:f&&(i||!p)),c._close=!!(a===42?p:p&&(d||!f)),t(u)}}function no(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Q0={name:"autolink",tokenize:K0};function K0(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Ze(h)?(e.consume(h),s):c(h)}function s(h){return h===43||h===45||h===46||We(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||We(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Sr(h)?n(h):(e.consume(h),u)}function c(h){return h===64?(e.consume(h),d):U0(h)?(e.consume(h),c):n(h)}function d(h){return We(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||We(h))&&r++<63){const b=h===45?p:f;return e.consume(h),b}return n(h)}}const tr={tokenize:J0,partial:!0};function J0(e,t,n){return r;function r(a){return Ee(a)?xe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ce(a)?t(a):n(a)}}const xl={name:"blockQuote",tokenize:Z0,continuation:{tokenize:ep},exit:tp};function Z0(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return Ee(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function ep(e,t,n){const r=this;return i;function i(s){return Ee(s)?xe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(xl,t,n)(s)}}function tp(e){e.exit("blockQuote")}const _l={name:"characterEscape",tokenize:np};function np(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return z0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Sl={name:"characterReference",tokenize:rp};function rp(e,t,n){const r=this;let i=0,a,s;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=We,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=j0,d):(e.enter("characterReferenceValue"),a=7,s=ra,d(f))}function d(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return s===We&&!Pa(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),d):n(f)}}const ro={tokenize:ap,partial:!0},io={name:"codeFenced",tokenize:ip,concrete:!0};function ip(e,t,n){const r=this,i={tokenize:A,partial:!0};let a=0,s=0,o;return u;function u(N){return c(N)}function c(N){const Y=r.events[r.events.length-1];return a=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===o?(s++,e.consume(N),d):s<3?n(N):(e.exit("codeFencedFenceSequence"),Ee(N)?xe(e,f,"whitespace")(N):f(N))}function f(N){return N===null||ce(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(ro,x,L)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||ce(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(N)):Ee(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),xe(e,h,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),p)}function h(N){return N===null||ce(N)?f(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(N))}function b(N){return N===null||ce(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(N)):N===96&&N===o?n(N):(e.consume(N),b)}function x(N){return e.attempt(i,L,w)(N)}function w(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),C}function C(N){return a>0&&Ee(N)?xe(e,k,"linePrefix",a+1)(N):k(N)}function k(N){return N===null||ce(N)?e.check(ro,x,L)(N):(e.enter("codeFlowValue"),I(N))}function I(N){return N===null||ce(N)?(e.exit("codeFlowValue"),k(N)):(e.consume(N),I)}function L(N){return e.exit("codeFenced"),t(N)}function A(N,Y,V){let re=0;return v;function v(Q){return N.enter("lineEnding"),N.consume(Q),N.exit("lineEnding"),U}function U(Q){return N.enter("codeFencedFence"),Ee(Q)?xe(N,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):z(Q)}function z(Q){return Q===o?(N.enter("codeFencedFenceSequence"),F(Q)):V(Q)}function F(Q){return Q===o?(re++,N.consume(Q),F):re>=s?(N.exit("codeFencedFenceSequence"),Ee(Q)?xe(N,$,"whitespace")(Q):$(Q)):V(Q)}function $(Q){return Q===null||ce(Q)?(N.exit("codeFencedFence"),Y(Q)):V(Q)}}}function ap(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ei={name:"codeIndented",tokenize:op},sp={tokenize:up,partial:!0};function op(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),xe(e,a,"linePrefix",5)(c)}function a(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):ce(c)?e.attempt(sp,s,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||ce(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function up(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):xe(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):ce(s)?i(s):n(s)}}const lp={name:"codeText",tokenize:fp,resolve:cp,previous:dp};function cp(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function dp(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fp(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,d(f)):ce(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||ce(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}function Cl(e){const t={};let n=-1,r,i,a,s,o,u,c;for(;++n<e.length;){for(;n in t;)n=t[n];if(r=e[n],n&&r[1].type==="chunkFlow"&&e[n-1][1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,hp(e,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(s=e[a],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},e[i][1].start),o=e.slice(i,n),o.unshift(r),st(e,i,n-i+1,o))}}return!c}function hp(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const a=[],s=n._tokenizer||r.parser[n.contentType](n.start),o=s.events,u=[],c={};let d,f,p=-1,h=n,b=0,x=0;const w=[x];for(;h;){for(;e[++i][1]!==h;);a.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(x=p+1,w.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),p=w.length;p--;){const C=o.slice(w[p],w[p+1]),k=a.pop();u.unshift([k,k+C.length-1]),st(e,k,2,C)}for(p=-1;++p<u.length;)c[b+u[p][0]]=b+u[p][1],b+=u[p][1]-u[p][0]-1;return c}const pp={tokenize:bp,resolve:gp},mp={tokenize:Ep,partial:!0};function gp(e){return Cl(e),e}function bp(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):ce(o)?e.check(mp,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ep(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),xe(e,a,"linePrefix")}function a(s){if(s===null||ce(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Al(e,t,n,r,i,a,s,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(C){return C===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(C),e.exit(a),p):C===null||C===32||C===41||Sr(C)?n(C):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(C))}function p(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===62?(e.exit("chunkString"),e.exit(o),p(C)):C===null||C===60||ce(C)?n(C):(e.consume(C),C===92?b:h)}function b(C){return C===60||C===62||C===92?(e.consume(C),h):h(C)}function x(C){return!d&&(C===null||C===41||Ie(C))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(C)):d<c&&C===40?(e.consume(C),d++,x):C===41?(e.consume(C),d--,x):C===null||C===32||C===40||Sr(C)?n(C):(e.consume(C),C===92?w:x)}function w(C){return C===40||C===41||C===92?(e.consume(C),x):x(C)}}function wl(e,t,n,r,i,a){const s=this;let o=0,u;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),d}function d(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ce(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ce(h)||o++>999?(e.exit("chunkString"),d(h)):(e.consume(h),u||(u=!Ee(h)),h===92?p:f)}function p(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function Il(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),c(p))}function c(p){return p===s?(e.exit(a),u(s)):p===null?n(p):ce(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),xe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||ce(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:d)}function f(p){return p===s||p===92?(e.consume(p),d):d(p)}}function jn(e,t){let n;return r;function r(i){return ce(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ee(i)?xe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Tp={name:"definition",tokenize:xp},yp={tokenize:_p,partial:!0};function xp(e,t,n){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return wl.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Et(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):n(h)}function u(h){return Ie(h)?jn(e,c)(h):c(h)}function c(h){return Al(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(yp,f,f)(h)}function f(h){return Ee(h)?xe(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ce(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function _p(e,t,n){return r;function r(o){return Ie(o)?jn(e,i)(o):n(o)}function i(o){return Il(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return Ee(o)?xe(e,s,"whitespace")(o):s(o)}function s(o){return o===null||ce(o)?t(o):n(o)}}const Sp={name:"hardBreakEscape",tokenize:Cp};function Cp(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ce(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Ap={name:"headingAtx",tokenize:Ip,resolve:wp};function wp(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},st(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Ip(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Ie(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||ce(d)?(e.exit("atxHeading"),t(d)):Ee(d)?xe(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||Ie(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const vp=["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"],ao=["pre","script","style","textarea"],kp={name:"htmlFlow",tokenize:Lp,resolveTo:Op,concrete:!0},Np={tokenize:Pp,partial:!0},Rp={tokenize:Dp,partial:!0};function Op(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="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 Lp(e,t,n){const r=this;let i,a,s,o,u;return c;function c(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),a=!0,x):T===63?(e.consume(T),i=3,r.interrupt?t:m):Ze(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function p(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,o=0,b):Ze(T)?(e.consume(T),i=4,r.interrupt?t:m):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:m):n(T)}function b(T){const ne="CDATA[";return T===ne.charCodeAt(o++)?(e.consume(T),o===ne.length?r.interrupt?t:z:b):n(T)}function x(T){return Ze(T)?(e.consume(T),s=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||Ie(T)){const ne=T===47,J=s.toLowerCase();return!ne&&!a&&ao.includes(J)?(i=1,r.interrupt?t(T):z(T)):vp.includes(s.toLowerCase())?(i=6,ne?(e.consume(T),C):r.interrupt?t(T):z(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):a?k(T):I(T))}return T===45||We(T)?(e.consume(T),s+=String.fromCharCode(T),w):n(T)}function C(T){return T===62?(e.consume(T),r.interrupt?t:z):n(T)}function k(T){return Ee(T)?(e.consume(T),k):v(T)}function I(T){return T===47?(e.consume(T),v):T===58||T===95||Ze(T)?(e.consume(T),L):Ee(T)?(e.consume(T),I):v(T)}function L(T){return T===45||T===46||T===58||T===95||We(T)?(e.consume(T),L):A(T)}function A(T){return T===61?(e.consume(T),N):Ee(T)?(e.consume(T),A):I(T)}function N(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),u=T,Y):Ee(T)?(e.consume(T),N):V(T)}function Y(T){return T===u?(e.consume(T),u=null,re):T===null||ce(T)?n(T):(e.consume(T),Y)}function V(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Ie(T)?A(T):(e.consume(T),V)}function re(T){return T===47||T===62||Ee(T)?I(T):n(T)}function v(T){return T===62?(e.consume(T),U):n(T)}function U(T){return T===null||ce(T)?z(T):Ee(T)?(e.consume(T),U):n(T)}function z(T){return T===45&&i===2?(e.consume(T),he):T===60&&i===1?(e.consume(T),pe):T===62&&i===4?(e.consume(T),G):T===63&&i===3?(e.consume(T),m):T===93&&i===5?(e.consume(T),Ne):ce(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Np,ie,F)(T)):T===null||ce(T)?(e.exit("htmlFlowData"),F(T)):(e.consume(T),z)}function F(T){return e.check(Rp,$,ie)(T)}function $(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return T===null||ce(T)?F(T):(e.enter("htmlFlowData"),z(T))}function he(T){return T===45?(e.consume(T),m):z(T)}function pe(T){return T===47?(e.consume(T),s="",Ae):z(T)}function Ae(T){if(T===62){const ne=s.toLowerCase();return ao.includes(ne)?(e.consume(T),G):z(T)}return Ze(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),Ae):z(T)}function Ne(T){return T===93?(e.consume(T),m):z(T)}function m(T){return T===62?(e.consume(T),G):T===45&&i===2?(e.consume(T),m):z(T)}function G(T){return T===null||ce(T)?(e.exit("htmlFlowData"),ie(T)):(e.consume(T),G)}function ie(T){return e.exit("htmlFlow"),t(T)}}function Dp(e,t,n){const r=this;return i;function i(s){return ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Pp(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tr,t,n)}}const Mp={name:"htmlText",tokenize:Bp};function Bp(e,t,n){const r=this;let i,a,s;return o;function o(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),u}function u(m){return m===33?(e.consume(m),c):m===47?(e.consume(m),A):m===63?(e.consume(m),I):Ze(m)?(e.consume(m),V):n(m)}function c(m){return m===45?(e.consume(m),d):m===91?(e.consume(m),a=0,b):Ze(m)?(e.consume(m),k):n(m)}function d(m){return m===45?(e.consume(m),h):n(m)}function f(m){return m===null?n(m):m===45?(e.consume(m),p):ce(m)?(s=f,pe(m)):(e.consume(m),f)}function p(m){return m===45?(e.consume(m),h):f(m)}function h(m){return m===62?he(m):m===45?p(m):f(m)}function b(m){const G="CDATA[";return m===G.charCodeAt(a++)?(e.consume(m),a===G.length?x:b):n(m)}function x(m){return m===null?n(m):m===93?(e.consume(m),w):ce(m)?(s=x,pe(m)):(e.consume(m),x)}function w(m){return m===93?(e.consume(m),C):x(m)}function C(m){return m===62?he(m):m===93?(e.consume(m),C):x(m)}function k(m){return m===null||m===62?he(m):ce(m)?(s=k,pe(m)):(e.consume(m),k)}function I(m){return m===null?n(m):m===63?(e.consume(m),L):ce(m)?(s=I,pe(m)):(e.consume(m),I)}function L(m){return m===62?he(m):I(m)}function A(m){return Ze(m)?(e.consume(m),N):n(m)}function N(m){return m===45||We(m)?(e.consume(m),N):Y(m)}function Y(m){return ce(m)?(s=Y,pe(m)):Ee(m)?(e.consume(m),Y):he(m)}function V(m){return m===45||We(m)?(e.consume(m),V):m===47||m===62||Ie(m)?re(m):n(m)}function re(m){return m===47?(e.consume(m),he):m===58||m===95||Ze(m)?(e.consume(m),v):ce(m)?(s=re,pe(m)):Ee(m)?(e.consume(m),re):he(m)}function v(m){return m===45||m===46||m===58||m===95||We(m)?(e.consume(m),v):U(m)}function U(m){return m===61?(e.consume(m),z):ce(m)?(s=U,pe(m)):Ee(m)?(e.consume(m),U):re(m)}function z(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,F):ce(m)?(s=z,pe(m)):Ee(m)?(e.consume(m),z):(e.consume(m),$)}function F(m){return m===i?(e.consume(m),i=void 0,Q):m===null?n(m):ce(m)?(s=F,pe(m)):(e.consume(m),F)}function $(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||Ie(m)?re(m):(e.consume(m),$)}function Q(m){return m===47||m===62||Ie(m)?re(m):n(m)}function he(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function pe(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ae}function Ae(m){return Ee(m)?xe(e,Ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):Ne(m)}function Ne(m){return e.enter("htmlTextData"),s(m)}}const Ma={name:"labelEnd",tokenize:$p,resolveTo:zp,resolveAll:jp},Fp={tokenize:Yp},Hp={tokenize:Gp},Up={tokenize:qp};function jp(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function zp(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[s][1].end)},d={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[s-2][1].start)};return o=[["enter",u,t],["enter",c,t]],o=lt(o,e.slice(a+1,a+r+3)),o=lt(o,[["enter",d,t]]),o=lt(o,$r(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=lt(o,[["exit",d,t],e[s-2],e[s-1],["exit",c,t]]),o=lt(o,e.slice(s+1)),o=lt(o,[["exit",u,t]]),st(e,a,e.length,o),e}function $p(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?f(p):(s=r.parser.defined.includes(Et(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(Fp,d,s?d:f)(p):p===91?e.attempt(Hp,d,s?c:f)(p):s?d(p):f(p)}function c(p){return e.attempt(Up,d,f)(p)}function d(p){return t(p)}function f(p){return a._balanced=!0,n(p)}}function Yp(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Ie(f)?jn(e,a)(f):a(f)}function a(f){return f===41?d(f):Al(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ie(f)?jn(e,u)(f):d(f)}function o(f){return n(f)}function u(f){return f===34||f===39||f===40?Il(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return Ie(f)?jn(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Gp(e,t,n){const r=this;return i;function i(o){return wl.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(Et(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function qp(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Vp={name:"labelStartImage",tokenize:Wp,resolveAll:Ma.resolveAll};function Wp(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Xp={name:"labelStartLink",tokenize:Qp,resolveAll:Ma.resolveAll};function Qp(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ti={name:"lineEnding",tokenize:Kp};function Kp(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),xe(e,t,"linePrefix")}}const yr={name:"thematicBreak",tokenize:Jp};function Jp(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||ce(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),Ee(c)?xe(e,o,"whitespace")(c):o(c))}}const nt={name:"list",tokenize:tm,continuation:{tokenize:nm},exit:im},Zp={tokenize:am,partial:!0},em={tokenize:rm,partial:!0};function tm(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const b=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:ra(h)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(yr,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return n(h)}function u(h){return ra(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(tr,r.interrupt?n:d,e.attempt(Zp,p,f))}function d(h){return r.containerState.initialBlankLine=!0,a++,p(h)}function f(h){return Ee(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function nm(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tr,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xe(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!Ee(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(em,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,xe(e,e.attempt(nt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function rm(e,t,n){const r=this;return xe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function im(e){e.exit(this.containerState.type)}function am(e,t,n){const r=this;return xe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!Ee(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const so={name:"setextUnderline",tokenize:om,resolveTo:sm};function sm(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function om(e,t,n){const r=this;let i;return a;function a(c){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),Ee(c)?xe(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||ce(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const um={tokenize:lm};function lm(e){const t=this,n=e.attempt(tr,r,e.attempt(this.parser.constructs.flowInitial,i,xe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(pp,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const cm={resolveAll:kl()},dm=vl("string"),fm=vl("text");function vl(e){return{tokenize:t,resolveAll:kl(e==="text"?hm:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return c(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p<f.length;){const h=f[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function kl(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function hm(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)u=!0,o++;else if(c!==-1){a++;break}}if(o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function pm(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let s=[],o=[];const u={consume:k,enter:I,exit:L,attempt:Y(A),check:Y(N),interrupt:Y(N,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:p,now:b,defineSkip:x,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(U){return s=lt(s,U),w(),s[s.length-1]!==null?[]:(V(t,0),c.events=$r(a,c.events,c),c.events)}function p(U,z){return gm(h(U),z)}function h(U){return mm(s,U)}function b(){const{line:U,column:z,offset:F,_index:$,_bufferIndex:Q}=r;return{line:U,column:z,offset:F,_index:$,_bufferIndex:Q}}function x(U){i[U.line]=U.column,v()}function w(){let U;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<z.length;)C(z.charCodeAt(r._bufferIndex));else C(z)}}function C(U){d=d(U)}function k(U){ce(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,v()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function I(U,z){const F=z||{};return F.type=U,F.start=b(),c.events.push(["enter",F,c]),o.push(F),F}function L(U){const z=o.pop();return z.end=b(),c.events.push(["exit",z,c]),z}function A(U,z){V(U,z.from)}function N(U,z){z.restore()}function Y(U,z){return F;function F($,Q,he){let pe,Ae,Ne,m;return Array.isArray($)?ie($):"tokenize"in $?ie([$]):G($);function G(W){return se;function se(ue){const de=ue!==null&&W[ue],ae=ue!==null&&W.null,Re=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return ie(Re)(ue)}}function ie(W){return pe=W,Ae=0,W.length===0?he:T(W[Ae])}function T(W){return se;function se(ue){return m=re(),Ne=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?J():W.tokenize.call(z?Object.assign(Object.create(c),z):c,u,ne,J)(ue)}}function ne(W){return U(Ne,m),Q}function J(W){return m.restore(),++Ae<pe.length?T(pe[Ae]):he}}}function V(U,z){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&st(c.events,z,c.events.length-z,U.resolve(c.events.slice(z),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function re(){const U=b(),z=c.previous,F=c.currentConstruct,$=c.events.length,Q=Array.from(o);return{restore:he,from:$};function he(){r=U,c.previous=z,c.currentConstruct=F,c.events.length=$,o=Q,v()}}function v(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function mm(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function gm(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
49
49
  `;break}case-3:{s=`\r
50
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}const cm={42:nt,43:nt,45:nt,48:nt,49:nt,50:nt,51:nt,52:nt,53:nt,54:nt,55:nt,56:nt,57:nt,62:bl},dm={91:fp},fm={[-2]:bi,[-1]:bi,32:bi},hm={35:Ep,42:Tr,45:[no,Tr],60:_p,61:no,95:Tr,96:eo,126:eo},pm={38:Tl,92:El},mm={[-5]:Ei,[-4]:Ei,[-3]:Ei,33:Up,38:Tl,42:ra,60:[$0,kp],91:zp,92:[gp,El],93:Da,95:ra,96:np},gm={null:[ra,rm]},bm={null:[42,95]},Em={null:[]},Tm=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bm,contentInitial:dm,disable:Em,document:cm,flow:hm,flowInitial:fm,insideSpan:gm,string:pm,text:mm},Symbol.toStringTag,{value:"Module"}));function ym(e){const n=ml([Tm,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(M0),document:i(F0),flow:i(tm),string:i(im),text:i(am)};return r;function i(a){return s;function s(o){return om(r,a,o)}}}function xm(e){for(;!yl(e););return e}const ro=/[\0\t\n\r]/g;function _m(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let c,d,f,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(ro.lastIndex=f,c=ro.exec(a),p=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(p),!c){t=a.slice(f);break}if(h===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(a.slice(f,p)),e+=p-f),h){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Sm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cm(e){return e.replace(Sm,Am)}function Am(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return gl(n.slice(a?2:1),a?16:10)}return La(n)||e}const wl={}.hasOwnProperty;function wm(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Im(n)(xm(ym(n).document().write(_m()(e,t,!0))))}function Im(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(je),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:a(qe),blockQuote:a(de),characterEscape:ne,characterReference:ne,codeFenced:a(ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ie,s),codeText:a(ke,s),codeTextData:ne,data:ne,codeFlowValue:ne,definition:a(q),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Ne),hardBreakEscape:a(Be),hardBreakTrailing:a(Be),htmlFlow:a(He,s),htmlFlowData:ne,htmlText:a(He,s),htmlTextData:ne,image:a(vt),label:s,link:a(je),listItem:a(kt),listItemValue:p,listOrdered:a(Dt,f),listUnordered:a(Dt),paragraph:a(be),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(qe),strong:a(Ie),thematicBreak:a(J)},exit:{atxHeading:u(),atxHeadingSequence:A,autolink:u(),autolinkEmail:ae,autolinkProtocol:oe,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:V,codeFenced:u(w),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:I,codeIndented:u(S),codeText:u(K),codeTextData:I,data:I,definition:u(),definitionDestinationString:L,definitionLabelString:v,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(B),htmlFlowData:I,htmlText:u($),htmlTextData:I,image:u(pe),label:Le,labelText:Se,lineEnding:U,link:u(he),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:W,resourceDestinationString:m,resourceTitleString:G,resource:re,setextHeading:u(X),setextHeadingLineSequence:Y,setextHeadingText:N,strong:u(),thematicBreak:u()}};Il(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let P={type:"root",children:[]};const Q={stack:[P],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:d,data:n},ue=[];let Z=-1;for(;++Z<O.length;)if(O[Z][1].type==="listOrdered"||O[Z][1].type==="listUnordered")if(O[Z][0]==="enter")ue.push(Z);else{const _e=ue.pop();Z=i(O,_e,Z)}for(Z=-1;++Z<O.length;){const _e=t[O[Z][0]];wl.call(_e,O[Z][1].type)&&_e[O[Z][1].type].call(Object.assign({sliceSerialize:O[Z][2].sliceSerialize},Q),O[Z][1])}if(Q.tokenStack.length>0){const _e=Q.tokenStack[Q.tokenStack.length-1];(_e[1]||io).call(Q,void 0,_e[0])}for(P.position={start:Ft(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:Ft(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},Z=-1;++Z<t.transforms.length;)P=t.transforms[Z](P)||P;return P}function i(O,P,Q){let ue=P-1,Z=-1,_e=!1,at,et,Ve,Pt;for(;++ue<=Q;){const Ke=O[ue];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?Z++:Z--,Pt=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(at&&!Pt&&!Z&&!Ve&&(Ve=ue),Pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pt=void 0}if(!Z&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||Z===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(at){let Mt=ue;for(et=void 0;Mt--;){const ht=O[Mt];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;et&&(O[et][1].type="lineEndingBlank",_e=!0),ht[1].type="lineEnding",et=Mt}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}Ve&&(!et||Ve<et)&&(at._spread=!0),at.end=Object.assign({},et?O[et][1].start:Ke[1].end),O.splice(et||ue,0,["exit",at,Ke[2]]),ue++,Q++}if(Ke[1].type==="listItemPrefix"){const Mt={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};at=Mt,O.splice(ue,0,["enter",Mt,Ke[2]]),ue++,Q++,Ve=void 0,Pt=!0}}}return O[P][1]._spread=_e,Q}function a(O,P){return Q;function Q(ue){o.call(this,O(ue),ue),P&&P.call(this,ue)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(O,P,Q){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([P,Q]),O.position={start:Ft(P.start),end:void 0}}function u(O){return P;function P(Q){O&&O.call(this,Q),c.call(this,Q)}}function c(O,P){const Q=this.stack.pop(),ue=this.tokenStack.pop();if(ue)ue[0].type!==O.type&&(P?P.call(this,O,ue[0]):(ue[1]||io).call(this,O,ue[0]));else throw new Error("Cannot close `"+O.type+"` ("+Hn({start:O.start,end:O.end})+"): it’s not open");Q.position.end=Ft(O.end)}function d(){return Oa(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function h(){const O=this.resume(),P=this.stack[this.stack.length-1];P.lang=O}function b(){const O=this.resume(),P=this.stack[this.stack.length-1];P.meta=O}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const O=this.resume(),P=this.stack[this.stack.length-1];P.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const O=this.resume(),P=this.stack[this.stack.length-1];P.value=O.replace(/(\r?\n|\r)$/g,"")}function v(O){const P=this.resume(),Q=this.stack[this.stack.length-1];Q.label=P,Q.identifier=mt(this.sliceSerialize(O)).toLowerCase()}function k(){const O=this.resume(),P=this.stack[this.stack.length-1];P.title=O}function L(){const O=this.resume(),P=this.stack[this.stack.length-1];P.url=O}function A(O){const P=this.stack[this.stack.length-1];if(!P.depth){const Q=this.sliceSerialize(O).length;P.depth=Q}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function Y(O){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function X(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(O){const Q=this.stack[this.stack.length-1].children;let ue=Q[Q.length-1];(!ue||ue.type!=="text")&&(ue=H(),ue.position={start:Ft(O.start),end:void 0},Q.push(ue)),this.stack.push(ue)}function I(O){const P=this.stack.pop();P.value+=this.sliceSerialize(O),P.position.end=Ft(O.end)}function U(O){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=P.children[P.children.length-1];Q.position.end=Ft(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(ne.call(this,O),I.call(this,O))}function z(){this.data.atHardBreak=!0}function B(){const O=this.resume(),P=this.stack[this.stack.length-1];P.value=O}function $(){const O=this.resume(),P=this.stack[this.stack.length-1];P.value=O}function K(){const O=this.resume(),P=this.stack[this.stack.length-1];P.value=O}function he(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=P,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function pe(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=P,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Se(O){const P=this.sliceSerialize(O),Q=this.stack[this.stack.length-2];Q.label=Cm(P),Q.identifier=mt(P).toLowerCase()}function Le(){const O=this.stack[this.stack.length-1],P=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const ue=O.children;Q.children=ue}else Q.alt=P}function m(){const O=this.resume(),P=this.stack[this.stack.length-1];P.url=O}function G(){const O=this.resume(),P=this.stack[this.stack.length-1];P.title=O}function re(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function W(O){const P=this.resume(),Q=this.stack[this.stack.length-1];Q.label=P,Q.identifier=mt(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function ce(O){this.data.characterReferenceType=O.type}function V(O){const P=this.sliceSerialize(O),Q=this.data.characterReferenceType;let ue;Q?(ue=gl(P,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=La(P);const Z=this.stack.pop();Z.value+=ue,Z.position.end=Ft(O.end)}function oe(O){I.call(this,O);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(O)}function ae(O){I.call(this,O);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(O)}function de(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ne(){return{type:"emphasis",children:[]}}function qe(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function He(){return{type:"html",value:""}}function vt(){return{type:"image",title:null,url:"",alt:null}}function je(){return{type:"link",title:null,url:"",children:[]}}function Dt(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function kt(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function be(){return{type:"paragraph",children:[]}}function Ie(){return{type:"strong",children:[]}}function H(){return{type:"text",value:""}}function J(){return{type:"thematicBreak"}}}function Ft(e){return{line:e.line,column:e.column,offset:e.offset}}function Il(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Il(e,r):vm(e,r)}}function vm(e,t){let n;for(n in t)if(wl.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 io(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Hn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Hn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Hn({start:t.start,end:t.end})+") is still open")}function km(e){const t=this;t.parser=n;function n(r){return wm(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Nm(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 Rm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
51
- `}]}function Om(e,t){const n=t.value?t.value+`
52
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Lm(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dm(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pm(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=An(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function Mm(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 Bm(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function vl(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 i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Fm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vl(e,t);const i={src:An(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Hm(e,t){const n={src:An(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 Um(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 jm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vl(e,t);const i={href:An(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function zm(e,t){const n={href:An(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 $m(e,t,n){const r=e.all(t),i=n?Ym(n):kl(t),a={},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:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
50
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}const bm={42:nt,43:nt,45:nt,48:nt,49:nt,50:nt,51:nt,52:nt,53:nt,54:nt,55:nt,56:nt,57:nt,62:xl},Em={91:Tp},Tm={[-2]:Ei,[-1]:Ei,32:Ei},ym={35:Ap,42:yr,45:[so,yr],60:kp,61:so,95:yr,96:io,126:io},xm={38:Sl,92:_l},_m={[-5]:Ti,[-4]:Ti,[-3]:Ti,33:Vp,38:Sl,42:ia,60:[Q0,Mp],91:Xp,92:[Sp,_l],93:Ma,95:ia,96:lp},Sm={null:[ia,cm]},Cm={null:[42,95]},Am={null:[]},wm=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Cm,contentInitial:Em,disable:Am,document:bm,flow:ym,flowInitial:Tm,insideSpan:Sm,string:xm,text:_m},Symbol.toStringTag,{value:"Module"}));function Im(e){const n=Tl([wm,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i($0),document:i(G0),flow:i(um),string:i(dm),text:i(fm)};return r;function i(a){return s;function s(o){return pm(r,a,o)}}}function vm(e){for(;!Cl(e););return e}const oo=/[\0\t\n\r]/g;function km(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let c,d,f,p,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(oo.lastIndex=f,c=oo.exec(a),p=c&&c.index!==void 0?c.index:a.length,h=a.charCodeAt(p),!c){t=a.slice(f);break}if(h===10&&f===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),f<p&&(u.push(a.slice(f,p)),e+=p-f),h){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Nm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rm(e){return e.replace(Nm,Om)}function Om(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return yl(n.slice(a?2:1),a?16:10)}return Pa(n)||e}const Nl={}.hasOwnProperty;function Lm(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Dm(n)(vm(Im(n).document().write(km()(e,t,!0))))}function Dm(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:re,autolinkEmail:re,atxHeading:a(Be),blockQuote:a(de),characterEscape:re,characterReference:re,codeFenced:a(ae),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(ae,s),codeText:a(Re,s),codeTextData:re,data:re,codeFlowValue:re,definition:a(q),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Me),hardBreakEscape:a(Ke),hardBreakTrailing:a(Ke),htmlFlow:a(je,s),htmlFlowData:re,htmlText:a(je,s),htmlTextData:re,image:a(qe),label:s,link:a(Ue),listItem:a(Nt),listItemValue:p,listOrdered:a(Pt,f),listUnordered:a(Pt),paragraph:a(be),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Be),strong:a(ve),thematicBreak:a(K)},exit:{atxHeading:u(),atxHeadingSequence:A,autolink:u(),autolinkEmail:ue,autolinkProtocol:se,blockQuote:u(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:W,codeFenced:u(w),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:v,codeIndented:u(C),codeText:u(Q),codeTextData:v,data:v,definition:u(),definitionDestinationString:L,definitionLabelString:k,definitionTitleString:I,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(F),htmlFlowData:v,htmlText:u($),htmlTextData:v,image:u(pe),label:Ne,labelText:Ae,lineEnding:U,link:u(he),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ne,resourceDestinationString:m,resourceTitleString:G,resource:ie,setextHeading:u(V),setextHeadingLineSequence:Y,setextHeadingText:N,strong:u(),thematicBreak:u()}};Rl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let M={type:"root",children:[]};const X={stack:[M],tokenStack:[],config:t,enter:o,exit:c,buffer:s,resume:d,data:n},le=[];let Z=-1;for(;++Z<O.length;)if(O[Z][1].type==="listOrdered"||O[Z][1].type==="listUnordered")if(O[Z][0]==="enter")le.push(Z);else{const _e=le.pop();Z=i(O,_e,Z)}for(Z=-1;++Z<O.length;){const _e=t[O[Z][0]];Nl.call(_e,O[Z][1].type)&&_e[O[Z][1].type].call(Object.assign({sliceSerialize:O[Z][2].sliceSerialize},X),O[Z][1])}if(X.tokenStack.length>0){const _e=X.tokenStack[X.tokenStack.length-1];(_e[1]||uo).call(X,void 0,_e[0])}for(M.position={start:Ht(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:Ht(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},Z=-1;++Z<t.transforms.length;)M=t.transforms[Z](M)||M;return M}function i(O,M,X){let le=M-1,Z=-1,_e=!1,rt,et,ot,it;for(;++le<=X;){const Ve=O[le];switch(Ve[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ve[0]==="enter"?Z++:Z--,it=void 0;break}case"lineEndingBlank":{Ve[0]==="enter"&&(rt&&!it&&!Z&&!ot&&(ot=le),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!Z&&Ve[0]==="enter"&&Ve[1].type==="listItemPrefix"||Z===-1&&Ve[0]==="exit"&&(Ve[1].type==="listUnordered"||Ve[1].type==="listOrdered")){if(rt){let Mt=le;for(et=void 0;Mt--;){const gt=O[Mt];if(gt[1].type==="lineEnding"||gt[1].type==="lineEndingBlank"){if(gt[0]==="exit")continue;et&&(O[et][1].type="lineEndingBlank",_e=!0),gt[1].type="lineEnding",et=Mt}else if(!(gt[1].type==="linePrefix"||gt[1].type==="blockQuotePrefix"||gt[1].type==="blockQuotePrefixWhitespace"||gt[1].type==="blockQuoteMarker"||gt[1].type==="listItemIndent"))break}ot&&(!et||ot<et)&&(rt._spread=!0),rt.end=Object.assign({},et?O[et][1].start:Ve[1].end),O.splice(et||le,0,["exit",rt,Ve[2]]),le++,X++}if(Ve[1].type==="listItemPrefix"){const Mt={type:"listItem",_spread:!1,start:Object.assign({},Ve[1].start),end:void 0};rt=Mt,O.splice(le,0,["enter",Mt,Ve[2]]),le++,X++,ot=void 0,it=!0}}}return O[M][1]._spread=_e,X}function a(O,M){return X;function X(le){o.call(this,O(le),le),M&&M.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(O,M,X){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([M,X]),O.position={start:Ht(M.start),end:void 0}}function u(O){return M;function M(X){O&&O.call(this,X),c.call(this,X)}}function c(O,M){const X=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==O.type&&(M?M.call(this,O,le[0]):(le[1]||uo).call(this,O,le[0]));else throw new Error("Cannot close `"+O.type+"` ("+Un({start:O.start,end:O.end})+"): it’s not open");X.position.end=Ht(O.end)}function d(){return Da(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(O){if(this.data.expectingFirstListItemValue){const M=this.stack[this.stack.length-2];M.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function h(){const O=this.resume(),M=this.stack[this.stack.length-1];M.lang=O}function b(){const O=this.resume(),M=this.stack[this.stack.length-1];M.meta=O}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const O=this.resume(),M=this.stack[this.stack.length-1];M.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const O=this.resume(),M=this.stack[this.stack.length-1];M.value=O.replace(/(\r?\n|\r)$/g,"")}function k(O){const M=this.resume(),X=this.stack[this.stack.length-1];X.label=M,X.identifier=Et(this.sliceSerialize(O)).toLowerCase()}function I(){const O=this.resume(),M=this.stack[this.stack.length-1];M.title=O}function L(){const O=this.resume(),M=this.stack[this.stack.length-1];M.url=O}function A(O){const M=this.stack[this.stack.length-1];if(!M.depth){const X=this.sliceSerialize(O).length;M.depth=X}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function Y(O){const M=this.stack[this.stack.length-1];M.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function re(O){const X=this.stack[this.stack.length-1].children;let le=X[X.length-1];(!le||le.type!=="text")&&(le=H(),le.position={start:Ht(O.start),end:void 0},X.push(le)),this.stack.push(le)}function v(O){const M=this.stack.pop();M.value+=this.sliceSerialize(O),M.position.end=Ht(O.end)}function U(O){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=M.children[M.children.length-1];X.position.end=Ht(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(M.type)&&(re.call(this,O),v.call(this,O))}function z(){this.data.atHardBreak=!0}function F(){const O=this.resume(),M=this.stack[this.stack.length-1];M.value=O}function $(){const O=this.resume(),M=this.stack[this.stack.length-1];M.value=O}function Q(){const O=this.resume(),M=this.stack[this.stack.length-1];M.value=O}function he(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=M,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function pe(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const M=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=M,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Ae(O){const M=this.sliceSerialize(O),X=this.stack[this.stack.length-2];X.label=Rm(M),X.identifier=Et(M).toLowerCase()}function Ne(){const O=this.stack[this.stack.length-1],M=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const le=O.children;X.children=le}else X.alt=M}function m(){const O=this.resume(),M=this.stack[this.stack.length-1];M.url=O}function G(){const O=this.resume(),M=this.stack[this.stack.length-1];M.title=O}function ie(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ne(O){const M=this.resume(),X=this.stack[this.stack.length-1];X.label=M,X.identifier=Et(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function J(O){this.data.characterReferenceType=O.type}function W(O){const M=this.sliceSerialize(O),X=this.data.characterReferenceType;let le;X?(le=yl(M,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Pa(M);const Z=this.stack.pop();Z.value+=le,Z.position.end=Ht(O.end)}function se(O){v.call(this,O);const M=this.stack[this.stack.length-1];M.url=this.sliceSerialize(O)}function ue(O){v.call(this,O);const M=this.stack[this.stack.length-1];M.url="mailto:"+this.sliceSerialize(O)}function de(){return{type:"blockquote",children:[]}}function ae(){return{type:"code",lang:null,meta:null,value:""}}function Re(){return{type:"inlineCode",value:""}}function q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Me(){return{type:"emphasis",children:[]}}function Be(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function je(){return{type:"html",value:""}}function qe(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function Pt(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function Nt(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function be(){return{type:"paragraph",children:[]}}function ve(){return{type:"strong",children:[]}}function H(){return{type:"text",value:""}}function K(){return{type:"thematicBreak"}}}function Ht(e){return{line:e.line,column:e.column,offset:e.offset}}function Rl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Rl(e,r):Pm(e,r)}}function Pm(e,t){let n;for(n in t)if(Nl.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 uo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Un({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Un({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Un({start:t.start,end:t.end})+") is still open")}function Mm(e){const t=this;t.parser=n;function n(r){return Lm(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 Fm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
51
+ `}]}function Hm(e,t){const n=t.value?t.value+`
52
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Um(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jm(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zm(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=wn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function $m(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 Ym(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ol(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 i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Gm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ol(e,t);const i={src:wn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function qm(e,t){const n={src:wn(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 Wm(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ol(e,t);const i={href:wn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Xm(e,t){const n={href:wn(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 Qm(e,t,n){const r=e.all(t),i=n?Km(n):Ll(t),a={},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:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
53
53
  `}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
54
- `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Ym(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=kl(n[r])}return t}function kl(e){const t=e.spread;return t??e.children.length>1}function Gm(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];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 a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function qm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Wm(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xm(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=At(t.children[1]),u=Ur(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Qm(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<o;){const f=t.children[u],p={},h=s?s[u]:void 0;h&&(p.align=h);let b={type:"element",tagName:a,properties:p,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),c.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function Km(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ao=9,so=32;function Jm(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(oo(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(oo(t.slice(i),i>0,!1)),a.join("")}function oo(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===ao||a===so;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===ao||a===so;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Zm(e,t){const n={type:"text",value:Jm(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function eg(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const tg={blockquote:Nm,break:Rm,code:Om,delete:Lm,emphasis:Dm,footnoteReference:Pm,heading:Mm,html:Bm,imageReference:Fm,image:Hm,inlineCode:Um,linkReference:jm,link:zm,listItem:$m,list:Gm,paragraph:qm,root:Vm,strong:Wm,table:Xm,tableCell:Km,tableRow:Qm,text:Zm,thematicBreak:eg,toml:lr,yaml:lr,definition:lr,footnoteDefinition:lr};function lr(){}const Nl=-1,$r=0,Cr=1,Ar=2,Pa=3,Ma=4,Ba=5,Fa=6,Rl=7,Ol=8,uo=typeof self=="object"?self:globalThis,ng=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case $r:case Nl:return n(s,i);case Cr:{const o=n([],i);for(const u of s)o.push(r(u));return o}case Ar:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case Pa:return n(new Date(s),i);case Ma:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Ba:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case Fa:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case Rl:{const{name:o,message:u}=s;return n(new uo[o](u),i)}case Ol:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new uo[a](s),i)};return r},lo=e=>ng(new Map,e)(0),dn="",{toString:rg}={},{keys:ig}=Object,On=e=>{const t=typeof e;if(t!=="object"||!e)return[$r,t];const n=rg.call(e).slice(8,-1);switch(n){case"Array":return[Cr,dn];case"Object":return[Ar,dn];case"Date":return[Pa,dn];case"RegExp":return[Ma,dn];case"Map":return[Ba,dn];case"Set":return[Fa,dn]}return n.includes("Array")?[Cr,n]:n.includes("Error")?[Rl,n]:[Ar,n]},cr=([e,t])=>e===$r&&(t==="function"||t==="symbol"),ag=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=On(s);switch(o){case $r:{let d=s;switch(u){case"bigint":o=Ol,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([Nl],s)}return i([o,d],s)}case Cr:{if(u)return i([u,[...s]],s);const d=[],f=i([o,d],s);for(const p of s)d.push(a(p));return f}case Ar:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],f=i([o,d],s);for(const p of ig(s))(e||!cr(On(s[p])))&&d.push([a(p),a(s[p])]);return f}case Pa:return i([o,s.toISOString()],s);case Ma:{const{source:d,flags:f}=s;return i([o,{source:d,flags:f}],s)}case Ba:{const d=[],f=i([o,d],s);for(const[p,h]of s)(e||!(cr(On(p))||cr(On(h))))&&d.push([a(p),a(h)]);return f}case Fa:{const d=[],f=i([o,d],s);for(const p of s)(e||!cr(On(p)))&&d.push(a(p));return f}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return a},co=(e,{json:t,lossy:n}={})=>{const r=[];return ag(!(t||n),!!t,new Map,r)(e),r},yn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?lo(co(e,t)):structuredClone(e):(e,t)=>lo(co(e,t));function sg(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 og(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ug(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||sg,r=e.options.footnoteBackLabel||og,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),p=An(f.toLowerCase());let h=0;const b=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++h<=y;){b.length>0&&b.push({type:"text",value:" "});let v=typeof n=="string"?n:n(u,h);typeof v=="string"&&(v={type:"text",value:v}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const v=w.children[w.children.length-1];v&&v.type==="text"?v.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else d.push(...b);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,S),o.push(S)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...yn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
54
+ `});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function Km(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=Ll(n[r])}return t}function Ll(e){const t=e.spread;return t??e.children.length>1}function Jm(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];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 a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Zm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eg(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function tg(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ng(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=It(t.children[1]),u=jr(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function rg(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<o;){const f=t.children[u],p={},h=s?s[u]:void 0;h&&(p.align=h);let b={type:"element",tagName:a,properties:p,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),c.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function ig(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const lo=9,co=32;function ag(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(fo(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(fo(t.slice(i),i>0,!1)),a.join("")}function fo(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===lo||a===co;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===lo||a===co;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function sg(e,t){const n={type:"text",value:ag(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function og(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ug={blockquote:Bm,break:Fm,code:Hm,delete:Um,emphasis:jm,footnoteReference:zm,heading:$m,html:Ym,imageReference:Gm,image:qm,inlineCode:Vm,linkReference:Wm,link:Xm,listItem:Qm,list:Jm,paragraph:Zm,root:eg,strong:tg,table:ng,tableCell:ig,tableRow:rg,text:sg,thematicBreak:og,toml:dr,yaml:dr,definition:dr,footnoteDefinition:dr};function dr(){}const Dl=-1,Yr=0,Ar=1,wr=2,Ba=3,Fa=4,Ha=5,Ua=6,Pl=7,Ml=8,ho=typeof self=="object"?self:globalThis,lg=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Yr:case Dl:return n(s,i);case Ar:{const o=n([],i);for(const u of s)o.push(r(u));return o}case wr:{const o=n({},i);for(const[u,c]of s)o[r(u)]=r(c);return o}case Ba:return n(new Date(s),i);case Fa:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case Ha:{const o=n(new Map,i);for(const[u,c]of s)o.set(r(u),r(c));return o}case Ua:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case Pl:{const{name:o,message:u}=s;return n(new ho[o](u),i)}case Ml:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new ho[a](s),i)};return r},po=e=>lg(new Map,e)(0),fn="",{toString:cg}={},{keys:dg}=Object,On=e=>{const t=typeof e;if(t!=="object"||!e)return[Yr,t];const n=cg.call(e).slice(8,-1);switch(n){case"Array":return[Ar,fn];case"Object":return[wr,fn];case"Date":return[Ba,fn];case"RegExp":return[Fa,fn];case"Map":return[Ha,fn];case"Set":return[Ua,fn]}return n.includes("Array")?[Ar,n]:n.includes("Error")?[Pl,n]:[wr,n]},fr=([e,t])=>e===Yr&&(t==="function"||t==="symbol"),fg=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=On(s);switch(o){case Yr:{let d=s;switch(u){case"bigint":o=Ml,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([Dl],s)}return i([o,d],s)}case Ar:{if(u)return i([u,[...s]],s);const d=[],f=i([o,d],s);for(const p of s)d.push(a(p));return f}case wr:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],f=i([o,d],s);for(const p of dg(s))(e||!fr(On(s[p])))&&d.push([a(p),a(s[p])]);return f}case Ba:return i([o,s.toISOString()],s);case Fa:{const{source:d,flags:f}=s;return i([o,{source:d,flags:f}],s)}case Ha:{const d=[],f=i([o,d],s);for(const[p,h]of s)(e||!(fr(On(p))||fr(On(h))))&&d.push([a(p),a(h)]);return f}case Ua:{const d=[],f=i([o,d],s);for(const p of s)(e||!fr(On(p)))&&d.push(a(p));return f}}const{message:c}=s;return i([o,{name:u,message:c}],s)};return a},mo=(e,{json:t,lossy:n}={})=>{const r=[];return fg(!(t||n),!!t,new Map,r)(e),r},xn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?po(mo(e,t)):structuredClone(e):(e,t)=>po(mo(e,t));function hg(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 pg(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function mg(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||hg,r=e.options.footnoteBackLabel||pg,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),p=wn(f.toLowerCase());let h=0;const b=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++h<=x;){b.length>0&&b.push({type:"text",value:" "});let k=typeof n=="string"?n:n(u,h);typeof k=="string"&&(k={type:"text",value:k}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const k=w.children[w.children.length-1];k&&k.type==="text"?k.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else d.push(...b);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,C),o.push(C)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...xn(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
55
55
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
56
- `}]}}const Yr=(function(e){if(e==null)return fg;if(typeof e=="function")return Gr(e);if(typeof e=="object")return Array.isArray(e)?lg(e):cg(e);if(typeof e=="string")return dg(e);throw new Error("Expected function, string, or object as test")});function lg(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Yr(e[n]);return Gr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function cg(e){const t=e;return Gr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function dg(e){return Gr(t);function t(n){return n&&n.type===e}}function Gr(e){return t;function t(n,r,i){return!!(hg(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function fg(){return!0}function hg(e){return e!==null&&typeof e=="object"&&"type"in e}const Ll=[],pg=!0,ia=!1,mg="skip";function Dl(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Yr(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Ll,b,y,w;if((!t||a(u,c,d[d.length-1]||void 0))&&(h=gg(n(u,d)),h[0]===ia))return h;if("children"in u&&u.children){const S=u;if(S.children&&h[0]!==mg)for(y=(r?S.children.length:-1)+s,w=d.concat(S);y>-1&&y<S.children.length;){const v=S.children[y];if(b=o(v,y,w)(),b[0]===ia)return b;y=typeof b[1]=="number"?b[1]:y+s}}return h}}}function gg(e){return Array.isArray(e)?e:typeof e=="number"?[pg,e]:e==null?Ll:[e]}function qr(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Dl(e,a,o,i);function o(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return s(u,f,d)}}const aa={}.hasOwnProperty,bg={};function Eg(e,t){const n=t||bg,r=new Map,i=new Map,a=new Map,s={...tg,...n.handlers},o={all:c,applyData:yg,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:Tg,wrap:_g};return qr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),o;function u(d,f){const p=d.type,h=o.handlers[p];if(aa.call(o.handlers,p)&&h)return h(o,d,f);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:y,...w}=d,S=yn(w);return S.children=o.all(d),S}return yn(d)}return(o.options.unknownHandler||xg)(o,d,f)}function c(d){const f=[];if("children"in d){const p=d.children;let h=-1;for(;++h<p.length;){const b=o.one(p[h],d);if(b){if(h&&p[h-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=fo(b.value)),!Array.isArray(b)&&b.type==="element")){const y=b.children[0];y&&y.type==="text"&&(y.value=fo(y.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function Tg(e,t){e.position&&(t.position=s0(e))}function yg(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=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"&&a&&Object.assign(n.properties,yn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function xg(e,t){const n=t.data||{},r="value"in t&&!(aa.call(n,"hProperties")||aa.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 _g(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
56
+ `}]}}const Gr=(function(e){if(e==null)return Tg;if(typeof e=="function")return qr(e);if(typeof e=="object")return Array.isArray(e)?gg(e):bg(e);if(typeof e=="string")return Eg(e);throw new Error("Expected function, string, or object as test")});function gg(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gr(e[n]);return qr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function bg(e){const t=e;return qr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Eg(e){return qr(t);function t(n){return n&&n.type===e}}function qr(e){return t;function t(n,r,i){return!!(yg(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Tg(){return!0}function yg(e){return e!==null&&typeof e=="object"&&"type"in e}const Bl=[],xg=!0,aa=!1,_g="skip";function Fl(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Gr(i),s=r?-1:1;o(e,void 0,[])();function o(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=Bl,b,x,w;if((!t||a(u,c,d[d.length-1]||void 0))&&(h=Sg(n(u,d)),h[0]===aa))return h;if("children"in u&&u.children){const C=u;if(C.children&&h[0]!==_g)for(x=(r?C.children.length:-1)+s,w=d.concat(C);x>-1&&x<C.children.length;){const k=C.children[x];if(b=o(k,x,w)(),b[0]===aa)return b;x=typeof b[1]=="number"?b[1]:x+s}}return h}}}function Sg(e){return Array.isArray(e)?e:typeof e=="number"?[xg,e]:e==null?Bl:[e]}function Vr(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Fl(e,a,o,i);function o(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return s(u,f,d)}}const sa={}.hasOwnProperty,Cg={};function Ag(e,t){const n=t||Cg,r=new Map,i=new Map,a=new Map,s={...ug,...n.handlers},o={all:c,applyData:Ig,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:wg,wrap:kg};return Vr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),o;function u(d,f){const p=d.type,h=o.handlers[p];if(sa.call(o.handlers,p)&&h)return h(o,d,f);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:x,...w}=d,C=xn(w);return C.children=o.all(d),C}return xn(d)}return(o.options.unknownHandler||vg)(o,d,f)}function c(d){const f=[];if("children"in d){const p=d.children;let h=-1;for(;++h<p.length;){const b=o.one(p[h],d);if(b){if(h&&p[h-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=go(b.value)),!Array.isArray(b)&&b.type==="element")){const x=b.children[0];x&&x.type==="text"&&(x.value=go(x.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function wg(e,t){e.position&&(t.position=h0(e))}function Ig(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=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"&&a&&Object.assign(n.properties,xn(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function vg(e,t){const n=t.data||{},r="value"in t&&!(sa.call(n,"hProperties")||sa.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 kg(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
57
57
  `});++r<e.length;)r&&n.push({type:"text",value:`
58
58
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
59
- `}),n}function fo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ho(e,t){const n=Eg(e,t),r=n.one(e,void 0),i=ug(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
60
- `},i),a}function Sg(e,t){return e&&"run"in e?async function(n,r){const i=ho(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ho(n,{file:r,...t||e})}}function po(e){if(e)throw e}var Ti,mo;function Cg(){if(mo)return Ti;mo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},o=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return Ti=function u(){var c,d,f,p,h,b,y=arguments[0],w=1,S=arguments.length,v=!1;for(typeof y=="boolean"&&(v=y,y=arguments[1]||{},w=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});w<S;++w)if(c=arguments[w],c!=null)for(d in c)f=o(y,d),p=o(c,d),y!==p&&(v&&p&&(a(p)||(h=i(p)))?(h?(h=!1,b=f&&i(f)?f:[]):b=f&&a(f)?f:{},s(y,{name:d,newValue:u(v,b,p)})):typeof p<"u"&&s(y,{name:d,newValue:p}));return y},Ti}var Ag=Cg();const yi=xa(Ag);function sa(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 wg(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...c){const d=e[++a];let f=-1;if(u){s(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,d?Ig(d,o)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Ig(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(c){const d=c;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const bt={basename:vg,dirname:kg,extname:Ng,join:Rg,sep:"/"};function vg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');tr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function kg(e){if(tr(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 Ng(e){tr(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Rg(...e){let t=-1,n;for(;++t<e.length;)tr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Og(n)}function Og(e){tr(e);const t=e.codePointAt(0)===47;let n=Lg(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Lg(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function tr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Dg={cwd:Pg};function Pg(){return"/"}function oa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Mg(e){if(typeof e=="string")e=new URL(e);else if(!oa(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 Bg(e)}function Bg(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const xi=["history","path","basename","stem","extname","dirname"];class Pl{constructor(t){let n;t?oa(t)?n={path:t}:typeof t=="string"||Fg(t)?n={value:t}:n=t:n={},this.cwd=Dg.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<xi.length;){const a=xi[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)xi.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?bt.basename(this.path):void 0}set basename(t){Si(t,"basename"),_i(t,"basename"),this.path=bt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bt.dirname(this.path):void 0}set dirname(t){go(this.basename,"dirname"),this.path=bt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bt.extname(this.path):void 0}set extname(t){if(_i(t,"extname"),go(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=bt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){oa(t)&&(t=Mg(t)),Si(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bt.basename(this.path,this.extname):void 0}set stem(t){Si(t,"stem"),_i(t,"stem"),this.path=bt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Xe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function _i(e,t){if(e&&e.includes(bt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bt.sep+"`")}function Si(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function go(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Fg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Hg=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,r);const s=Object.getOwnPropertyNames(i);for(const o of s){const u=Object.getOwnPropertyDescriptor(i,o);u&&Object.defineProperty(a,o,u)}return a}),Ug={}.hasOwnProperty;class Ha extends Hg{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=wg()}copy(){const t=new Ha;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(yi(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(wi("data",this.frozen),this.namespace[t]=n,this):Ug.call(this.namespace,t)&&this.namespace[t]||void 0:t?(wi("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=dr(t),r=this.parser||this.Parser;return Ci("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ci("process",this.parser||this.Parser),Ai("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=dr(t),u=r.parse(o);r.run(u,o,function(d,f,p){if(d||!f||!p)return c(d);const h=f,b=r.stringify(h,p);$g(b)?p.value=b:p.result=b,c(d,p)});function c(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Ci("processSync",this.parser||this.Parser),Ai("processSync",this.compiler||this.Compiler),this.process(t,i),Eo("processSync","process",n),r;function i(a,s){n=!0,po(a),r=s}}run(t,n,r){bo(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=dr(n);i.run(t,u,c);function c(d,f,p){const h=f||t;d?o(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Eo("runSync","run",r),i;function a(s,o){po(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=dr(n),i=this.compiler||this.Compiler;return Ai("stringify",i),bo(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(wi("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");o(c.plugins),c.settings&&(i.settings=yi(!0,i.settings,c.settings))}function o(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[h,...b]=d;const y=r[p][1];sa(y)&&sa(h)&&(h=yi(!0,y,h)),r[p]=[c,h,...b]}}}}const jg=new Ha().freeze();function Ci(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ai(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wi(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 bo(e){if(!sa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Eo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function dr(e){return zg(e)?e:new Pl(e)}function zg(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $g(e){return typeof e=="string"||Yg(e)}function Yg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Gg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",To=[],yo={allowDangerousHtml:!0},qg=/^(https?|ircs?|mailto|xmpp)$/i,Vg=[{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 Ua(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||To,u=e.remarkPlugins||To,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...yo}:yo,d=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||Wg,h=jg().use(km).use(u).use(Sg,c).use(o),b=new Pl;typeof r=="string"&&(b.value=r);for(const v of Vg)Object.hasOwn(e,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+Gg+v.id,void 0);const y=h.parse(b);let w=h.runSync(y,b);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),qr(w,S),f0(w,{Fragment:x.Fragment,components:a,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function S(v,k,L){if(v.type==="raw"&&L&&typeof k=="number")return d?L.children.splice(k,1):L.children[k]={type:"text",value:v.value},k;if(v.type==="element"){let A;for(A in gi)if(Object.hasOwn(gi,A)&&Object.hasOwn(v.properties,A)){const N=v.properties[A],Y=gi[A];(Y===null||Y.includes(v.tagName))&&(v.properties[A]=p(String(N||""),A,v))}}if(v.type==="element"){let A=t?!t.includes(v.tagName):s?s.includes(v.tagName):!1;if(!A&&n&&typeof k=="number"&&(A=!n(v,k,L)),A&&L&&typeof k=="number")return f&&v.children?L.children.splice(k,1,...v.children):L.children.splice(k,1),k}}}function Wg(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||qg.test(e.slice(0,t))?e:""}const xo=/[#.]/g;function Xg(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){xo.lastIndex=i;const o=xo.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const Qg=new Set(["button","menu","reset","submit"]),ua={}.hasOwnProperty;function Ml(e,t,n){const r=n&&eb(n);function i(a,s,...o){let u=-1,c;if(a==null){c={type:"root",children:[]};const d=s;o.unshift(d)}else if(c=Xg(a,t),c.tagName=c.tagName.toLowerCase(),r&&ua.call(r,c.tagName)&&(c.tagName=r[c.tagName]),Kg(s,c.tagName)){let d;for(d in s)ua.call(s,d)&&Jg(e,c.properties,d,s[d])}else o.unshift(s);for(;++u<o.length;)la(c.children,o[u]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function Kg(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"?Qg.has(e.type.toLowerCase()):!("value"in e)}function Jg(e,t,n,r){const i=Hr(e,n);let a=-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"?i.spaceSeparated?s=zs(r):i.commaSeparated?s=Bs(r):i.commaOrSpaceSeparated?s=zs(Bs(r).join(" ")):s=_o(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?Zg(r):String(r);if(Array.isArray(s)){const o=[];for(;++a<s.length;){const u=_o(i,i.property,s[a]);o[a]=u}s=o}if(i.property==="className"&&Array.isArray(t.className)){const o=s;s=t.className.concat(o)}t[i.property]=s}}function la(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;)la(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?la(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function _o(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Vn(n)===Vn(t)))return!0}return n}function Zg(e){const t=[];let n;for(n in e)ua.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function eb(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const tb=["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"],nb=Ml(Zn,"div"),rb=Ml(Yt,"g",tb);function ib(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=So(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=So(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function So(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
61
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Qt={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/"},Bl={}.hasOwnProperty,ab=Object.prototype;function sb(e,t){const n=t||{};return ja({file:n.file||void 0,location:!1,schema:n.space==="svg"?Yt:Zn,verbose:n.verbose||!1},e)}function ja(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},yr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Fl(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=ib(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},yr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},yr(e,r,n),n}default:return n=ob(e,t),n}}function Fl(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=ja(e,t[n]);r.push(i)}return r}function ob(e,t){const n=e.schema;e.schema=t.namespaceURI===Qt.svg?Yt:Zn;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;Bl.call(ab,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?rb:nb)(t.tagName,i,Fl(e,t.childNodes));if(yr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&gn(u.startTag),d=u&&u.endTag&&gn(u.endTag),f=ja(e,o.content);c&&d&&e.file&&(f.position={start:c.end,end:d.start}),s.content=f}return e.schema=n,s}function yr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ub(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ub(e,t,n){const r=gn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)Bl.call(n.attrs,s)&&(a[Hr(e.schema,s).property]=gn(n.attrs[s]));n.startTag;const o=gn(n.startTag),u=n.endTag?gn(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function gn(e){const t=Co({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Co({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Co(e){return e.line&&e.column?e:void 0}const Ao={}.hasOwnProperty;function Hl(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&Ao.call(i,e)){const u=String(i[e]);s=Ao.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const lb={},cb={}.hasOwnProperty,Ul=Hl("type",{handlers:{root:fb,element:bb,text:mb,comment:gb,doctype:pb}});function db(e,t){const r=(t||lb).space;return Ul(e,r==="svg"?Yt:Zn)}function fb(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=za(e.children,n,t),wn(e,n),n}function hb(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=za(e.children,n,t),wn(e,n),n}function pb(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return wn(e,t),t}function mb(e){const t={nodeName:"#text",value:e.value,parentNode:null};return wn(e,t),t}function gb(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return wn(e,t),t}function bb(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Yt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&cb.call(e.properties,a)){const u=Eb(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Qt[s],childNodes:[],parentNode:null};return o.childNodes=za(e.children,o,r),wn(e,o),e.tagName==="template"&&e.content&&(o.content=hb(e.content,r)),o}function Eb(e,t,n){const r=Hr(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?Zu(n):ul(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Qt[r.space]}return i}function za(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Ul(e[r],n);a.parentNode=t,i.push(a)}return i}function wn(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,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 Tb=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],yb=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]),De="�";var g;(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"})(g||(g={}));const tt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function jl(e){return e>=55296&&e<=57343}function xb(e){return e>=56320&&e<=57343}function _b(e,t){return(e-55296)*1024+9216+t}function zl(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function $l(e){return e>=64976&&e<=65007||yb.has(e)}var D;(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"})(D||(D={}));const Sb=65536;class Cb{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=Sb,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:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(xb(n))return this.pos++,this._addGap(),_b(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(D.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,g.EOF;const r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.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,g.EOF;let t=this.html.charCodeAt(this.pos);return t===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):t===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,jl(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===g.LINE_FEED||t===g.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){zl(t)?this._err(D.controlCharacterInInputStream):$l(t)&&this._err(D.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ge;(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"})(ge||(ge={}));function Yl(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 Gl=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Ab=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Ii;const wb=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]]),Ib=(Ii=String.fromCodePoint)!==null&&Ii!==void 0?Ii: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 vb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=wb.get(e))!==null&&t!==void 0?t:e}var Ge;(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"})(Ge||(Ge={}));const kb=32;var jt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(jt||(jt={}));function ca(e){return e>=Ge.ZERO&&e<=Ge.NINE}function Nb(e){return e>=Ge.UPPER_A&&e<=Ge.UPPER_F||e>=Ge.LOWER_A&&e<=Ge.LOWER_F}function Rb(e){return e>=Ge.UPPER_A&&e<=Ge.UPPER_Z||e>=Ge.LOWER_A&&e<=Ge.LOWER_Z||ca(e)}function Ob(e){return e===Ge.EQUALS||Rb(e)}var $e;(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"})($e||($e={}));var Ot;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ot||(Ot={}));class ql{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=$e.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ot.Strict}startEntity(t){this.decodeMode=t,this.state=$e.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case $e.EntityStart:return t.charCodeAt(n)===Ge.NUM?(this.state=$e.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=$e.NamedEntity,this.stateNamedEntity(t,n));case $e.NumericStart:return this.stateNumericStart(t,n);case $e.NumericDecimal:return this.stateNumericDecimal(t,n);case $e.NumericHex:return this.stateNumericHex(t,n);case $e.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|kb)===Ge.LOWER_X?(this.state=$e.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=$e.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ca(i)||Nb(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ca(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,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===Ge.SEMI)this.consumed+=1;else if(this.decodeMode===Ot.Strict)return 0;return this.emitCodePoint(vb(this.result),this.consumed),this.errors&&(t!==Ge.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&jt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Lb(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ot.Attribute&&(a===0||Ob(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&jt.VALUE_LENGTH)>>14,a!==0){if(s===Ge.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ot.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&jt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~jt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case $e.NamedEntity:return this.result!==0&&(this.decodeMode!==Ot.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case $e.NumericDecimal:return this.emitNumericEntity(0,2);case $e.NumericHex:return this.emitNumericEntity(0,3);case $e.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case $e.EntityStart:return 0}}}function Vl(e){let t="";const n=new ql(e,r=>t+=Ib(r));return function(i,a){let s=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(s,o),n.startEntity(a);const c=n.write(i,o+1);if(c<0){s=o+n.end();break}s=o+c,o=c===0?s+1:s}const u=t+i.slice(s);return t="",u}}function Lb(e,t,n,r){const i=(t&jt.BRANCH_LENGTH)>>7,a=t&jt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}Vl(Gl);Vl(Ab);var M;(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/"})(M||(M={}));var Kt;(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"})(Kt||(Kt={}));var ot;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ot||(ot={}));var R;(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"})(R||(R={}));var l;(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"})(l||(l={}));const Db=new Map([[R.A,l.A],[R.ADDRESS,l.ADDRESS],[R.ANNOTATION_XML,l.ANNOTATION_XML],[R.APPLET,l.APPLET],[R.AREA,l.AREA],[R.ARTICLE,l.ARTICLE],[R.ASIDE,l.ASIDE],[R.B,l.B],[R.BASE,l.BASE],[R.BASEFONT,l.BASEFONT],[R.BGSOUND,l.BGSOUND],[R.BIG,l.BIG],[R.BLOCKQUOTE,l.BLOCKQUOTE],[R.BODY,l.BODY],[R.BR,l.BR],[R.BUTTON,l.BUTTON],[R.CAPTION,l.CAPTION],[R.CENTER,l.CENTER],[R.CODE,l.CODE],[R.COL,l.COL],[R.COLGROUP,l.COLGROUP],[R.DD,l.DD],[R.DESC,l.DESC],[R.DETAILS,l.DETAILS],[R.DIALOG,l.DIALOG],[R.DIR,l.DIR],[R.DIV,l.DIV],[R.DL,l.DL],[R.DT,l.DT],[R.EM,l.EM],[R.EMBED,l.EMBED],[R.FIELDSET,l.FIELDSET],[R.FIGCAPTION,l.FIGCAPTION],[R.FIGURE,l.FIGURE],[R.FONT,l.FONT],[R.FOOTER,l.FOOTER],[R.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[R.FORM,l.FORM],[R.FRAME,l.FRAME],[R.FRAMESET,l.FRAMESET],[R.H1,l.H1],[R.H2,l.H2],[R.H3,l.H3],[R.H4,l.H4],[R.H5,l.H5],[R.H6,l.H6],[R.HEAD,l.HEAD],[R.HEADER,l.HEADER],[R.HGROUP,l.HGROUP],[R.HR,l.HR],[R.HTML,l.HTML],[R.I,l.I],[R.IMG,l.IMG],[R.IMAGE,l.IMAGE],[R.INPUT,l.INPUT],[R.IFRAME,l.IFRAME],[R.KEYGEN,l.KEYGEN],[R.LABEL,l.LABEL],[R.LI,l.LI],[R.LINK,l.LINK],[R.LISTING,l.LISTING],[R.MAIN,l.MAIN],[R.MALIGNMARK,l.MALIGNMARK],[R.MARQUEE,l.MARQUEE],[R.MATH,l.MATH],[R.MENU,l.MENU],[R.META,l.META],[R.MGLYPH,l.MGLYPH],[R.MI,l.MI],[R.MO,l.MO],[R.MN,l.MN],[R.MS,l.MS],[R.MTEXT,l.MTEXT],[R.NAV,l.NAV],[R.NOBR,l.NOBR],[R.NOFRAMES,l.NOFRAMES],[R.NOEMBED,l.NOEMBED],[R.NOSCRIPT,l.NOSCRIPT],[R.OBJECT,l.OBJECT],[R.OL,l.OL],[R.OPTGROUP,l.OPTGROUP],[R.OPTION,l.OPTION],[R.P,l.P],[R.PARAM,l.PARAM],[R.PLAINTEXT,l.PLAINTEXT],[R.PRE,l.PRE],[R.RB,l.RB],[R.RP,l.RP],[R.RT,l.RT],[R.RTC,l.RTC],[R.RUBY,l.RUBY],[R.S,l.S],[R.SCRIPT,l.SCRIPT],[R.SEARCH,l.SEARCH],[R.SECTION,l.SECTION],[R.SELECT,l.SELECT],[R.SOURCE,l.SOURCE],[R.SMALL,l.SMALL],[R.SPAN,l.SPAN],[R.STRIKE,l.STRIKE],[R.STRONG,l.STRONG],[R.STYLE,l.STYLE],[R.SUB,l.SUB],[R.SUMMARY,l.SUMMARY],[R.SUP,l.SUP],[R.TABLE,l.TABLE],[R.TBODY,l.TBODY],[R.TEMPLATE,l.TEMPLATE],[R.TEXTAREA,l.TEXTAREA],[R.TFOOT,l.TFOOT],[R.TD,l.TD],[R.TH,l.TH],[R.THEAD,l.THEAD],[R.TITLE,l.TITLE],[R.TR,l.TR],[R.TRACK,l.TRACK],[R.TT,l.TT],[R.U,l.U],[R.UL,l.UL],[R.SVG,l.SVG],[R.VAR,l.VAR],[R.WBR,l.WBR],[R.XMP,l.XMP]]);function In(e){var t;return(t=Db.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const F=l,Pb={[M.HTML]:new Set([F.ADDRESS,F.APPLET,F.AREA,F.ARTICLE,F.ASIDE,F.BASE,F.BASEFONT,F.BGSOUND,F.BLOCKQUOTE,F.BODY,F.BR,F.BUTTON,F.CAPTION,F.CENTER,F.COL,F.COLGROUP,F.DD,F.DETAILS,F.DIR,F.DIV,F.DL,F.DT,F.EMBED,F.FIELDSET,F.FIGCAPTION,F.FIGURE,F.FOOTER,F.FORM,F.FRAME,F.FRAMESET,F.H1,F.H2,F.H3,F.H4,F.H5,F.H6,F.HEAD,F.HEADER,F.HGROUP,F.HR,F.HTML,F.IFRAME,F.IMG,F.INPUT,F.LI,F.LINK,F.LISTING,F.MAIN,F.MARQUEE,F.MENU,F.META,F.NAV,F.NOEMBED,F.NOFRAMES,F.NOSCRIPT,F.OBJECT,F.OL,F.P,F.PARAM,F.PLAINTEXT,F.PRE,F.SCRIPT,F.SECTION,F.SELECT,F.SOURCE,F.STYLE,F.SUMMARY,F.TABLE,F.TBODY,F.TD,F.TEMPLATE,F.TEXTAREA,F.TFOOT,F.TH,F.THEAD,F.TITLE,F.TR,F.TRACK,F.UL,F.WBR,F.XMP]),[M.MATHML]:new Set([F.MI,F.MO,F.MN,F.MS,F.MTEXT,F.ANNOTATION_XML]),[M.SVG]:new Set([F.TITLE,F.FOREIGN_OBJECT,F.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},da=new Set([F.H1,F.H2,F.H3,F.H4,F.H5,F.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var E;(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"})(E||(E={}));const Fe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function Mb(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function Bn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function Bb(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function Ht(e){return Bb(e)||Bn(e)}function wo(e){return Ht(e)||Mb(e)}function fr(e){return e+32}function Wl(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function Io(e){return Wl(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function Fb(e){return e===g.NULL?D.nullCharacterReference:e>1114111?D.characterReferenceOutsideUnicodeRange:jl(e)?D.surrogateCharacterReference:$l(e)?D.noncharacterCharacterReference:zl(e)||e===g.CARRIAGE_RETURN?D.controlCharacterReference:null}class Hb{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=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Cb(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ql(Gl,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Fb(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.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:ge.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ge.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ge.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ge.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(Yl(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(D.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=In(t.tagName),t.type===ge.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(D.endTagWithAttributes),t.selfClosing&&this._err(D.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 ge.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ge.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ge.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:ge.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=Wl(t)?ge.WHITESPACE_CHARACTER:t===g.NULL?ge.NULL_CHARACTER:ge.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ge.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ot.Attribute:Ot.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(t);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ht(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ht(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=E.DATA;break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.tagName+=De;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Bn(t)?fr(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ht(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ht(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ht(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ht(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ht(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(tt.SCRIPT,!1)&&Io(this.preprocessor.peek(tt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<tt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(tt.SCRIPT,!1)&&Io(this.preprocessor.peek(tt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<tt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=De;break}default:this.currentAttr.name+=String.fromCodePoint(Bn(t)?fr(t):t)}}_stateAfterAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=De;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=De;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=De;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=De;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(tt.DASH_DASH,!0)?(this._createCommentToken(tt.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(tt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tt.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(tt.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(tt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=De;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case g.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(D.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Bn(t))this._createDoctypeToken(String.fromCharCode(fr(t))),this.state=E.DOCTYPE_NAME;else switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(De),this.state=E.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.name+=De;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Bn(t)?fr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(tt.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tt.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.NULL:{this._err(D.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.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(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&wo(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){wo(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Xl=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),vo=new Set([...Xl,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),wr=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Ub=new Set([...wr,l.OL,l.UL]),jb=new Set([...wr,l.BUTTON]),ko=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),No=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),zb=new Set([l.TR,l.TEMPLATE,l.HTML]),$b=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Yb=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Gb=new Set([l.TD,l.TH]);class qb{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=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.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 i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===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])!==M.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(da,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Gb,M.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(Yb,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo($b,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(zb,M.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]===l.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]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case M.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case M.SVG:{if(No.has(i))return!1;break}case M.MATHML:{if(ko.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,wr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Ub)}hasInButtonScope(t){return this.hasInDynamicScope(t,jb)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case M.HTML:{if(da.has(n))return!0;if(wr.has(n))return!1;break}case M.SVG:{if(No.has(n))return!1;break}case M.MATHML:{if(ko.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Xl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;vo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&vo.has(this.currentTagId);)this.pop()}}const vi=3;var xt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(xt||(xt={}));const Ro={type:xt.Marker};class Vb{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===xt.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<vi)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<vi)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=vi&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Ro)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:xt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:xt.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(Ro);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===xt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===xt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===xt.Element&&n.element===t)}}const Ut={createDocument(){return{nodeName:"#document",mode:ot.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 i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ut.appendChild(e,a)}},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(Ut.isTextNode(n)){n.value+=t;return}}Ut.appendChild(e,Ut.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ut.isTextNode(r)?r.value+=t:Ut.insertBefore(e,Ut.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}}},Ql="html",Wb="about:legacy-compat",Xb="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Kl=["+//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//"],Qb=[...Kl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Kb=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Jl=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Jb=[...Jl,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Oo(e,t){return t.some(n=>e.startsWith(n))}function Zb(e){return e.name===Ql&&e.publicId===null&&(e.systemId===null||e.systemId===Wb)}function e1(e){if(e.name!==Ql)return ot.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Xb)return ot.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Kb.has(n))return ot.QUIRKS;let r=t===null?Qb:Kl;if(Oo(n,r))return ot.QUIRKS;if(r=t===null?Jl:Jb,Oo(n,r))return ot.LIMITED_QUIRKS}return ot.NO_QUIRKS}const Lo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},t1="definitionurl",n1="definitionURL",r1=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])),i1=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),a1=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])),s1=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function o1(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===Kt.COLOR||r===Kt.SIZE||r===Kt.FACE)||s1.has(t)}function Zl(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===t1){e.attrs[t].name=n1;break}}function ec(e){for(let t=0;t<e.attrs.length;t++){const n=r1.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function $a(e){for(let t=0;t<e.attrs.length;t++){const n=i1.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 u1(e){const t=a1.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=In(e.tagName))}function l1(e,t){return t===M.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function c1(e,t,n){if(t===M.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Kt.ENCODING){const i=n[r].value.toLowerCase();return i===Lo.TEXT_HTML||i===Lo.APPLICATION_XML}}return t===M.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function d1(e,t,n,r){return(!r||r===M.HTML)&&c1(e,t,n)||(!r||r===M.MATHML)&&l1(e,t)}const f1="hidden",h1=8,p1=3;var _;(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"})(_||(_={}));const m1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},tc=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Do={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ut,onParseError:null};class Po{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.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={...Do,...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 Hb(this.options,this),this.activeFormattingElements=new Vb(this.treeAdapter),this.fragmentContextID=r?In(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new qb(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={...Do,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,M.HTML,[]));const i=r.treeAdapter.createElement("documentmock",M.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:m1,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,M.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=Fe.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)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Fe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Fe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Fe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Fe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));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,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,M.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(R.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.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 i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,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,i=this.treeAdapter.getTagName(t),a=n.type===ge.END_TAG&&i===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,a)}}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===l.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===M.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&!this._isIntegrationPoint(r,n,M.HTML)}_processToken(t){switch(t.type){case ge.CHARACTER:{this.onCharacter(t);break}case ge.NULL_CHARACTER:{this.onNullCharacter(t);break}case ge.COMMENT:{this.onComment(t);break}case ge.DOCTYPE:{this.onDoctype(t);break}case ge.START_TAG:{this._processStartTag(t);break}case ge.END_TAG:{this.onEndTag(t);break}case ge.EOF:{this.onEof(t);break}case ge.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return d1(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===xt.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=_.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=_.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=_.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=_.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=_.IN_TABLE;return}case l.BODY:{this.insertionMode=_.IN_BODY;return}case l.FRAMESET:{this.insertionMode=_.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?_.AFTER_HEAD:_.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=_.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=_.IN_HEAD;return}break}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(t){return tc.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 l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.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 Pb[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){GE(this,t);return}switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{jn(this,t);break}case _.BEFORE_HEAD:{zn(this,t);break}case _.IN_HEAD:{$n(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Yn(this,t);break}case _.AFTER_HEAD:{Gn(this,t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:{rc(this,t);break}case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{ki(this,t);break}case _.IN_TABLE_TEXT:{lc(this,t);break}case _.IN_COLUMN_GROUP:{Ir(this,t);break}case _.AFTER_BODY:{vr(this,t);break}case _.AFTER_AFTER_BODY:{xr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){YE(this,t);return}switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{jn(this,t);break}case _.BEFORE_HEAD:{zn(this,t);break}case _.IN_HEAD:{$n(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Yn(this,t);break}case _.AFTER_HEAD:{Gn(this,t);break}case _.TEXT:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{ki(this,t);break}case _.IN_COLUMN_GROUP:{Ir(this,t);break}case _.AFTER_BODY:{vr(this,t);break}case _.AFTER_AFTER_BODY:{xr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){fa(this,t);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{fa(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.AFTER_BODY:{_1(this,t);break}case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{S1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:{C1(this,t);break}case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:{this._err(t,D.misplacedDoctype);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?qE(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{A1(this,t);break}case _.BEFORE_HEAD:{I1(this,t);break}case _.IN_HEAD:{gt(this,t);break}case _.IN_HEAD_NO_SCRIPT:{N1(this,t);break}case _.AFTER_HEAD:{O1(this,t);break}case _.IN_BODY:{Qe(this,t);break}case _.IN_TABLE:{xn(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_CAPTION:{vE(this,t);break}case _.IN_COLUMN_GROUP:{qa(this,t);break}case _.IN_TABLE_BODY:{Xr(this,t);break}case _.IN_ROW:{Qr(this,t);break}case _.IN_CELL:{RE(this,t);break}case _.IN_SELECT:{fc(this,t);break}case _.IN_SELECT_IN_TABLE:{LE(this,t);break}case _.IN_TEMPLATE:{PE(this,t);break}case _.AFTER_BODY:{BE(this,t);break}case _.IN_FRAMESET:{FE(this,t);break}case _.AFTER_FRAMESET:{UE(this,t);break}case _.AFTER_AFTER_BODY:{zE(this,t);break}case _.AFTER_AFTER_FRAMESET:{$E(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?VE(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{w1(this,t);break}case _.BEFORE_HEAD:{v1(this,t);break}case _.IN_HEAD:{k1(this,t);break}case _.IN_HEAD_NO_SCRIPT:{R1(this,t);break}case _.AFTER_HEAD:{L1(this,t);break}case _.IN_BODY:{Wr(this,t);break}case _.TEXT:{EE(this,t);break}case _.IN_TABLE:{Xn(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_CAPTION:{kE(this,t);break}case _.IN_COLUMN_GROUP:{NE(this,t);break}case _.IN_TABLE_BODY:{ha(this,t);break}case _.IN_ROW:{dc(this,t);break}case _.IN_CELL:{OE(this,t);break}case _.IN_SELECT:{hc(this,t);break}case _.IN_SELECT_IN_TABLE:{DE(this,t);break}case _.IN_TEMPLATE:{ME(this,t);break}case _.AFTER_BODY:{mc(this,t);break}case _.IN_FRAMESET:{HE(this,t);break}case _.AFTER_FRAMESET:{jE(this,t);break}case _.AFTER_AFTER_BODY:{xr(this,t);break}}}onEof(t){switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{jn(this,t);break}case _.BEFORE_HEAD:{zn(this,t);break}case _.IN_HEAD:{$n(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Yn(this,t);break}case _.AFTER_HEAD:{Gn(this,t);break}case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{oc(this,t);break}case _.TEXT:{TE(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_TEMPLATE:{pc(this,t);break}case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Ga(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===g.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 _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{this._insertCharacters(t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{nc(this,t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{ki(this,t);break}case _.IN_TABLE_TEXT:{uc(this,t);break}}}}function g1(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):sc(e,t),n}function b1(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function E1(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=p1;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=T1(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function T1(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 y1(e,t,n){const r=e.treeAdapter.getTagName(t),i=In(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function x1(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ya(e,t){for(let n=0;n<h1;n++){const r=g1(e,t);if(!r)break;const i=b1(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=E1(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&y1(e,s,a),x1(e,i,r)}}function fa(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function _1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function S1(e,t){e._appendCommentNode(t,e.document)}function Ga(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],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function C1(e,t){e._setDocumentType(t);const n=t.forceQuirks?ot.QUIRKS:e1(t);Zb(t)||e._err(t,D.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=_.BEFORE_HTML}function Ln(e,t){e._err(t,D.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ot.QUIRKS),e.insertionMode=_.BEFORE_HTML,e._processToken(t)}function A1(e,t){t.tagID===l.HTML?(e._insertElement(t,M.HTML),e.insertionMode=_.BEFORE_HEAD):jn(e,t)}function w1(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&jn(e,t)}function jn(e,t){e._insertFakeRootElement(),e.insertionMode=_.BEFORE_HEAD,e._processToken(t)}function I1(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.HEAD:{e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD;break}default:zn(e,t)}}function v1(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?zn(e,t):e._err(t,D.endTagWithoutMatchingOpenElement)}function zn(e,t){e._insertFakeElement(R.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD,e._processToken(t)}function gt(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,Fe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Fe.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=_.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,Fe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,Fe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=_.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:$n(e,t)}}function k1(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=_.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{$n(e,t);break}case l.TEMPLATE:{un(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function un(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,D.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,D.endTagWithoutMatchingOpenElement)}function $n(e,t){e.openElements.pop(),e.insertionMode=_.AFTER_HEAD,e._processToken(t)}function N1(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{gt(e,t);break}case l.NOSCRIPT:{e._err(t,D.nestedNoscriptInHead);break}default:Yn(e,t)}}function R1(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=_.IN_HEAD;break}case l.BR:{Yn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Yn(e,t){const n=t.type===ge.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=_.IN_HEAD,e._processToken(t)}function O1(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.BODY:{e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=_.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,M.HTML),e.insertionMode=_.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,D.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),gt(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:Gn(e,t)}}function L1(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{Gn(e,t);break}case l.TEMPLATE:{un(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Gn(e,t){e._insertFakeElement(R.BODY,l.BODY),e.insertionMode=_.IN_BODY,Vr(e,t)}function Vr(e,t){switch(t.type){case ge.CHARACTER:{rc(e,t);break}case ge.WHITESPACE_CHARACTER:{nc(e,t);break}case ge.COMMENT:{fa(e,t);break}case ge.START_TAG:{Qe(e,t);break}case ge.END_TAG:{Wr(e,t);break}case ge.EOF:{oc(e,t);break}}}function nc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function rc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function D1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function P1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function M1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_FRAMESET)}function B1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function F1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),da.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function H1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function U1(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function j1(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function z1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=Fe.PLAINTEXT}function $1(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function Y1(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(Ya(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function G1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function q1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Ya(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function V1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function W1(e,t){e.treeAdapter.getDocumentMode(e.document)!==ot.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=_.IN_TABLE}function ic(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ac(e){const t=Yl(e,Kt.TYPE);return t!=null&&t.toLowerCase()===f1}function X1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),ac(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Q1(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function K1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function J1(e,t){t.tagName=R.IMG,t.tagID=l.IMG,ic(e,t)}function Z1(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=_.TEXT}function eE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function tE(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function Mo(e,t){e._switchToTextParsing(t,Fe.RAWTEXT)}function nE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===_.IN_TABLE||e.insertionMode===_.IN_CAPTION||e.insertionMode===_.IN_TABLE_BODY||e.insertionMode===_.IN_ROW||e.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function rE(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function iE(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function aE(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,M.HTML)}function sE(e,t){e._reconstructActiveFormattingElements(),Zl(t),$a(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function oE(e,t){e._reconstructActiveFormattingElements(),ec(t),$a(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function Bo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function Qe(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{G1(e,t);break}case l.A:{Y1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{F1(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{B1(e,t);break}case l.LI:case l.DD:case l.DT:{j1(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{ic(e,t);break}case l.HR:{K1(e,t);break}case l.RB:case l.RTC:{iE(e,t);break}case l.RT:case l.RP:{aE(e,t);break}case l.PRE:case l.LISTING:{H1(e,t);break}case l.XMP:{eE(e,t);break}case l.SVG:{oE(e,t);break}case l.HTML:{D1(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{gt(e,t);break}case l.BODY:{P1(e,t);break}case l.FORM:{U1(e,t);break}case l.NOBR:{q1(e,t);break}case l.MATH:{sE(e,t);break}case l.TABLE:{W1(e,t);break}case l.INPUT:{X1(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Q1(e,t);break}case l.IMAGE:{J1(e,t);break}case l.BUTTON:{$1(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{V1(e,t);break}case l.IFRAME:{tE(e,t);break}case l.SELECT:{nE(e,t);break}case l.OPTION:case l.OPTGROUP:{rE(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Mo(e,t);break}case l.FRAMESET:{M1(e,t);break}case l.TEXTAREA:{Z1(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Mo(e,t):Bo(e,t);break}case l.PLAINTEXT:{z1(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:Bo(e,t)}}function uE(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=_.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function lE(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=_.AFTER_BODY,mc(e,t))}function cE(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function dE(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function fE(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(R.P,l.P),e._closePElement()}function hE(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function pE(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function mE(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function gE(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bE(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function sc(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Wr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Ya(e,t);break}case l.P:{fE(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{cE(e,t);break}case l.LI:{hE(e);break}case l.DD:case l.DT:{pE(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{mE(e);break}case l.BR:{bE(e);break}case l.BODY:{uE(e,t);break}case l.HTML:{lE(e,t);break}case l.FORM:{dE(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{gE(e,t);break}case l.TEMPLATE:{un(e,t);break}default:sc(e,t)}}function oc(e,t){e.tmplInsertionModeStack.length>0?pc(e,t):Ga(e,t)}function EE(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function TE(e,t){e._err(t,D.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ki(e,t){if(tc.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=_.IN_TABLE_TEXT,t.type){case ge.CHARACTER:{lc(e,t);break}case ge.WHITESPACE_CHARACTER:{uc(e,t);break}}else nr(e,t)}function yE(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_CAPTION}function xE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_COLUMN_GROUP}function _E(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,l.COLGROUP),e.insertionMode=_.IN_COLUMN_GROUP,qa(e,t)}function SE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_TABLE_BODY}function CE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,l.TBODY),e.insertionMode=_.IN_TABLE_BODY,Xr(e,t)}function AE(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wE(e,t){ac(t)?e._appendElement(t,M.HTML):nr(e,t),t.ackSelfClosing=!0}function IE(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function xn(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{CE(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{gt(e,t);break}case l.COL:{_E(e,t);break}case l.FORM:{IE(e,t);break}case l.TABLE:{AE(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{SE(e,t);break}case l.INPUT:{wE(e,t);break}case l.CAPTION:{yE(e,t);break}case l.COLGROUP:{xE(e,t);break}default:nr(e,t)}}function Xn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{un(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:nr(e,t)}}function nr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Vr(e,t),e.fosterParentingEnabled=n}function uc(e,t){e.pendingCharacterTokens.push(t)}function lc(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Dn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)nr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const cc=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function vE(e,t){const n=t.tagID;cc.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,xn(e,t)):Qe(e,t)}function kE(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,n===l.TABLE&&Xn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:Wr(e,t)}}function qa(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.COL:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{gt(e,t);break}default:Ir(e,t)}}function NE(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case l.TEMPLATE:{un(e,t);break}case l.COL:break;default:Ir(e,t)}}function Ir(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE,e._processToken(t))}function Xr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,l.TR),e.insertionMode=_.IN_ROW,Qr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,xn(e,t));break}default:xn(e,t)}}function ha(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,Xn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:Xn(e,t)}}function Qr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=_.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,Xr(e,t));break}default:xn(e,t)}}function dc(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,ha(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,ha(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:Xn(e,t)}}function RE(e,t){const n=t.tagID;cc.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),Qr(e,t)):Qe(e,t)}function OE(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),dc(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:Wr(e,t)}}function fc(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{gt(e,t);break}}}function hc(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{un(e,t);break}}}function LE(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fc(e,t)}function DE(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):hc(e,t)}function PE(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{gt(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=_.IN_TABLE,e.insertionMode=_.IN_TABLE,xn(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,e.insertionMode=_.IN_COLUMN_GROUP,qa(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,e.insertionMode=_.IN_TABLE_BODY,Xr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=_.IN_ROW,e.insertionMode=_.IN_ROW,Qr(e,t);break}default:e.tmplInsertionModeStack[0]=_.IN_BODY,e.insertionMode=_.IN_BODY,Qe(e,t)}}function ME(e,t){t.tagID===l.TEMPLATE&&un(e,t)}function pc(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ga(e,t)}function BE(e,t){t.tagID===l.HTML?Qe(e,t):vr(e,t)}function mc(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=_.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.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 vr(e,t)}function vr(e,t){e.insertionMode=_.IN_BODY,Vr(e,t)}function FE(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.FRAMESET:{e._insertElement(t,M.HTML);break}case l.FRAME:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{gt(e,t);break}}}function HE(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=_.AFTER_FRAMESET))}function UE(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.NOFRAMES:{gt(e,t);break}}}function jE(e,t){t.tagID===l.HTML&&(e.insertionMode=_.AFTER_AFTER_FRAMESET)}function zE(e,t){t.tagID===l.HTML?Qe(e,t):xr(e,t)}function xr(e,t){e.insertionMode=_.IN_BODY,Vr(e,t)}function $E(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.NOFRAMES:{gt(e,t);break}}}function YE(e,t){t.chars=De,e._insertCharacters(t)}function GE(e,t){e._insertCharacters(t),e.framesetOk=!1}function gc(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function qE(e,t){if(o1(t))gc(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?Zl(t):r===M.SVG&&(u1(t),ec(t)),$a(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function VE(e,t){if(t.tagID===l.P||t.tagID===l.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)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const WE=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Fo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bc(e,t){const n=iT(e),r=Hl("type",{handlers:{root:XE,element:QE,text:KE,comment:Tc,doctype:JE,raw:eT},unknown:tT}),i={parser:n?new Po(Fo):Po.getFragmentParser(void 0,Fo),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),vn(i,At());const a=n?i.parser.document:i.parser.getFragment(),s=sb(a,{file:i.options.file});return i.stitches&&qr(s,"comment",function(o,u,c){const d=o;if(d.value.stitch&&c&&u!==void 0){const f=c.children;return f[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Ec(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function XE(e,t){Ec(e.children,t)}function QE(e,t){nT(e,t),Ec(e.children,t),rT(e,t)}function KE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ge.CHARACTER,chars:e.value,location:rr(e)};vn(t,At(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function JE(e,t){const n={type:ge.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:rr(e)};vn(t,At(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ZE(e,t){t.stitches=!0;const n=aT(e);if("children"in e&&"children"in n){const r=bc({type:"root",children:e.children},t.options);n.children=r.children}Tc({type:"comment",value:{stitch:n}},t)}function Tc(e,t){const n=e.value,r={type:ge.COMMENT,data:n,location:rr(e)};vn(t,At(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function eT(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,yc(t,At(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 tT(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ZE(n,t);else{let r="";throw WE.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 vn(e,t){yc(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=Fe.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 yc(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 nT(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Fe.PLAINTEXT)return;vn(t,At(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Qt.html;i===Qt.html&&n==="svg"&&(i=Qt.svg);const a=db({...e,children:[]},{space:i===Qt.svg?"svg":"html"}),s={type:ge.START_TAG,tagName:n,tagID:In(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:rr(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function rT(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Tb.includes(n)||t.parser.tokenizer.state===Fe.PLAINTEXT)return;vn(t,Ur(e));const r={type:ge.END_TAG,tagName:n,tagID:In(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:rr(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Fe.RCDATA||t.parser.tokenizer.state===Fe.RAWTEXT||t.parser.tokenizer.state===Fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Fe.DATA)}function iT(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function rr(e){const t=At(e)||{line:void 0,column:void 0,offset:void 0},n=Ur(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 aT(e){return"children"in e?yn({...e,children:[]}):yn(e)}function Va(e){return function(t,n){return bc(t,{...e,file:n})}}const Wa=({children:e})=>x.jsx("div",{className:"p-3",children:e}),sT=({content:e,metaData:t})=>x.jsx(Wa,{children:x.jsx("div",{className:"flex justify-end",children:x.jsx("div",{className:`ml-auto w-fit max-w-full px-4 py-3 rounded-2xl rounded-br-md transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"bg-violet-600 text-white shadow-sm"}`,children:x.jsx("div",{children:x.jsx(Ua,{rehypePlugins:[Va],children:e&&e})})})})});function Ho(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function oT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function uT(e,t,n){const i=Yr((n||{}).ignore||[]),a=lT(t);let s=-1;for(;++s<a.length;)Dl(e,"text",o);function o(c,d){let f=-1,p;for(;++f<d.length;){const h=d[f],b=p?p.children:void 0;if(i(h,b?b.indexOf(h):void 0,p))return;p=h}if(p)return u(c,d)}function u(c,d){const f=d[d.length-1],p=a[s][0],h=a[s][1];let b=0;const w=f.children.indexOf(c);let S=!1,v=[];p.lastIndex=0;let k=p.exec(c.value);for(;k;){const L=k.index,A={index:k.index,input:k.input,stack:[...d,c]};let N=h(...k,A);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=L+1:(b!==L&&v.push({type:"text",value:c.value.slice(b,L)}),Array.isArray(N)?v.push(...N):N&&v.push(N),b=L+k[0].length,S=!0),!p.global)break;k=p.exec(c.value)}return S?(b<c.value.length&&v.push({type:"text",value:c.value.slice(b)}),f.children.splice(w,1,...v)):v=[c],w+v.length}}function lT(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([cT(i[0]),dT(i[1])])}return t}function cT(e){return typeof e=="string"?new RegExp(oT(e),"g"):e}function dT(e){return typeof e=="function"?e:function(){return e}}const Ni="phrasing",Ri=["autolink","link","image","label"];function fT(){return{transforms:[TT],enter:{literalAutolink:pT,literalAutolinkEmail:Oi,literalAutolinkHttp:Oi,literalAutolinkWww:Oi},exit:{literalAutolink:ET,literalAutolinkEmail:bT,literalAutolinkHttp:mT,literalAutolinkWww:gT}}}function hT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ni,notInConstruct:Ri},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ni,notInConstruct:Ri},{character:":",before:"[ps]",after:"\\/",inConstruct:Ni,notInConstruct:Ri}]}}function pT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Oi(e){this.config.enter.autolinkProtocol.call(this,e)}function mT(e){this.config.exit.autolinkProtocol.call(this,e)}function gT(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function bT(e){this.config.exit.autolinkEmail.call(this,e)}function ET(e){this.exit(e)}function TT(e){uT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,yT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),xT]],{ignore:["link","linkReference"]})}function yT(e,t,n,r,i){let a="";if(!xc(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!_T(n)))return!1;const s=ST(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function xT(e,t,n,r){return!xc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function _T(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ST(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ho(e,"(");let a=Ho(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function xc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||en(n)||jr(n))&&(!t||n!==47)}_c.peek=OT;function CT(){this.buffer()}function AT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wT(){this.buffer()}function IT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kT(e){this.exit(e)}function NT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RT(e){this.exit(e)}function OT(){return"["}function _c(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function LT(){return{enter:{gfmFootnoteCallString:CT,gfmFootnoteCall:AT,gfmFootnoteDefinitionLabelString:wT,gfmFootnoteDefinition:IT},exit:{gfmFootnoteCallString:vT,gfmFootnoteCall:kT,gfmFootnoteDefinitionLabelString:NT,gfmFootnoteDefinition:RT}}}function DT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:_c},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
62
- `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?Sc:PT))),c(),u}}function PT(e,t,n){return t===0?e:Sc(e,t,n)}function Sc(e,t,n){return(n?"":" ")+e}const MT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Cc.peek=jT;function BT(){return{canContainEols:["delete"],enter:{strikethrough:HT},exit:{strikethrough:UT}}}function FT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:MT}],handlers:{delete:Cc}}}function HT(e){this.enter({type:"delete",children:[]},e)}function UT(e){this.exit(e)}function Cc(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function jT(){return"~"}function zT(e){return e.length}function $T(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||zT,a=[],s=[],o=[],u=[];let c=0,d=-1;for(;++d<e.length;){const y=[],w=[];let S=-1;for(e[d].length>c&&(c=e[d].length);++S<e[d].length;){const v=YT(e[d][S]);if(n.alignDelimiters!==!1){const k=i(v);w[S]=k,(u[S]===void 0||k>u[S])&&(u[S]=k)}y.push(v)}s[d]=y,o[d]=w}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=Uo(r[f]);else{const y=Uo(r);for(;++f<c;)a[f]=y}f=-1;const p=[],h=[];for(;++f<c;){const y=a[f];let w="",S="";y===99?(w=":",S=":"):y===108?w=":":y===114&&(S=":");let v=n.alignDelimiters===!1?1:Math.max(1,u[f]-w.length-S.length);const k=w+"-".repeat(v)+S;n.alignDelimiters!==!1&&(v=w.length+v+S.length,v>u[f]&&(u[f]=v),h[f]=v),p[f]=k}s.splice(1,0,p),o.splice(1,0,h),d=-1;const b=[];for(;++d<s.length;){const y=s[d],w=o[d];f=-1;const S=[];for(;++f<c;){const v=y[f]||"";let k="",L="";if(n.alignDelimiters!==!1){const A=u[f]-(w[f]||0),N=a[f];N===114?k=" ".repeat(A):N===99?A%2?(k=" ".repeat(A/2+.5),L=" ".repeat(A/2-.5)):(k=" ".repeat(A/2),L=k):L=" ".repeat(A)}n.delimiterStart!==!1&&!f&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&v==="")&&(n.delimiterStart!==!1||f)&&S.push(" "),n.alignDelimiters!==!1&&S.push(k),S.push(v),n.alignDelimiters!==!1&&S.push(L),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&S.push("|")}b.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return b.join(`
63
- `)}function YT(e){return e==null?"":String(e)}function Uo(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function GT(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),qT);return i(),s}function qT(e,t,n){return">"+(n?"":" ")+e}function VT(e,t){return jo(e,t.inConstruct,!0)&&!jo(e,t.notInConstruct,!1)}function jo(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function zo(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
64
- `&&VT(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
65
- `}function WT(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function XT(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function QT(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function KT(e,t,n,r){const i=QT(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(XT(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,JT);return f(),p}const o=n.createTracker(r),u=i.repeat(Math.max(WT(a,i)+1,3)),c=n.enter("codeFenced");let d=o.move(u);if(e.lang){const f=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
59
+ `}),n}function go(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bo(e,t){const n=Ag(e,t),r=n.one(e,void 0),i=mg(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
60
+ `},i),a}function Ng(e,t){return e&&"run"in e?async function(n,r){const i=bo(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bo(n,{file:r,...t||e})}}function Eo(e){if(e)throw e}var yi,To;function Rg(){if(To)return yi;To=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var d=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!d&&!f)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},s=function(c,d){n&&d.name==="__proto__"?n(c,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):c[d.name]=d.newValue},o=function(c,d){if(d==="__proto__")if(e.call(c,d)){if(r)return r(c,d).value}else return;return c[d]};return yi=function u(){var c,d,f,p,h,b,x=arguments[0],w=1,C=arguments.length,k=!1;for(typeof x=="boolean"&&(k=x,x=arguments[1]||{},w=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});w<C;++w)if(c=arguments[w],c!=null)for(d in c)f=o(x,d),p=o(c,d),x!==p&&(k&&p&&(a(p)||(h=i(p)))?(h?(h=!1,b=f&&i(f)?f:[]):b=f&&a(f)?f:{},s(x,{name:d,newValue:u(k,b,p)})):typeof p<"u"&&s(x,{name:d,newValue:p}));return x},yi}var Og=Rg();const xi=Sa(Og);function oa(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 Lg(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...c){const d=e[++a];let f=-1;if(u){s(u);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,d?Dg(d,o)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Dg(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(c){const d=c;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const yt={basename:Pg,dirname:Mg,extname:Bg,join:Fg,sep:"/"};function Pg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Mg(e){if(nr(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 Bg(e){nr(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Fg(...e){let t=-1,n;for(;++t<e.length;)nr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Hg(n)}function Hg(e){nr(e);const t=e.codePointAt(0)===47;let n=Ug(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ug(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function nr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jg={cwd:zg};function zg(){return"/"}function ua(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $g(e){if(typeof e=="string")e=new URL(e);else if(!ua(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 Yg(e)}function Yg(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const _i=["history","path","basename","stem","extname","dirname"];class Hl{constructor(t){let n;t?ua(t)?n={path:t}:typeof t=="string"||Gg(t)?n={value:t}:n=t:n={},this.cwd=jg.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<_i.length;){const a=_i[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)_i.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?yt.basename(this.path):void 0}set basename(t){Ci(t,"basename"),Si(t,"basename"),this.path=yt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?yt.dirname(this.path):void 0}set dirname(t){yo(this.basename,"dirname"),this.path=yt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?yt.extname(this.path):void 0}set extname(t){if(Si(t,"extname"),yo(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=yt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ua(t)&&(t=$g(t)),Ci(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?yt.basename(this.path,this.extname):void 0}set stem(t){Ci(t,"stem"),Si(t,"stem"),this.path=yt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Xe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Si(e,t){if(e&&e.includes(yt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+yt.sep+"`")}function Ci(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Gg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qg=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};Object.setPrototypeOf(a,r);const s=Object.getOwnPropertyNames(i);for(const o of s){const u=Object.getOwnPropertyDescriptor(i,o);u&&Object.defineProperty(a,o,u)}return a}),Vg={}.hasOwnProperty;class ja extends qg{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=Lg()}copy(){const t=new ja;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(xi(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ii("data",this.frozen),this.namespace[t]=n,this):Vg.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ii("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=hr(t),r=this.parser||this.Parser;return Ai("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ai("process",this.parser||this.Parser),wi("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=hr(t),u=r.parse(o);r.run(u,o,function(d,f,p){if(d||!f||!p)return c(d);const h=f,b=r.stringify(h,p);Qg(b)?p.value=b:p.result=b,c(d,p)});function c(d,f){d||!f?s(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Ai("processSync",this.parser||this.Parser),wi("processSync",this.compiler||this.Compiler),this.process(t,i),_o("processSync","process",n),r;function i(a,s){n=!0,Eo(a),r=s}}run(t,n,r){xo(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=hr(n);i.run(t,u,c);function c(d,f,p){const h=f||t;d?o(d):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),_o("runSync","run",r),i;function a(s,o){Eo(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=hr(n),i=this.compiler||this.Compiler;return wi("stringify",i),xo(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ii("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");o(c.plugins),c.settings&&(i.settings=xi(!0,i.settings,c.settings))}function o(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...d]);else if(d.length>0){let[h,...b]=d;const x=r[p][1];oa(x)&&oa(h)&&(h=xi(!0,x,h)),r[p]=[c,h,...b]}}}}const Wg=new ja().freeze();function Ai(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function wi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ii(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 xo(e){if(!oa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _o(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hr(e){return Xg(e)?e:new Hl(e)}function Xg(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Qg(e){return typeof e=="string"||Kg(e)}function Kg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Jg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",So=[],Co={allowDangerousHtml:!0},Zg=/^(https?|ircs?|mailto|xmpp)$/i,eb=[{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 za(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,s=e.disallowedElements,o=e.rehypePlugins||So,u=e.remarkPlugins||So,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Co}:Co,d=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||tb,h=Wg().use(Mm).use(u).use(Ng,c).use(o),b=new Hl;typeof r=="string"&&(b.value=r);for(const k of eb)Object.hasOwn(e,k.from)&&(""+k.from+(k.to?"use `"+k.to+"` instead":"remove it")+Jg+k.id,void 0);const x=h.parse(b);let w=h.runSync(x,b);return i&&(w={type:"element",tagName:"div",properties:{className:i},children:w.type==="root"?w.children:[w]}),Vr(w,C),T0(w,{Fragment:y.Fragment,components:a,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function C(k,I,L){if(k.type==="raw"&&L&&typeof I=="number")return d?L.children.splice(I,1):L.children[I]={type:"text",value:k.value},I;if(k.type==="element"){let A;for(A in bi)if(Object.hasOwn(bi,A)&&Object.hasOwn(k.properties,A)){const N=k.properties[A],Y=bi[A];(Y===null||Y.includes(k.tagName))&&(k.properties[A]=p(String(N||""),A,k))}}if(k.type==="element"){let A=t?!t.includes(k.tagName):s?s.includes(k.tagName):!1;if(!A&&n&&typeof I=="number"&&(A=!n(k,I,L)),A&&L&&typeof I=="number")return f&&k.children?L.children.splice(I,1,...k.children):L.children.splice(I,1),I}}}function tb(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Zg.test(e.slice(0,t))?e:""}const Ao=/[#.]/g;function nb(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){Ao.lastIndex=i;const o=Ao.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}const rb=new Set(["button","menu","reset","submit"]),la={}.hasOwnProperty;function Ul(e,t,n){const r=n&&ob(n);function i(a,s,...o){let u=-1,c;if(a==null){c={type:"root",children:[]};const d=s;o.unshift(d)}else if(c=nb(a,t),c.tagName=c.tagName.toLowerCase(),r&&la.call(r,c.tagName)&&(c.tagName=r[c.tagName]),ib(s,c.tagName)){let d;for(d in s)la.call(s,d)&&ab(e,c.properties,d,s[d])}else o.unshift(s);for(;++u<o.length;)ca(c.children,o[u]);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function ib(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"?rb.has(e.type.toLowerCase()):!("value"in e)}function ab(e,t,n,r){const i=Ur(e,n);let a=-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"?i.spaceSeparated?s=qs(r):i.commaSeparated?s=js(r):i.commaOrSpaceSeparated?s=qs(js(r).join(" ")):s=wo(i,i.property,r):Array.isArray(r)?s=r.concat():s=i.property==="style"?sb(r):String(r);if(Array.isArray(s)){const o=[];for(;++a<s.length;){const u=wo(i,i.property,s[a]);o[a]=u}s=o}if(i.property==="className"&&Array.isArray(t.className)){const o=s;s=t.className.concat(o)}t[i.property]=s}}function ca(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;)ca(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?ca(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function wo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Wn(n)===Wn(t)))return!0}return n}function sb(e){const t=[];let n;for(n in e)la.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}function ob(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}const ub=["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"],lb=Ul(er,"div"),cb=Ul(qt,"g",ub);function db(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=Io(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=Io(t,o),c=u===-1?t.length+1:u+1;if(o===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Io(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
61
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Jt={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/"},jl={}.hasOwnProperty,fb=Object.prototype;function hb(e,t){const n=t||{};return $a({file:n.file||void 0,location:!1,schema:n.space==="svg"?qt:er,verbose:n.verbose||!1},e)}function $a(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},xr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:zl(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=db(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},xr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},xr(e,r,n),n}default:return n=pb(e,t),n}}function zl(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=$a(e,t[n]);r.push(i)}return r}function pb(e,t){const n=e.schema;e.schema=t.namespaceURI===Jt.svg?qt:er;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;jl.call(fb,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?cb:lb)(t.tagName,i,zl(e,t.childNodes));if(xr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,c=u&&u.startTag&&bn(u.startTag),d=u&&u.endTag&&bn(u.endTag),f=$a(e,o.content);c&&d&&e.file&&(f.position={start:c.end,end:d.start}),s.content=f}return e.schema=n,s}function xr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=mb(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function mb(e,t,n){const r=bn(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)jl.call(n.attrs,s)&&(a[Ur(e.schema,s).property]=bn(n.attrs[s]));n.startTag;const o=bn(n.startTag),u=n.endTag?bn(n.endTag):void 0,c={opening:o};u&&(c.closing=u),c.properties=a,t.data={position:c}}}return r}function bn(e){const t=vo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=vo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function vo(e){return e.line&&e.column?e:void 0}const ko={}.hasOwnProperty;function $l(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&ko.call(i,e)){const u=String(i[e]);s=ko.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const gb={},bb={}.hasOwnProperty,Yl=$l("type",{handlers:{root:Tb,element:Cb,text:_b,comment:Sb,doctype:xb}});function Eb(e,t){const r=(t||gb).space;return Yl(e,r==="svg"?qt:er)}function Tb(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ya(e.children,n,t),In(e,n),n}function yb(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ya(e.children,n,t),In(e,n),n}function xb(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return In(e,t),t}function _b(e){const t={nodeName:"#text",value:e.value,parentNode:null};return In(e,t),t}function Sb(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return In(e,t),t}function Cb(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=qt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&bb.call(e.properties,a)){const u=Ab(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Jt[s],childNodes:[],parentNode:null};return o.childNodes=Ya(e.children,o,r),In(e,o),e.tagName==="template"&&e.content&&(o.content=yb(e.content,r)),o}function Ab(e,t,n){const r=Ur(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?rl(n):fl(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Jt[r.space]}return i}function Ya(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Yl(e[r],n);a.parentNode=t,i.push(a)}return i}function In(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,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 wb=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Ib=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]),De="�";var g;(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"})(g||(g={}));const tt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Gl(e){return e>=55296&&e<=57343}function vb(e){return e>=56320&&e<=57343}function kb(e,t){return(e-55296)*1024+9216+t}function ql(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Vl(e){return e>=64976&&e<=65007||Ib.has(e)}var D;(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"})(D||(D={}));const Nb=65536;class Rb{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=Nb,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:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(vb(n))return this.pos++,this._addGap(),kb(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,g.EOF;return this._err(D.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,g.EOF;const r=this.html.charCodeAt(n);return r===g.CARRIAGE_RETURN?g.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,g.EOF;let t=this.html.charCodeAt(this.pos);return t===g.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,g.LINE_FEED):t===g.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Gl(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===g.LINE_FEED||t===g.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ql(t)?this._err(D.controlCharacterInInputStream):Vl(t)&&this._err(D.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ge;(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"})(ge||(ge={}));function Wl(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 Xl=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Ob=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var vi;const Lb=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]]),Db=(vi=String.fromCodePoint)!==null&&vi!==void 0?vi: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=Lb.get(e))!==null&&t!==void 0?t:e}var Ge;(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"})(Ge||(Ge={}));const Mb=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 da(e){return e>=Ge.ZERO&&e<=Ge.NINE}function Bb(e){return e>=Ge.UPPER_A&&e<=Ge.UPPER_F||e>=Ge.LOWER_A&&e<=Ge.LOWER_F}function Fb(e){return e>=Ge.UPPER_A&&e<=Ge.UPPER_Z||e>=Ge.LOWER_A&&e<=Ge.LOWER_Z||da(e)}function Hb(e){return e===Ge.EQUALS||Fb(e)}var $e;(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"})($e||($e={}));var Lt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Lt||(Lt={}));class Ql{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=$e.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Lt.Strict}startEntity(t){this.decodeMode=t,this.state=$e.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case $e.EntityStart:return t.charCodeAt(n)===Ge.NUM?(this.state=$e.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=$e.NamedEntity,this.stateNamedEntity(t,n));case $e.NumericStart:return this.stateNumericStart(t,n);case $e.NumericDecimal:return this.stateNumericDecimal(t,n);case $e.NumericHex:return this.stateNumericHex(t,n);case $e.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Mb)===Ge.LOWER_X?(this.state=$e.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=$e.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(da(i)||Bb(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(da(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,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===Ge.SEMI)this.consumed+=1;else if(this.decodeMode===Lt.Strict)return 0;return this.emitCodePoint(Pb(this.result),this.consumed),this.errors&&(t!==Ge.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&zt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Ub(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Lt.Attribute&&(a===0||Hb(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&zt.VALUE_LENGTH)>>14,a!==0){if(s===Ge.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Lt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&zt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~zt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case $e.NamedEntity:return this.result!==0&&(this.decodeMode!==Lt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case $e.NumericDecimal:return this.emitNumericEntity(0,2);case $e.NumericHex:return this.emitNumericEntity(0,3);case $e.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case $e.EntityStart:return 0}}}function Kl(e){let t="";const n=new Ql(e,r=>t+=Db(r));return function(i,a){let s=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(s,o),n.startEntity(a);const c=n.write(i,o+1);if(c<0){s=o+n.end();break}s=o+c,o=c===0?s+1:s}const u=t+i.slice(s);return t="",u}}function Ub(e,t,n,r){const i=(t&zt.BRANCH_LENGTH)>>7,a=t&zt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,c=e[u];if(c<r)s=u+1;else if(c>r)o=u-1;else return e[u+i]}return-1}Kl(Xl);Kl(Ob);var P;(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/"})(P||(P={}));var Zt;(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"})(Zt||(Zt={}));var ct;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ct||(ct={}));var R;(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"})(R||(R={}));var l;(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"})(l||(l={}));const jb=new Map([[R.A,l.A],[R.ADDRESS,l.ADDRESS],[R.ANNOTATION_XML,l.ANNOTATION_XML],[R.APPLET,l.APPLET],[R.AREA,l.AREA],[R.ARTICLE,l.ARTICLE],[R.ASIDE,l.ASIDE],[R.B,l.B],[R.BASE,l.BASE],[R.BASEFONT,l.BASEFONT],[R.BGSOUND,l.BGSOUND],[R.BIG,l.BIG],[R.BLOCKQUOTE,l.BLOCKQUOTE],[R.BODY,l.BODY],[R.BR,l.BR],[R.BUTTON,l.BUTTON],[R.CAPTION,l.CAPTION],[R.CENTER,l.CENTER],[R.CODE,l.CODE],[R.COL,l.COL],[R.COLGROUP,l.COLGROUP],[R.DD,l.DD],[R.DESC,l.DESC],[R.DETAILS,l.DETAILS],[R.DIALOG,l.DIALOG],[R.DIR,l.DIR],[R.DIV,l.DIV],[R.DL,l.DL],[R.DT,l.DT],[R.EM,l.EM],[R.EMBED,l.EMBED],[R.FIELDSET,l.FIELDSET],[R.FIGCAPTION,l.FIGCAPTION],[R.FIGURE,l.FIGURE],[R.FONT,l.FONT],[R.FOOTER,l.FOOTER],[R.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[R.FORM,l.FORM],[R.FRAME,l.FRAME],[R.FRAMESET,l.FRAMESET],[R.H1,l.H1],[R.H2,l.H2],[R.H3,l.H3],[R.H4,l.H4],[R.H5,l.H5],[R.H6,l.H6],[R.HEAD,l.HEAD],[R.HEADER,l.HEADER],[R.HGROUP,l.HGROUP],[R.HR,l.HR],[R.HTML,l.HTML],[R.I,l.I],[R.IMG,l.IMG],[R.IMAGE,l.IMAGE],[R.INPUT,l.INPUT],[R.IFRAME,l.IFRAME],[R.KEYGEN,l.KEYGEN],[R.LABEL,l.LABEL],[R.LI,l.LI],[R.LINK,l.LINK],[R.LISTING,l.LISTING],[R.MAIN,l.MAIN],[R.MALIGNMARK,l.MALIGNMARK],[R.MARQUEE,l.MARQUEE],[R.MATH,l.MATH],[R.MENU,l.MENU],[R.META,l.META],[R.MGLYPH,l.MGLYPH],[R.MI,l.MI],[R.MO,l.MO],[R.MN,l.MN],[R.MS,l.MS],[R.MTEXT,l.MTEXT],[R.NAV,l.NAV],[R.NOBR,l.NOBR],[R.NOFRAMES,l.NOFRAMES],[R.NOEMBED,l.NOEMBED],[R.NOSCRIPT,l.NOSCRIPT],[R.OBJECT,l.OBJECT],[R.OL,l.OL],[R.OPTGROUP,l.OPTGROUP],[R.OPTION,l.OPTION],[R.P,l.P],[R.PARAM,l.PARAM],[R.PLAINTEXT,l.PLAINTEXT],[R.PRE,l.PRE],[R.RB,l.RB],[R.RP,l.RP],[R.RT,l.RT],[R.RTC,l.RTC],[R.RUBY,l.RUBY],[R.S,l.S],[R.SCRIPT,l.SCRIPT],[R.SEARCH,l.SEARCH],[R.SECTION,l.SECTION],[R.SELECT,l.SELECT],[R.SOURCE,l.SOURCE],[R.SMALL,l.SMALL],[R.SPAN,l.SPAN],[R.STRIKE,l.STRIKE],[R.STRONG,l.STRONG],[R.STYLE,l.STYLE],[R.SUB,l.SUB],[R.SUMMARY,l.SUMMARY],[R.SUP,l.SUP],[R.TABLE,l.TABLE],[R.TBODY,l.TBODY],[R.TEMPLATE,l.TEMPLATE],[R.TEXTAREA,l.TEXTAREA],[R.TFOOT,l.TFOOT],[R.TD,l.TD],[R.TH,l.TH],[R.THEAD,l.THEAD],[R.TITLE,l.TITLE],[R.TR,l.TR],[R.TRACK,l.TRACK],[R.TT,l.TT],[R.U,l.U],[R.UL,l.UL],[R.SVG,l.SVG],[R.VAR,l.VAR],[R.WBR,l.WBR],[R.XMP,l.XMP]]);function vn(e){var t;return(t=jb.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const B=l,zb={[P.HTML]:new Set([B.ADDRESS,B.APPLET,B.AREA,B.ARTICLE,B.ASIDE,B.BASE,B.BASEFONT,B.BGSOUND,B.BLOCKQUOTE,B.BODY,B.BR,B.BUTTON,B.CAPTION,B.CENTER,B.COL,B.COLGROUP,B.DD,B.DETAILS,B.DIR,B.DIV,B.DL,B.DT,B.EMBED,B.FIELDSET,B.FIGCAPTION,B.FIGURE,B.FOOTER,B.FORM,B.FRAME,B.FRAMESET,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HEADER,B.HGROUP,B.HR,B.HTML,B.IFRAME,B.IMG,B.INPUT,B.LI,B.LINK,B.LISTING,B.MAIN,B.MARQUEE,B.MENU,B.META,B.NAV,B.NOEMBED,B.NOFRAMES,B.NOSCRIPT,B.OBJECT,B.OL,B.P,B.PARAM,B.PLAINTEXT,B.PRE,B.SCRIPT,B.SECTION,B.SELECT,B.SOURCE,B.STYLE,B.SUMMARY,B.TABLE,B.TBODY,B.TD,B.TEMPLATE,B.TEXTAREA,B.TFOOT,B.TH,B.THEAD,B.TITLE,B.TR,B.TRACK,B.UL,B.WBR,B.XMP]),[P.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[P.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[P.XLINK]:new Set,[P.XML]:new Set,[P.XMLNS]:new Set},fa=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var E;(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"})(E||(E={}));const Fe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function $b(e){return e>=g.DIGIT_0&&e<=g.DIGIT_9}function Fn(e){return e>=g.LATIN_CAPITAL_A&&e<=g.LATIN_CAPITAL_Z}function Yb(e){return e>=g.LATIN_SMALL_A&&e<=g.LATIN_SMALL_Z}function Ut(e){return Yb(e)||Fn(e)}function No(e){return Ut(e)||$b(e)}function pr(e){return e+32}function Jl(e){return e===g.SPACE||e===g.LINE_FEED||e===g.TABULATION||e===g.FORM_FEED}function Ro(e){return Jl(e)||e===g.SOLIDUS||e===g.GREATER_THAN_SIGN}function Gb(e){return e===g.NULL?D.nullCharacterReference:e>1114111?D.characterReferenceOutsideUnicodeRange:Gl(e)?D.surrogateCharacterReference:Vl(e)?D.noncharacterCharacterReference:ql(e)||e===g.CARRIAGE_RETURN?D.controlCharacterReference:null}class qb{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=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Rb(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ql(Xl,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Gb(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.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:ge.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ge.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ge.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ge.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(Wl(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(D.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=vn(t.tagName),t.type===ge.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(D.endTagWithAttributes),t.selfClosing&&this._err(D.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 ge.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ge.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ge.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:ge.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=Jl(t)?ge.WHITESPACE_CHARACTER:t===g.NULL?ge.NULL_CHARACTER:ge.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ge.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Lt.Attribute:Lt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(t);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case g.AMPERSAND:{this._startCharacterReference();break}case g.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ut(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case g.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case g.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ut(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case g.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=E.DATA;break}case g.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.tagName+=De;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fn(t)?pr(t):t)}}_stateRcdataLessThanSign(t){t===g.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ut(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case g.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case g.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===g.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ut(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case g.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case g.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ut(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===g.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===g.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ut(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ut(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(tt.SCRIPT,!1)&&Ro(this.preprocessor.peek(tt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<tt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case g.HYPHEN_MINUS:{this._emitChars("-");break}case g.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case g.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(De);break}case g.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===g.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(tt.SCRIPT,!1)&&Ro(this.preprocessor.peek(tt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<tt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:case g.SOLIDUS:case g.GREATER_THAN_SIGN:case g.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case g.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=De;break}default:this.currentAttr.name+=String.fromCodePoint(Fn(t)?pr(t):t)}}_stateAfterAttributeName(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case g.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=De;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case g.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=De;break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.AMPERSAND:{this._startCharacterReference();break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=De;break}case g.QUOTATION_MARK:case g.APOSTROPHE:case g.LESS_THAN_SIGN:case g.EQUALS_SIGN:case g.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case g.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case g.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case g.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case g.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=De;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(tt.DASH_DASH,!0)?(this._createCommentToken(tt.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(tt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tt.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(tt.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(tt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case g.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.data+=De;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case g.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case g.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===g.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==g.GREATER_THAN_SIGN&&t!==g.EOF&&this._err(D.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case g.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case g.HYPHEN_MINUS:{n.data+="-";break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case g.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case g.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case g.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case g.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fn(t))this._createDoctypeToken(String.fromCharCode(pr(t))),this.state=E.DOCTYPE_NAME;else switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(De),this.state=E.DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.name+=De;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fn(t)?pr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(tt.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tt.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case g.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case g.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case g.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case g.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case g.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=De;break}case g.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.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 g.SPACE:case g.LINE_FEED:case g.TABULATION:case g.FORM_FEED:break;case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case g.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case g.NULL:{this._err(D.unexpectedNullCharacter);break}case g.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case g.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case g.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===g.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case g.GREATER_THAN_SIGN:{this.state=E.DATA;break}case g.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.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(g.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&No(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){No(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===g.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Zl=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),Oo=new Set([...Zl,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Ir=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Vb=new Set([...Ir,l.OL,l.UL]),Wb=new Set([...Ir,l.BUTTON]),Lo=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Do=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),Xb=new Set([l.TR,l.TEMPLATE,l.HTML]),Qb=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),Kb=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Jb=new Set([l.TD,l.TH]);class Zb{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=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===P.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 i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===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])!==P.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(fa,P.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Jb,P.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(Kb,P.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Qb,P.HTML)}clearBackToTableRowContext(){this.clearBackTo(Xb,P.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]===l.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]===l.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case P.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case P.SVG:{if(Do.has(i))return!1;break}case P.MATHML:{if(Lo.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ir)}hasInListItemScope(t){return this.hasInDynamicScope(t,Vb)}hasInButtonScope(t){return this.hasInDynamicScope(t,Wb)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case P.HTML:{if(fa.has(n))return!0;if(Ir.has(n))return!1;break}case P.SVG:{if(Do.has(n))return!1;break}case P.MATHML:{if(Lo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===P.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Zl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Oo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Oo.has(this.currentTagId);)this.pop()}}const ki=3;var Ct;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ct||(Ct={}));const Po={type:Ct.Marker};class e1{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===Ct.Marker)break;const{element:c}=u;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const d=this.treeAdapter.getAttrList(c);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ki)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ki)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=ki&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Po)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ct.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ct.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(Po);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ct.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ct.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ct.Element&&n.element===t)}}const jt={createDocument(){return{nodeName:"#document",mode:ct.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 i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};jt.appendChild(e,a)}},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(jt.isTextNode(n)){n.value+=t;return}}jt.appendChild(e,jt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&jt.isTextNode(r)?r.value+=t:jt.insertBefore(e,jt.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}}},ec="html",t1="about:legacy-compat",n1="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",tc=["+//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//"],r1=[...tc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],i1=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),nc=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],a1=[...nc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Mo(e,t){return t.some(n=>e.startsWith(n))}function s1(e){return e.name===ec&&e.publicId===null&&(e.systemId===null||e.systemId===t1)}function o1(e){if(e.name!==ec)return ct.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===n1)return ct.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),i1.has(n))return ct.QUIRKS;let r=t===null?r1:tc;if(Mo(n,r))return ct.QUIRKS;if(r=t===null?nc:a1,Mo(n,r))return ct.LIMITED_QUIRKS}return ct.NO_QUIRKS}const Bo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},u1="definitionurl",l1="definitionURL",c1=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])),d1=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:P.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:P.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:P.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:P.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:P.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:P.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:P.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:P.XML}],["xml:space",{prefix:"xml",name:"space",namespace:P.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:P.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:P.XMLNS}]]),f1=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])),h1=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function p1(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===Zt.COLOR||r===Zt.SIZE||r===Zt.FACE)||h1.has(t)}function rc(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===u1){e.attrs[t].name=l1;break}}function ic(e){for(let t=0;t<e.attrs.length;t++){const n=c1.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ga(e){for(let t=0;t<e.attrs.length;t++){const n=d1.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 m1(e){const t=f1.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=vn(e.tagName))}function g1(e,t){return t===P.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function b1(e,t,n){if(t===P.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Zt.ENCODING){const i=n[r].value.toLowerCase();return i===Bo.TEXT_HTML||i===Bo.APPLICATION_XML}}return t===P.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function E1(e,t,n,r){return(!r||r===P.HTML)&&b1(e,t,n)||(!r||r===P.MATHML)&&g1(e,t)}const T1="hidden",y1=8,x1=3;var _;(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"})(_||(_={}));const _1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ac=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Fo={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:jt,onParseError:null};class Ho{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=_.INITIAL,this.originalInsertionMode=_.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={...Fo,...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 qb(this.options,this),this.activeFormattingElements=new e1(this.treeAdapter),this.fragmentContextID=r?vn(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Zb(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={...Fo,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,P.HTML,[]));const i=r.treeAdapter.createElement("documentmock",P.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(_.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:_1,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===P.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,P.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=_.TEXT}switchToPlaintextParsing(){this.insertionMode=_.TEXT,this.originalInsertionMode=_.IN_BODY,this.tokenizer.state=Fe.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)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==P.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=Fe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=Fe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=Fe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=Fe.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));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,P.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,P.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(R.HTML,P.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.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 i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:c,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:c,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,i=this.treeAdapter.getTagName(t),a=n.type===ge.END_TAG&&i===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,a)}}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===l.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===P.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&!this._isIntegrationPoint(r,n,P.HTML)}_processToken(t){switch(t.type){case ge.CHARACTER:{this.onCharacter(t);break}case ge.NULL_CHARACTER:{this.onNullCharacter(t);break}case ge.COMMENT:{this.onComment(t);break}case ge.DOCTYPE:{this.onDoctype(t);break}case ge.START_TAG:{this._processStartTag(t);break}case ge.END_TAG:{this.onEndTag(t);break}case ge.EOF:{this.onEof(t);break}case ge.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return E1(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Ct.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=_.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=_.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=_.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=_.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=_.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=_.IN_TABLE;return}case l.BODY:{this.insertionMode=_.IN_BODY;return}case l.FRAMESET:{this.insertionMode=_.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?_.AFTER_HEAD:_.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=_.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=_.IN_HEAD;return}break}}this.insertionMode=_.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=_.IN_SELECT_IN_TABLE;return}}this.insertionMode=_.IN_SELECT}_isElementCausesFosterParenting(t){return ac.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 l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===P.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.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 zb[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){JE(this,t);return}switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{zn(this,t);break}case _.BEFORE_HEAD:{$n(this,t);break}case _.IN_HEAD:{Yn(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case _.AFTER_HEAD:{qn(this,t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:{oc(this,t);break}case _.TEXT:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Ni(this,t);break}case _.IN_TABLE_TEXT:{hc(this,t);break}case _.IN_COLUMN_GROUP:{vr(this,t);break}case _.AFTER_BODY:{kr(this,t);break}case _.AFTER_AFTER_BODY:{_r(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KE(this,t);return}switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{zn(this,t);break}case _.BEFORE_HEAD:{$n(this,t);break}case _.IN_HEAD:{Yn(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case _.AFTER_HEAD:{qn(this,t);break}case _.TEXT:{this._insertCharacters(t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Ni(this,t);break}case _.IN_COLUMN_GROUP:{vr(this,t);break}case _.AFTER_BODY:{kr(this,t);break}case _.AFTER_AFTER_BODY:{_r(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ha(this,t);return}switch(this.insertionMode){case _.INITIAL:case _.BEFORE_HTML:case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_TEMPLATE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{ha(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.AFTER_BODY:{k1(this,t);break}case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{N1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case _.INITIAL:{R1(this,t);break}case _.BEFORE_HEAD:case _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:{this._err(t,D.misplacedDoctype);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ZE(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{O1(this,t);break}case _.BEFORE_HEAD:{D1(this,t);break}case _.IN_HEAD:{Tt(this,t);break}case _.IN_HEAD_NO_SCRIPT:{B1(this,t);break}case _.AFTER_HEAD:{H1(this,t);break}case _.IN_BODY:{Qe(this,t);break}case _.IN_TABLE:{_n(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_CAPTION:{PE(this,t);break}case _.IN_COLUMN_GROUP:{Wa(this,t);break}case _.IN_TABLE_BODY:{Qr(this,t);break}case _.IN_ROW:{Kr(this,t);break}case _.IN_CELL:{FE(this,t);break}case _.IN_SELECT:{gc(this,t);break}case _.IN_SELECT_IN_TABLE:{UE(this,t);break}case _.IN_TEMPLATE:{zE(this,t);break}case _.AFTER_BODY:{YE(this,t);break}case _.IN_FRAMESET:{GE(this,t);break}case _.AFTER_FRAMESET:{VE(this,t);break}case _.AFTER_AFTER_BODY:{XE(this,t);break}case _.AFTER_AFTER_FRAMESET:{QE(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?eT(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{L1(this,t);break}case _.BEFORE_HEAD:{P1(this,t);break}case _.IN_HEAD:{M1(this,t);break}case _.IN_HEAD_NO_SCRIPT:{F1(this,t);break}case _.AFTER_HEAD:{U1(this,t);break}case _.IN_BODY:{Xr(this,t);break}case _.TEXT:{AE(this,t);break}case _.IN_TABLE:{Qn(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_CAPTION:{ME(this,t);break}case _.IN_COLUMN_GROUP:{BE(this,t);break}case _.IN_TABLE_BODY:{pa(this,t);break}case _.IN_ROW:{mc(this,t);break}case _.IN_CELL:{HE(this,t);break}case _.IN_SELECT:{bc(this,t);break}case _.IN_SELECT_IN_TABLE:{jE(this,t);break}case _.IN_TEMPLATE:{$E(this,t);break}case _.AFTER_BODY:{Tc(this,t);break}case _.IN_FRAMESET:{qE(this,t);break}case _.AFTER_FRAMESET:{WE(this,t);break}case _.AFTER_AFTER_BODY:{_r(this,t);break}}}onEof(t){switch(this.insertionMode){case _.INITIAL:{Ln(this,t);break}case _.BEFORE_HTML:{zn(this,t);break}case _.BEFORE_HEAD:{$n(this,t);break}case _.IN_HEAD:{Yn(this,t);break}case _.IN_HEAD_NO_SCRIPT:{Gn(this,t);break}case _.AFTER_HEAD:{qn(this,t);break}case _.IN_BODY:case _.IN_TABLE:case _.IN_CAPTION:case _.IN_COLUMN_GROUP:case _.IN_TABLE_BODY:case _.IN_ROW:case _.IN_CELL:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:{dc(this,t);break}case _.TEXT:{wE(this,t);break}case _.IN_TABLE_TEXT:{Dn(this,t);break}case _.IN_TEMPLATE:{Ec(this,t);break}case _.AFTER_BODY:case _.IN_FRAMESET:case _.AFTER_FRAMESET:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{Va(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===g.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 _.IN_HEAD:case _.IN_HEAD_NO_SCRIPT:case _.AFTER_HEAD:case _.TEXT:case _.IN_COLUMN_GROUP:case _.IN_SELECT:case _.IN_SELECT_IN_TABLE:case _.IN_FRAMESET:case _.AFTER_FRAMESET:{this._insertCharacters(t);break}case _.IN_BODY:case _.IN_CAPTION:case _.IN_CELL:case _.IN_TEMPLATE:case _.AFTER_BODY:case _.AFTER_AFTER_BODY:case _.AFTER_AFTER_FRAMESET:{sc(this,t);break}case _.IN_TABLE:case _.IN_TABLE_BODY:case _.IN_ROW:{Ni(this,t);break}case _.IN_TABLE_TEXT:{fc(this,t);break}}}}function S1(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):cc(e,t),n}function C1(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function A1(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=x1;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=w1(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function w1(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 I1(e,t,n){const r=e.treeAdapter.getTagName(t),i=vn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===P.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function v1(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function qa(e,t){for(let n=0;n<y1;n++){const r=S1(e,t);if(!r)break;const i=C1(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=A1(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&I1(e,s,a),v1(e,i,r)}}function ha(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function k1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function N1(e,t){e._appendCommentNode(t,e.document)}function Va(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],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function R1(e,t){e._setDocumentType(t);const n=t.forceQuirks?ct.QUIRKS:o1(t);s1(t)||e._err(t,D.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=_.BEFORE_HTML}function Ln(e,t){e._err(t,D.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ct.QUIRKS),e.insertionMode=_.BEFORE_HTML,e._processToken(t)}function O1(e,t){t.tagID===l.HTML?(e._insertElement(t,P.HTML),e.insertionMode=_.BEFORE_HEAD):zn(e,t)}function L1(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&zn(e,t)}function zn(e,t){e._insertFakeRootElement(),e.insertionMode=_.BEFORE_HEAD,e._processToken(t)}function D1(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.HEAD:{e._insertElement(t,P.HTML),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD;break}default:$n(e,t)}}function P1(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?$n(e,t):e._err(t,D.endTagWithoutMatchingOpenElement)}function $n(e,t){e._insertFakeElement(R.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=_.IN_HEAD,e._processToken(t)}function Tt(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,Fe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Fe.RAWTEXT):(e._insertElement(t,P.HTML),e.insertionMode=_.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,Fe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,Fe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=_.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(_.IN_TEMPLATE);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:Yn(e,t)}}function M1(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=_.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{Yn(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function ln(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,D.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,D.endTagWithoutMatchingOpenElement)}function Yn(e,t){e.openElements.pop(),e.insertionMode=_.AFTER_HEAD,e._processToken(t)}function B1(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{Tt(e,t);break}case l.NOSCRIPT:{e._err(t,D.nestedNoscriptInHead);break}default:Gn(e,t)}}function F1(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=_.IN_HEAD;break}case l.BR:{Gn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Gn(e,t){const n=t.type===ge.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=_.IN_HEAD,e._processToken(t)}function H1(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.BODY:{e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=_.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,P.HTML),e.insertionMode=_.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,D.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),Tt(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:qn(e,t)}}function U1(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{qn(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function qn(e,t){e._insertFakeElement(R.BODY,l.BODY),e.insertionMode=_.IN_BODY,Wr(e,t)}function Wr(e,t){switch(t.type){case ge.CHARACTER:{oc(e,t);break}case ge.WHITESPACE_CHARACTER:{sc(e,t);break}case ge.COMMENT:{ha(e,t);break}case ge.START_TAG:{Qe(e,t);break}case ge.END_TAG:{Xr(e,t);break}case ge.EOF:{dc(e,t);break}}}function sc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function oc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function j1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function z1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function $1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,P.HTML),e.insertionMode=_.IN_FRAMESET)}function Y1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML)}function G1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),fa.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,P.HTML)}function q1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function V1(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),n||(e.formElement=e.openElements.current))}function W1(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML)}function X1(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.tokenizer.state=Fe.PLAINTEXT}function Q1(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.framesetOk=!1}function K1(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(qa(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function J1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Z1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(qa(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function eE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function tE(e,t){e.treeAdapter.getDocumentMode(e.document)!==ct.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=_.IN_TABLE}function uc(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function lc(e){const t=Wl(e,Zt.TYPE);return t!=null&&t.toLowerCase()===T1}function nE(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),lc(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function rE(e,t){e._appendElement(t,P.HTML),t.ackSelfClosing=!0}function iE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aE(e,t){t.tagName=R.IMG,t.tagID=l.IMG,uc(e,t)}function sE(e,t){e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=_.TEXT}function oE(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function uE(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Fe.RAWTEXT)}function Uo(e,t){e._switchToTextParsing(t,Fe.RAWTEXT)}function lE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===_.IN_TABLE||e.insertionMode===_.IN_CAPTION||e.insertionMode===_.IN_TABLE_BODY||e.insertionMode===_.IN_ROW||e.insertionMode===_.IN_CELL?_.IN_SELECT_IN_TABLE:_.IN_SELECT}function cE(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML)}function dE(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,P.HTML)}function fE(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,P.HTML)}function hE(e,t){e._reconstructActiveFormattingElements(),rc(t),Ga(t),t.selfClosing?e._appendElement(t,P.MATHML):e._insertElement(t,P.MATHML),t.ackSelfClosing=!0}function pE(e,t){e._reconstructActiveFormattingElements(),ic(t),Ga(t),t.selfClosing?e._appendElement(t,P.SVG):e._insertElement(t,P.SVG),t.ackSelfClosing=!0}function jo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML)}function Qe(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{J1(e,t);break}case l.A:{K1(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{G1(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Y1(e,t);break}case l.LI:case l.DD:case l.DT:{W1(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{uc(e,t);break}case l.HR:{iE(e,t);break}case l.RB:case l.RTC:{dE(e,t);break}case l.RT:case l.RP:{fE(e,t);break}case l.PRE:case l.LISTING:{q1(e,t);break}case l.XMP:{oE(e,t);break}case l.SVG:{pE(e,t);break}case l.HTML:{j1(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{Tt(e,t);break}case l.BODY:{z1(e,t);break}case l.FORM:{V1(e,t);break}case l.NOBR:{Z1(e,t);break}case l.MATH:{hE(e,t);break}case l.TABLE:{tE(e,t);break}case l.INPUT:{nE(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{rE(e,t);break}case l.IMAGE:{aE(e,t);break}case l.BUTTON:{Q1(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{eE(e,t);break}case l.IFRAME:{uE(e,t);break}case l.SELECT:{lE(e,t);break}case l.OPTION:case l.OPTGROUP:{cE(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Uo(e,t);break}case l.FRAMESET:{$1(e,t);break}case l.TEXTAREA:{sE(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Uo(e,t):jo(e,t);break}case l.PLAINTEXT:{X1(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:jo(e,t)}}function mE(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=_.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function gE(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=_.AFTER_BODY,Tc(e,t))}function bE(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function EE(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function TE(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(R.P,l.P),e._closePElement()}function yE(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function xE(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function _E(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function SE(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function CE(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function cc(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==l.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Xr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{qa(e,t);break}case l.P:{TE(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{bE(e,t);break}case l.LI:{yE(e);break}case l.DD:case l.DT:{xE(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{_E(e);break}case l.BR:{CE(e);break}case l.BODY:{mE(e,t);break}case l.HTML:{gE(e,t);break}case l.FORM:{EE(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{SE(e,t);break}case l.TEMPLATE:{ln(e,t);break}default:cc(e,t)}}function dc(e,t){e.tmplInsertionModeStack.length>0?Ec(e,t):Va(e,t)}function AE(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function wE(e,t){e._err(t,D.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ni(e,t){if(ac.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=_.IN_TABLE_TEXT,t.type){case ge.CHARACTER:{hc(e,t);break}case ge.WHITESPACE_CHARACTER:{fc(e,t);break}}else rr(e,t)}function IE(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,P.HTML),e.insertionMode=_.IN_CAPTION}function vE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=_.IN_COLUMN_GROUP}function kE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,l.COLGROUP),e.insertionMode=_.IN_COLUMN_GROUP,Wa(e,t)}function NE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=_.IN_TABLE_BODY}function RE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,l.TBODY),e.insertionMode=_.IN_TABLE_BODY,Qr(e,t)}function OE(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function LE(e,t){lc(t)?e._appendElement(t,P.HTML):rr(e,t),t.ackSelfClosing=!0}function DE(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,P.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function _n(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{RE(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{Tt(e,t);break}case l.COL:{kE(e,t);break}case l.FORM:{DE(e,t);break}case l.TABLE:{OE(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{NE(e,t);break}case l.INPUT:{LE(e,t);break}case l.CAPTION:{IE(e,t);break}case l.COLGROUP:{vE(e,t);break}default:rr(e,t)}}function Qn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{ln(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:rr(e,t)}}function rr(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Wr(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 Dn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)rr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const pc=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function PE(e,t){const n=t.tagID;pc.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,_n(e,t)):Qe(e,t)}function ME(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_TABLE,n===l.TABLE&&Qn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:Xr(e,t)}}function Wa(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.COL:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{Tt(e,t);break}default:vr(e,t)}}function BE(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case l.TEMPLATE:{ln(e,t);break}case l.COL:break;default:vr(e,t)}}function vr(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=_.IN_TABLE,e._processToken(t))}function Qr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,P.HTML),e.insertionMode=_.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,l.TR),e.insertionMode=_.IN_ROW,Kr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,_n(e,t));break}default:_n(e,t)}}function pa(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE,Qn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:Qn(e,t)}}function Kr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,P.HTML),e.insertionMode=_.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,Qr(e,t));break}default:_n(e,t)}}function mc(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,pa(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=_.IN_TABLE_BODY,pa(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:Qn(e,t)}}function FE(e,t){const n=t.tagID;pc.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),Kr(e,t)):Qe(e,t)}function HE(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=_.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),mc(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:Xr(e,t)}}function gc(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,P.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,P.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{Tt(e,t);break}}}function bc(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{ln(e,t);break}}}function UE(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):gc(e,t)}function jE(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):bc(e,t)}function zE(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{Tt(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=_.IN_TABLE,e.insertionMode=_.IN_TABLE,_n(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=_.IN_COLUMN_GROUP,e.insertionMode=_.IN_COLUMN_GROUP,Wa(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=_.IN_TABLE_BODY,e.insertionMode=_.IN_TABLE_BODY,Qr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=_.IN_ROW,e.insertionMode=_.IN_ROW,Kr(e,t);break}default:e.tmplInsertionModeStack[0]=_.IN_BODY,e.insertionMode=_.IN_BODY,Qe(e,t)}}function $E(e,t){t.tagID===l.TEMPLATE&&ln(e,t)}function Ec(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Va(e,t)}function YE(e,t){t.tagID===l.HTML?Qe(e,t):kr(e,t)}function Tc(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=_.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.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 kr(e,t)}function kr(e,t){e.insertionMode=_.IN_BODY,Wr(e,t)}function GE(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.FRAMESET:{e._insertElement(t,P.HTML);break}case l.FRAME:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{Tt(e,t);break}}}function qE(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=_.AFTER_FRAMESET))}function VE(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.NOFRAMES:{Tt(e,t);break}}}function WE(e,t){t.tagID===l.HTML&&(e.insertionMode=_.AFTER_AFTER_FRAMESET)}function XE(e,t){t.tagID===l.HTML?Qe(e,t):_r(e,t)}function _r(e,t){e.insertionMode=_.IN_BODY,Wr(e,t)}function QE(e,t){switch(t.tagID){case l.HTML:{Qe(e,t);break}case l.NOFRAMES:{Tt(e,t);break}}}function KE(e,t){t.chars=De,e._insertCharacters(t)}function JE(e,t){e._insertCharacters(t),e.framesetOk=!1}function yc(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==P.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ZE(e,t){if(p1(t))yc(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===P.MATHML?rc(t):r===P.SVG&&(m1(t),ic(t)),Ga(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function eT(e,t){if(t.tagID===l.P||t.tagID===l.BR){yc(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)===P.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const tT=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),zo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xc(e,t){const n=dT(e),r=$l("type",{handlers:{root:nT,element:rT,text:iT,comment:Sc,doctype:aT,raw:oT},unknown:uT}),i={parser:n?new Ho(zo):Ho.getFragmentParser(void 0,zo),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),kn(i,It());const a=n?i.parser.document:i.parser.getFragment(),s=hb(a,{file:i.options.file});return i.stitches&&Vr(s,"comment",function(o,u,c){const d=o;if(d.value.stitch&&c&&u!==void 0){const f=c.children;return f[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function _c(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function nT(e,t){_c(e.children,t)}function rT(e,t){lT(e,t),_c(e.children,t),cT(e,t)}function iT(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ge.CHARACTER,chars:e.value,location:ir(e)};kn(t,It(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function aT(e,t){const n={type:ge.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ir(e)};kn(t,It(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function sT(e,t){t.stitches=!0;const n=fT(e);if("children"in e&&"children"in n){const r=xc({type:"root",children:e.children},t.options);n.children=r.children}Sc({type:"comment",value:{stitch:n}},t)}function Sc(e,t){const n=e.value,r={type:ge.COMMENT,data:n,location:ir(e)};kn(t,It(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function oT(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,Cc(t,It(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 uT(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))sT(n,t);else{let r="";throw tT.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 kn(e,t){Cc(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=Fe.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 Cc(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 lT(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Fe.PLAINTEXT)return;kn(t,It(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Jt.html;i===Jt.html&&n==="svg"&&(i=Jt.svg);const a=Eb({...e,children:[]},{space:i===Jt.svg?"svg":"html"}),s={type:ge.START_TAG,tagName:n,tagID:vn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:ir(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function cT(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&wb.includes(n)||t.parser.tokenizer.state===Fe.PLAINTEXT)return;kn(t,jr(e));const r={type:ge.END_TAG,tagName:n,tagID:vn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ir(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Fe.RCDATA||t.parser.tokenizer.state===Fe.RAWTEXT||t.parser.tokenizer.state===Fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=Fe.DATA)}function dT(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ir(e){const t=It(e)||{line:void 0,column:void 0,offset:void 0},n=jr(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 fT(e){return"children"in e?xn({...e,children:[]}):xn(e)}function Xa(e){return function(t,n){return xc(t,{...e,file:n})}}const Qa=({children:e})=>y.jsx("div",{className:"p-3",children:e}),hT=({content:e,metaData:t})=>y.jsx(Qa,{children:y.jsx("div",{className:"flex justify-end",children:y.jsx("div",{className:`ml-auto w-fit max-w-full px-4 py-3 rounded-2xl rounded-br-md transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 border-l-4 border-red-400 text-red-800 shadow-md animate-fade-in":"chatsystem-user-message chatsystem-primary-background text-white shadow-sm"}`,children:y.jsx("div",{children:y.jsx(za,{rehypePlugins:[Xa],children:e&&e})})})})});function $o(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function pT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mT(e,t,n){const i=Gr((n||{}).ignore||[]),a=gT(t);let s=-1;for(;++s<a.length;)Fl(e,"text",o);function o(c,d){let f=-1,p;for(;++f<d.length;){const h=d[f],b=p?p.children:void 0;if(i(h,b?b.indexOf(h):void 0,p))return;p=h}if(p)return u(c,d)}function u(c,d){const f=d[d.length-1],p=a[s][0],h=a[s][1];let b=0;const w=f.children.indexOf(c);let C=!1,k=[];p.lastIndex=0;let I=p.exec(c.value);for(;I;){const L=I.index,A={index:I.index,input:I.input,stack:[...d,c]};let N=h(...I,A);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=L+1:(b!==L&&k.push({type:"text",value:c.value.slice(b,L)}),Array.isArray(N)?k.push(...N):N&&k.push(N),b=L+I[0].length,C=!0),!p.global)break;I=p.exec(c.value)}return C?(b<c.value.length&&k.push({type:"text",value:c.value.slice(b)}),f.children.splice(w,1,...k)):k=[c],w+k.length}}function gT(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([bT(i[0]),ET(i[1])])}return t}function bT(e){return typeof e=="string"?new RegExp(pT(e),"g"):e}function ET(e){return typeof e=="function"?e:function(){return e}}const Ri="phrasing",Oi=["autolink","link","image","label"];function TT(){return{transforms:[wT],enter:{literalAutolink:xT,literalAutolinkEmail:Li,literalAutolinkHttp:Li,literalAutolinkWww:Li},exit:{literalAutolink:AT,literalAutolinkEmail:CT,literalAutolinkHttp:_T,literalAutolinkWww:ST}}}function yT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ri,notInConstruct:Oi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ri,notInConstruct:Oi},{character:":",before:"[ps]",after:"\\/",inConstruct:Ri,notInConstruct:Oi}]}}function xT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Li(e){this.config.enter.autolinkProtocol.call(this,e)}function _T(e){this.config.exit.autolinkProtocol.call(this,e)}function ST(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function CT(e){this.config.exit.autolinkEmail.call(this,e)}function AT(e){this.exit(e)}function wT(e){mT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,IT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),vT]],{ignore:["link","linkReference"]})}function IT(e,t,n,r,i){let a="";if(!Ac(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!kT(n)))return!1;const s=NT(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function vT(e,t,n,r){return!Ac(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kT(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function NT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=$o(e,"(");let a=$o(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Ac(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||nn(n)||zr(n))&&(!t||n!==47)}wc.peek=HT;function RT(){this.buffer()}function OT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function LT(){this.buffer()}function DT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function PT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Et(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MT(e){this.exit(e)}function BT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Et(this.sliceSerialize(e)).toLowerCase(),n.label=t}function FT(e){this.exit(e)}function HT(){return"["}function wc(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function UT(){return{enter:{gfmFootnoteCallString:RT,gfmFootnoteCall:OT,gfmFootnoteDefinitionLabelString:LT,gfmFootnoteDefinition:DT},exit:{gfmFootnoteCallString:PT,gfmFootnoteCall:MT,gfmFootnoteDefinitionLabelString:BT,gfmFootnoteDefinition:FT}}}function jT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:wc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
62
+ `:" ")+a.indentLines(a.containerFlow(r,o.current()),t?Ic:zT))),c(),u}}function zT(e,t,n){return t===0?e:Ic(e,t,n)}function Ic(e,t,n){return(n?"":" ")+e}const $T=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];vc.peek=WT;function YT(){return{canContainEols:["delete"],enter:{strikethrough:qT},exit:{strikethrough:VT}}}function GT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$T}],handlers:{delete:vc}}}function qT(e){this.enter({type:"delete",children:[]},e)}function VT(e){this.exit(e)}function vc(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function WT(){return"~"}function XT(e){return e.length}function QT(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||XT,a=[],s=[],o=[],u=[];let c=0,d=-1;for(;++d<e.length;){const x=[],w=[];let C=-1;for(e[d].length>c&&(c=e[d].length);++C<e[d].length;){const k=KT(e[d][C]);if(n.alignDelimiters!==!1){const I=i(k);w[C]=I,(u[C]===void 0||I>u[C])&&(u[C]=I)}x.push(k)}s[d]=x,o[d]=w}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=Yo(r[f]);else{const x=Yo(r);for(;++f<c;)a[f]=x}f=-1;const p=[],h=[];for(;++f<c;){const x=a[f];let w="",C="";x===99?(w=":",C=":"):x===108?w=":":x===114&&(C=":");let k=n.alignDelimiters===!1?1:Math.max(1,u[f]-w.length-C.length);const I=w+"-".repeat(k)+C;n.alignDelimiters!==!1&&(k=w.length+k+C.length,k>u[f]&&(u[f]=k),h[f]=k),p[f]=I}s.splice(1,0,p),o.splice(1,0,h),d=-1;const b=[];for(;++d<s.length;){const x=s[d],w=o[d];f=-1;const C=[];for(;++f<c;){const k=x[f]||"";let I="",L="";if(n.alignDelimiters!==!1){const A=u[f]-(w[f]||0),N=a[f];N===114?I=" ".repeat(A):N===99?A%2?(I=" ".repeat(A/2+.5),L=" ".repeat(A/2-.5)):(I=" ".repeat(A/2),L=I):L=" ".repeat(A)}n.delimiterStart!==!1&&!f&&C.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||f)&&C.push(" "),n.alignDelimiters!==!1&&C.push(I),C.push(k),n.alignDelimiters!==!1&&C.push(L),n.padding!==!1&&C.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&C.push("|")}b.push(n.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return b.join(`
63
+ `)}function KT(e){return e==null?"":String(e)}function Yo(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function JT(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),ZT);return i(),s}function ZT(e,t,n){return">"+(n?"":" ")+e}function e2(e,t){return Go(e,t.inConstruct,!0)&&!Go(e,t.notInConstruct,!1)}function Go(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function qo(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
64
+ `&&e2(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
65
+ `}function t2(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function n2(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function r2(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function i2(e,t,n,r){const i=r2(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(n2(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(a,a2);return f(),p}const o=n.createTracker(r),u=i.repeat(Math.max(t2(a,i)+1,3)),c=n.enter("codeFenced");let d=o.move(u);if(e.lang){const f=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
66
66
  `,encode:["`"],...o.current()})),f()}return d+=o.move(`
67
67
  `),a&&(d+=o.move(a+`
68
- `)),d+=o.move(u),c(),d}function JT(e,t,n){return(n?"":" ")+e}function Xa(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ZT(e,t,n,r){const i=Xa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
69
- `,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),s(),c}function e2(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Ac.peek=t2;function Ac(e,t,n,r){const i=e2(n),a=n.enter("emphasis"),s=n.createTracker(r);let o=s.move(i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i),a(),o}function t2(e,t,n){return n.options.emphasis||"*"}function n2(e,t){let n=!1;return qr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ia}),!!((!e.depth||e.depth<3)&&Oa(e)&&(t.options.setext||n))}function r2(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(n2(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
68
+ `)),d+=o.move(u),c(),d}function a2(e,t,n){return(n?"":" ")+e}function Ka(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function s2(e,t,n,r){const i=Ka(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
69
+ `,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),s(),c}function o2(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}kc.peek=u2;function kc(e,t,n,r){const i=o2(n),a=n.enter("emphasis"),s=n.createTracker(r);let o=s.move(i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i),a(),o}function u2(e,t,n){return n.options.emphasis||"*"}function l2(e,t){let n=!1;return Vr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,aa}),!!((!e.depth||e.depth<3)&&Da(e)&&(t.options.setext||n))}function c2(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(l2(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
70
70
  `,after:`
71
71
  `});return f(),d(),p+`
72
72
  `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
73
73
  `))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
74
- `,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),o(),c}wc.peek=i2;function wc(e){return e.value||""}function i2(){return"<"}Ic.peek=a2;function Ic(e,t,n,r){const i=Xa(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),c+=u.move(")"),s(),c}function a2(){return"!"}vc.peek=s2;function vc(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const c=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function s2(){return"!"}kc.peek=o2;function kc(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function o2(){return"`"}function Nc(e,t){const n=Oa(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Rc.peek=u2;function Rc(e,t,n,r){const i=Xa(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(Nc(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),n.stack=d,f}o=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),o(),c}function u2(e,t,n){return Nc(e,n)?"<":"["}Oc.peek=l2;function Oc(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function l2(){return"["}function Qa(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function c2(e){const t=Qa(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function d2(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Lc(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function f2(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?d2(n):Qa(n);const o=e.ordered?s==="."?")":".":c2(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Lc(n)===s&&d){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function h2(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function p2(e,t,n,r){const i=h2(n);let a=n.bulletCurrent||Qa(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),d);return u(),c;function d(f,p,h){return p?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function m2(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const g2=Yr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function b2(e,t,n,r){return(e.children.some(function(s){return g2(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function E2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Dc.peek=T2;function Dc(e,t,n,r){const i=E2(n),a=n.enter("strong"),s=n.createTracker(r);let o=s.move(i+i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i+i),a(),o}function T2(e,t,n){return n.options.strong||"*"}function y2(e,t,n,r){return n.safe(e.value,r)}function x2(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function _2(e,t,n){const r=(Lc(n)+(n.options.ruleSpaces?" ":"")).repeat(x2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Pc={blockquote:GT,break:zo,code:KT,definition:ZT,emphasis:Ac,hardBreak:zo,heading:r2,html:wc,image:Ic,imageReference:vc,inlineCode:kc,link:Rc,linkReference:Oc,list:f2,listItem:p2,paragraph:m2,root:b2,strong:Dc,text:y2,thematicBreak:_2};function S2(){return{enter:{table:C2,tableData:$o,tableHeader:$o,tableRow:w2},exit:{codeText:I2,table:A2,tableData:Li,tableHeader:Li,tableRow:Li}}}function C2(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function A2(e){this.exit(e),this.data.inTable=void 0}function w2(e){this.enter({type:"tableRow",children:[]},e)}function Li(e){this.exit(e)}function $o(e){this.enter({type:"tableCell",children:[]},e)}function I2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,v2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function v2(e,t){return t==="|"?t:e}function k2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
75
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:o}};function s(h,b,y,w){return c(d(h,y,w),h.align)}function o(h,b,y,w){const S=f(h,y,w),v=c([S]);return v.slice(0,v.indexOf(`
76
- `))}function u(h,b,y,w){const S=y.enter("tableCell"),v=y.enter("phrasing"),k=y.containerPhrasing(h,{...w,before:a,after:a});return v(),S(),k}function c(h,b){return $T(h,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function d(h,b,y){const w=h.children;let S=-1;const v=[],k=b.enter("table");for(;++S<w.length;)v[S]=f(w[S],b,y);return k(),v}function f(h,b,y){const w=h.children;let S=-1;const v=[],k=b.enter("tableRow");for(;++S<w.length;)v[S]=u(w[S],h,b,y);return k(),v}function p(h,b,y){let w=Pc.inlineCode(h,b,y);return y.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function N2(){return{exit:{taskListCheckValueChecked:Yo,taskListCheckValueUnchecked:Yo,paragraph:O2}}}function R2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:L2}}}function Yo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function O2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function L2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=Pc.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+s}}function D2(){return[fT(),LT(),BT(),S2(),N2()]}function P2(e){return{extensions:[hT(),DT(e),FT(),k2(e),R2()]}}const M2={tokenize:z2,partial:!0},Mc={tokenize:$2,partial:!0},Bc={tokenize:Y2,partial:!0},Fc={tokenize:G2,partial:!0},B2={tokenize:q2,partial:!0},Hc={name:"wwwAutolink",tokenize:U2,previous:jc},Uc={name:"protocolAutolink",tokenize:j2,previous:zc},Lt={name:"emailAutolink",tokenize:H2,previous:$c},wt={};function F2(){return{text:wt}}let Vt=48;for(;Vt<123;)wt[Vt]=Lt,Vt++,Vt===58?Vt=65:Vt===91&&(Vt=97);wt[43]=Lt;wt[45]=Lt;wt[46]=Lt;wt[95]=Lt;wt[72]=[Lt,Uc];wt[104]=[Lt,Uc];wt[87]=[Lt,Hc];wt[119]=[Lt,Hc];function H2(e,t,n){const r=this;let i,a;return s;function s(f){return!pa(f)||!$c.call(r,r.previous)||Ka(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return pa(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(B2,d,c)(f):f===45||f===95||We(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),i=!0,u}function d(f){return a&&i&&Ze(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function U2(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!jc.call(r,r.previous)||Ka(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(M2,e.attempt(Mc,e.attempt(Bc,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function j2(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&zc.call(r,r.previous)&&!Ka(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(Ze(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||_r(f)||ve(f)||en(f)||jr(f)?n(f):e.attempt(Mc,e.attempt(Bc,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function z2(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function $2(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Fc,u,o)(c):c===null||ve(c)||en(c)||c!==45&&jr(c)?u(c):(a=!0,e.consume(c),s)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!a?n(c):t(c)}}function Y2(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Fc,t,a)(s):s===null||ve(s)||en(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function G2(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||ve(o)||en(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||ve(o)||en(o)?t(o):r(o)}function a(o){return Ze(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Ze(o)?(e.consume(o),s):n(o)}}function q2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return We(a)?n(a):t(a)}}function jc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ve(e)}function zc(e){return!Ze(e)}function $c(e){return!(e===47||pa(e))}function pa(e){return e===43||e===45||e===46||e===95||We(e)}function Ka(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const V2={tokenize:ty,partial:!0};function W2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:J2,continuation:{tokenize:Z2},exit:ey}},text:{91:{name:"gfmFootnoteCall",tokenize:K2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:X2,resolveTo:Q2}}}}function X2(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const c=mt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Q2(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function K2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||ve(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(mt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return ve(f)||(s=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function J2(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(b)}function d(b){if(s>999||b===93&&!o||b===null||b===91||ve(b))return n(b);if(b===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=mt(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ve(b)||(o=!0),s++,e.consume(b),b===92?f:d}function f(b){return b===91||b===92||b===93?(e.consume(b),s++,d):d(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),xe(e,h,"gfmFootnoteDefinitionWhitespace")):n(b)}function h(b){return t(b)}}function Z2(e,t,n){return e.check(er,t,e.attempt(V2,t,n))}function ey(e){e.exit("gfmFootnoteDefinition")}function ty(e,t,n){const r=this;return xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function ny(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",d,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&it(p,p.length,0,zr(h,s.slice(c+1,u),o)),it(p,p.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",d,o]]),it(s,c-1,u-c+3,p),u=c+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const c=this.previous,d=this.events;let f=0;return p;function p(b){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(b):(s.enter("strikethroughSequenceTemporary"),h(b))}function h(b){const y=Sr(c);if(b===126)return f>1?u(b):(s.consume(b),f++,h);if(f<2&&!n)return u(b);const w=s.exit("strikethroughSequenceTemporary"),S=Sr(b);return w._open=!S||S===2&&!!y,w._close=!y||y===2&&!!S,o(b)}}}class ry{constructor(){this.map=[]}add(t,n,r){iy(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function iy(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function ay(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function sy(){return{flow:{null:{name:"table",tokenize:oy,resolveAll:uy}}}}function oy(e,t,n){const r=this;let i=0,a=0,s;return o;function o(I){let U=r.events.length-1;for(;U>-1;){const $=r.events[U][1].type;if($==="lineEnding"||$==="linePrefix")U--;else break}const z=U>-1?r.events[U][1].type:null,B=z==="tableHead"||z==="tableRow"?N:u;return B===N&&r.parser.lazy[r.now().line]?n(I):B(I)}function u(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(s=!0,a+=1),d(I)}function d(I){return I===null?n(I):se(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),h):n(I):Ee(I)?xe(e,d,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(I)))}function f(I){return I===null||I===124||ve(I)?(e.exit("data"),d(I)):(e.consume(I),I===92?p:f)}function p(I){return I===92||I===124?(e.consume(I),f):f(I)}function h(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,Ee(I)?xe(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?w(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),y):A(I)}function y(I){return Ee(I)?xe(e,w,"whitespace")(I):w(I)}function w(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),S):I===45?(a+=1,S(I)):I===null||se(I)?L(I):A(I)}function S(I){return I===45?(e.enter("tableDelimiterFiller"),v(I)):A(I)}function v(I){return I===45?(e.consume(I),v):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(I))}function k(I){return Ee(I)?xe(e,L,"whitespace")(I):L(I)}function L(I){return I===124?b(I):I===null||se(I)?!s||i!==a?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):A(I)}function A(I){return n(I)}function N(I){return e.enter("tableRow"),Y(I)}function Y(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),Y):I===null||se(I)?(e.exit("tableRow"),t(I)):Ee(I)?xe(e,Y,"whitespace")(I):(e.enter("data"),X(I))}function X(I){return I===null||I===124||ve(I)?(e.exit("data"),Y(I)):(e.consume(I),I===92?ne:X)}function ne(I){return I===92||I===124?(e.consume(I),X):X(I)}}function uy(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,c,d,f;const p=new ry;for(;++n<e.length;){const h=e[n],b=h[1];h[0]==="enter"?b.type==="tableHead"?(o=!1,u!==0&&(Go(p,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])),i=b.type==="tableDelimiterRow"?2:d?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=hr(p,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=hr(p,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(o=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],f=hr(p,t,a,i,n,f)):s[1]!==0&&(f=hr(p,t,s,i,n,f)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Go(p,t,u,c,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=ay(t.events,n))}return e}function hr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},hn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=hn(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=hn(t.events,n[2]),d=hn(t.events,n[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,y=n[3]-n[2]-1;e.add(b,y,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},hn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Go(e,t,n,r,i){const a=[],s=hn(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function hn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ly={name:"tasklistCheck",tokenize:dy};function cy(){return{text:{91:ly}}}function dy(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return ve(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return se(u)?t(u):Ee(u)?e.check({tokenize:fy},t,n)(u):n(u)}}function fy(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function hy(e){return ml([F2(),W2(),ny(e),sy(),cy()])}const py={};function my(e){const t=this,n=e||py,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(hy(n)),a.push(D2()),s.push(P2(n))}const qo=new Set;function gy(e){return qo.has(e)?!1:(qo.add(e),!0)}function by(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=C.useRef(!1),o=C.useRef();return C.useCallback(c=>{if(o.current?.(),o.current=void 0,!c||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{a&&!gy(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const p=new IntersectionObserver((h,b)=>{h[0]?.isIntersecting&&(b.disconnect(),f())},{root:d,rootMargin:r,threshold:i});p.observe(c),o.current=()=>p.disconnect()},[t,n,r,i,a,e])}const Ey=e=>{const t=new URL(e);if(t.username||t.password)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_CREDENTIALS");const n=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol!=="https:"&&!(t.protocol==="http:"&&n))throw new Error("CHAT_SYSTEM_API_URL_MUST_USE_HTTPS");if(t.search||t.hash)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_QUERY_OR_HASH");const r=t.pathname.replace(/\/+$/,"");return`${t.origin}${r}`};class tn{constructor(){}static getApiUrl=t=>t!==void 0?Ey(t):_a()?"http://localhost:3001":"https://www.api.chatsystem.ai";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:i={}})=>{const a={method:n,headers:this.getHeaders({contentType:t}),...i};return r&&(a.body=JSON.stringify(r)),a}}const Yc=C.createContext(null);function Ty({apiUrl:e,children:t}){const n=C.useMemo(()=>tn.getApiUrl(e),[e]);return x.jsx(Yc.Provider,{value:n,children:t})}function Kr(){return C.useContext(Yc)??tn.getApiUrl()}function yy(e,t){if(!t||!e)return e;const n=t.replace(/^[?&]+/,""),[r,i]=e.split("#"),a=r.includes("?")?"&":"?",s=`${r}${a}${n}`;return i?`${s}#${i}`:s}function xy({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:o}=C.useContext(rn),u=Kr(),c=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),d=u,f=yy(e,t||o.api.tracking?.queryParamToAppend||""),p=()=>{const v=`${d}/tracking/clicked/${r.appToken}`,k={discussionId:r.discussionId,urlClicked:e};try{fetch(v,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(k),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=()=>{const v=`${d}/tracking/displayed/${r.appToken}`,k={discussionId:r.discussionId,urlSeen:e};try{fetch(v,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(k),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},b=C.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),y=by(h,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:b}),w=v=>{p(),i?.(v)},S=c?{}:{target:"_blank",rel:"noopener noreferrer"};return c?x.jsx("a",{ref:y,href:f,...s,onClick:w,className:"customLinkInternal",children:n}):x.jsx("a",{ref:y,href:f,...S,...s,onClick:w,className:"customLinkExternal",children:n})}const Gc=({logo:e,label:t,className:n})=>x.jsxs("div",{className:`flex items-center gap-2 logoWrapper${n?` ${n}`:""}`,children:[e,x.jsx("p",{className:"font-bold",children:t})]}),qc=()=>{const{companySettings:e}=C.useContext(rn);return x.jsx("div",{className:`assistant
74
+ `,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),o(),c}Nc.peek=d2;function Nc(e){return e.value||""}function d2(){return"<"}Rc.peek=f2;function Rc(e,t,n,r){const i=Ka(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(o=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),o()),c+=u.move(")"),s(),c}function f2(){return"!"}Oc.peek=h2;function Oc(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const c=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function h2(){return"!"}Lc.peek=p2;function Lc(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function p2(){return"`"}function Dc(e,t){const n=Da(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Pc.peek=m2;function Pc(e,t,n,r){const i=Ka(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(Dc(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),n.stack=d,f}o=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),o(),c}function m2(e,t,n){return Dc(e,n)?"<":"["}Mc.peek=g2;function Mc(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(c+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!c||c!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function g2(){return"["}function Ja(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function b2(e){const t=Ja(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function E2(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Bc(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function T2(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?E2(n):Ja(n);const o=e.ordered?s==="."?")":".":b2(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Bc(n)===s&&d){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function y2(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function x2(e,t,n,r){const i=y2(n);let a=n.bulletCurrent||Ja(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),d);return u(),c;function d(f,p,h){return p?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function _2(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const S2=Gr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function C2(e,t,n,r){return(e.children.some(function(s){return S2(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function A2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Fc.peek=w2;function Fc(e,t,n,r){const i=A2(n),a=n.enter("strong"),s=n.createTracker(r);let o=s.move(i+i);return o+=s.move(n.containerPhrasing(e,{before:o,after:i,...s.current()})),o+=s.move(i+i),a(),o}function w2(e,t,n){return n.options.strong||"*"}function I2(e,t,n,r){return n.safe(e.value,r)}function v2(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function k2(e,t,n){const r=(Bc(n)+(n.options.ruleSpaces?" ":"")).repeat(v2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Hc={blockquote:JT,break:qo,code:i2,definition:s2,emphasis:kc,hardBreak:qo,heading:c2,html:Nc,image:Rc,imageReference:Oc,inlineCode:Lc,link:Pc,linkReference:Mc,list:T2,listItem:x2,paragraph:_2,root:C2,strong:Fc,text:I2,thematicBreak:k2};function N2(){return{enter:{table:R2,tableData:Vo,tableHeader:Vo,tableRow:L2},exit:{codeText:D2,table:O2,tableData:Di,tableHeader:Di,tableRow:Di}}}function R2(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function O2(e){this.exit(e),this.data.inTable=void 0}function L2(e){this.enter({type:"tableRow",children:[]},e)}function Di(e){this.exit(e)}function Vo(e){this.enter({type:"tableCell",children:[]},e)}function D2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,P2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function P2(e,t){return t==="|"?t:e}function M2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
75
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:o}};function s(h,b,x,w){return c(d(h,x,w),h.align)}function o(h,b,x,w){const C=f(h,x,w),k=c([C]);return k.slice(0,k.indexOf(`
76
+ `))}function u(h,b,x,w){const C=x.enter("tableCell"),k=x.enter("phrasing"),I=x.containerPhrasing(h,{...w,before:a,after:a});return k(),C(),I}function c(h,b){return QT(h,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function d(h,b,x){const w=h.children;let C=-1;const k=[],I=b.enter("table");for(;++C<w.length;)k[C]=f(w[C],b,x);return I(),k}function f(h,b,x){const w=h.children;let C=-1;const k=[],I=b.enter("tableRow");for(;++C<w.length;)k[C]=u(w[C],h,b,x);return I(),k}function p(h,b,x){let w=Hc.inlineCode(h,b,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function B2(){return{exit:{taskListCheckValueChecked:Wo,taskListCheckValueUnchecked:Wo,paragraph:H2}}}function F2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:U2}}}function Wo(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function H2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function U2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=Hc.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+s}}function j2(){return[TT(),UT(),YT(),N2(),B2()]}function z2(e){return{extensions:[yT(),jT(e),GT(),M2(e),F2()]}}const $2={tokenize:X2,partial:!0},Uc={tokenize:Q2,partial:!0},jc={tokenize:K2,partial:!0},zc={tokenize:J2,partial:!0},Y2={tokenize:Z2,partial:!0},$c={name:"wwwAutolink",tokenize:V2,previous:Gc},Yc={name:"protocolAutolink",tokenize:W2,previous:qc},Dt={name:"emailAutolink",tokenize:q2,previous:Vc},vt={};function G2(){return{text:vt}}let Xt=48;for(;Xt<123;)vt[Xt]=Dt,Xt++,Xt===58?Xt=65:Xt===91&&(Xt=97);vt[43]=Dt;vt[45]=Dt;vt[46]=Dt;vt[95]=Dt;vt[72]=[Dt,Yc];vt[104]=[Dt,Yc];vt[87]=[Dt,$c];vt[119]=[Dt,$c];function q2(e,t,n){const r=this;let i,a;return s;function s(f){return!ma(f)||!Vc.call(r,r.previous)||Za(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return ma(f)?(e.consume(f),o):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(Y2,d,c)(f):f===45||f===95||We(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),i=!0,u}function d(f){return a&&i&&Ze(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function V2(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Gc.call(r,r.previous)||Za(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($2,e.attempt(Uc,e.attempt(jc,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function W2(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&qc.call(r,r.previous)&&!Za(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(Ze(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||Sr(f)||Ie(f)||nn(f)||zr(f)?n(f):e.attempt(Uc,e.attempt(jc,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function X2(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function Q2(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(zc,u,o)(c):c===null||Ie(c)||nn(c)||c!==45&&zr(c)?u(c):(a=!0,e.consume(c),s)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!a?n(c):t(c)}}function K2(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(zc,t,a)(s):s===null||Ie(s)||nn(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function J2(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ie(o)||nn(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Ie(o)||nn(o)?t(o):r(o)}function a(o){return Ze(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):Ze(o)?(e.consume(o),s):n(o)}}function Z2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return We(a)?n(a):t(a)}}function Gc(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ie(e)}function qc(e){return!Ze(e)}function Vc(e){return!(e===47||ma(e))}function ma(e){return e===43||e===45||e===46||e===95||We(e)}function Za(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const ey={tokenize:uy,partial:!0};function ty(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ay,continuation:{tokenize:sy},exit:oy}},text:{91:{name:"gfmFootnoteCall",tokenize:iy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ny,resolveTo:ry}}}}function ny(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const c=Et(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function ry(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function iy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||Ie(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Et(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Ie(f)||(s=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function ay(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(b)}function d(b){if(s>999||b===93&&!o||b===null||b===91||Ie(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=Et(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ie(b)||(o=!0),s++,e.consume(b),b===92?f:d}function f(b){return b===91||b===92||b===93?(e.consume(b),s++,d):d(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),xe(e,h,"gfmFootnoteDefinitionWhitespace")):n(b)}function h(b){return t(b)}}function sy(e,t,n){return e.check(tr,t,e.attempt(ey,t,n))}function oy(e){e.exit("gfmFootnoteDefinition")}function uy(e,t,n){const r=this;return xe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function ly(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",d,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&st(p,p.length,0,$r(h,s.slice(c+1,u),o)),st(p,p.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",d,o]]),st(s,c-1,u-c+3,p),u=c+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const c=this.previous,d=this.events;let f=0;return p;function p(b){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(b):(s.enter("strikethroughSequenceTemporary"),h(b))}function h(b){const x=Cr(c);if(b===126)return f>1?u(b):(s.consume(b),f++,h);if(f<2&&!n)return u(b);const w=s.exit("strikethroughSequenceTemporary"),C=Cr(b);return w._open=!C||C===2&&!!x,w._close=!x||x===2&&!!C,o(b)}}}class cy{constructor(){this.map=[]}add(t,n,r){dy(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function dy(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function fy(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function hy(){return{flow:{null:{name:"table",tokenize:py,resolveAll:my}}}}function py(e,t,n){const r=this;let i=0,a=0,s;return o;function o(v){let U=r.events.length-1;for(;U>-1;){const $=r.events[U][1].type;if($==="lineEnding"||$==="linePrefix")U--;else break}const z=U>-1?r.events[U][1].type:null,F=z==="tableHead"||z==="tableRow"?N:u;return F===N&&r.parser.lazy[r.now().line]?n(v):F(v)}function u(v){return e.enter("tableHead"),e.enter("tableRow"),c(v)}function c(v){return v===124||(s=!0,a+=1),d(v)}function d(v){return v===null?n(v):ce(v)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):n(v):Ee(v)?xe(e,d,"whitespace")(v):(a+=1,s&&(s=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),f(v)))}function f(v){return v===null||v===124||Ie(v)?(e.exit("data"),d(v)):(e.consume(v),v===92?p:f)}function p(v){return v===92||v===124?(e.consume(v),f):f(v)}function h(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(e.enter("tableDelimiterRow"),s=!1,Ee(v)?xe(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):b(v))}function b(v){return v===45||v===58?w(v):v===124?(s=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),x):A(v)}function x(v){return Ee(v)?xe(e,w,"whitespace")(v):w(v)}function w(v){return v===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),C):v===45?(a+=1,C(v)):v===null||ce(v)?L(v):A(v)}function C(v){return v===45?(e.enter("tableDelimiterFiller"),k(v)):A(v)}function k(v){return v===45?(e.consume(v),k):v===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),I):(e.exit("tableDelimiterFiller"),I(v))}function I(v){return Ee(v)?xe(e,L,"whitespace")(v):L(v)}function L(v){return v===124?b(v):v===null||ce(v)?!s||i!==a?A(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(v)):A(v)}function A(v){return n(v)}function N(v){return e.enter("tableRow"),Y(v)}function Y(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),Y):v===null||ce(v)?(e.exit("tableRow"),t(v)):Ee(v)?xe(e,Y,"whitespace")(v):(e.enter("data"),V(v))}function V(v){return v===null||v===124||Ie(v)?(e.exit("data"),Y(v)):(e.consume(v),v===92?re:V)}function re(v){return v===92||v===124?(e.consume(v),V):V(v)}}function my(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,c,d,f;const p=new cy;for(;++n<e.length;){const h=e[n],b=h[1];h[0]==="enter"?b.type==="tableHead"?(o=!1,u!==0&&(Xo(p,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},p.add(n,0,[["enter",d,t]])),i=b.type==="tableDelimiterRow"?2:d?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=mr(p,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=mr(p,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(o=!0,u=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],f=mr(p,t,a,i,n,f)):s[1]!==0&&(f=mr(p,t,s,i,n,f)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Xo(p,t,u,c,d),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=fy(t.events,n))}return e}function mr(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},pn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=pn(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=pn(t.events,n[2]),d=pn(t.events,n[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},pn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Xo(e,t,n,r,i){const a=[],s=pn(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function pn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const gy={name:"tasklistCheck",tokenize:Ey};function by(){return{text:{91:gy}}}function Ey(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return Ie(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return ce(u)?t(u):Ee(u)?e.check({tokenize:Ty},t,n)(u):n(u)}}function Ty(e,t,n){return xe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function yy(e){return Tl([G2(),ty(),ly(e),hy(),by()])}const xy={};function _y(e){const t=this,n=e||xy,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(yy(n)),a.push(j2()),s.push(z2(n))}const Qo=new Set;function Sy(e){return Qo.has(e)?!1:(Qo.add(e),!0)}function Cy(e,{root:t,rootSelector:n,rootMargin:r="0px",threshold:i=0,dedupeKey:a}={}){const s=S.useRef(!1),o=S.useRef();return S.useCallback(c=>{if(o.current?.(),o.current=void 0,!c||s.current)return;const d=t??(n?document.querySelector(n):null),f=()=>{a&&!Sy(a)||(s.current=!0,e())};if(typeof window>"u"||!("IntersectionObserver"in window)){f();return}const p=new IntersectionObserver((h,b)=>{h[0]?.isIntersecting&&(b.disconnect(),f())},{root:d,rootMargin:r,threshold:i});p.observe(c),o.current=()=>p.disconnect()},[t,n,r,i,a,e])}const Ay=e=>{const t=new URL(e);if(t.username||t.password)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_CREDENTIALS");const n=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol!=="https:"&&!(t.protocol==="http:"&&n))throw new Error("CHAT_SYSTEM_API_URL_MUST_USE_HTTPS");if(t.search||t.hash)throw new Error("CHAT_SYSTEM_API_URL_MUST_NOT_CONTAIN_QUERY_OR_HASH");const r=t.pathname.replace(/\/+$/,"");return`${t.origin}${r}`};class rn{constructor(){}static getApiUrl=t=>t!==void 0?Ay(t):Ca()?"http://localhost:3001":"https://www.api.chatsystem.ai";static getHeaders=({contentType:t="text/plain"})=>({"Content-Type":t});static getFetchConfig=({contentType:t="text/plain",httpVerb:n="GET",body:r,options:i={}})=>{const a={method:n,headers:this.getHeaders({contentType:t}),...i};return r&&(a.body=JSON.stringify(r)),a}}const Wc=S.createContext(null);function wy({apiUrl:e,children:t}){const n=S.useMemo(()=>rn.getApiUrl(e),[e]);return y.jsx(Wc.Provider,{value:n,children:t})}function Jr(){return S.useContext(Wc)??rn.getApiUrl()}function Iy(e,t){if(!t||!e)return e;const n=t.replace(/^[?&]+/,""),[r,i]=e.split("#"),a=r.includes("?")?"&":"?",s=`${r}${a}${n}`;return i?`${s}#${i}`:s}function vy({href:e="",queryParamToAppend:t="",children:n,context:r,onClick:i,seenRootEl:a,...s}){const{companySettings:o}=S.useContext(Yt),u=Jr(),c=e.startsWith("/")||typeof window<"u"&&e.startsWith(window.location.origin),d=u,f=Iy(e,t||o.api.tracking?.queryParamToAppend||""),p=()=>{const k=`${d}/tracking/clicked/${r.appToken}`,I={discussionId:r.discussionId,urlClicked:e};try{fetch(k,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(I),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},h=()=>{const k=`${d}/tracking/displayed/${r.appToken}`,I={discussionId:r.discussionId,urlSeen:e};try{fetch(k,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(I),keepalive:!0,cache:"no-store",credentials:"omit",mode:"cors"}).catch(()=>{})}catch{}},b=S.useMemo(()=>`${r.appToken}::${r.discussionId}::${e}`,[r.appToken,r.discussionId,e]),x=Cy(h,{root:a,threshold:0,rootMargin:"0px 0px -10% 0px",dedupeKey:b}),w=k=>{p(),i?.(k)},C=c?{}:{target:"_blank",rel:"noopener noreferrer"};return c?y.jsx("a",{ref:x,href:f,...s,onClick:w,className:"customLinkInternal",children:n}):y.jsx("a",{ref:x,href:f,...C,...s,onClick:w,className:"customLinkExternal",children:n})}const Xc=({logo:e,label:t,className:n})=>y.jsxs("div",{className:`flex items-center gap-2 logoWrapper${n?` ${n}`:""}`,children:[e,y.jsx("p",{className:"font-bold",children:t})]}),Qc=()=>{const{companySettings:e}=S.useContext(Yt);return y.jsx("div",{className:`assistant
77
77
  transition
78
78
  ease-in-out
79
79
  delay-50
@@ -81,8 +81,8 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
81
81
  flex
82
82
  justify-center
83
83
  items-center
84
- `,children:x.jsx(Sa,{facet:e.agent.display[ee.AgentDisplayFacetRoleType.ASSISTANT]})})},_y=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:i,chatlineLabelCustomerSupportTranslation:a}=Ju(),s=t?.authorType==="customer_support_operator"?t.customerSupportAuthorName??a:i,o=ee.formatCustomerSupportProviderText({text:e??"",provider:t?.customerSupportProvider});return x.jsx(Wa,{children:x.jsx("div",{className:"chatLineAssistant flex justify-start",children:x.jsxs("div",{className:`mr-auto w-full rounded-2xl rounded-bl-md px-4 py-3 transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 text-red-800 shadow-md animate-fade-in":"bg-slate-100 text-gray-800 shadow-sm"}`,children:[x.jsx(Gc,{className:"logoWrapper--assistant w-full justify-start text-left mb-2 text-xs",logo:x.jsx(qc,{}),label:s}),x.jsx("div",{children:x.jsx(Ua,{remarkPlugins:[my],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[Va],components:{a:({node:u,href:c,children:d,...f})=>x.jsx(xy,{href:c??"",...f,context:n,seenRootEl:r,children:d})},children:o})})]})})})},Sy=({content:e,metaData:t})=>{const n=t?.isErrorMessage;return x.jsx(Wa,{children:x.jsx("div",{className:"chatLineSystemMessage flex justify-center px-2","data-system-event":t?.systemEvent,children:x.jsx("div",{className:`max-w-[90%] rounded-lg border px-3 py-2 text-center text-xs leading-relaxed shadow-sm ${n?"border-red-200 bg-red-50 text-red-800":"border-slate-200 bg-slate-50 text-slate-600"}`,children:x.jsx(Ua,{rehypePlugins:[Va],children:e??""})})})})},Cy=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{if(n?.messageKind==="system")return x.jsx(Sy,{content:t,metaData:n});const a=e==="user",s=e==="assistant";return x.jsxs(x.Fragment,{children:[a&&x.jsx(sT,{content:t,metaData:n}),s&&x.jsx(_y,{content:t,metaData:n,context:r,seenRootEl:i})]})};function Ay(e,t,n){let[r,i]=C.useState(e||t),a=C.useRef(e!==void 0),s=e!==void 0;C.useEffect(()=>{let c=a.current;c!==s&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,u=C.useCallback((c,...d)=>{let f=(p,...h)=>{n&&(Object.is(o,p)||n(p,...h)),s||(o=p)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...b)=>{let y=c(s?o:h,...b);return f(y,...d),s?h:y})):(s||i(c),f(c,...d))},[s,o,n]);return[o,u]}const kr={prefix:String(Math.round(Math.random()*1e10)),current:0},Vc=C.createContext(kr),wy=C.createContext(!1);let Iy=!!(typeof window<"u"&&window.document&&window.document.createElement),Di=new WeakMap;function vy(e=!1){let t=C.useContext(Vc),n=C.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=Di.get(a);s==null?Di.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,Di.delete(a))}n.current=++t.current}return n.current}function ky(e){let t=C.useContext(Vc);t===kr&&!Iy&&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=vy(!!e),r=t===kr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function Ny(e){let t=C.useId(),[n]=C.useState(Py()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${kr.prefix}`;return e||`${r}-${t}`}const Ry=typeof C.useId=="function"?Ny:ky;function Oy(){return!1}function Ly(){return!0}function Dy(e){return()=>{}}function Py(){return typeof C.useSyncExternalStore=="function"?C.useSyncExternalStore(Dy,Oy,Ly):C.useContext(wy)}function Wc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Wc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function My(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Wc(e))&&(r&&(r+=" "),r+=t);return r}const ln=typeof document<"u"?C.useLayoutEffect:()=>{};function Jt(e){const t=C.useRef(null);return ln(()=>{t.current=e},[e]),C.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function By(e){let[t,n]=C.useState(e),r=C.useRef(null),i=Jt(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});ln(()=>{r.current&&i()});let a=Jt(s=>{r.current=s(t),i()});return[t,a]}let Fy=!!(typeof window<"u"&&window.document&&window.document.createElement),Nr=new Map;function Rr(e){let[t,n]=C.useState(e),r=C.useRef(null),i=Ry(t),a=C.useCallback(s=>{r.current=s},[]);return Fy&&Nr.set(i,a),ln(()=>{let s=i;return()=>{Nr.delete(s)}},[i]),C.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function Hy(e,t){if(e===t)return e;let n=Nr.get(e);if(n)return n(t),t;let r=Nr.get(t);return r?(r(e),e):t}function Vo(e=[]){let t=Rr(),[n,r]=By(t),i=C.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return ln(i,[t,i,...e]),n}function Uy(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ir=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Or=e=>e&&"window"in e&&e.window===e?e:ir(e).defaultView||window;function Lr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=Uy(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=My(a,s):i==="id"&&a&&s?t.id=Hy(a,s):t[i]=s!==void 0?s:a}}return t}const jy=new Set(["id"]),zy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),$y=new Set(["href","target","rel","download","ping","referrerPolicy"]),Yy=/^(data-.*)$/;function Gy(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(jy.has(s)||n&&zy.has(s)||r&&$y.has(s)||i?.has(s)||Yy.test(s))&&(a[s]=e[s]);return a}function Wo(e){if(qy())e.focus({preventScroll:!0});else{let t=Vy(e);e.focus(),Wy(t)}}let pr=null;function qy(){if(pr==null){pr=!1;try{document.createElement("div").focus({get preventScroll(){return pr=!0,!0}})}catch{}}return pr}function Vy(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 Wy(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Xy(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 Qy(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 Ky(){return Qy(/^Mac/i)}function Jy(){return Xy(/Android/i)}let pn=new Map,ma=new Set;function Xo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=pn.get(r.target);i||(i=new Set,pn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=pn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),pn.delete(r.target)),pn.size===0)){for(let a of ma)a();ma.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Xo():document.addEventListener("DOMContentLoaded",Xo));function Zy(e){requestAnimationFrame(()=>{pn.size===0?e():ma.add(e)})}function ex(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Rr(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function tx(e,t){ln(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function nx(e){return e.mozInputSource===0&&e.isTrusted?!0:Jy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function rx(e,t,n){let r=C.useRef(t),i=Jt(()=>{n&&n(r.current)});C.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s?.addEventListener("reset",i),()=>{s?.removeEventListener("reset",i)}},[e,i])}const ix=C.createContext({register:()=>{}});ix.displayName="PressResponderContext";class ax{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 sx(e){let t=C.useRef({isFocused:!1,observer:null});ln(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Jt(r=>{e?.(r)});return C.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new ax("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function ox(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=C.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),s=sx(a),o=C.useCallback(u=>{u.target===u.currentTarget&&document.activeElement===u.target&&(n&&n(u),i&&i(!0),s(u))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let kn=null,ux=new Set,qn=new Map,nn=!1,ga=!1;function Jr(e,t){for(let n of ux)n(e,t)}function lx(e){return!(e.metaKey||!Ky()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Dr(e){nn=!0,lx(e)&&(kn="keyboard",Jr("keyboard",e))}function ut(e){kn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(nn=!0,Jr("pointer",e))}function Xc(e){nx(e)&&(nn=!0,kn="virtual")}function Qc(e){e.target===window||e.target===document||(!nn&&!ga&&(kn="virtual",Jr("virtual",e)),nn=!1,ga=!1)}function Kc(){nn=!1,ga=!0}function Qo(e){if(typeof window>"u"||qn.get(Or(e)))return;const t=Or(e),n=ir(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){nn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Dr,!0),n.addEventListener("keyup",Dr,!0),n.addEventListener("click",Xc,!0),t.addEventListener("focus",Qc,!0),t.addEventListener("blur",Kc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ut,!0),n.addEventListener("pointermove",ut,!0),n.addEventListener("pointerup",ut,!0)):(n.addEventListener("mousedown",ut,!0),n.addEventListener("mousemove",ut,!0),n.addEventListener("mouseup",ut,!0)),t.addEventListener("beforeunload",()=>{Jc(e)},{once:!0}),qn.set(t,{focus:r})}const Jc=(e,t)=>{const n=Or(e),r=ir(e);t&&r.removeEventListener("DOMContentLoaded",t),qn.has(n)&&(n.HTMLElement.prototype.focus=qn.get(n).focus,r.removeEventListener("keydown",Dr,!0),r.removeEventListener("keyup",Dr,!0),r.removeEventListener("click",Xc,!0),n.removeEventListener("focus",Qc,!0),n.removeEventListener("blur",Kc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ut,!0),r.removeEventListener("pointermove",ut,!0),r.removeEventListener("pointerup",ut,!0)):(r.removeEventListener("mousedown",ut,!0),r.removeEventListener("mousemove",ut,!0),r.removeEventListener("mouseup",ut,!0)),qn.delete(n))};function cx(e){const t=ir(e);let n;return t.readyState!=="loading"?Qo(e):(n=()=>{Qo(e)},t.addEventListener("DOMContentLoaded",n)),()=>Jc(e,n)}typeof document<"u"&&cx();function dx(){return kn}function fx(e){kn=e,Jr(e,null)}function Ko(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 hx(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Ko(e.onKeyDown),onKeyUp:Ko(e.onKeyUp)}}}function px(e){const t=ir(e);if(dx()==="virtual"){let n=t.activeElement;Zy(()=>{t.activeElement===n&&e.isConnected&&Wo(e)})}else Wo(e)}function mx(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class Ja{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new Jo({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.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 a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&mx(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),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 Ja;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Jo({scopeRef:null}),this.fastMap.set(null,this.root)}}class Jo{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 Ja;let gx=C.createContext(null);function bx(e){let t=C.useContext(gx)||{};tx(t,e);let{ref:n,...r}=t;return r}function Ex(e,t){let{focusProps:n}=ox(e),{keyboardProps:r}=hx(e),i=Lr(n,r),a=bx(t),s=e.isDisabled?{}:a,o=C.useRef(e.autoFocus);return C.useEffect(()=>{o.current&&t.current&&px(t.current),o.current=!1},[t]),{focusableProps:Lr({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function Tx(e,t,n){let{validationBehavior:r,focus:i}=e;ln(()=>{if(r==="native"&&n?.current){let u=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(xx(n.current))}});let a=Jt(()=>{t.resetValidation()}),s=Jt(u=>{var c;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&n&&d&&_x(d)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),fx("keyboard")}u.preventDefault()}),o=Jt(()=>{t.commitValidation()});C.useEffect(()=>{let u=n?.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",s),u.addEventListener("change",o),c?.addEventListener("reset",a),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",o),c?.removeEventListener("reset",a)}},[n,s,o,a,r])}function yx(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 xx(e){return{isInvalid:!e.validity.valid,validationDetails:yx(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function _x(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const Zc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},ed={...Zc,customError:!0,valid:!1},Pn={isInvalid:!1,validationDetails:Zc,validationErrors:[]},Sx=C.createContext({}),Zo="__formValidationState"+Date.now();function Cx(e){if(e[Zo]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[Zo];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return Ax(e)}function Ax(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let u=t?{isInvalid:!0,validationErrors:[],validationDetails:ed}:null,c=C.useMemo(()=>eu(wx(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let d=C.useContext(Sx),f=C.useMemo(()=>r?Array.isArray(r)?r.flatMap(I=>ba(d[I])):ba(d[r]):[],[d,r]),[p,h]=C.useState(d),[b,y]=C.useState(!1);d!==p&&(h(d),y(!1));let w=C.useMemo(()=>eu(b?[]:f),[b,f]),S=C.useRef(Pn),[v,k]=C.useState(Pn),L=C.useRef(Pn),A=()=>{if(!N)return;Y(!1);let I=c||a||S.current;Pi(I,L.current)||(L.current=I,k(I))},[N,Y]=C.useState(!1);return C.useEffect(A),{realtimeValidation:u||w||c||a||Pn,displayValidation:o==="native"?u||w||v:u||w||c||a||v,updateValidation(I){o==="aria"&&!Pi(v,I)?k(I):S.current=I},resetValidation(){let I=Pn;Pi(I,L.current)||(L.current=I,k(I)),o==="native"&&Y(!1),y(!0)},commitValidation(){o==="native"&&Y(!0),y(!0)}}}function ba(e){return e?Array.isArray(e)?e:[e]:[]}function wx(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return ba(n)}return[]}function eu(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:ed}:null}function Pi(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 Ix(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Rr(t);let s=Rr(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=ex({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:u}}function vx(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=Ix(e),o=Vo([!!t,!!n,r,i]),u=Vo([!!t,!!n,r,i]);return s=Lr(s,{"aria-describedby":[o,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:u}}}function kx(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:o="aria"}=e,[u,c]=Ay(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Ex(e,t),f=Cx({...e,value:u}),{isInvalid:p,validationErrors:h,validationDetails:b}=f.displayValidation,{labelProps:y,fieldProps:w,descriptionProps:S,errorMessageProps:v}=vx({...e,isInvalid:p,errorMessage:e.errorMessage||h}),k=Gy(e,{labelable:!0});const L={type:s,pattern:e.pattern};return rx(t,u,c),Tx(e,f,t),C.useEffect(()=>{if(t.current instanceof Or(t.current).HTMLTextAreaElement){let A=t.current;Object.defineProperty(A,"defaultValue",{get:()=>A.value,set:()=>{},configurable:!0})}},[t]),{labelProps:y,inputProps:Lr(k,n==="input"&&L,{disabled:r,readOnly:a,required:i&&o==="native","aria-required":i&&o==="aria"||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:u,onChange:A=>c(A.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,...w}),descriptionProps:S,errorMessageProps:v,isInvalid:p,validationErrors:h,validationDetails:b}}const Nx=e=>e.charCodeAt(e.length-1)===10,Rx=e=>{const[t,n]=C.useState(""),r=()=>{y.current&&(y.current.style.height=y.current.scrollHeight+"px")},i=()=>{y.current&&(y.current.style.height="48px")},a=I=>{n(I)};C.useEffect(r,[t]);const{label:s,SubmitComponent:o,onSubmit:u,isLoadingStream:c,audioEnabled:d=!1,MicComponent:f,onPressMicButton:p,LoadingComponent:h,onPressLoadingButton:b}=e,y=C.useRef(null),{labelProps:w,inputProps:S}=kx({...e,inputElementType:"textarea"},y),v=I=>{Nx(I.target.value)||a(I.target.value)},k=I=>{if(I.key==="Enter"||I.code==="Enter"||I.keyCode===13||I.code==="NumpadEnter"){if(I.shiftKey)a(t+`
85
- `);else if(!I.shiftKey){I.preventDefault(),I.stopPropagation(),c||Y();return}}},L=I=>{(I.key==="Enter"||I.code==="Enter"||I.keyCode===13||I.code==="NumpadEnter")&&(I.preventDefault(),I.stopPropagation())},A=t.trim().length>0,N=!!(e.isDisabled||e.shouldDisableIfInputIsEmpty&&!A),Y=()=>{N||(i(),u?.(t),a(""))},X=d&&!!f&&!!o&&!A&&!c,ne=()=>c&&h?x.jsx("div",{className:"relative",children:x.jsx(h,{onPressLoadingButton:b})}):o?!d||!f?x.jsx("div",{className:"relative",children:x.jsx(o,{onSubmitButton:Y,isDisabled:N})}):A?x.jsx("div",{className:"relative",children:x.jsx(o,{onSubmitButton:Y,isDisabled:N})}):x.jsxs("div",{className:"relative",children:[x.jsx("div",{className:"block md:hidden",children:x.jsx(f,{onPressMicButton:p})}),x.jsxs("div",{className:"hidden md:block",children:[x.jsx(f,{onPressMicButton:p,className:"md:!right-12"}),x.jsx(o,{onSubmitButton:Y,isDisabled:N,className:"md:!right-3"})]})]}):null;return x.jsxs("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[x.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[x.jsx("label",{...w,className:e.classNameLabel,children:s}),x.jsx("textarea",{...S,ref:y,className:`${e.classNameTextarea} p-3 ${X?"pr-12 md:pr-24":"pr-12"}`,onChange:v,value:t,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:X?"calc(100% - 72px)":"calc(100% - 30px)",resize:"none"},onKeyDown:k,onKeyUp:L})]}),ne()]})},Ox=({onSubmitButton:e,isDisabled:t,className:n})=>x.jsx("div",{children:x.jsx("button",{className:`absolute
84
+ `,children:y.jsx(Aa,{facet:e.agent.display[ee.AgentDisplayFacetRoleType.ASSISTANT]})})},ky=({content:e,metaData:t,context:n,seenRootEl:r})=>{const{chatlineLabelAssistantTranslation:i,chatlineLabelCustomerSupportTranslation:a}=nl(),s=t?.authorType==="customer_support_operator"?t.customerSupportAuthorName??a:i,o=ee.formatCustomerSupportProviderText({text:e??"",provider:t?.customerSupportProvider});return y.jsx(Qa,{children:y.jsx("div",{className:"chatLineAssistant flex justify-start",children:y.jsxs("div",{className:`mr-auto w-full rounded-2xl rounded-bl-md px-4 py-3 transition-all duration-300 text-left ${t?.isErrorMessage?"bg-red-100 text-red-800 shadow-md animate-fade-in":"bg-slate-100 text-gray-800 shadow-sm"}`,children:[y.jsx(Xc,{className:"logoWrapper--assistant w-full justify-start text-left mb-2 text-xs",logo:y.jsx(Qc,{}),label:s}),y.jsx("div",{className:"chatsystem-markdown",children:y.jsx(za,{remarkPlugins:[_y],remarkRehypeOptions:{passThrough:["link"]},rehypePlugins:[Xa],components:{a:({node:u,href:c,children:d,...f})=>y.jsx(vy,{href:c??"",...f,context:n,seenRootEl:r,children:d})},children:o})})]})})})},Ny=({content:e,metaData:t})=>{const n=t?.isErrorMessage;return y.jsx(Qa,{children:y.jsx("div",{className:"chatLineSystemMessage flex justify-center px-2","data-system-event":t?.systemEvent,children:y.jsx("div",{className:`max-w-[90%] rounded-lg border px-3 py-2 text-center text-xs leading-relaxed shadow-sm ${n?"border-red-200 bg-red-50 text-red-800":"border-slate-200 bg-slate-50 text-slate-600"}`,children:y.jsx(za,{rehypePlugins:[Xa],children:e??""})})})})},Ry=({userType:e,content:t,metaData:n,context:r,seenRootEl:i})=>{if(n?.messageKind==="system")return y.jsx(Ny,{content:t,metaData:n});const a=e==="user",s=e==="assistant";return y.jsxs(y.Fragment,{children:[a&&y.jsx(hT,{content:t,metaData:n}),s&&y.jsx(ky,{content:t,metaData:n,context:r,seenRootEl:i})]})};function Oy(e,t,n){let[r,i]=S.useState(e||t),a=S.useRef(e!==void 0),s=e!==void 0;S.useEffect(()=>{let c=a.current;c!==s&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,u=S.useCallback((c,...d)=>{let f=(p,...h)=>{n&&(Object.is(o,p)||n(p,...h)),s||(o=p)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...b)=>{let x=c(s?o:h,...b);return f(x,...d),s?h:x})):(s||i(c),f(c,...d))},[s,o,n]);return[o,u]}const Nr={prefix:String(Math.round(Math.random()*1e10)),current:0},Kc=S.createContext(Nr),Ly=S.createContext(!1);let Dy=!!(typeof window<"u"&&window.document&&window.document.createElement),Pi=new WeakMap;function Py(e=!1){let t=S.useContext(Kc),n=S.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=Pi.get(a);s==null?Pi.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,Pi.delete(a))}n.current=++t.current}return n.current}function My(e){let t=S.useContext(Kc);t===Nr&&!Dy&&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=Py(!!e),r=t===Nr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function By(e){let t=S.useId(),[n]=S.useState(zy()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Nr.prefix}`;return e||`${r}-${t}`}const Fy=typeof S.useId=="function"?By:My;function Hy(){return!1}function Uy(){return!0}function jy(e){return()=>{}}function zy(){return typeof S.useSyncExternalStore=="function"?S.useSyncExternalStore(jy,Hy,Uy):S.useContext(Ly)}function Jc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Jc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $y(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Jc(e))&&(r&&(r+=" "),r+=t);return r}const cn=typeof document<"u"?S.useLayoutEffect:()=>{};function en(e){const t=S.useRef(null);return cn(()=>{t.current=e},[e]),S.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function Yy(e){let[t,n]=S.useState(e),r=S.useRef(null),i=en(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});cn(()=>{r.current&&i()});let a=en(s=>{r.current=s(t),i()});return[t,a]}let Gy=!!(typeof window<"u"&&window.document&&window.document.createElement),Rr=new Map;function Or(e){let[t,n]=S.useState(e),r=S.useRef(null),i=Fy(t),a=S.useCallback(s=>{r.current=s},[]);return Gy&&Rr.set(i,a),cn(()=>{let s=i;return()=>{Rr.delete(s)}},[i]),S.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function qy(e,t){if(e===t)return e;let n=Rr.get(e);if(n)return n(t),t;let r=Rr.get(t);return r?(r(e),e):t}function Ko(e=[]){let t=Or(),[n,r]=Yy(t),i=S.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return cn(i,[t,i,...e]),n}function Vy(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ar=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Lr=e=>e&&"window"in e&&e.window===e?e:ar(e).defaultView||window;function Dr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=Vy(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=$y(a,s):i==="id"&&a&&s?t.id=qy(a,s):t[i]=s!==void 0?s:a}}return t}const Wy=new Set(["id"]),Xy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Qy=new Set(["href","target","rel","download","ping","referrerPolicy"]),Ky=/^(data-.*)$/;function Jy(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(Wy.has(s)||n&&Xy.has(s)||r&&Qy.has(s)||i?.has(s)||Ky.test(s))&&(a[s]=e[s]);return a}function Jo(e){if(Zy())e.focus({preventScroll:!0});else{let t=ex(e);e.focus(),tx(t)}}let gr=null;function Zy(){if(gr==null){gr=!1;try{document.createElement("div").focus({get preventScroll(){return gr=!0,!0}})}catch{}}return gr}function ex(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 tx(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function nx(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 rx(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 ix(){return rx(/^Mac/i)}function ax(){return nx(/Android/i)}let mn=new Map,ga=new Set;function Zo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=mn.get(r.target);i||(i=new Set,mn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=mn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),mn.delete(r.target)),mn.size===0)){for(let a of ga)a();ga.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Zo():document.addEventListener("DOMContentLoaded",Zo));function sx(e){requestAnimationFrame(()=>{mn.size===0?e():ga.add(e)})}function ox(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Or(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function ux(e,t){cn(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function lx(e){return e.mozInputSource===0&&e.isTrusted?!0:ax()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function cx(e,t,n){let r=S.useRef(t),i=en(()=>{n&&n(r.current)});S.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s?.addEventListener("reset",i),()=>{s?.removeEventListener("reset",i)}},[e,i])}const dx=S.createContext({register:()=>{}});dx.displayName="PressResponderContext";class fx{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 hx(e){let t=S.useRef({isFocused:!1,observer:null});cn(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=en(r=>{e?.(r)});return S.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new fx("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function px(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=S.useCallback(u=>{if(u.target===u.currentTarget)return r&&r(u),i&&i(!1),!0},[r,i]),s=hx(a),o=S.useCallback(u=>{u.target===u.currentTarget&&document.activeElement===u.target&&(n&&n(u),i&&i(!0),s(u))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let Nn=null,mx=new Set,Vn=new Map,an=!1,ba=!1;function Zr(e,t){for(let n of mx)n(e,t)}function gx(e){return!(e.metaKey||!ix()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Pr(e){an=!0,gx(e)&&(Nn="keyboard",Zr("keyboard",e))}function dt(e){Nn="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(an=!0,Zr("pointer",e))}function Zc(e){lx(e)&&(an=!0,Nn="virtual")}function ed(e){e.target===window||e.target===document||(!an&&!ba&&(Nn="virtual",Zr("virtual",e)),an=!1,ba=!1)}function td(){an=!1,ba=!0}function eu(e){if(typeof window>"u"||Vn.get(Lr(e)))return;const t=Lr(e),n=ar(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){an=!0,r.apply(this,arguments)},n.addEventListener("keydown",Pr,!0),n.addEventListener("keyup",Pr,!0),n.addEventListener("click",Zc,!0),t.addEventListener("focus",ed,!0),t.addEventListener("blur",td,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",dt,!0),n.addEventListener("pointermove",dt,!0),n.addEventListener("pointerup",dt,!0)):(n.addEventListener("mousedown",dt,!0),n.addEventListener("mousemove",dt,!0),n.addEventListener("mouseup",dt,!0)),t.addEventListener("beforeunload",()=>{nd(e)},{once:!0}),Vn.set(t,{focus:r})}const nd=(e,t)=>{const n=Lr(e),r=ar(e);t&&r.removeEventListener("DOMContentLoaded",t),Vn.has(n)&&(n.HTMLElement.prototype.focus=Vn.get(n).focus,r.removeEventListener("keydown",Pr,!0),r.removeEventListener("keyup",Pr,!0),r.removeEventListener("click",Zc,!0),n.removeEventListener("focus",ed,!0),n.removeEventListener("blur",td,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",dt,!0),r.removeEventListener("pointermove",dt,!0),r.removeEventListener("pointerup",dt,!0)):(r.removeEventListener("mousedown",dt,!0),r.removeEventListener("mousemove",dt,!0),r.removeEventListener("mouseup",dt,!0)),Vn.delete(n))};function bx(e){const t=ar(e);let n;return t.readyState!=="loading"?eu(e):(n=()=>{eu(e)},t.addEventListener("DOMContentLoaded",n)),()=>nd(e,n)}typeof document<"u"&&bx();function Ex(){return Nn}function Tx(e){Nn=e,Zr(e,null)}function tu(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 yx(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:tu(e.onKeyDown),onKeyUp:tu(e.onKeyUp)}}}function xx(e){const t=ar(e);if(Ex()==="virtual"){let n=t.activeElement;sx(()=>{t.activeElement===n&&e.isConnected&&Jo(e)})}else Jo(e)}function _x(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}class es{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new nu({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.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 a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&_x(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),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 es;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new nu({scopeRef:null}),this.fastMap.set(null,this.root)}}class nu{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 es;let Sx=S.createContext(null);function Cx(e){let t=S.useContext(Sx)||{};ux(t,e);let{ref:n,...r}=t;return r}function Ax(e,t){let{focusProps:n}=px(e),{keyboardProps:r}=yx(e),i=Dr(n,r),a=Cx(t),s=e.isDisabled?{}:a,o=S.useRef(e.autoFocus);return S.useEffect(()=>{o.current&&t.current&&xx(t.current),o.current=!1},[t]),{focusableProps:Dr({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function wx(e,t,n){let{validationBehavior:r,focus:i}=e;cn(()=>{if(r==="native"&&n?.current){let u=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(u),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(vx(n.current))}});let a=en(()=>{t.resetValidation()}),s=en(u=>{var c;t.displayValidation.isInvalid||t.commitValidation();let d=n==null||(c=n.current)===null||c===void 0?void 0:c.form;if(!u.defaultPrevented&&n&&d&&kx(d)===n.current){var f;i?i():(f=n.current)===null||f===void 0||f.focus(),Tx("keyboard")}u.preventDefault()}),o=en(()=>{t.commitValidation()});S.useEffect(()=>{let u=n?.current;if(!u)return;let c=u.form;return u.addEventListener("invalid",s),u.addEventListener("change",o),c?.addEventListener("reset",a),()=>{u.removeEventListener("invalid",s),u.removeEventListener("change",o),c?.removeEventListener("reset",a)}},[n,s,o,a,r])}function Ix(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 vx(e){return{isInvalid:!e.validity.valid,validationDetails:Ix(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function kx(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const rd={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},id={...rd,customError:!0,valid:!1},Pn={isInvalid:!1,validationDetails:rd,validationErrors:[]},Nx=S.createContext({}),ru="__formValidationState"+Date.now();function Rx(e){if(e[ru]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[ru];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return Ox(e)}function Ox(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let u=t?{isInvalid:!0,validationErrors:[],validationDetails:id}:null,c=S.useMemo(()=>iu(Lx(s,i)),[s,i]);a?.validationDetails.valid&&(a=null);let d=S.useContext(Nx),f=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(v=>Ea(d[v])):Ea(d[r]):[],[d,r]),[p,h]=S.useState(d),[b,x]=S.useState(!1);d!==p&&(h(d),x(!1));let w=S.useMemo(()=>iu(b?[]:f),[b,f]),C=S.useRef(Pn),[k,I]=S.useState(Pn),L=S.useRef(Pn),A=()=>{if(!N)return;Y(!1);let v=c||a||C.current;Mi(v,L.current)||(L.current=v,I(v))},[N,Y]=S.useState(!1);return S.useEffect(A),{realtimeValidation:u||w||c||a||Pn,displayValidation:o==="native"?u||w||k:u||w||c||a||k,updateValidation(v){o==="aria"&&!Mi(k,v)?I(v):C.current=v},resetValidation(){let v=Pn;Mi(v,L.current)||(L.current=v,I(v)),o==="native"&&Y(!1),x(!0)},commitValidation(){o==="native"&&Y(!0),x(!0)}}}function Ea(e){return e?Array.isArray(e)?e:[e]:[]}function Lx(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Ea(n)}return[]}function iu(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:id}:null}function Mi(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 Dx(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Or(t);let s=Or(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let u=ox({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:u}}function Px(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=Dx(e),o=Ko([!!t,!!n,r,i]),u=Ko([!!t,!!n,r,i]);return s=Dr(s,{"aria-describedby":[o,u,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:u}}}function Mx(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:a=!1,type:s="text",validationBehavior:o="aria"}=e,[u,c]=Oy(e.value,e.defaultValue||"",e.onChange),{focusableProps:d}=Ax(e,t),f=Rx({...e,value:u}),{isInvalid:p,validationErrors:h,validationDetails:b}=f.displayValidation,{labelProps:x,fieldProps:w,descriptionProps:C,errorMessageProps:k}=Px({...e,isInvalid:p,errorMessage:e.errorMessage||h}),I=Jy(e,{labelable:!0});const L={type:s,pattern:e.pattern};return cx(t,u,c),wx(e,f,t),S.useEffect(()=>{if(t.current instanceof Lr(t.current).HTMLTextAreaElement){let A=t.current;Object.defineProperty(A,"defaultValue",{get:()=>A.value,set:()=>{},configurable:!0})}},[t]),{labelProps:x,inputProps:Dr(I,n==="input"&&L,{disabled:r,readOnly:a,required:i&&o==="native","aria-required":i&&o==="aria"||void 0,"aria-invalid":p||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:u,onChange:A=>c(A.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,...w}),descriptionProps:C,errorMessageProps:k,isInvalid:p,validationErrors:h,validationDetails:b}}const Bx=e=>e.charCodeAt(e.length-1)===10,Fx=e=>{const[t,n]=S.useState(""),r=()=>{x.current&&(x.current.style.height=x.current.scrollHeight+"px")},i=()=>{x.current&&(x.current.style.height="48px")},a=v=>{n(v)};S.useEffect(r,[t]);const{label:s,SubmitComponent:o,onSubmit:u,isLoadingStream:c,audioEnabled:d=!1,MicComponent:f,onPressMicButton:p,LoadingComponent:h,onPressLoadingButton:b}=e,x=S.useRef(null),{labelProps:w,inputProps:C}=Mx({...e,inputElementType:"textarea"},x),k=v=>{Bx(v.target.value)||a(v.target.value)},I=v=>{if(v.key==="Enter"||v.code==="Enter"||v.keyCode===13||v.code==="NumpadEnter"){if(v.shiftKey)a(t+`
85
+ `);else if(!v.shiftKey){v.preventDefault(),v.stopPropagation(),c||Y();return}}},L=v=>{(v.key==="Enter"||v.code==="Enter"||v.keyCode===13||v.code==="NumpadEnter")&&(v.preventDefault(),v.stopPropagation())},A=t.trim().length>0,N=!!(e.isDisabled||e.shouldDisableIfInputIsEmpty&&!A),Y=()=>{N||(i(),u?.(t),a(""))},V=d&&!!f&&!!o&&!A&&!c,re=()=>c&&h?y.jsx("div",{className:"relative",children:y.jsx(h,{onPressLoadingButton:b})}):o?!d||!f?y.jsx("div",{className:"relative",children:y.jsx(o,{onSubmitButton:Y,isDisabled:N})}):A?y.jsx("div",{className:"relative",children:y.jsx(o,{onSubmitButton:Y,isDisabled:N})}):y.jsxs("div",{className:"relative",children:[y.jsx("div",{className:"block md:hidden",children:y.jsx(f,{onPressMicButton:p})}),y.jsxs("div",{className:"hidden md:block",children:[y.jsx(f,{onPressMicButton:p,className:"md:!right-12"}),y.jsx(o,{onSubmitButton:Y,isDisabled:N,className:"md:!right-3"})]})]}):null;return y.jsxs("div",{style:{display:"flex",flexDirection:"column"},className:`${e.classNameContainer} w-full`,children:[y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[y.jsx("label",{...w,className:e.classNameLabel,children:s}),y.jsx("textarea",{...C,ref:x,className:`${e.classNameTextarea} p-3 ${V?"pr-12 md:pr-24":"pr-12"}`,onChange:k,value:t,rows:1,style:{overflow:"hidden",outlineColor:"#a8a8a8",border:"none",outline:"none",width:V?"calc(100% - 72px)":"calc(100% - 30px)",resize:"none"},onKeyDown:I,onKeyUp:L})]}),re()]})},Hx=({onSubmitButton:e,isDisabled:t,className:n})=>y.jsx("div",{children:y.jsx("button",{className:`absolute
86
86
  bg-violet-600
87
87
  md:bottom-2
88
88
  md:right-3
@@ -101,14 +101,15 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
101
101
  dark:bg-white
102
102
  transition-colors
103
103
  chatsystem-paperplane-button
104
- ${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:x.jsx("span",{className:"","data-state":"closed",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[x.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),x.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});var lt=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(lt||{});const Lx={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Discussion limit reached","chatbot.DiscussionLimitReached.explaination":"The discussion has reached its maximum number of messages. Please start a new one.","chatbot.DiscussionLimitReached.cta":"Restart","chatbot.error.api.409":"Oups ! The discussion if full. Please start a new one.","chatbot.error.api.429":"⏳ The chatbot is a little busy at the time. Please try again later.","chatbot.error.api.500":"Oops ! There has been an error. Please try again later.","chatbot.chatline.label.user":"You","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Customer support","chatbot.chatline.loading.function.genericSearchMessage":"Thinking ...","chatbot.chatline.loading.function.search":"Search","chatbot.chatline.loading.function.extractProductName":"Looking into the cavern","chatbot.chatline.loading.function.suggestProductName":"Consulting the shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Looking for ziboublis","chatbot.chatline.loading.function.searchStock":"Searching Stock","chatbot.chatline.loading.function.step":"Step","chatbot.chatline.loading.stepName.search":"Searching ...","chatbot.chatline.loading.stepName.building":"Building Query ...","chatbot.chatline.loading.stepName.analyzing":"Analyzing ...","chatbot.chatline.loading.stepName.redacting":"Writing answer","chatbot.chatline.loading.cancel":"Cancel","chatbot.chatline.seeRecentMessages":"see recent messages","chatbot.widget.menu.open":"Open chat menu","chatbot.widget.menu.startNewDiscussion":"Start a new discussion","chatbot.widget.close":"Close chat","recordingOverlay.recording":"Recording...","recordingOverlay.cancel":"Cancel","recordingOverlay.explaination":"Tap the mic to stop","chatbot.infobanner.title":"You have an archived discussion.","chatbot.infobanner.cta":"See","chatbot.customerSupport.connecting":"Transferring your request to customer support...","chatbot.customerSupport.connected":"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.","chatbot.customerSupport.connectionError":"Customer support is not available right now. Please try again later.","chatbot.customerSupport.providerUnavailable":"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.","chatbot.customerSupport.closed":"Your customer support conversation is now complete. Start a new conversation if you need more help!","chatbot.customerSupport.restart":"Restart","chatbot.customerSupport.fallback.title":"Leave your contact details","chatbot.customerSupport.fallback.description":"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Phone","chatbot.customerSupport.fallback.submit":"Send","chatbot.customerSupport.fallback.submitting":"Sending...","chatbot.customerSupport.fallback.success":"Your contact details have been saved. Customer support will contact you soon.","chatbot.customerSupport.closedHours.title":"Customer support is currently closed","chatbot.customerSupport.closedHours.description":"Leave your email, phone number and request. Customer support will contact you during opening hours.","chatbot.customerSupport.closedHours.schedulePrefix":"Today:","chatbot.customerSupport.closedHours.reason":"Reason for your request","chatbot.customerSupport.closedHours.success":"Your request has been saved. Customer support will contact you during opening hours.","chatbot.customerSupport.fallback.error":"We could not save your contact details. Please try again."},Dx={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Maximum de messages envoyés atteint.","chatbot.DiscussionLimitReached.explaination":"Le robot est à son maximum et ne peut plus envoyer de message. Merci de relancer une conversation.","chatbot.DiscussionLimitReached.cta":"Relancer une nouvelle conversation","chatbot.error.api.409":"Oups ! La discussion est à son maximum. Merci d'en commencer une nouvelle.","chatbot.error.api.429":"⏳ Le robot est un peu occupé actuellement. Merci de réessayer plus tard.","chatbot.error.api.500":"Oups ! Une erreur est survenue. Merci de réessayer plus tard !","chatbot.chatline.label.user":"Vous","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Support client","chatbot.chatline.loading.function.search":"Recherche","chatbot.chatline.loading.function.genericSearchMessage":"Je réfléchis ...","chatbot.chatline.loading.function.extractProductName":"Recherche dans la caverne","chatbot.chatline.loading.function.suggestProductName":"Consultation des shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Recherche des ziboublis","chatbot.chatline.loading.function.searchStock":"Recherche en stock","chatbot.chatline.loading.function.step":"Etape","chatbot.chatline.loading.stepName.search":"Recherche ...","chatbot.chatline.loading.stepName.building":"Construction ...","chatbot.chatline.loading.stepName.analyzing":"Analyse ...","chatbot.chatline.loading.stepName.redacting":"Rédaction","chatbot.chatline.loading.cancel":"Annuler","chatbot.chatline.seeRecentMessages":"voir les messages plus récents","chatbot.widget.menu.open":"Ouvrir le menu de discussion","chatbot.widget.menu.startNewDiscussion":"Démarrer une nouvelle discussion","chatbot.widget.close":"Fermer la discussion","recordingOverlay.recording":"Micro activé...","recordingOverlay.cancel":"Annuler","recordingOverlay.explaination":"Appuyez sur le micro pour arrêter","chatbot.infobanner.title":"Vous avez une conversation archivée.","chatbot.infobanner.cta":"Voir","chatbot.customerSupport.connecting":"Transfert de votre demande au support client...","chatbot.customerSupport.connected":"Votre demande a été transmise au support client. Il faut généralement quelques minutes pour obtenir une réponse. Merci de patienter.","chatbot.customerSupport.connectionError":"Le support client n'est pas disponible pour le moment. Merci de réessayer plus tard.","chatbot.customerSupport.providerUnavailable":"Le support client a reçu votre demande, mais les réponses en direct sont temporairement indisponibles. Merci de réessayer dans quelques instants.","chatbot.customerSupport.closed":"Votre échange avec le support client est terminé. Relancez une nouvelle conversation quand vous le souhaitez !","chatbot.customerSupport.restart":"Relancer","chatbot.customerSupport.fallback.title":"Laissez vos coordonnées","chatbot.customerSupport.fallback.description":"Le support client n'a pas encore répondu. Laissez votre email et votre téléphone, nous vous recontacterons prochainement.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Téléphone","chatbot.customerSupport.fallback.submit":"Envoyer","chatbot.customerSupport.fallback.submitting":"Envoi...","chatbot.customerSupport.fallback.success":"Vos coordonnées ont bien été notées. Le support client vous recontactera prochainement.","chatbot.customerSupport.closedHours.title":"Le support client est actuellement fermé","chatbot.customerSupport.closedHours.description":"Laissez votre email, votre téléphone et le motif de votre demande. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.closedHours.schedulePrefix":"Aujourd’hui :","chatbot.customerSupport.closedHours.reason":"Motif de votre demande","chatbot.customerSupport.closedHours.success":"Votre demande a bien été enregistrée. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.fallback.error":"Impossible d'enregistrer vos coordonnées. Merci de réessayer."},Zr={[lt.ENGLISH]:{translatedText:Lx,pictureName:lt.ENGLISH,langID:0,locale:lt.ENGLISH},[lt.FRENCH]:{translatedText:Dx,pictureName:lt.FRENCH,langID:1,locale:lt.FRENCH}},Px=Object.keys(Zr);Px.reduce((e,t)=>{const n=Zr[t];return[...e,n]},[]);const Mx="languageSettings",td=C.createContext({appCurrentLang:Zr[lt.ENGLISH],setAppCurrentLang:()=>{}}),Bx=e=>e.filter(t=>t.userType==="user").length;var Ea=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(Ea||{});const Fx=e=>!!e.startsWith("/"),Hx=(e,t,n)=>e===Ea.GET_DISCUSSION_ID?t?`Votre ID de discussion est ${t}`:"Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas.":e===Ea.RESET_DISCUSSION?(n(),null):`La commande ${e} n'est pas prise en compte.`;class Rt{static pending="";constructor(){}static transformNDJSONChunkIntoObjects(t){const n=Ct();this.pending+=t;const r=this.pending.split(/\r?\n/);this.pending=r.pop()??"";const i=[];for(const a of r){const s=a.trim();if(s)try{i.push(JSON.parse(s))}catch{n.warn("[NDJSON] Could not parse line:",s)}}return i}static flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamClientEventDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CLIENT_EVENT;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;static containsObjectWithLastAnswerToTrue=t=>{for(const n of t)if(this.isObjectOutputstreamMessageEndDTO(n)&&n.isLastAnswer)return!0;return!1}}const Ux=e=>{if(!ee.isUnknownRecord(e))return;const t=ee.readOptionalNumber(e.timeoutMinutes)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES;return{enabled:e.enabled===!0,timeoutMinutes:Math.max(1,Math.min(120,Math.round(t))),requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1}},jx=e=>{if(ee.isUnknownRecord(e))return{enabled:e.enabled!==!1,requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1,requireReason:e.requireReason!==!1}},zx=e=>{if(!ee.isUnknownRecord(e))return null;const t=e;if(t.type!=="interactive_widget_request"||t.event!=="interactiveWidget.requested"||t.widgetType!==ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport||!ee.isUnknownRecord(t.payload))return null;const n=t.payload;if((ee.readOptionalString(n.mode)??"live_chat")==="closed_hours_contact_capture"){const s=ee.readOptionalString(n.reconnectToken),o=ee.readOptionalNumber(n.customerSupportSessionId),u=jx(n.closedHoursContactCapture);if(n.transport!=="none"||!s||!o||!u||!u.enabled)return null;const c=ee.isUnknownRecord(n.businessHours)?n.businessHours:{};return{mode:"closed_hours_contact_capture",transport:"none",reconnectToken:s,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:o,companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),closedHoursContactCapture:u,businessHours:{timezone:ee.readOptionalString(c.timezone)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE,todayScheduleLabel:ee.readOptionalString(c.todayScheduleLabel)}}}if(n.transport!=="socket"||typeof n.socketUrl!="string")return null;const i=ee.readOptionalString(n.handoffToken),a=ee.readOptionalString(n.reconnectToken);return!i&&!a?null:{mode:"live_chat",transport:"socket",socketUrl:n.socketUrl,handoffToken:i,reconnectToken:a,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:ee.readOptionalNumber(n.customerSupportSessionId),companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),fallbackContactCapture:Ux(n.fallbackContactCapture)}},$x=e=>zx(e),Yx=/^[a-zA-Z0-9][a-zA-Z0-9:._-]*$/,Gx=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,qx=e=>{if(!ee.isUnknownRecord(e)||e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V1&&e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V2||typeof e.gateId!="string"||e.gateId.length<1||e.gateId.length>100||typeof e.toolCallId!="string"||e.toolCallId.length<1||e.toolCallId.length>255||typeof e.resultToken!="string"||e.resultToken.length<32||e.resultToken.length>512||typeof e.expiresAt!="string"||!Number.isFinite(Date.parse(e.expiresAt))||e.reason!=="identity_required"&&e.reason!=="identity_expired"||!Array.isArray(e.requiredCapabilities)||e.requiredCapabilities.length<1||e.requiredCapabilities.length>50||!e.requiredCapabilities.every(n=>typeof n=="string"&&n.length<=100&&Yx.test(n)))return null;const t={gateId:e.gateId,toolCallId:e.toolCallId,requiredCapabilities:[...new Set(e.requiredCapabilities)].sort(),reason:e.reason,expiresAt:e.expiresAt,resultToken:e.resultToken};return e.protocolVersion===ee.IDENTITY_GATE_PROTOCOL_V1?{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V1,...t}:!ee.isUnknownRecord(e.continuation)||typeof e.continuation.continuationId!="string"||!Gx.test(e.continuation.continuationId)||typeof e.continuation.expiresAt!="string"||!Number.isFinite(Date.parse(e.continuation.expiresAt))?null:{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V2,...t,continuation:{continuationId:e.continuation.continuationId,expiresAt:e.continuation.expiresAt}}},Vx=e=>{if(e.event===ee.IDENTITY_GATE_REQUIRED_EVENT){const n=qx(e.payload);if(n)return{type:"identity_gate_required",payload:n}}const t=$x(e.payload);return t?{type:"customer_support_handoff_requested",payload:t}:{type:"unhandled_client_event",event:e}},Wx=1e4,Xx=3e3,Qx=e=>{const t=new URL(e);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t},Kx=({apiUrl:e,handoff:t})=>(t.socketUrl.startsWith("ws://")||t.socketUrl.startsWith("wss://")?new URL(t.socketUrl):new URL(t.socketUrl,Qx(e))).toString(),Jx=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return["connected","customer_message_ack","provider_message","closed","error"].includes(t.type)};class Zx{socket;callbacks;url;appToken;handoffToken;isIntentionalClose=!1;handshakeTimeout;closeAcknowledgementTimeout=null;constructor(t){this.callbacks=t.callbacks,this.url=Kx(t),this.appToken=t.appToken;const n=t.handoff.reconnectToken??t.handoff.handoffToken;if(!n)throw new Error("Customer support socket requires a reconnect token");this.handoffToken=n,this.socket=new WebSocket(this.url),this.handshakeTimeout=setTimeout(()=>{this.socket.readyState!==WebSocket.CONNECTING&&this.socket.readyState!==WebSocket.OPEN||(this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()}),this.socket.close())},Wx),this.socket.addEventListener("open",this.sendAuthMessage),this.socket.addEventListener("message",this.handleMessage),this.socket.addEventListener("close",this.handleClose),this.socket.addEventListener("error",this.handleTransportError)}sendAuthMessage=()=>{this.socket.send(JSON.stringify({type:"auth",appToken:this.appToken,handoffToken:this.handoffToken}))};sendCustomerMessage(t){if(this.socket.readyState!==WebSocket.OPEN){this.callbacks.onError?.({type:"error",message:"Customer support connection is not ready.",code:"CUSTOMER_SUPPORT_SOCKET_NOT_READY"});return}const n={type:"customer_message",text:t,clientMessageId:crypto.randomUUID()};this.socket.send(JSON.stringify(n))}close(t,n){if(this.isIntentionalClose=!0,clearTimeout(this.handshakeTimeout),this.socket.readyState===WebSocket.OPEN&&n?.notifyServer){const r={type:"close",reason:t};this.socket.send(JSON.stringify(r)),this.closeAcknowledgementTimeout=setTimeout(()=>{this.closeTransport(t)},Xx);return}this.closeTransport(t)}handleMessage=t=>{clearTimeout(this.handshakeTimeout);let n;try{n=JSON.parse(t.data)}catch{this.callbacks.onError?.({type:"error",message:"Customer support sent an invalid message.",code:"CUSTOMER_SUPPORT_SOCKET_INVALID_MESSAGE"});return}if(Jx(n)){if(n.type==="connected"){this.callbacks.onConnected?.(n);return}if(n.type==="provider_message"){this.callbacks.onProviderMessage?.(n);return}if(n.type==="closed"){if(this.closeAcknowledgementTimeout!==null){clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null,this.closeTransport("Customer support session closed");return}this.callbacks.onClosed?.(n);return}n.type==="error"&&this.callbacks.onError?.(n)}};handleClose=t=>{clearTimeout(this.handshakeTimeout),this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),!this.isIntentionalClose&&this.callbacks.onClose?.(t)};handleTransportError=()=>{this.isIntentionalClose||this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()})};closeTransport(t){this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),this.socket.close(1e3,t??"Customer support socket detached")}safeUrlForLogs(){const t=new URL(this.url);return t.searchParams.has("handoffToken")&&t.searchParams.set("handoffToken","<redacted>"),t.toString()}}const e_=new Set(["SLACK_INBOUND_EVENT_NOT_OBSERVED"]),t_=e=>e&&e_.has(e)?"provider_unavailable":"connection_error",n_=e=>e.isClosed?e.labels.closed:!e.isCustomerSupportMode||!e.hasTransportFailed?null:e.failureKind==="provider_unavailable"?e.labels.providerUnavailable:e.labels.connectionError,r_=[500,1500,3e3],i_=e=>{const t=r_[e];return t===void 0?{shouldRetry:!1}:{shouldRetry:!0,delayMs:t}},_t={ai:"ai",customerSupport:"customer_support"},ei="chatsystem-widget",a_=1440*60*1e3;function mr(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))}function s_(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.timeoutMinutes!="number"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean")}function o_(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean"||typeof e.requireReason!="boolean")}function u_(e){if(typeof e!="object"||e===null||typeof e.discussionId!="number"||typeof e.reconnectToken!="string"||!mr(e.startedAt)||!mr(e.updatedAt)||e.reconnectTokenExpiresAt!==void 0&&!mr(e.reconnectTokenExpiresAt)||e.closedAt!==void 0&&!mr(e.closedAt)||e.closedReason!==void 0&&typeof e.closedReason!="string")return!1;const t=e.mode??"live_chat";return t==="closed_hours_contact_capture"?!(!["active","closed"].includes(e.status)||typeof e.customerSupportSessionId!="number"||!o_(e.closedHoursContactCapture)||typeof e.businessHours!="object"||e.businessHours===null||typeof e.businessHours.timezone!="string"||e.businessHours.todayScheduleLabel!==void 0&&typeof e.businessHours.todayScheduleLabel!="string"):!(t!=="live_chat"||!["connecting","active","closed"].includes(e.status)||typeof e.socketUrl!="string"||e.customerSupportSessionId!==void 0&&typeof e.customerSupportSessionId!="number"||e.isWaitingForFirstProviderReply!==void 0&&typeof e.isWaitingForFirstProviderReply!="boolean"||e.fallbackContactCapture!==void 0&&!s_(e.fallbackContactCapture))}function l_(e){return!(typeof e!="object"||e===null||e.userType!=="user"&&e.userType!=="assistant"||"content"in e&&e.content!==void 0&&typeof e.content!="string"||"metaData"in e&&e.metaData!==void 0&&(typeof e.metaData!="object"||e.metaData===null||"isErrorMessage"in e.metaData&&e.metaData.isErrorMessage!==void 0&&typeof e.metaData.isErrorMessage!="boolean"||"messageKind"in e.metaData&&e.metaData.messageKind!==void 0&&!["conversation","system"].includes(e.metaData.messageKind)||"systemEvent"in e.metaData&&e.metaData.systemEvent!==void 0&&!["customer_support_connecting","customer_support_connected","customer_support_closed","customer_support_connection_error"].includes(e.metaData.systemEvent)||"customerSupportAuthorName"in e.metaData&&e.metaData.customerSupportAuthorName!==void 0&&typeof e.metaData.customerSupportAuthorName!="string"))}function c_(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(l_)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt))||e.customerSupport!==void 0&&e.customerSupport!==null&&!u_(e.customerSupport))}function d_(e){const t=Ct();if(typeof window>"u")return;const n=e.key??ei,r={items:e.conversation.items,discussionId:e.conversation.discussionId,updatedAt:new Date().toISOString(),customerSupport:e.customerSupport??null};try{const i=JSON.stringify(r);window.localStorage.setItem(n,i)}catch(i){t.error("Failed to save chat state to localStorage",i)}}function nd(e){const t=Ct();if(typeof window>"u")return null;const n=e?.key??ei,r=window.localStorage.getItem(n);if(!r)return null;try{const i=JSON.parse(r);return c_(i)?i:(t.warn("Chat state in localStorage has unexpected shape, ignoring."),null)}catch(i){return t.error("Failed to parse chat state from localStorage",i),null}}function f_(e){if(typeof window>"u")return null;const t=ei;window.localStorage.removeItem(t)}const rd=(e,t)=>{if(t===null)return"discussion_not_loaded";if(t!==e.discussionId)return"discussion_mismatch";if(e.status==="closed")return"session_closed";if(!e.reconnectToken)return"missing_reconnect_token";if(e.mode==="closed_hours_contact_capture")return null;if(!e.socketUrl)return"missing_socket_url";if(e.reconnectTokenExpiresAt){const n=Date.parse(e.reconnectTokenExpiresAt);if(Number.isNaN(n))return"invalid_reconnect_expiration";if(n<=Date.now())return"expired_reconnect_token"}return null},h_=()=>{const e=nd(),t=e?.customerSupport??null;if(!t)return{mode:_t.ai,customerSupportState:null,reason:"no_customer_support_state"};const n=rd(t,e?.discussionId??null);return n==="session_closed"?{mode:_t.customerSupport,customerSupportState:t,reason:n}:n?{mode:_t.ai,customerSupportState:null,reason:n}:{mode:_t.customerSupport,customerSupportState:t,reason:"valid_reconnect_state"}},id=e=>e.mode!==_t.customerSupport?!1:e.customerSupportState.status!=="closed",Za=e=>e.mode!==_t.customerSupport?!1:e.customerSupportState.status==="closed",es=e=>e.mode!==_t.customerSupport||e.customerSupportState.status==="closed"?!1:e.customerSupportState.mode==="closed_hours_contact_capture",p_=e=>es(e)?"customer_support":id(e)?"customer_support_connecting":Za(e)?"customer_support":"ai",m_=e=>es(e)?"idle":id(e)?"connecting":Za(e)?"closed":"idle",g_=e=>es(e)?"visible":"idle",b_=e=>e?.trim()||void 0,E_=e=>e.mode!==_t.customerSupport||e.customerSupportState.status==="closed"||e.customerSupportState.mode==="closed_hours_contact_capture"?null:e.customerSupportState,ad=e=>!!(e&&e.mode!=="closed_hours_contact_capture"),ts=e=>e?.mode==="closed_hours_contact_capture",T_=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&ad(e.state))return e.state.fallbackContactCapture},y_=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&ts(e.state))return e.state.closedHoursContactCapture},x_=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&ts(e.state))return e.state.businessHours},__=e=>e.isCustomerSupportMode?e.chatTransportMode==="customer_support_connecting"?"customer_support_connecting":e.isCurrentDiscussion?ts(e.state)?"customer_support_closed_hours_form":e.socketStatus!=="connected"?`socket_${e.socketStatus}`:e.isWaitingForFirstProviderReply?"waiting_first_provider_reply":e.isCustomerSupportClosed?"customer_support_closed":null:e.currentDiscussionId===null?"discussion_not_loaded":"discussion_mismatch":null;function S_({appToken:e,currentConversation:t,loadingStatus:n,labels:r,logger:i,setCurrentConversationId:a,setLoadingStatus:s,addMessageToCurrentConversation:o,chatboxBootState:u,resetConversationRequestId:c}){const d=Kr(),f=u,[p,h]=C.useState(()=>p_(f)),[b,y]=C.useState(f.customerSupportState),[w,S]=C.useState(()=>m_(f)),[v,k]=C.useState(null),[L,A]=C.useState("idle"),[N,Y]=C.useState(()=>g_(f)),X=C.useRef(null),ne=C.useRef(c),I=C.useRef(!1),U=C.useRef(null),z=C.useRef(E_(f)),B=C.useRef(Za(f)),$=C.useRef(!1),K=C.useRef(0),he=C.useRef(null),pe=p!=="ai",Se=b?.discussionId===t.discussionId,Le=pe&&b?.status==="closed",m=n_({isCustomerSupportMode:pe,isClosed:Le,hasTransportFailed:w==="failed",failureKind:v,labels:r}),G=!!(pe&&Se&&b?.mode!=="closed_hours_contact_capture"&&b?.isWaitingForFirstProviderReply),re={isCustomerSupportMode:pe,isCurrentDiscussion:Se,state:b},T=T_(re),W=y_(re),ce=x_(re),V=!!T?.enabled&&["visible","submitting","submitted","failed"].includes(L),oe=!!W?.enabled&&["visible","submitting","submitted","failed"].includes(N),ae=__({chatTransportMode:p,currentDiscussionId:t.discussionId,isCustomerSupportClosed:Le,isCustomerSupportMode:pe,isCurrentDiscussion:Se,isWaitingForFirstProviderReply:G,socketStatus:w,state:b}),de=ae!==null;C.useEffect(()=>{if(n!=="notLoading"||t.items.length===0)return;const H=Se?b:null;!t.discussionId&&!H||d_({conversation:t,customerSupport:H})},[n,t,b,Se]),C.useEffect(()=>($.current=!1,()=>{$.current=!0,he.current!==null&&(window.clearTimeout(he.current),he.current=null),X.current?.close("Widget unmounted"),X.current=null}),[]);const ie=(H,J,O)=>{o({userType:"assistant",content:H,metaData:{messageKind:"system",systemEvent:J,...O},temporaryId:crypto.randomUUID()})},ke=(H,J)=>{o({userType:"assistant",content:H,metaData:{messageKind:"conversation",authorType:"customer_support_operator",...J},temporaryId:crypto.randomUUID()})},q=(H,J)=>{X.current?.close(H,J),X.current=null},Ne=()=>{he.current!==null&&(window.clearTimeout(he.current),he.current=null),K.current=0,U.current=null,z.current=null,B.current=!1,k(null),y(null),S("idle"),h("ai")},qe=(H,J)=>{q(H,J),Ne()};C.useEffect(()=>{ne.current!==c&&(ne.current=c,I.current=!0,qe("Starting new conversation",{notifyServer:!0}))},[c]),C.useEffect(()=>{t.discussionId===null&&I.current&&b===null&&p==="ai"&&(I.current=!1)},[p,t.discussionId,b]);const Be=H=>{B.current||(B.current=!0,U.current=null,X.current=null,H?.discussionId&&a(H.discussionId),s("notLoading"),k(null),S("closed"),h("customer_support"),y(J=>{if(!J)return J;const O=new Date().toISOString();return{...J,status:"closed",discussionId:H?.discussionId??J.discussionId,updatedAt:O,closedAt:H?.closedAt??O,closedReason:H?.reason,isWaitingForFirstProviderReply:!1}}))},He=(H,J)=>{X.current&&q("Replacing customer support socket"),S("connecting");let O=!1,P=!1;const Q=Z=>{k(Z),S("failed"),s("notLoading")},ue=Z=>{X.current=null;const _e=i_(K.current);if(!_e.shouldRetry){i.error("Customer support socket reconnect exhausted code="+Z.code+" reason="+(Z.reason||"none")),Q("connection_error");return}K.current+=1,S("connecting"),h("customer_support_connecting"),i.log("Customer support socket reconnect scheduled attempt="+K.current+" delayMs="+_e.delayMs+" code="+Z.code),he.current=window.setTimeout(()=>{he.current=null,!($.current||B.current)&&He(H,{...J,addConnectedMessage:O?!1:J?.addConnectedMessage})},_e.delayMs)};X.current=new Zx({apiUrl:d,appToken:e,handoff:H,callbacks:{onConnected:Z=>{const _e=H.reconnectToken??H.handoffToken;if(!_e){Be({reason:"Missing reconnect token"});return}O=!0,K.current=0,J?.isStoredReconnect&&(z.current=null);const at=new Date().toISOString();a(Z.discussionId),k(null),S("connected"),h("customer_support"),s("notLoading"),y(et=>{const Ve=ad(et)?et:null;return{mode:"live_chat",status:"active",discussionId:Z.discussionId,socketUrl:H.socketUrl,reconnectToken:_e,reconnectTokenExpiresAt:Z.reconnectTokenExpiresAt??H.reconnectTokenExpiresAt,customerSupportSessionId:Z.customerSupportSessionId??H.customerSupportSessionId,provider:Ve?.provider,isWaitingForFirstProviderReply:Ve?.isWaitingForFirstProviderReply??!0,fallbackContactCapture:Ve?.fallbackContactCapture,startedAt:Ve?.startedAt??at,updatedAt:at}}),J?.addConnectedMessage!==!1&&ie(r.connected,"customer_support_connected")},onProviderMessage:Z=>{k(null),S("connected"),A(_e=>_e==="submitted"?_e:"idle"),y(_e=>!_e||_e.mode==="closed_hours_contact_capture"?_e:{..._e,status:"active",provider:Z.provider??_e.provider,reconnectTokenExpiresAt:Z.reconnectTokenExpiresAt??_e.reconnectTokenExpiresAt,isWaitingForFirstProviderReply:!1,updatedAt:new Date().toISOString()}),ke(Z.text,{customerSupportAuthorName:b_(Z.authorName),customerSupportProvider:Z.provider})},onClosed:Z=>{P=!0,Be({reason:Z.reason,closedAt:Z.closedAt,discussionId:Z.discussionId})},onError:Z=>{P=!0,i.error("Customer support socket server error code="+Z.code+" message="+Z.message),Q(t_(Z.code))},onClose:Z=>{$.current||B.current||P||ue(Z)},onTransportError:Z=>{i.error(`Customer support socket transport error readyState=${Z.readyState} url=${Z.url}`)}}})};C.useEffect(()=>{const H=z.current;if(!H)return;const J=rd(H,t.discussionId);if(J!=="discussion_not_loaded"){if(J==="session_closed"){z.current=null,S("closed"),h("customer_support");return}if(J){z.current=null,y(O=>O?.discussionId===t.discussionId?O:null),S("idle"),h("ai");return}X.current||(S("connecting"),h("customer_support_connecting"),He({mode:"live_chat",transport:"socket",socketUrl:H.socketUrl,reconnectToken:H.reconnectToken,reconnectTokenExpiresAt:H.reconnectTokenExpiresAt,customerSupportSessionId:H.customerSupportSessionId,discussionId:H.discussionId,fallbackContactCapture:H.fallbackContactCapture},{addConnectedMessage:!1,isStoredReconnect:!0}))}},[t.discussionId]);const vt=H=>{if(H.mode==="closed_hours_contact_capture"){be(H);return}const J=H.reconnectToken??H.handoffToken;if(!H.discussionId||!J){ie(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const O=new Date().toISOString();U.current=H,B.current=!1,A("idle"),y({mode:"live_chat",status:"connecting",discussionId:H.discussionId,socketUrl:H.socketUrl,reconnectToken:J,reconnectTokenExpiresAt:H.reconnectTokenExpiresAt,customerSupportSessionId:H.customerSupportSessionId,isWaitingForFirstProviderReply:!0,fallbackContactCapture:H.fallbackContactCapture,startedAt:O,updatedAt:O}),S("connecting"),h("customer_support_connecting"),ie(r.connecting,"customer_support_connecting")},je=()=>{const H=U.current;!H||H.mode!=="live_chat"||(U.current=null,He(H))},Dt=H=>p!=="customer_support"||w!=="connected"||!Se||!X.current?(ie(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0}),!1):(X.current.sendCustomerMessage(H),!0);C.useEffect(()=>{if(!T?.enabled||!G||!Se||w!=="connected"||L!=="idle")return;const H=Math.max(1,T.timeoutMinutes)*60*1e3,J=window.setTimeout(()=>{A("visible")},H);return()=>window.clearTimeout(J)},[T,L,Se,G,w]);const kt=async({email:H,phone:J})=>{if(!b?.customerSupportSessionId||!b.reconnectToken)return!1;A("submitting");const O=`${d}/customer-support/sessions/${b.customerSupportSessionId}/fallback-contact`;return(await fetch(O,tn.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:b.reconnectToken,reasonType:"fallback_no_reply",email:H,phone:J}}))).ok?(A("submitted"),q("Fallback contact submitted"),Be({reason:"fallback_contact_submitted",discussionId:b.discussionId}),!0):(A("failed"),!1)},be=H=>{if(!H.discussionId){ie(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const J=new Date().toISOString();U.current=null,B.current=!1,q("Closed-hours contact capture"),y({mode:"closed_hours_contact_capture",status:"active",discussionId:H.discussionId,reconnectToken:H.reconnectToken,reconnectTokenExpiresAt:H.reconnectTokenExpiresAt,customerSupportSessionId:H.customerSupportSessionId,closedHoursContactCapture:H.closedHoursContactCapture,businessHours:H.businessHours,startedAt:J,updatedAt:J}),S("idle"),h("customer_support"),s("notLoading"),Y("visible")},Ie=async({email:H,phone:J,reason:O})=>{if(b?.mode!=="closed_hours_contact_capture")return!1;Y("submitting");const P=d+"/customer-support/sessions/"+b.customerSupportSessionId+"/fallback-contact";return(await fetch(P,tn.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:b.reconnectToken,reasonType:"closed_hours",email:H,phone:J,reason:O}}))).ok?(Y("submitted"),Be({reason:"closed_hours_contact_submitted",discussionId:b.discussionId}),!0):(Y("failed"),!1)};return C.useEffect(()=>{if(pe&&b&&b.status!=="closed"&&t.discussionId!==b.discussionId&&t.discussionId===null){if(I.current)return;a(b.discussionId);return}},[t.discussionId,b,pe,w,a]),{chatTransportMode:p,socketStatus:w,isCustomerSupportMode:pe,isCustomerSupportClosed:Le,customerSupportStatusMessage:m,isCustomerSupportInputDisabled:de,customerSupportInputDisabledReason:ae,enterCustomerSupportMode:vt,flushPendingCustomerSupportHandoff:je,sendToCustomerSupport:Dt,fallbackContactCaptureConfig:T,fallbackContactCaptureStatus:L,shouldDisplayFallbackContactCapture:V,submitFallbackContactCapture:kt,closedHoursContactCaptureConfig:W,closedHoursBusinessHours:ce,closedHoursContactCaptureStatus:N,shouldDisplayClosedHoursContactCapture:oe,submitClosedHoursContactCapture:Ie}}const sd=()=>{const e=sn(),t=e.formatMessage({defaultMessage:"Search",id:"chatbot.chatline.loading.function.search"}),n=e.formatMessage({defaultMessage:"Looking into the cavern",id:"chatbot.chatline.loading.function.extractProductName"}),r=e.formatMessage({defaultMessage:"Consulting the shadocks",id:"chatbot.chatline.loading.function.suggestProductName"}),i=e.formatMessage({defaultMessage:"Looking for ziboublis",id:"chatbot.chatline.loading.function.criteriaDefinition"}),a=e.formatMessage({defaultMessage:"Searching Stock",id:"chatbot.chatline.loading.function.searchStock"}),s=e.formatMessage({defaultMessage:"Step",id:"chatbot.chatline.loading.function.step"}),o=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),u=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),d=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),f=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),p=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),h=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),b=w=>w?w.includes("ExtractProductNames")?n:w.includes("SuggestProductNames")?r:w==="Recherche ..."?u:w==="Construction ..."?c:w==="Analyse ..."?d:w==="Rédaction"?f:w.includes("CreateCriteriasFromProductNames")||w.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:w.includes("SearchStock")?a:"":t,y=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:y,lookingForProductTranslation:o,cancelTranslation:p,recentMessagesTranslation:h}},C_=()=>{const{companySettings:e}=C.useContext(rn);return x.jsx("div",{className:`search
104
+ chatsystem-primary-background
105
+ ${n??""}`,"data-testid":"send-button",onClick:e,disabled:t,type:"button","aria-label":"Send message",children:y.jsx("span",{className:"","data-state":"closed",children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[y.jsx("path",{d:"M3 20L21 12L3 4L7.5 12L3 20Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),y.jsx("path",{d:"M7.5 12H14.75",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});var ft=(e=>(e.FRENCH="fr-FR",e.ENGLISH="en-US",e))(ft||{});const Ux={"generic.language.english":"English","generic.language.french":"French","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Discussion limit reached","chatbot.DiscussionLimitReached.explaination":"The discussion has reached its maximum number of messages. Please start a new one.","chatbot.DiscussionLimitReached.cta":"Restart","chatbot.error.api.409":"Oups ! The discussion if full. Please start a new one.","chatbot.error.api.429":"⏳ The chatbot is a little busy at the time. Please try again later.","chatbot.error.api.500":"Oops ! There has been an error. Please try again later.","chatbot.chatline.label.user":"You","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Customer support","chatbot.chatline.loading.function.genericSearchMessage":"Thinking ...","chatbot.chatline.loading.function.search":"Search","chatbot.chatline.loading.function.extractProductName":"Looking into the cavern","chatbot.chatline.loading.function.suggestProductName":"Consulting the shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Looking for ziboublis","chatbot.chatline.loading.function.searchStock":"Searching Stock","chatbot.chatline.loading.function.step":"Step","chatbot.chatline.loading.stepName.search":"Searching ...","chatbot.chatline.loading.stepName.building":"Building Query ...","chatbot.chatline.loading.stepName.analyzing":"Analyzing ...","chatbot.chatline.loading.stepName.redacting":"Writing answer","chatbot.chatline.loading.cancel":"Cancel","chatbot.chatline.seeRecentMessages":"see recent messages","chatbot.widget.menu.open":"Open chat menu","chatbot.widget.menu.startNewDiscussion":"Start a new discussion","chatbot.widget.close":"Close chat","recordingOverlay.recording":"Recording...","recordingOverlay.cancel":"Cancel","recordingOverlay.explaination":"Tap the mic to stop","chatbot.infobanner.title":"You have an archived discussion.","chatbot.infobanner.cta":"See","chatbot.customerSupport.connecting":"Transferring your request to customer support...","chatbot.customerSupport.connected":"Your request has been sent to Customer Support. It usually takes a few minutes to get a reply. Thank you for waiting.","chatbot.customerSupport.connectionError":"Customer support is not available right now. Please try again later.","chatbot.customerSupport.providerUnavailable":"Customer support received your request, but live replies are temporarily unavailable. Please try again shortly.","chatbot.customerSupport.closed":"Your customer support conversation is now complete. Start a new conversation if you need more help!","chatbot.customerSupport.restart":"Restart","chatbot.customerSupport.fallback.title":"Leave your contact details","chatbot.customerSupport.fallback.description":"Customer support has not replied yet. Leave your email and phone number and we will contact you soon.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Phone","chatbot.customerSupport.fallback.submit":"Send","chatbot.customerSupport.fallback.submitting":"Sending...","chatbot.customerSupport.fallback.success":"Your contact details have been saved. Customer support will contact you soon.","chatbot.customerSupport.closedHours.title":"Customer support is currently closed","chatbot.customerSupport.closedHours.description":"Leave your email, phone number and request. Customer support will contact you during opening hours.","chatbot.customerSupport.closedHours.schedulePrefix":"Today:","chatbot.customerSupport.closedHours.reason":"Reason for your request","chatbot.customerSupport.closedHours.success":"Your request has been saved. Customer support will contact you during opening hours.","chatbot.customerSupport.fallback.error":"We could not save your contact details. Please try again."},jx={"generic.language.english":"Anglais","generic.language.french":"Français","chatbot.placeholder.content":"Message...","chatbot.DiscussionLimitReached.title":"Maximum de messages envoyés atteint.","chatbot.DiscussionLimitReached.explaination":"Le robot est à son maximum et ne peut plus envoyer de message. Merci de relancer une conversation.","chatbot.DiscussionLimitReached.cta":"Relancer une nouvelle conversation","chatbot.error.api.409":"Oups ! La discussion est à son maximum. Merci d'en commencer une nouvelle.","chatbot.error.api.429":"⏳ Le robot est un peu occupé actuellement. Merci de réessayer plus tard.","chatbot.error.api.500":"Oups ! Une erreur est survenue. Merci de réessayer plus tard !","chatbot.chatline.label.user":"Vous","chatbot.chatline.label.assistant":"Assistant","chatbot.chatline.label.customerSupport":"Support client","chatbot.chatline.loading.function.search":"Recherche","chatbot.chatline.loading.function.genericSearchMessage":"Je réfléchis ...","chatbot.chatline.loading.function.extractProductName":"Recherche dans la caverne","chatbot.chatline.loading.function.suggestProductName":"Consultation des shadocks","chatbot.chatline.loading.function.criteriaDefinition":"Recherche des ziboublis","chatbot.chatline.loading.function.searchStock":"Recherche en stock","chatbot.chatline.loading.function.step":"Etape","chatbot.chatline.loading.stepName.search":"Recherche ...","chatbot.chatline.loading.stepName.building":"Construction ...","chatbot.chatline.loading.stepName.analyzing":"Analyse ...","chatbot.chatline.loading.stepName.redacting":"Rédaction","chatbot.chatline.loading.cancel":"Annuler","chatbot.chatline.seeRecentMessages":"voir les messages plus récents","chatbot.widget.menu.open":"Ouvrir le menu de discussion","chatbot.widget.menu.startNewDiscussion":"Démarrer une nouvelle discussion","chatbot.widget.close":"Fermer la discussion","recordingOverlay.recording":"Micro activé...","recordingOverlay.cancel":"Annuler","recordingOverlay.explaination":"Appuyez sur le micro pour arrêter","chatbot.infobanner.title":"Vous avez une conversation archivée.","chatbot.infobanner.cta":"Voir","chatbot.customerSupport.connecting":"Transfert de votre demande au support client...","chatbot.customerSupport.connected":"Votre demande a été transmise au support client. Il faut généralement quelques minutes pour obtenir une réponse. Merci de patienter.","chatbot.customerSupport.connectionError":"Le support client n'est pas disponible pour le moment. Merci de réessayer plus tard.","chatbot.customerSupport.providerUnavailable":"Le support client a reçu votre demande, mais les réponses en direct sont temporairement indisponibles. Merci de réessayer dans quelques instants.","chatbot.customerSupport.closed":"Votre échange avec le support client est terminé. Relancez une nouvelle conversation quand vous le souhaitez !","chatbot.customerSupport.restart":"Relancer","chatbot.customerSupport.fallback.title":"Laissez vos coordonnées","chatbot.customerSupport.fallback.description":"Le support client n'a pas encore répondu. Laissez votre email et votre téléphone, nous vous recontacterons prochainement.","chatbot.customerSupport.fallback.email":"Email","chatbot.customerSupport.fallback.phone":"Téléphone","chatbot.customerSupport.fallback.submit":"Envoyer","chatbot.customerSupport.fallback.submitting":"Envoi...","chatbot.customerSupport.fallback.success":"Vos coordonnées ont bien été notées. Le support client vous recontactera prochainement.","chatbot.customerSupport.closedHours.title":"Le support client est actuellement fermé","chatbot.customerSupport.closedHours.description":"Laissez votre email, votre téléphone et le motif de votre demande. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.closedHours.schedulePrefix":"Aujourd’hui :","chatbot.customerSupport.closedHours.reason":"Motif de votre demande","chatbot.customerSupport.closedHours.success":"Votre demande a bien été enregistrée. Le support client vous recontactera pendant ses horaires d’ouverture.","chatbot.customerSupport.fallback.error":"Impossible d'enregistrer vos coordonnées. Merci de réessayer."},ei={[ft.ENGLISH]:{translatedText:Ux,pictureName:ft.ENGLISH,langID:0,locale:ft.ENGLISH},[ft.FRENCH]:{translatedText:jx,pictureName:ft.FRENCH,langID:1,locale:ft.FRENCH}},zx=Object.keys(ei);zx.reduce((e,t)=>{const n=ei[t];return[...e,n]},[]);const $x="languageSettings",ad=S.createContext({appCurrentLang:ei[ft.ENGLISH],setAppCurrentLang:()=>{}}),Yx=e=>e.filter(t=>t.userType==="user").length;var Ta=(e=>(e.GET_DISCUSSION_ID="/id",e.RESET_DISCUSSION="/delete",e))(Ta||{});const Gx=e=>!!e.startsWith("/"),qx=(e,t,n)=>e===Ta.GET_DISCUSSION_ID?t?`Votre ID de discussion est ${t}`:"Votre ID de discussion n'est pas encore défini. Envoyez un premier message pour que ce soit le cas.":e===Ta.RESET_DISCUSSION?(n(),null):`La commande ${e} n'est pas prise en compte.`;class Ot{static pending="";constructor(){}static transformNDJSONChunkIntoObjects(t){const n=wt();this.pending+=t;const r=this.pending.split(/\r?\n/);this.pending=r.pop()??"";const i=[];for(const a of r){const s=a.trim();if(s)try{i.push(JSON.parse(s))}catch{n.warn("[NDJSON] Could not parse line:",s)}}return i}static flushPending(){const t=this.pending.trim();if(this.pending="",!t)return[];try{return[JSON.parse(t)]}catch{return[]}}static isObjectOutputstreamMessageDeltaDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_DELTA;static isObjectOutputstreamMessageStartDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_START;static isObjectOutputstreamMessageEndDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_MESSAGE_END;static isObjectOutputstreamErrorDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_ERROR;static isObjectOutputstreamClientEventDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CLIENT_EVENT;static isObjectOutputstreamLoadingNumberOfStepsDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_NUMBER_OF_STEPS_TYPE;static isObjectOutputstreamLoadingCurrentStepNumberDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NUMBER_TYPE;static isObjectOutputstreamLoadingCurrentStepNameDTO=t=>t.type===ee.OutputStreamTypesEnum.OUTPUT_STREAM_CURRENT_STEP_NAME_TYPE;static containsObjectWithLastAnswerToTrue=t=>{for(const n of t)if(this.isObjectOutputstreamMessageEndDTO(n)&&n.isLastAnswer)return!0;return!1}}const Vx=e=>{if(!ee.isUnknownRecord(e))return;const t=ee.readOptionalNumber(e.timeoutMinutes)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_FALLBACK_CONTACT_CAPTURE_DEFAULT_TIMEOUT_MINUTES;return{enabled:e.enabled===!0,timeoutMinutes:Math.max(1,Math.min(120,Math.round(t))),requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1}},Wx=e=>{if(ee.isUnknownRecord(e))return{enabled:e.enabled!==!1,requireEmail:e.requireEmail!==!1,requirePhone:e.requirePhone!==!1,requireReason:e.requireReason!==!1}},Xx=e=>{if(!ee.isUnknownRecord(e))return null;const t=e;if(t.type!=="interactive_widget_request"||t.event!=="interactiveWidget.requested"||t.widgetType!==ee.INTERACTIVE_WIDGET_TYPES.directChatCustomerSupport||!ee.isUnknownRecord(t.payload))return null;const n=t.payload;if((ee.readOptionalString(n.mode)??"live_chat")==="closed_hours_contact_capture"){const s=ee.readOptionalString(n.reconnectToken),o=ee.readOptionalNumber(n.customerSupportSessionId),u=Wx(n.closedHoursContactCapture);if(n.transport!=="none"||!s||!o||!u||!u.enabled)return null;const c=ee.isUnknownRecord(n.businessHours)?n.businessHours:{};return{mode:"closed_hours_contact_capture",transport:"none",reconnectToken:s,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:o,companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),closedHoursContactCapture:u,businessHours:{timezone:ee.readOptionalString(c.timezone)??ee.DIRECT_CHAT_CUSTOMER_SUPPORT_DEFAULT_BUSINESS_HOURS_TIMEZONE,todayScheduleLabel:ee.readOptionalString(c.todayScheduleLabel)}}}if(n.transport!=="socket"||typeof n.socketUrl!="string")return null;const i=ee.readOptionalString(n.handoffToken),a=ee.readOptionalString(n.reconnectToken);return!i&&!a?null:{mode:"live_chat",transport:"socket",socketUrl:n.socketUrl,handoffToken:i,reconnectToken:a,reconnectTokenExpiresAt:ee.readOptionalString(n.reconnectTokenExpiresAt),customerSupportSessionId:ee.readOptionalNumber(n.customerSupportSessionId),companyId:ee.readOptionalNumber(t.companyId),agentId:ee.readOptionalNullableNumber(t.agentId),discussionId:ee.readOptionalNullableNumber(t.discussionId)??null,toolcallId:ee.readOptionalNullableString(t.toolcallId),fallbackContactCapture:Vx(n.fallbackContactCapture)}},Qx=e=>Xx(e),Kx=/^[a-zA-Z0-9][a-zA-Z0-9:._-]*$/,Jx=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Zx=e=>{if(!ee.isUnknownRecord(e)||e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V1&&e.protocolVersion!==ee.IDENTITY_GATE_PROTOCOL_V2||typeof e.gateId!="string"||e.gateId.length<1||e.gateId.length>100||typeof e.toolCallId!="string"||e.toolCallId.length<1||e.toolCallId.length>255||typeof e.resultToken!="string"||e.resultToken.length<32||e.resultToken.length>512||typeof e.expiresAt!="string"||!Number.isFinite(Date.parse(e.expiresAt))||e.reason!=="identity_required"&&e.reason!=="identity_expired"||!Array.isArray(e.requiredCapabilities)||e.requiredCapabilities.length<1||e.requiredCapabilities.length>50||!e.requiredCapabilities.every(n=>typeof n=="string"&&n.length<=100&&Kx.test(n)))return null;const t={gateId:e.gateId,toolCallId:e.toolCallId,requiredCapabilities:[...new Set(e.requiredCapabilities)].sort(),reason:e.reason,expiresAt:e.expiresAt,resultToken:e.resultToken};return e.protocolVersion===ee.IDENTITY_GATE_PROTOCOL_V1?{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V1,...t}:!ee.isUnknownRecord(e.continuation)||typeof e.continuation.continuationId!="string"||!Jx.test(e.continuation.continuationId)||typeof e.continuation.expiresAt!="string"||!Number.isFinite(Date.parse(e.continuation.expiresAt))?null:{protocolVersion:ee.IDENTITY_GATE_PROTOCOL_V2,...t,continuation:{continuationId:e.continuation.continuationId,expiresAt:e.continuation.expiresAt}}},e_=e=>{if(e.event===ee.IDENTITY_GATE_REQUIRED_EVENT){const n=Zx(e.payload);if(n)return{type:"identity_gate_required",payload:n}}const t=Qx(e.payload);return t?{type:"customer_support_handoff_requested",payload:t}:{type:"unhandled_client_event",event:e}},t_=1e4,n_=3e3,r_=e=>{const t=new URL(e);return t.protocol=t.protocol==="https:"?"wss:":"ws:",t},i_=({apiUrl:e,handoff:t})=>(t.socketUrl.startsWith("ws://")||t.socketUrl.startsWith("wss://")?new URL(t.socketUrl):new URL(t.socketUrl,r_(e))).toString(),a_=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return["connected","customer_message_ack","provider_message","closed","error"].includes(t.type)};class s_{socket;callbacks;url;appToken;handoffToken;isIntentionalClose=!1;handshakeTimeout;closeAcknowledgementTimeout=null;constructor(t){this.callbacks=t.callbacks,this.url=i_(t),this.appToken=t.appToken;const n=t.handoff.reconnectToken??t.handoff.handoffToken;if(!n)throw new Error("Customer support socket requires a reconnect token");this.handoffToken=n,this.socket=new WebSocket(this.url),this.handshakeTimeout=setTimeout(()=>{this.socket.readyState!==WebSocket.CONNECTING&&this.socket.readyState!==WebSocket.OPEN||(this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()}),this.socket.close())},t_),this.socket.addEventListener("open",this.sendAuthMessage),this.socket.addEventListener("message",this.handleMessage),this.socket.addEventListener("close",this.handleClose),this.socket.addEventListener("error",this.handleTransportError)}sendAuthMessage=()=>{this.socket.send(JSON.stringify({type:"auth",appToken:this.appToken,handoffToken:this.handoffToken}))};sendCustomerMessage(t){if(this.socket.readyState!==WebSocket.OPEN){this.callbacks.onError?.({type:"error",message:"Customer support connection is not ready.",code:"CUSTOMER_SUPPORT_SOCKET_NOT_READY"});return}const n={type:"customer_message",text:t,clientMessageId:crypto.randomUUID()};this.socket.send(JSON.stringify(n))}close(t,n){if(this.isIntentionalClose=!0,clearTimeout(this.handshakeTimeout),this.socket.readyState===WebSocket.OPEN&&n?.notifyServer){const r={type:"close",reason:t};this.socket.send(JSON.stringify(r)),this.closeAcknowledgementTimeout=setTimeout(()=>{this.closeTransport(t)},n_);return}this.closeTransport(t)}handleMessage=t=>{clearTimeout(this.handshakeTimeout);let n;try{n=JSON.parse(t.data)}catch{this.callbacks.onError?.({type:"error",message:"Customer support sent an invalid message.",code:"CUSTOMER_SUPPORT_SOCKET_INVALID_MESSAGE"});return}if(a_(n)){if(n.type==="connected"){this.callbacks.onConnected?.(n);return}if(n.type==="provider_message"){this.callbacks.onProviderMessage?.(n);return}if(n.type==="closed"){if(this.closeAcknowledgementTimeout!==null){clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null,this.closeTransport("Customer support session closed");return}this.callbacks.onClosed?.(n);return}n.type==="error"&&this.callbacks.onError?.(n)}};handleClose=t=>{clearTimeout(this.handshakeTimeout),this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),!this.isIntentionalClose&&this.callbacks.onClose?.(t)};handleTransportError=()=>{this.isIntentionalClose||this.callbacks.onTransportError?.({readyState:this.socket.readyState,url:this.safeUrlForLogs()})};closeTransport(t){this.closeAcknowledgementTimeout!==null&&(clearTimeout(this.closeAcknowledgementTimeout),this.closeAcknowledgementTimeout=null),this.socket.close(1e3,t??"Customer support socket detached")}safeUrlForLogs(){const t=new URL(this.url);return t.searchParams.has("handoffToken")&&t.searchParams.set("handoffToken","<redacted>"),t.toString()}}const o_=new Set(["SLACK_INBOUND_EVENT_NOT_OBSERVED"]),u_=e=>e&&o_.has(e)?"provider_unavailable":"connection_error",l_=e=>e.isClosed?e.labels.closed:!e.isCustomerSupportMode||!e.hasTransportFailed?null:e.failureKind==="provider_unavailable"?e.labels.providerUnavailable:e.labels.connectionError,c_=[500,1500,3e3],d_=e=>{const t=c_[e];return t===void 0?{shouldRetry:!1}:{shouldRetry:!0,delayMs:t}},bt={ai:"ai",customerSupport:"customer_support"},ti="chatsystem-widget",f_=1440*60*1e3;function br(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))}function h_(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.timeoutMinutes!="number"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean")}function p_(e){return!(typeof e!="object"||e===null||typeof e.enabled!="boolean"||typeof e.requireEmail!="boolean"||typeof e.requirePhone!="boolean"||typeof e.requireReason!="boolean")}function m_(e){if(typeof e!="object"||e===null||typeof e.discussionId!="number"||typeof e.reconnectToken!="string"||!br(e.startedAt)||!br(e.updatedAt)||e.reconnectTokenExpiresAt!==void 0&&!br(e.reconnectTokenExpiresAt)||e.closedAt!==void 0&&!br(e.closedAt)||e.closedReason!==void 0&&typeof e.closedReason!="string")return!1;const t=e.mode??"live_chat";return t==="closed_hours_contact_capture"?!(!["active","closed"].includes(e.status)||typeof e.customerSupportSessionId!="number"||!p_(e.closedHoursContactCapture)||typeof e.businessHours!="object"||e.businessHours===null||typeof e.businessHours.timezone!="string"||e.businessHours.todayScheduleLabel!==void 0&&typeof e.businessHours.todayScheduleLabel!="string"):!(t!=="live_chat"||!["connecting","active","closed"].includes(e.status)||typeof e.socketUrl!="string"||e.customerSupportSessionId!==void 0&&typeof e.customerSupportSessionId!="number"||e.isWaitingForFirstProviderReply!==void 0&&typeof e.isWaitingForFirstProviderReply!="boolean"||e.fallbackContactCapture!==void 0&&!h_(e.fallbackContactCapture))}function g_(e){return!(typeof e!="object"||e===null||e.userType!=="user"&&e.userType!=="assistant"||"content"in e&&e.content!==void 0&&typeof e.content!="string"||"metaData"in e&&e.metaData!==void 0&&(typeof e.metaData!="object"||e.metaData===null||"isErrorMessage"in e.metaData&&e.metaData.isErrorMessage!==void 0&&typeof e.metaData.isErrorMessage!="boolean"||"messageKind"in e.metaData&&e.metaData.messageKind!==void 0&&!["conversation","system"].includes(e.metaData.messageKind)||"systemEvent"in e.metaData&&e.metaData.systemEvent!==void 0&&!["customer_support_connecting","customer_support_connected","customer_support_closed","customer_support_connection_error"].includes(e.metaData.systemEvent)||"customerSupportAuthorName"in e.metaData&&e.metaData.customerSupportAuthorName!==void 0&&typeof e.metaData.customerSupportAuthorName!="string"))}function b_(e){return!(typeof e!="object"||e===null||!Array.isArray(e.items)||!e.items.every(g_)||e.discussionId!==null&&typeof e.discussionId!="number"||typeof e.updatedAt!="string"||Number.isNaN(Date.parse(e.updatedAt))||e.customerSupport!==void 0&&e.customerSupport!==null&&!m_(e.customerSupport))}function E_(e){const t=wt();if(typeof window>"u")return;const n=e.key??ti,r={items:e.conversation.items,discussionId:e.conversation.discussionId,updatedAt:new Date().toISOString(),customerSupport:e.customerSupport??null};try{const i=JSON.stringify(r);window.localStorage.setItem(n,i)}catch(i){t.error("Failed to save chat state to localStorage",i)}}function sd(e){const t=wt();if(typeof window>"u")return null;const n=e?.key??ti,r=window.localStorage.getItem(n);if(!r)return null;try{const i=JSON.parse(r);return b_(i)?i:(t.warn("Chat state in localStorage has unexpected shape, ignoring."),null)}catch(i){return t.error("Failed to parse chat state from localStorage",i),null}}function T_(e){if(typeof window>"u")return null;const t=ti;window.localStorage.removeItem(t)}const od=(e,t)=>{if(t===null)return"discussion_not_loaded";if(t!==e.discussionId)return"discussion_mismatch";if(e.status==="closed")return"session_closed";if(!e.reconnectToken)return"missing_reconnect_token";if(e.mode==="closed_hours_contact_capture")return null;if(!e.socketUrl)return"missing_socket_url";if(e.reconnectTokenExpiresAt){const n=Date.parse(e.reconnectTokenExpiresAt);if(Number.isNaN(n))return"invalid_reconnect_expiration";if(n<=Date.now())return"expired_reconnect_token"}return null},y_=()=>{const e=sd(),t=e?.customerSupport??null;if(!t)return{mode:bt.ai,customerSupportState:null,reason:"no_customer_support_state"};const n=od(t,e?.discussionId??null);return n==="session_closed"?{mode:bt.customerSupport,customerSupportState:t,reason:n}:n?{mode:bt.ai,customerSupportState:null,reason:n}:{mode:bt.customerSupport,customerSupportState:t,reason:"valid_reconnect_state"}},ud=e=>e.mode!==bt.customerSupport?!1:e.customerSupportState.status!=="closed",ts=e=>e.mode!==bt.customerSupport?!1:e.customerSupportState.status==="closed",ns=e=>e.mode!==bt.customerSupport||e.customerSupportState.status==="closed"?!1:e.customerSupportState.mode==="closed_hours_contact_capture",x_=e=>ns(e)?"customer_support":ud(e)?"customer_support_connecting":ts(e)?"customer_support":"ai",__=e=>ns(e)?"idle":ud(e)?"connecting":ts(e)?"closed":"idle",S_=e=>ns(e)?"visible":"idle",C_=e=>e?.trim()||void 0,A_=e=>e.mode!==bt.customerSupport||e.customerSupportState.status==="closed"||e.customerSupportState.mode==="closed_hours_contact_capture"?null:e.customerSupportState,ld=e=>!!(e&&e.mode!=="closed_hours_contact_capture"),rs=e=>e?.mode==="closed_hours_contact_capture",w_=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&ld(e.state))return e.state.fallbackContactCapture},I_=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&rs(e.state))return e.state.closedHoursContactCapture},v_=e=>{if(e.isCustomerSupportMode&&e.isCurrentDiscussion&&rs(e.state))return e.state.businessHours},k_=e=>e.isCustomerSupportMode?e.chatTransportMode==="customer_support_connecting"?"customer_support_connecting":e.isCurrentDiscussion?rs(e.state)?"customer_support_closed_hours_form":e.socketStatus!=="connected"?`socket_${e.socketStatus}`:e.isWaitingForFirstProviderReply?"waiting_first_provider_reply":e.isCustomerSupportClosed?"customer_support_closed":null:e.currentDiscussionId===null?"discussion_not_loaded":"discussion_mismatch":null;function N_({appToken:e,currentConversation:t,loadingStatus:n,labels:r,logger:i,setCurrentConversationId:a,setLoadingStatus:s,addMessageToCurrentConversation:o,chatboxBootState:u,resetConversationRequestId:c}){const d=Jr(),f=u,[p,h]=S.useState(()=>x_(f)),[b,x]=S.useState(f.customerSupportState),[w,C]=S.useState(()=>__(f)),[k,I]=S.useState(null),[L,A]=S.useState("idle"),[N,Y]=S.useState(()=>S_(f)),V=S.useRef(null),re=S.useRef(c),v=S.useRef(!1),U=S.useRef(null),z=S.useRef(A_(f)),F=S.useRef(ts(f)),$=S.useRef(!1),Q=S.useRef(0),he=S.useRef(null),pe=p!=="ai",Ae=b?.discussionId===t.discussionId,Ne=pe&&b?.status==="closed",m=l_({isCustomerSupportMode:pe,isClosed:Ne,hasTransportFailed:w==="failed",failureKind:k,labels:r}),G=!!(pe&&Ae&&b?.mode!=="closed_hours_contact_capture"&&b?.isWaitingForFirstProviderReply),ie={isCustomerSupportMode:pe,isCurrentDiscussion:Ae,state:b},T=w_(ie),ne=I_(ie),J=v_(ie),W=!!T?.enabled&&["visible","submitting","submitted","failed"].includes(L),se=!!ne?.enabled&&["visible","submitting","submitted","failed"].includes(N),ue=k_({chatTransportMode:p,currentDiscussionId:t.discussionId,isCustomerSupportClosed:Ne,isCustomerSupportMode:pe,isCurrentDiscussion:Ae,isWaitingForFirstProviderReply:G,socketStatus:w,state:b}),de=ue!==null;S.useEffect(()=>{if(n!=="notLoading"||t.items.length===0)return;const H=Ae?b:null;!t.discussionId&&!H||E_({conversation:t,customerSupport:H})},[n,t,b,Ae]),S.useEffect(()=>($.current=!1,()=>{$.current=!0,he.current!==null&&(window.clearTimeout(he.current),he.current=null),V.current?.close("Widget unmounted"),V.current=null}),[]);const ae=(H,K,O)=>{o({userType:"assistant",content:H,metaData:{messageKind:"system",systemEvent:K,...O},temporaryId:crypto.randomUUID()})},Re=(H,K)=>{o({userType:"assistant",content:H,metaData:{messageKind:"conversation",authorType:"customer_support_operator",...K},temporaryId:crypto.randomUUID()})},q=(H,K)=>{V.current?.close(H,K),V.current=null},Me=()=>{he.current!==null&&(window.clearTimeout(he.current),he.current=null),Q.current=0,U.current=null,z.current=null,F.current=!1,I(null),x(null),C("idle"),h("ai")},Be=(H,K)=>{q(H,K),Me()};S.useEffect(()=>{re.current!==c&&(re.current=c,v.current=!0,Be("Starting new conversation",{notifyServer:!0}))},[c]),S.useEffect(()=>{t.discussionId===null&&v.current&&b===null&&p==="ai"&&(v.current=!1)},[p,t.discussionId,b]);const Ke=H=>{F.current||(F.current=!0,U.current=null,V.current=null,H?.discussionId&&a(H.discussionId),s("notLoading"),I(null),C("closed"),h("customer_support"),x(K=>{if(!K)return K;const O=new Date().toISOString();return{...K,status:"closed",discussionId:H?.discussionId??K.discussionId,updatedAt:O,closedAt:H?.closedAt??O,closedReason:H?.reason,isWaitingForFirstProviderReply:!1}}))},je=(H,K)=>{V.current&&q("Replacing customer support socket"),C("connecting");let O=!1,M=!1;const X=Z=>{I(Z),C("failed"),s("notLoading")},le=Z=>{V.current=null;const _e=d_(Q.current);if(!_e.shouldRetry){i.error("Customer support socket reconnect exhausted code="+Z.code+" reason="+(Z.reason||"none")),X("connection_error");return}Q.current+=1,C("connecting"),h("customer_support_connecting"),i.log("Customer support socket reconnect scheduled attempt="+Q.current+" delayMs="+_e.delayMs+" code="+Z.code),he.current=window.setTimeout(()=>{he.current=null,!($.current||F.current)&&je(H,{...K,addConnectedMessage:O?!1:K?.addConnectedMessage})},_e.delayMs)};V.current=new s_({apiUrl:d,appToken:e,handoff:H,callbacks:{onConnected:Z=>{const _e=H.reconnectToken??H.handoffToken;if(!_e){Ke({reason:"Missing reconnect token"});return}O=!0,Q.current=0,K?.isStoredReconnect&&(z.current=null);const rt=new Date().toISOString();a(Z.discussionId),I(null),C("connected"),h("customer_support"),s("notLoading"),x(et=>{const ot=ld(et)?et:null;return{mode:"live_chat",status:"active",discussionId:Z.discussionId,socketUrl:H.socketUrl,reconnectToken:_e,reconnectTokenExpiresAt:Z.reconnectTokenExpiresAt??H.reconnectTokenExpiresAt,customerSupportSessionId:Z.customerSupportSessionId??H.customerSupportSessionId,provider:ot?.provider,isWaitingForFirstProviderReply:ot?.isWaitingForFirstProviderReply??!0,fallbackContactCapture:ot?.fallbackContactCapture,startedAt:ot?.startedAt??rt,updatedAt:rt}}),K?.addConnectedMessage!==!1&&ae(r.connected,"customer_support_connected")},onProviderMessage:Z=>{I(null),C("connected"),A(_e=>_e==="submitted"?_e:"idle"),x(_e=>!_e||_e.mode==="closed_hours_contact_capture"?_e:{..._e,status:"active",provider:Z.provider??_e.provider,reconnectTokenExpiresAt:Z.reconnectTokenExpiresAt??_e.reconnectTokenExpiresAt,isWaitingForFirstProviderReply:!1,updatedAt:new Date().toISOString()}),Re(Z.text,{customerSupportAuthorName:C_(Z.authorName),customerSupportProvider:Z.provider})},onClosed:Z=>{M=!0,Ke({reason:Z.reason,closedAt:Z.closedAt,discussionId:Z.discussionId})},onError:Z=>{M=!0,i.error("Customer support socket server error code="+Z.code+" message="+Z.message),X(u_(Z.code))},onClose:Z=>{$.current||F.current||M||le(Z)},onTransportError:Z=>{i.error(`Customer support socket transport error readyState=${Z.readyState} url=${Z.url}`)}}})};S.useEffect(()=>{const H=z.current;if(!H)return;const K=od(H,t.discussionId);if(K!=="discussion_not_loaded"){if(K==="session_closed"){z.current=null,C("closed"),h("customer_support");return}if(K){z.current=null,x(O=>O?.discussionId===t.discussionId?O:null),C("idle"),h("ai");return}V.current||(C("connecting"),h("customer_support_connecting"),je({mode:"live_chat",transport:"socket",socketUrl:H.socketUrl,reconnectToken:H.reconnectToken,reconnectTokenExpiresAt:H.reconnectTokenExpiresAt,customerSupportSessionId:H.customerSupportSessionId,discussionId:H.discussionId,fallbackContactCapture:H.fallbackContactCapture},{addConnectedMessage:!1,isStoredReconnect:!0}))}},[t.discussionId]);const qe=H=>{if(H.mode==="closed_hours_contact_capture"){be(H);return}const K=H.reconnectToken??H.handoffToken;if(!H.discussionId||!K){ae(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const O=new Date().toISOString();U.current=H,F.current=!1,A("idle"),x({mode:"live_chat",status:"connecting",discussionId:H.discussionId,socketUrl:H.socketUrl,reconnectToken:K,reconnectTokenExpiresAt:H.reconnectTokenExpiresAt,customerSupportSessionId:H.customerSupportSessionId,isWaitingForFirstProviderReply:!0,fallbackContactCapture:H.fallbackContactCapture,startedAt:O,updatedAt:O}),C("connecting"),h("customer_support_connecting"),ae(r.connecting,"customer_support_connecting")},Ue=()=>{const H=U.current;!H||H.mode!=="live_chat"||(U.current=null,je(H))},Pt=H=>p!=="customer_support"||w!=="connected"||!Ae||!V.current?(ae(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0}),!1):(V.current.sendCustomerMessage(H),!0);S.useEffect(()=>{if(!T?.enabled||!G||!Ae||w!=="connected"||L!=="idle")return;const H=Math.max(1,T.timeoutMinutes)*60*1e3,K=window.setTimeout(()=>{A("visible")},H);return()=>window.clearTimeout(K)},[T,L,Ae,G,w]);const Nt=async({email:H,phone:K})=>{if(!b?.customerSupportSessionId||!b.reconnectToken)return!1;A("submitting");const O=`${d}/customer-support/sessions/${b.customerSupportSessionId}/fallback-contact`;return(await fetch(O,rn.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:b.reconnectToken,reasonType:"fallback_no_reply",email:H,phone:K}}))).ok?(A("submitted"),q("Fallback contact submitted"),Ke({reason:"fallback_contact_submitted",discussionId:b.discussionId}),!0):(A("failed"),!1)},be=H=>{if(!H.discussionId){ae(r.connectionError,"customer_support_connection_error",{isErrorMessage:!0});return}const K=new Date().toISOString();U.current=null,F.current=!1,q("Closed-hours contact capture"),x({mode:"closed_hours_contact_capture",status:"active",discussionId:H.discussionId,reconnectToken:H.reconnectToken,reconnectTokenExpiresAt:H.reconnectTokenExpiresAt,customerSupportSessionId:H.customerSupportSessionId,closedHoursContactCapture:H.closedHoursContactCapture,businessHours:H.businessHours,startedAt:K,updatedAt:K}),C("idle"),h("customer_support"),s("notLoading"),Y("visible")},ve=async({email:H,phone:K,reason:O})=>{if(b?.mode!=="closed_hours_contact_capture")return!1;Y("submitting");const M=d+"/customer-support/sessions/"+b.customerSupportSessionId+"/fallback-contact";return(await fetch(M,rn.getFetchConfig({httpVerb:"POST",contentType:"application/json",body:{reconnectToken:b.reconnectToken,reasonType:"closed_hours",email:H,phone:K,reason:O}}))).ok?(Y("submitted"),Ke({reason:"closed_hours_contact_submitted",discussionId:b.discussionId}),!0):(Y("failed"),!1)};return S.useEffect(()=>{if(pe&&b&&b.status!=="closed"&&t.discussionId!==b.discussionId&&t.discussionId===null){if(v.current)return;a(b.discussionId);return}},[t.discussionId,b,pe,w,a]),{chatTransportMode:p,socketStatus:w,isCustomerSupportMode:pe,isCustomerSupportClosed:Ne,customerSupportStatusMessage:m,isCustomerSupportInputDisabled:de,customerSupportInputDisabledReason:ue,enterCustomerSupportMode:qe,flushPendingCustomerSupportHandoff:Ue,sendToCustomerSupport:Pt,fallbackContactCaptureConfig:T,fallbackContactCaptureStatus:L,shouldDisplayFallbackContactCapture:W,submitFallbackContactCapture:Nt,closedHoursContactCaptureConfig:ne,closedHoursBusinessHours:J,closedHoursContactCaptureStatus:N,shouldDisplayClosedHoursContactCapture:se,submitClosedHoursContactCapture:ve}}const cd=()=>{const e=on(),t=e.formatMessage({defaultMessage:"Search",id:"chatbot.chatline.loading.function.search"}),n=e.formatMessage({defaultMessage:"Looking into the cavern",id:"chatbot.chatline.loading.function.extractProductName"}),r=e.formatMessage({defaultMessage:"Consulting the shadocks",id:"chatbot.chatline.loading.function.suggestProductName"}),i=e.formatMessage({defaultMessage:"Looking for ziboublis",id:"chatbot.chatline.loading.function.criteriaDefinition"}),a=e.formatMessage({defaultMessage:"Searching Stock",id:"chatbot.chatline.loading.function.searchStock"}),s=e.formatMessage({defaultMessage:"Step",id:"chatbot.chatline.loading.function.step"}),o=e.formatMessage({defaultMessage:"I'm looking for products",id:"chatbot.chatline.loading.function.genericSearchMessage"}),u=e.formatMessage({defaultMessage:"Searching ...",id:"chatbot.chatline.loading.stepName.search"}),c=e.formatMessage({defaultMessage:"Building Query ...",id:"chatbot.chatline.loading.stepName.building"}),d=e.formatMessage({defaultMessage:"Analyzing ...",id:"chatbot.chatline.loading.stepName.analyzing"}),f=e.formatMessage({defaultMessage:"Writing answer",id:"chatbot.chatline.loading.stepName.redacting"}),p=e.formatMessage({defaultMessage:"Cancel",id:"chatbot.chatline.loading.cancel"}),h=e.formatMessage({defaultMessage:"see recent messages",id:"chatbot.chatline.seeRecentMessages"}),b=w=>w?w.includes("ExtractProductNames")?n:w.includes("SuggestProductNames")?r:w==="Recherche ..."?u:w==="Construction ..."?c:w==="Analyse ..."?d:w==="Rédaction"?f:w.includes("CreateCriteriasFromProductNames")||w.includes("CreateCriteriasOrProductNamesFromDiscussion")?i:w.includes("SearchStock")?a:"":t,x=b();return{searchTranslation:t,extractProductNameTranslation:n,criteriaDefinitionTranslation:i,searchStockTranslation:a,stepTranslation:s,getCurrentStepTranslated:b,defaultStartingStep:x,lookingForProductTranslation:o,cancelTranslation:p,recentMessagesTranslation:h}},R_=()=>{const{companySettings:e}=S.useContext(Yt);return y.jsx("div",{className:`search
105
106
  transition
106
107
  ease-in-out
107
108
  delay-50
108
109
  flex
109
110
  justify-center
110
111
  items-center
111
- `,children:x.jsx(Sa,{facet:e.agent.display[ee.AgentDisplayFacetRoleType.SEARCH]})})},A_=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getCurrentStepTranslated:i,stepTranslation:a,lookingForProductTranslation:s}=sd();return x.jsx(x.Fragment,{children:e==="loadingIntermediaryStates"&&x.jsxs("div",{children:[x.jsxs("div",{children:[x.jsx("p",{className:"text-center my-2 text-lg",children:s}),x.jsx("p",{className:"text-center my-1 text-md",children:t&&`${i(t)}`}),n&&x.jsxs("p",{className:"text-center my-2",children:[a,x.jsx("span",{children:" "}),n,"/",r]})]}),x.jsx("div",{className:"flex justify-center",children:x.jsx(C_,{})})]})})},w_=({onPressLoadingButton:e})=>x.jsx("div",{children:x.jsx("button",{className:`
112
+ `,children:y.jsx(Aa,{facet:e.agent.display[ee.AgentDisplayFacetRoleType.SEARCH]})})},O_=({loadingStatus:e,currentStepName:t,currentStepNumber:n,numberOfSteps:r})=>{const{getCurrentStepTranslated:i,stepTranslation:a,lookingForProductTranslation:s}=cd();return y.jsx(y.Fragment,{children:e==="loadingIntermediaryStates"&&y.jsxs("div",{children:[y.jsxs("div",{children:[y.jsx("p",{className:"text-center my-2 text-lg",children:s}),y.jsx("p",{className:"text-center my-1 text-md",children:t&&`${i(t)}`}),n&&y.jsxs("p",{className:"text-center my-2",children:[a,y.jsx("span",{children:" "}),n,"/",r]})]}),y.jsx("div",{className:"flex justify-center",children:y.jsx(R_,{})})]})})},L_=({onPressLoadingButton:e})=>y.jsx("div",{children:y.jsx("button",{className:`
112
113
  absolute
113
114
  bg-white
114
115
  md:bottom-2
@@ -119,13 +120,13 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
119
120
  disabled:opacity-10
120
121
  disabled:text-gray-400
121
122
  enabled:bg-white
122
- text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors chatsystem-stop-button`,"data-testid":"send-button",onClick:e,type:"button",style:{outline:"none"},tabIndex:-1,onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},onKeyUp:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},children:x.jsx("span",{className:"","data-state":"closed",children:x.jsxs("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:[x.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),x.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),x.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",x.jsx("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"})," "]})]})})})}),I_=4,v_=1;class k_{previousScrollTop=0;hasMeasuredViewport=!1;shouldFollow=!1;observeViewport(t){const n=t.scrollHeight>t.clientHeight,r=t.scrollHeight-t.scrollTop<=t.clientHeight+I_;return this.hasMeasuredViewport&&t.scrollTop<this.previousScrollTop-v_?this.shouldFollow=!1:r&&(this.shouldFollow=!0),this.previousScrollTop=t.scrollTop,this.hasMeasuredViewport=!0,{isAtBottom:r,isScrollable:n}}startFollowing(){this.shouldFollow=!0}shouldFollowContentChange(){return this.shouldFollow}}const N_=e=>{const t=C.useRef(null),n=C.useRef(null),r=C.useRef(new k_),i=C.useRef(null),[a,s]=C.useState(!1),o=()=>{const d=t.current;if(!d)return;const f=r.current.observeViewport({scrollTop:d.scrollTop,scrollHeight:d.scrollHeight,clientHeight:d.clientHeight});s(f.isScrollable&&!f.isAtBottom)},u=({smooth:d=!1,sticky:f=!1})=>{f&&r.current.startFollowing();const p=t.current;p&&p.scrollTo({top:p.scrollHeight,behavior:d?"smooth":"auto"})},c=({smooth:d=!1}={})=>{i.current={smooth:d},r.current.startFollowing()};return C.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",o),o(),()=>{d.removeEventListener("scroll",o)}},[]),C.useLayoutEffect(()=>{const d=i.current;if(d){i.current=null,u({smooth:d.smooth,sticky:!0});return}r.current.shouldFollowContentChange()?u({smooth:!1}):o()},[e.length]),C.useEffect(()=>{const d=n.current;if(!d||typeof ResizeObserver>"u")return;const f=new ResizeObserver(()=>{r.current.shouldFollowContentChange()?u({smooth:!1}):o()});return f.observe(d),()=>f.disconnect()},[]),{scrollToBottom:u,requestScrollToBottomAfterNextRender:c,messagesContainerRef:t,messagesContentRef:n,showScrollButton:a}},R_=()=>{const e=sn(),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}},O_=e=>Ye.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ye.createElement("g",{clipPath:"url(#clip0_1276_7761)"},Ye.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"})),Ye.createElement("defs",null,Ye.createElement("clipPath",{id:"clip0_1276_7761"},Ye.createElement("rect",{width:24,height:24,fill:"white"})))),L_=({onReset:e})=>{const{DiscussionLimitReachedCtaTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedTitleTranslation:r}=R_();return x.jsx(x.Fragment,{children:x.jsx("div",{className:"px-3 mt-4",children:x.jsxs("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:[x.jsx("div",{className:"flex flex-col justify-center items-center mx-3",children:x.jsx("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:x.jsx("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"})})}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("p",{className:"font-semibold",children:r}),x.jsx("p",{className:"text-sm break-words",children:n}),x.jsx("div",{className:"my-2",children:x.jsxs("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
123
+ text-white p-0.5 border border-white rounded-lg dark:border-white dark:bg-white transition-colors chatsystem-stop-button`,"data-testid":"send-button",onClick:e,type:"button",style:{outline:"none"},tabIndex:-1,onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},onKeyUp:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},children:y.jsx("span",{className:"","data-state":"closed",children:y.jsxs("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:[y.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),y.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),y.jsxs("g",{id:"SVGRepo_iconCarrier",children:[" ",y.jsx("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"})," "]})]})})})}),D_=4,P_=1;class M_{previousScrollTop=0;hasMeasuredViewport=!1;shouldFollow=!1;observeViewport(t){const n=t.scrollHeight>t.clientHeight,r=t.scrollHeight-t.scrollTop<=t.clientHeight+D_;return this.hasMeasuredViewport&&t.scrollTop<this.previousScrollTop-P_?this.shouldFollow=!1:r&&(this.shouldFollow=!0),this.previousScrollTop=t.scrollTop,this.hasMeasuredViewport=!0,{isAtBottom:r,isScrollable:n}}startFollowing(){this.shouldFollow=!0}shouldFollowContentChange(){return this.shouldFollow}}const B_=e=>{const t=S.useRef(null),n=S.useRef(null),r=S.useRef(new M_),i=S.useRef(null),[a,s]=S.useState(!1),o=()=>{const d=t.current;if(!d)return;const f=r.current.observeViewport({scrollTop:d.scrollTop,scrollHeight:d.scrollHeight,clientHeight:d.clientHeight});s(f.isScrollable&&!f.isAtBottom)},u=({smooth:d=!1,sticky:f=!1})=>{f&&r.current.startFollowing();const p=t.current;p&&p.scrollTo({top:p.scrollHeight,behavior:d?"smooth":"auto"})},c=({smooth:d=!1}={})=>{i.current={smooth:d},r.current.startFollowing()};return S.useEffect(()=>{const d=t.current;if(d)return d.addEventListener("scroll",o),o(),()=>{d.removeEventListener("scroll",o)}},[]),S.useLayoutEffect(()=>{const d=i.current;if(d){i.current=null,u({smooth:d.smooth,sticky:!0});return}r.current.shouldFollowContentChange()?u({smooth:!1}):o()},[e.length]),S.useEffect(()=>{const d=n.current;if(!d||typeof ResizeObserver>"u")return;const f=new ResizeObserver(()=>{r.current.shouldFollowContentChange()?u({smooth:!1}):o()});return f.observe(d),()=>f.disconnect()},[]),{scrollToBottom:u,requestScrollToBottomAfterNextRender:c,messagesContainerRef:t,messagesContentRef:n,showScrollButton:a}},F_=()=>{const e=on(),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}},H_=e=>Ye.createElement("svg",{width:"800px",height:"800px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ye.createElement("g",{clipPath:"url(#clip0_1276_7761)"},Ye.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"})),Ye.createElement("defs",null,Ye.createElement("clipPath",{id:"clip0_1276_7761"},Ye.createElement("rect",{width:24,height:24,fill:"white"})))),U_=({onReset:e})=>{const{DiscussionLimitReachedCtaTranslation:t,DiscussionLimitReachedExplainationTranslation:n,DiscussionLimitReachedTitleTranslation:r}=F_();return y.jsx(y.Fragment,{children:y.jsx("div",{className:"px-3 mt-4",children:y.jsxs("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:[y.jsx("div",{className:"flex flex-col justify-center items-center mx-3",children:y.jsx("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:y.jsx("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"})})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("p",{className:"font-semibold",children:r}),y.jsx("p",{className:"text-sm break-words",children:n}),y.jsx("div",{className:"my-2",children:y.jsxs("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
123
124
  font-medium text-blue-700 dark:text-blue-300
124
125
  bg-blue-50/70 hover:bg-blue-100 dark:bg-blue-900/20 dark:hover:bg-blue-900/30
125
126
  ring-1 ring-inset ring-blue-600/20 hover:ring-blue-600/30
126
127
  shadow-sm transition-all duration-200
127
128
  focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/50
128
- active:scale-[0.98]`,children:[x.jsx(O_,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"}),x.jsx("span",{children:t})]})})]})]})})})},D_=({onClick:e,label:t="voir les messages plus récents",className:n})=>{const[r,i]=C.useState(!1);return C.useEffect(()=>{const a=requestAnimationFrame(()=>i(!0));return()=>cancelAnimationFrame(a)},[]),x.jsx("button",{onClick:e,className:["absolute z-10 select-none outline-none","bottom-20 right-8 left-auto translate-x-0 top-auto","transition-all duration-300 ease-out",r?"opacity-100 translate-y-0":"opacity-0 -translate-y-1",n??""].join(" "),"aria-label":t,title:t,children:x.jsx("span",{className:["inline-flex items-center justify-center","w-9 h-9","rounded-full bg-white shadow-md","hover:shadow-lg transition-shadow","p-2"].join(" "),children:x.jsx(pu,{className:"w-4 h-4",fill:"#64748b"})})})},od=C.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{},chatboxBootState:{mode:_t.ai,customerSupportState:null,reason:"context_default"},setChatboxBootState:()=>{},resetConversationRequestId:0,resetConversation:()=>{}}),ns=()=>{const e=C.useContext(od);if(!e)throw new Error("useChatbotConversation must be used within ChatbotInitialtextContext.Provider");const{currentConversation:t,setCurrentConversation:n,archivedConversation:r,setArchivedConversation:i,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,resetConversation:u}=e,c=L=>{n(A=>({...A,discussionId:L}))},d=L=>{n(A=>({...A,items:L}))},f=L=>{n(A=>({...A,items:[...A.items,L]}))},p=({messageStreamId:L,role:A})=>{n(N=>({...N,items:[...N.items,{userType:A,content:"",metaData:{messageStreamId:L},temporaryId:crypto.randomUUID()}]}))},h=()=>{n(L=>({...L,items:L.items.filter(A=>!(A.content?.length===0&&A.userType==="assistant"))}))},b=()=>{n(L=>{const A=[...L.items];return A.pop(),{...L,items:A}})},y=L=>{n(A=>({...A,updatedAt:L.updatedAt}))},w=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:c,setCurrentConversationMetadata:y,resetConversation:u,setCurrentConversationItems:d,addMessageToCurrentConversation:f,removeEmptyAssistantMessageFromCurrentConversation:h,removeLastMessageFromCurrentConversation:b,updateCurrentConversationLastMessage:({newContent:L})=>{n(A=>{const N=[...A.items],Y=N.length-1,X=N[Y];return N[Y]={...X,content:X.content=L},{...A,items:N}})},archivedConversation:r,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,setArchivedConversationAsMain:()=>{n(r),w()},addEmptyMessageToCurrentConversation:p,updateCurrentConversationMessageById:({newContent:L,id:A})=>{n(N=>{const Y=[...N.items],X=Y.findIndex(I=>I.metaData?.messageStreamId===A),ne=Y[X];return Y[X]={...ne,content:ne.content=L},{...N,items:Y}})}}},tu=({message:e,actionLabel:t,onClick:n})=>x.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-md border border-sky-100 bg-sky-50 px-3 py-2 text-xs text-sky-900 shadow-sm",children:[x.jsx("div",{className:"mt-0.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-sky-500 text-[10px] font-semibold text-white",children:"i"}),x.jsxs("div",{className:"flex-1",children:[x.jsx("p",{className:"leading-snug",children:e}),x.jsx("button",{type:"button",onClick:n,className:"mt-1 inline-flex items-center text-[11px] font-medium text-sky-700 hover:text-sky-900 hover:underline",children:t})]})]}),P_=({config:e,status:t,labels:n,onSubmit:r})=>{const[i,a]=C.useState(""),[s,o]=C.useState(""),u=t==="submitting",c=t==="submitted";return x.jsx("div",{className:["customer-support-fallback",c?"customer-support-fallback--success":"",u?"customer-support-fallback--submitting":""].join(" "),children:c?x.jsxs("div",{className:"customer-support-fallback__success",children:[x.jsx("span",{className:"customer-support-fallback__check","aria-hidden":"true",children:"✓"}),x.jsx("p",{children:n.success})]}):x.jsxs("form",{className:"customer-support-fallback__form",onSubmit:async d=>{d.preventDefault(),await r({email:i,phone:s})},children:[x.jsxs("div",{className:"customer-support-fallback__copy",children:[x.jsx("strong",{children:n.title}),x.jsx("p",{children:n.description})]}),x.jsxs("div",{className:"customer-support-fallback__fields",children:[x.jsx("input",{type:"email",value:i,required:e.requireEmail,disabled:u,placeholder:n.email,"aria-label":n.email,onChange:d=>a(d.currentTarget.value)}),x.jsx("input",{type:"tel",value:s,required:e.requirePhone,disabled:u,placeholder:n.phone,"aria-label":n.phone,onChange:d=>o(d.currentTarget.value)})]}),t==="failed"&&x.jsx("p",{className:"customer-support-fallback__error",children:n.error}),x.jsxs("button",{className:"customer-support-fallback__submit",type:"submit",disabled:u,children:[u&&x.jsx("span",{className:"customer-support-fallback__spinner","aria-hidden":"true"}),x.jsx("span",{children:u?n.submitting:n.submit})]})]})})},M_=({config:e,status:t,scheduleLabel:n,labels:r,onSubmit:i})=>{const[a,s]=C.useState(""),[o,u]=C.useState(""),[c,d]=C.useState(""),f=t==="submitting",p=t==="submitted";return x.jsx("div",{className:["customer-support-fallback","customer-support-fallback--closed-hours",p?"customer-support-fallback--success":"",f?"customer-support-fallback--submitting":""].join(" "),children:p?x.jsxs("div",{className:"customer-support-fallback__success",children:[x.jsx("span",{className:"customer-support-fallback__check","aria-hidden":"true",children:"✓"}),x.jsx("p",{children:r.success})]}):x.jsxs("form",{className:"customer-support-fallback__form",onSubmit:async h=>{h.preventDefault(),await i({email:a,phone:o,reason:c})},children:[x.jsxs("div",{className:"customer-support-fallback__copy",children:[x.jsx("strong",{children:r.title}),x.jsx("p",{children:r.description}),n?x.jsxs("p",{className:"customer-support-fallback__schedule",children:[r.schedulePrefix," ",n]}):null]}),x.jsxs("div",{className:"customer-support-fallback__fields",children:[x.jsx("input",{type:"email",value:a,required:e.requireEmail,disabled:f,placeholder:r.email,"aria-label":r.email,onChange:h=>s(h.currentTarget.value)}),x.jsx("input",{type:"tel",value:o,required:e.requirePhone,disabled:f,placeholder:r.phone,"aria-label":r.phone,onChange:h=>u(h.currentTarget.value)}),x.jsx("textarea",{value:c,required:e.requireReason,disabled:f,placeholder:r.reason,"aria-label":r.reason,onChange:h=>d(h.currentTarget.value)})]}),t==="failed"&&x.jsx("p",{className:"customer-support-fallback__error",children:r.error}),x.jsxs("button",{className:"customer-support-fallback__submit",type:"submit",disabled:f,children:[f&&x.jsx("span",{className:"customer-support-fallback__spinner","aria-hidden":"true"}),x.jsx("span",{children:f?r.submitting:r.submit})]})]})})},B_=({onPressMicButton:e,isDisabled:t,className:n})=>x.jsx("div",{children:x.jsx("button",{className:`absolute
129
+ active:scale-[0.98]`,children:[y.jsx(H_,{"aria-hidden":"true",className:"w-5 h-5 transition-transform duration-200 group-hover:rotate-180"}),y.jsx("span",{children:t})]})})]})]})})})},j_=({onClick:e,label:t="voir les messages plus récents",className:n})=>{const[r,i]=S.useState(!1);return S.useEffect(()=>{const a=requestAnimationFrame(()=>i(!0));return()=>cancelAnimationFrame(a)},[]),y.jsx("button",{onClick:e,className:["absolute z-10 select-none outline-none","bottom-20 right-8 left-auto translate-x-0 top-auto","transition-all duration-300 ease-out",r?"opacity-100 translate-y-0":"opacity-0 -translate-y-1",n??""].join(" "),"aria-label":t,title:t,children:y.jsx("span",{className:["inline-flex items-center justify-center","w-9 h-9","rounded-full bg-white shadow-md","hover:shadow-lg transition-shadow","p-2"].join(" "),children:y.jsx(Eu,{className:"w-4 h-4",fill:"#64748b"})})})},dd=S.createContext({currentConversation:{items:[],discussionId:null},setCurrentConversation:()=>{},archivedConversation:{items:[],discussionId:null},setArchivedConversation:()=>{},chatboxBootState:{mode:bt.ai,customerSupportState:null,reason:"context_default"},setChatboxBootState:()=>{},resetConversationRequestId:0,resetConversation:()=>{}}),is=()=>{const e=S.useContext(dd);if(!e)throw new Error("useChatbotConversation must be used within ChatbotInitialtextContext.Provider");const{currentConversation:t,setCurrentConversation:n,archivedConversation:r,setArchivedConversation:i,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,resetConversation:u}=e,c=L=>{n(A=>({...A,discussionId:L}))},d=L=>{n(A=>({...A,items:L}))},f=L=>{n(A=>({...A,items:[...A.items,L]}))},p=({messageStreamId:L,role:A})=>{n(N=>({...N,items:[...N.items,{userType:A,content:"",metaData:{messageStreamId:L},temporaryId:crypto.randomUUID()}]}))},h=()=>{n(L=>({...L,items:L.items.filter(A=>!(A.content?.length===0&&A.userType==="assistant"))}))},b=()=>{n(L=>{const A=[...L.items];return A.pop(),{...L,items:A}})},x=L=>{n(A=>({...A,updatedAt:L.updatedAt}))},w=()=>{i({discussionId:null,items:[],updatedAt:null})};return{currentConversation:t,setCurrentConversation:n,setCurrentConversationId:c,setCurrentConversationMetadata:x,resetConversation:u,setCurrentConversationItems:d,addMessageToCurrentConversation:f,removeEmptyAssistantMessageFromCurrentConversation:h,removeLastMessageFromCurrentConversation:b,updateCurrentConversationLastMessage:({newContent:L})=>{n(A=>{const N=[...A.items],Y=N.length-1,V=N[Y];return N[Y]={...V,content:V.content=L},{...A,items:N}})},archivedConversation:r,chatboxBootState:a,setChatboxBootState:s,resetConversationRequestId:o,setArchivedConversationAsMain:()=>{n(r),w()},addEmptyMessageToCurrentConversation:p,updateCurrentConversationMessageById:({newContent:L,id:A})=>{n(N=>{const Y=[...N.items],V=Y.findIndex(v=>v.metaData?.messageStreamId===A),re=Y[V];return Y[V]={...re,content:re.content=L},{...N,items:Y}})}}},au=({message:e,actionLabel:t,onClick:n})=>y.jsxs("div",{className:"mt-3 flex items-start gap-2 rounded-md border border-sky-100 bg-sky-50 px-3 py-2 text-xs text-sky-900 shadow-sm",children:[y.jsx("div",{className:"mt-0.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-sky-500 text-[10px] font-semibold text-white",children:"i"}),y.jsxs("div",{className:"flex-1",children:[y.jsx("p",{className:"leading-snug",children:e}),y.jsx("button",{type:"button",onClick:n,className:"mt-1 inline-flex items-center text-[11px] font-medium text-sky-700 hover:text-sky-900 hover:underline",children:t})]})]}),z_=({config:e,status:t,labels:n,onSubmit:r})=>{const[i,a]=S.useState(""),[s,o]=S.useState(""),u=t==="submitting",c=t==="submitted";return y.jsx("div",{className:["customer-support-fallback",c?"customer-support-fallback--success":"",u?"customer-support-fallback--submitting":""].join(" "),children:c?y.jsxs("div",{className:"customer-support-fallback__success",children:[y.jsx("span",{className:"customer-support-fallback__check","aria-hidden":"true",children:"✓"}),y.jsx("p",{children:n.success})]}):y.jsxs("form",{className:"customer-support-fallback__form",onSubmit:async d=>{d.preventDefault(),await r({email:i,phone:s})},children:[y.jsxs("div",{className:"customer-support-fallback__copy",children:[y.jsx("strong",{children:n.title}),y.jsx("p",{children:n.description})]}),y.jsxs("div",{className:"customer-support-fallback__fields",children:[y.jsx("input",{type:"email",value:i,required:e.requireEmail,disabled:u,placeholder:n.email,"aria-label":n.email,onChange:d=>a(d.currentTarget.value)}),y.jsx("input",{type:"tel",value:s,required:e.requirePhone,disabled:u,placeholder:n.phone,"aria-label":n.phone,onChange:d=>o(d.currentTarget.value)})]}),t==="failed"&&y.jsx("p",{className:"customer-support-fallback__error",children:n.error}),y.jsxs("button",{className:"customer-support-fallback__submit",type:"submit",disabled:u,children:[u&&y.jsx("span",{className:"customer-support-fallback__spinner","aria-hidden":"true"}),y.jsx("span",{children:u?n.submitting:n.submit})]})]})})},$_=({config:e,status:t,scheduleLabel:n,labels:r,onSubmit:i})=>{const[a,s]=S.useState(""),[o,u]=S.useState(""),[c,d]=S.useState(""),f=t==="submitting",p=t==="submitted";return y.jsx("div",{className:["customer-support-fallback","customer-support-fallback--closed-hours",p?"customer-support-fallback--success":"",f?"customer-support-fallback--submitting":""].join(" "),children:p?y.jsxs("div",{className:"customer-support-fallback__success",children:[y.jsx("span",{className:"customer-support-fallback__check","aria-hidden":"true",children:"✓"}),y.jsx("p",{children:r.success})]}):y.jsxs("form",{className:"customer-support-fallback__form",onSubmit:async h=>{h.preventDefault(),await i({email:a,phone:o,reason:c})},children:[y.jsxs("div",{className:"customer-support-fallback__copy",children:[y.jsx("strong",{children:r.title}),y.jsx("p",{children:r.description}),n?y.jsxs("p",{className:"customer-support-fallback__schedule",children:[r.schedulePrefix," ",n]}):null]}),y.jsxs("div",{className:"customer-support-fallback__fields",children:[y.jsx("input",{type:"email",value:a,required:e.requireEmail,disabled:f,placeholder:r.email,"aria-label":r.email,onChange:h=>s(h.currentTarget.value)}),y.jsx("input",{type:"tel",value:o,required:e.requirePhone,disabled:f,placeholder:r.phone,"aria-label":r.phone,onChange:h=>u(h.currentTarget.value)}),y.jsx("textarea",{value:c,required:e.requireReason,disabled:f,placeholder:r.reason,"aria-label":r.reason,onChange:h=>d(h.currentTarget.value)})]}),t==="failed"&&y.jsx("p",{className:"customer-support-fallback__error",children:r.error}),y.jsxs("button",{className:"customer-support-fallback__submit",type:"submit",disabled:f,children:[f&&y.jsx("span",{className:"customer-support-fallback__spinner","aria-hidden":"true"}),y.jsx("span",{children:f?r.submitting:r.submit})]})]})})},Y_=({onPressMicButton:e,isDisabled:t,className:n})=>y.jsx("div",{children:y.jsx("button",{className:`absolute
129
130
  bg-violet-600
130
131
  md:bottom-2
131
132
  md:right-3
@@ -144,12 +145,13 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
144
145
  transition-colors
145
146
  enabled:hover:scale-[1.02] active:scale-[0.98]
146
147
  chatsystem-mic-button
147
- ${n??""}`,"data-testid":"mic-button",onClick:e,disabled:t,type:"button","aria-label":"Start voice input",children:x.jsx("span",{"data-state":"closed",children:x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[x.jsx("path",{d:"M12 14.5c1.66 0 3-1.34 3-3V6.5c0-1.66-1.34-3-3-3s-3 1.34-3 3v5c0 1.66 1.34 3 3 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),x.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),x.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),x.jsx("path",{d:"M7 11.5c0 2.76 2.24 5 5 5s5-2.24 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});function F_(){const[e,t]=C.useState("idle"),[n,r]=C.useState(null),[i,a]=C.useState(0),s=C.useRef(null),o=C.useRef(null),u=C.useRef([]),c=C.useRef(null),d=C.useRef(null),f=C.useRef(null),p=C.useRef(null),h=C.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{f.current?.disconnect()}catch{}f.current=null;try{d.current?.disconnect()}catch{}d.current=null;const v=c.current;c.current=null,v&&v.close().catch(()=>{}),a(0)},[]),b=C.useCallback(v=>{try{const k=new AudioContext,L=k.createAnalyser(),A=k.createMediaStreamSource(v);L.fftSize=256,L.smoothingTimeConstant=.85,A.connect(L),c.current=k,d.current=L,f.current=A;const N=new Uint8Array(L.fftSize),Y=()=>{const X=d.current;if(!X)return;X.getByteTimeDomainData(N);let ne=0;for(let z=0;z<N.length;z++){const B=(N[z]-128)/128;ne+=B*B}const I=Math.sqrt(ne/N.length),U=Math.min(1,I*6);a(U),p.current=requestAnimationFrame(Y)};p.current=requestAnimationFrame(Y)}catch{a(0)}},[]),y=C.useCallback(async()=>{r(null),h();try{const v=await navigator.mediaDevices.getUserMedia({audio:!0});o.current=v,b(v);const L=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(N=>MediaRecorder.isTypeSupported(N))||"",A=new MediaRecorder(v,L?{mimeType:L}:void 0);s.current=A,u.current=[],A.ondataavailable=N=>{N.data&&N.data.size>0&&u.current.push(N.data)},A.onerror=()=>{t("error"),r("Recorder error.")},A.onstart=()=>t("recording"),A.onstop=()=>t("stopped"),A.start()}catch(v){h(),t("error"),r(v?.message??"Microphone permission denied.")}},[b,h]),w=C.useCallback(async()=>{const v=s.current,k=o.current;return!v||e!=="recording"?null:new Promise(L=>{v.onstop=()=>{h();const A=v.mimeType||"audio/webm",N=new Blob(u.current,{type:A}),Y=A.includes("ogg")?"ogg":"webm",X=new File([N],`voice-message.${Y}`,{type:A});k?.getTracks().forEach(ne=>ne.stop()),o.current=null,s.current=null,L({blob:N,file:X})},v.stop()})},[e,h]),S=C.useCallback(()=>{const v=s.current,k=o.current;try{v&&e==="recording"&&v.stop()}catch{}h(),k?.getTracks().forEach(L=>L.stop()),o.current=null,s.current=null,u.current=[],t("idle")},[e,h]);return C.useEffect(()=>()=>{h(),o.current?.getTracks().forEach(v=>v.stop())},[h]),{state:e,error:n,audioLevel:i,start:y,stop:w,cancel:S}}const H_=()=>{const e=sn(),t=e.formatMessage({defaultMessage:"Recording...",id:"recordingOverlay.recording"}),n=e.formatMessage({defaultMessage:"Cancel",id:"recordingOverlay.cancel"}),r=e.formatMessage({defaultMessage:"Tap the mic to stop",id:"recordingOverlay.explaination"});return{recordingTranslation:t,cancelTranslation:n,recordingExplainationTranslation:r}},U_=({isOpen:e,onStop:t,onCancel:n,audioLevel:r=0})=>{const{recordingTranslation:i}=H_(),a=C.useMemo(()=>{const s=Math.max(0,Math.min(1,r));return Array.from({length:20},(o,u)=>{const c=Math.sin(u/19*Math.PI*2)*.5+.5,d=u%2===0?.9:.65,f=6+s*(14+c*18)*d;return Math.round(f)})},[r]);return e?x.jsx("div",{className:"relative mt-3 w-full rounded-lg border border-slate-400 bg-white p-1",role:"group","aria-label":"Recording voice message",children:x.jsxs("div",{className:"flex min-h-[48px] items-center gap-3 px-2",children:[x.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[x.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-100 motion-safe:animate-ping","aria-hidden":!0}),x.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-50","aria-hidden":!0}),x.jsx("span",{className:"absolute h-3.5 w-3.5 rounded-full bg-red-200","aria-hidden":!0}),x.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-500","aria-hidden":!0})]}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"mb-0.5 text-[11px] font-medium leading-3 text-slate-600",children:i}),x.jsx("div",{className:"flex h-5 items-center gap-[3px] overflow-hidden","aria-hidden":"true",children:a.map((s,o)=>x.jsx("span",{className:"block w-1 rounded-full bg-slate-400 transition-[height,background-color] duration-75",style:{height:`${s}px`,backgroundColor:r>.08?"rgb(59 130 246)":"rgb(148 163 184)"}},o))})]}),x.jsx("button",{type:"button",onClick:n,className:"flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-700","aria-label":"Cancel recording",children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:x.jsx("path",{d:"M6 6l12 12M18 6L6 18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),x.jsx("button",{type:"button",onClick:t,className:"flex h-9 w-9 items-center justify-center rounded-full bg-violet-600 text-white hover:bg-violet-700","aria-label":"Validate recording",children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:x.jsx("path",{d:"M5 13l4 4L19 7",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}):null},j_=e=>/(\[.*|!\[.*)$/.test(e),z_=e=>/\)/.test(e),nu=()=>({rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null});class $_{buffers=new Map;callbacks;constructor(t){this.callbacks=t}handleStart(t){this.buffers.set(t.messageId,nu()),t.role==="assistant"&&this.callbacks.onAssistantMessageStart?.(),this.callbacks.addEmptyMessage({messageStreamId:t.messageId,role:t.role})}handleDelta(t){this.ensureBufferExists(t.messageId);const n=this.buffers.get(t.messageId);this.appendSourceSeparatorIfNeeded(n,t.streamSourceUuid),this.appendDelta(n,t.delta),this.callbacks.updateMessage({id:t.messageId,newContent:n.rendered})}handleEnd(t){this.buffers.delete(t.messageId)}hasBuffer(t){return this.buffers.has(t)}ensureBufferExists(t){this.buffers.has(t)||(this.buffers.set(t,nu()),this.callbacks.addEmptyMessage({messageStreamId:t,role:"assistant"}))}appendSourceSeparatorIfNeeded(t,n){t.lastStreamSourceUuid&&t.lastStreamSourceUuid!==n&&(t.rendered+='<span style="display:block;height:1rem;"></span>'),t.lastStreamSourceUuid=n??null}appendDelta(t,n){if(z_(n)){t.markdownTag+=n,t.rendered+=t.markdownTag,t.markdownTag="",t.isWritingTag=!1;return}if(t.isWritingTag||j_(n)){t.markdownTag+=n,t.isWritingTag=!0;return}t.rendered+=n}}const Y_=30,G_=e=>{try{const t=e.split(".")[1];if(!t)return null;const n=t.replace(/-/g,"+").replace(/_/g,"/"),r=n.padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return typeof i.exp=="number"?i.exp:null}catch{return null}};class q_{token=null;expiresAt=null;pendingRequest=null;pendingRequestIsInteractive=!1;generation=0;provider;constructor(t){this.provider=t}clear(){this.generation+=1,this.token=null,this.expiresAt=null,this.pendingRequest=null,this.pendingRequestIsInteractive=!1}handleIdentityChanged(){this.token=null,this.expiresAt=null,!(this.pendingRequest&&this.pendingRequestIsInteractive)&&(this.generation+=1,this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}async getToken(t){if(!this.provider)return null;const n=Math.floor(Date.now()/1e3);if(this.token&&this.expiresAt!=null&&this.expiresAt-Y_>n)return this.token;if(this.pendingRequest){const a=this.pendingRequestIsInteractive,s=await this.pendingRequest;if(s||!t.interactive||a)return s}const r=this.generation;this.pendingRequestIsInteractive=t.interactive;let i;return i=this.provider.getToken(t).then(a=>{if(r!==this.generation)return null;if(!a)return this.clear(),null;const s=G_(a);return s==null||s<=Math.floor(Date.now()/1e3)?(this.clear(),null):(this.token=a,this.expiresAt=s,a)}).finally(()=>{this.pendingRequest===i&&(this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}),this.pendingRequest=i,i}}const ud=C.createContext(void 0),V_=async({apiUrl:e,appToken:t,payload:n,identitySession:r,fetchImplementation:i=fetch})=>{let a=null,s;try{a=await r.getToken({interactive:!0,reason:n.reason,requiredCapabilities:n.requiredCapabilities}),a||(a=await r.getToken({interactive:!1,reason:n.reason,requiredCapabilities:n.requiredCapabilities})),s=a?{status:"success"}:{status:"cancelled"}}catch{r.clear(),s={status:"failed",code:"HOST_IDENTITY_FAILED"}}const o=await i(`${e}/ai/identity-gates/${encodeURIComponent(t)}/${encodeURIComponent(n.gateId)}/result`,{method:"POST",headers:{"Content-Type":"application/json","X-ChatSystem-Identity-Gate-Token":n.resultToken,...a?{Authorization:`Bearer ${a}`}:{}},body:JSON.stringify(s)});if(!o.ok)throw o.status===401&&a&&r.clear(),new Error(`IDENTITY_GATE_RESOLUTION_FAILED:${o.status}`)},W_="chatsystem:pending-turn:",X_=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,rs=e=>`${W_}${encodeURIComponent(e)}`,ld=(e,t=Date.now())=>{if(!e||typeof e!="object"||Array.isArray(e))return null;const n=e;if(typeof n.continuationId!="string"||!X_.test(n.continuationId)||typeof n.expiresAt!="string"||typeof n.discussionId!="number"||!Number.isSafeInteger(n.discussionId)||n.discussionId<=0)return null;const r=Date.parse(n.expiresAt);return!Number.isFinite(r)||r<=t?null:{continuationId:n.continuationId,expiresAt:n.expiresAt,discussionId:n.discussionId}},Q_=(e,t,n,r=sessionStorage)=>{const i=ld({...t,discussionId:n});i&&r.setItem(rs(e),JSON.stringify(i))},K_=(e,t=sessionStorage,n=Date.now())=>{const r=rs(e),i=t.getItem(r);if(!i)return null;try{const a=ld(JSON.parse(i),n);if(a)return a}catch{}return t.removeItem(r),null},ru=(e,t=sessionStorage)=>{t.removeItem(rs(e))},J_=async({apiUrl:e,appToken:t,discussionId:n,continuation:r,identitySession:i,fetchImplementation:a=fetch})=>{if(!Number.isSafeInteger(n)||n<=0)return null;const s=await i.getToken({interactive:!1});if(!s)return null;const o={discussionId:n};return a(`${e}/ai/pending-turns/${encodeURIComponent(t)}/${encodeURIComponent(r.continuationId)}/resume`,{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify(o)})},Z_=e=>e>=200&&e<300||e>=400&&e<500&&e!==429||e===503;let gr=new AbortController;const cd=({appToken:e,agentId:t,containerClassName:n})=>{const r=Sn(),i=Kr(),a=C.useContext(ud);e||r.error("App Token missing");const s=C.useRef(null),o=C.useRef(null),u=C.useRef(a),c=C.useRef(new Set),d=C.useRef(null),f=C.useRef(null),p=C.useRef(null),[h,b]=C.useState(0);(!o.current||u.current!==a)&&(u.current=a,o.current=new q_(a)),C.useEffect(()=>{const le=o.current;if(!(!le||!a))return le.getToken({interactive:!1}).catch(()=>le.clear()),a.subscribe?.(()=>{le.handleIdentityChanged(),b(Ce=>Ce+1),le.getToken({interactive:!1}).catch(()=>le.clear())})},[a]);const{placeholderTranslation:y,genericErrorTranslation:w,tooManyRequestsTranslation:S,discussionFullErrorTranslation:v,infoBannerExplainationTranslation:k,infoBannerTitleTranslation:L,customerSupportConnectingTranslation:A,customerSupportConnectedTranslation:N,customerSupportConnectionErrorTranslation:Y,customerSupportProviderUnavailableTranslation:X,customerSupportClosedTranslation:ne,customerSupportRestartTranslation:I,customerSupportFallbackTitleTranslation:U,customerSupportFallbackDescriptionTranslation:z,customerSupportFallbackEmailTranslation:B,customerSupportFallbackPhoneTranslation:$,customerSupportFallbackSubmitTranslation:K,customerSupportFallbackSubmittingTranslation:he,customerSupportFallbackSuccessTranslation:pe,customerSupportFallbackErrorTranslation:Se,customerSupportClosedHoursTitleTranslation:Le,customerSupportClosedHoursDescriptionTranslation:m,customerSupportClosedHoursSchedulePrefixTranslation:G,customerSupportClosedHoursReasonTranslation:re,customerSupportClosedHoursSuccessTranslation:T}=Ju(),{currentConversation:W,addEmptyMessageToCurrentConversation:ce,addMessageToCurrentConversation:V,removeEmptyAssistantMessageFromCurrentConversation:oe,resetConversation:ae,setCurrentConversationId:de,updateCurrentConversationMessageById:ie,archivedConversation:ke,chatboxBootState:q,resetConversationRequestId:Ne,setArchivedConversationAsMain:qe}=ns(),[Be,He]=C.useState("notLoading"),{defaultStartingStep:vt,recentMessagesTranslation:je}=sd(),[Dt,kt]=C.useState(null),[be,Ie]=C.useState(vt),[H,J]=C.useState(null),[O,P]=C.useState(!1),{scrollToBottom:Q,showScrollButton:ue,messagesContainerRef:Z,requestScrollToBottomAfterNextRender:_e,messagesContentRef:at}=N_(W.items),{chatTransportMode:et,isCustomerSupportMode:Ve,customerSupportStatusMessage:Pt,isCustomerSupportInputDisabled:Ke,enterCustomerSupportMode:Mt,flushPendingCustomerSupportHandoff:ht,sendToCustomerSupport:yd,fallbackContactCaptureConfig:ss,fallbackContactCaptureStatus:xd,shouldDisplayFallbackContactCapture:_d,submitFallbackContactCapture:Sd,closedHoursContactCaptureConfig:os,closedHoursBusinessHours:Cd,closedHoursContactCaptureStatus:Ad,shouldDisplayClosedHoursContactCapture:wd,submitClosedHoursContactCapture:Id}=S_({appToken:e,currentConversation:W,loadingStatus:Be,labels:{connecting:A,connected:N,connectionError:Y,providerUnavailable:X,closed:ne},logger:r,setCurrentConversationId:de,setLoadingStatus:He,addMessageToCurrentConversation:V,chatboxBootState:q,resetConversationRequestId:Ne}),[us,ti]=C.useState(!1),{start:vd,stop:kd,cancel:Nd,audioLevel:Rd}=F_(),{companySettings:ni}=C.useContext(rn),{appCurrentLang:ls}=C.useContext(td),[Od,Ld]=C.useState(()=>{if(typeof window>"u")return!0;const le=window.matchMedia("(pointer: coarse)"),Ce=window.matchMedia("(hover: none)");return!(le.matches||Ce.matches)}),ri=C.useRef(null);ri.current||(ri.current=new $_({addEmptyMessage:ce,updateMessage:ie,onAssistantMessageStart:()=>He("loadingDisplayedAnswer")}));const ii=ri.current;C.useEffect(()=>{if(typeof window>"u")return;const le=window.matchMedia("(pointer: coarse)"),Ce=window.matchMedia("(hover: none)"),Me=()=>{Ld(!(le.matches||Ce.matches))};return Me(),le.addEventListener?(le.addEventListener("change",Me),Ce.addEventListener("change",Me)):(le.addListener(Me),Ce.addListener(Me)),()=>{le.removeEventListener?(le.removeEventListener("change",Me),Ce.removeEventListener("change",Me)):(le.removeListener(Me),Ce.removeListener(Me))}},[]);const Dd=Be!=="notLoading"||(W?.items?.length??0)>0,[Pd,cs]=C.useState(!0),Md=!!ke&&(ke.items?.length??0)>0,Bd=()=>{qe(),cs(!1)},Fd=!Ve&&(Be!=="notLoading"||O)||Ve&&(Be!=="notLoading"||Ke),Hd={...Dd?{maxHeight:"100vh"}:{height:"250px"}};C.useEffect(()=>{if(Ve){P(!1);return}Bx(W.items)>=ni?.api?.settings?.maxUserMessagesPerDiscussion&&P(!0)},[ni?.api?.settings?.maxUserMessagesPerDiscussion,W.items,Ve]);const ds=C.useRef(Ne);C.useEffect(()=>{ds.current!==Ne&&(ds.current=Ne,He("notLoading"),P(!1))},[Ne]);const Ud=()=>{gr.abort("Cancelling stream on purpose."),r.log("Stream request aborted"),He("notLoading"),oe()},fs=async le=>{const Ce=le?.body?.getReader(),Me=new TextDecoder,Nn=le.headers.get("discussionId"),pt=parseInt(Nn,10);Number.isNaN(pt)||de(pt),await new ReadableStream({start(Nt){return Rn();async function Rn(){if(!le.ok){He("notLoading");let Bt=w;le.status===409?(Bt=v,P(!0)):le.status===429?Bt=S:Bt=w,V({userType:"assistant",content:Bt,metaData:{isErrorMessage:!0},temporaryId:crypto.randomUUID()}),gr=new AbortController;return}return Ce?.read().then(Bt=>{const{done:Gd,value:qd}=Bt,Vd=Me.decode(qd),Wd=Rt.transformNDJSONChunkIntoObjects(Vd);for(const ze of Wd)if(Rt.isObjectOutputstreamMessageStartDTO(ze))ii.handleStart(ze);else if(Rt.isObjectOutputstreamMessageDeltaDTO(ze))ii.handleDelta(ze);else if(Rt.isObjectOutputstreamMessageEndDTO(ze))ii.handleEnd(ze);else if(Rt.isObjectOutputstreamLoadingCurrentStepNumberDTO(ze)){const{content:Pe}=ze;Nt.enqueue(Pe),J(Pe)}else if(Rt.isObjectOutputstreamLoadingCurrentStepNameDTO(ze)){const{content:Pe}=ze;Nt.enqueue(Pe),Ie(Pe)}else if(Rt.isObjectOutputstreamLoadingNumberOfStepsDTO(ze)){const{content:Pe}=ze;Nt.enqueue(Pe),kt(Pe)}else if(Rt.isObjectOutputstreamClientEventDTO(ze)){const Pe=Vx(ze);if(Pe.type==="customer_support_handoff_requested")Mt(Pe.payload);else if(Pe.type==="identity_gate_required"){if(!c.current.has(Pe.payload.gateId)){c.current.add(Pe.payload.gateId);const ps=o.current;ps&&(Pe.payload.protocolVersion===2&&(Q_(e,Pe.payload.continuation,pt),d.current=Pe.payload.continuation.continuationId),V_({apiUrl:i,appToken:e,payload:Pe.payload,identitySession:ps}).then(()=>{Pe.payload.protocolVersion===2&&ru(e)}).catch(Xd=>r.error(Xd)).finally(()=>{Pe.payload.protocolVersion===2&&d.current===Pe.payload.continuation.continuationId&&(d.current=null)}))}}else r.warn(`Client event not handled - ${ze.event}`)}else if(Rt.isObjectOutputstreamErrorDTO(ze)){const{message:Pe}=ze;V({userType:"assistant",metaData:{isErrorMessage:!0},content:Pe,temporaryId:crypto.randomUUID()})}else r.warn(`Packet shape not handled - ${ze}`);if(Gd){Nt.close(),He("notLoading"),Ie(vt),J(null),ht();return}return Rn()})}}}).pipeTo(new WritableStream)};p.current=fs,C.useEffect(()=>{if(!a)return;const le=K_(e);if(!le){f.current=null;return}if(f.current===le.continuationId||d.current===le.continuationId)return;const Ce=o.current;Ce&&(f.current=le.continuationId,J_({apiUrl:i,appToken:e,discussionId:le.discussionId,continuation:le,identitySession:Ce}).then(async Me=>{if(!Me){f.current=null;return}Me.status===401&&Ce.clear(),Z_(Me.status)&&ru(e),He("loadingIntermediaryStates"),await p.current?.(Me)}).catch(Me=>{r.error(Me),He("notLoading")}))},[i,e,a,h,r]);const jd=(le,Ce)=>{const Me=i,Nn=t?`?agentId=${encodeURIComponent(String(t))}`:"",pt=`${Me}/ai/prompt/${e}${Nn}`,ai=gr.signal;if(le.mode==="text"){const Rn={query:le.text,language:ls.locale};W?.discussionId&&(Rn.discussionId=W.discussionId);const Bt=tn.getFetchConfig({httpVerb:"POST",body:Rn,contentType:"application/json",options:{signal:ai,headers:{...tn.getHeaders({contentType:"application/json"}),...a?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...Ce?{Authorization:"Bearer "+Ce}:{}}}});return{url:pt,fetchConfig:Bt}}const Nt=new FormData;return Nt.append("language",ls.locale),W?.discussionId&&Nt.append("discussionId",String(W.discussionId)),Nt.append("audioInput",le.audioFile,le.audioFile.name),{url:pt,fetchConfig:{method:"POST",body:Nt,signal:ai,headers:a||Ce?{...a?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...Ce?{Authorization:"Bearer "+Ce}:{}}:void 0}}},hs=async le=>{He("loadingIntermediaryStates"),Q({smooth:!1,sticky:!0});let Ce=null;try{Ce=await o.current?.getToken({interactive:!1})??null}catch{o.current?.clear()}const{url:Me,fetchConfig:Nn}=jd(le,Ce);fetch(Me,Nn).then(async pt=>{pt.status===401&&Ce&&o.current?.clear(),await fs(pt)}).catch(pt=>{r.error(pt),He("notLoading"),gr=new AbortController})},zd=async()=>{ti(!0),await vd()},$d=async()=>{const le=await kd();ti(!1),le&&hs({mode:"audio",audioFile:le.file})},Yd=()=>{Nd(),ti(!1)};return x.jsxs("div",{className:["chatbox-root relative p-2","flex flex-col min-h-0 overflow-visible","h-auto",n??"mx-auto"].join(" "),ref:s,style:Hd,children:[x.jsx("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:Z,children:x.jsxs("div",{ref:at,children:[W.items.map((le,Ce)=>x.jsx(Cy,{content:le.content,userType:le.userType,metaData:le.metaData,context:{discussionId:W?.discussionId,messageIndex:Ce,appToken:e},seenRootEl:Z.current},le.temporaryId)),x.jsx(A_,{currentStepName:be,currentStepNumber:H,loadingStatus:Be,numberOfSteps:Dt})]})}),ue&&x.jsx(D_,{label:je,onClick:()=>Q({smooth:!0,sticky:!0})}),!Ve&&O&&x.jsx(L_,{onReset:ae}),wd&&os&&x.jsx(M_,{config:os,status:Ad,scheduleLabel:Cd?.todayScheduleLabel,labels:{title:Le,description:m,schedulePrefix:G,email:B,phone:$,reason:re,submit:K,submitting:he,success:T,error:Se},onSubmit:Id}),_d&&ss&&x.jsx(P_,{config:ss,status:xd,labels:{title:U,description:z,email:B,phone:$,submit:K,submitting:he,success:pe,error:Se},onSubmit:Sd}),Pt&&x.jsx(tu,{actionLabel:I,message:Pt,onClick:ae}),Md&&Pd&&x.jsx(tu,{actionLabel:L,message:k,onClick:Bd}),x.jsx("div",{className:"chatbox-input-wrapper flex-shrink-0",children:us?x.jsx(U_,{isOpen:us,onStop:$d,onCancel:Yd,audioLevel:Rd}):x.jsx(Rx,{classNameTextarea:"",classNameContainer:"relative mt-2 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:Ox,isDisabled:Fd,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:le=>{if(cs(!1),Fx(le)){const Ce=Hx(le,W.discussionId,ae);Ce&&(_e({smooth:!0}),V({userType:"user",content:Ce,temporaryId:crypto.randomUUID()}))}else _e({smooth:!0}),V({userType:"user",content:le,temporaryId:crypto.randomUUID()}),et==="customer_support"?yd(le):hs({mode:"text",text:le})},placeholder:y,autoFocus:Od,isLoadingStream:Be==="loadingDisplayedAnswer"||Be==="loadingIntermediaryStates",LoadingComponent:w_,onPressLoadingButton:Ud,onPressMicButton:()=>{zd()},MicComponent:B_,audioEnabled:ni?.agent?.isAudioAllowed&&!Ve})})]})};function Pr(){return Pr=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},Pr.apply(this,arguments)}function dd(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ta(e,t){return Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ta(e,t)}function fd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ta(e,t)}var br={exports:{}};/*
148
+ chatsystem-primary-background
149
+ ${n??""}`,"data-testid":"mic-button",onClick:e,disabled:t,type:"button","aria-label":"Start voice input",children:y.jsx("span",{"data-state":"closed",children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",className:"text-white dark:text-black",children:[y.jsx("path",{d:"M12 14.5c1.66 0 3-1.34 3-3V6.5c0-1.66-1.34-3-3-3s-3 1.34-3 3v5c0 1.66 1.34 3 3 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),y.jsx("path",{d:"M12 14.5V18",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),y.jsx("path",{d:"M8.5 18h7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),y.jsx("path",{d:"M7 11.5c0 2.76 2.24 5 5 5s5-2.24 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})})})});function G_(){const[e,t]=S.useState("idle"),[n,r]=S.useState(null),[i,a]=S.useState(0),s=S.useRef(null),o=S.useRef(null),u=S.useRef([]),c=S.useRef(null),d=S.useRef(null),f=S.useRef(null),p=S.useRef(null),h=S.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{f.current?.disconnect()}catch{}f.current=null;try{d.current?.disconnect()}catch{}d.current=null;const k=c.current;c.current=null,k&&k.close().catch(()=>{}),a(0)},[]),b=S.useCallback(k=>{try{const I=new AudioContext,L=I.createAnalyser(),A=I.createMediaStreamSource(k);L.fftSize=256,L.smoothingTimeConstant=.85,A.connect(L),c.current=I,d.current=L,f.current=A;const N=new Uint8Array(L.fftSize),Y=()=>{const V=d.current;if(!V)return;V.getByteTimeDomainData(N);let re=0;for(let z=0;z<N.length;z++){const F=(N[z]-128)/128;re+=F*F}const v=Math.sqrt(re/N.length),U=Math.min(1,v*6);a(U),p.current=requestAnimationFrame(Y)};p.current=requestAnimationFrame(Y)}catch{a(0)}},[]),x=S.useCallback(async()=>{r(null),h();try{const k=await navigator.mediaDevices.getUserMedia({audio:!0});o.current=k,b(k);const L=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg"].find(N=>MediaRecorder.isTypeSupported(N))||"",A=new MediaRecorder(k,L?{mimeType:L}:void 0);s.current=A,u.current=[],A.ondataavailable=N=>{N.data&&N.data.size>0&&u.current.push(N.data)},A.onerror=()=>{t("error"),r("Recorder error.")},A.onstart=()=>t("recording"),A.onstop=()=>t("stopped"),A.start()}catch(k){h(),t("error"),r(k?.message??"Microphone permission denied.")}},[b,h]),w=S.useCallback(async()=>{const k=s.current,I=o.current;return!k||e!=="recording"?null:new Promise(L=>{k.onstop=()=>{h();const A=k.mimeType||"audio/webm",N=new Blob(u.current,{type:A}),Y=A.includes("ogg")?"ogg":"webm",V=new File([N],`voice-message.${Y}`,{type:A});I?.getTracks().forEach(re=>re.stop()),o.current=null,s.current=null,L({blob:N,file:V})},k.stop()})},[e,h]),C=S.useCallback(()=>{const k=s.current,I=o.current;try{k&&e==="recording"&&k.stop()}catch{}h(),I?.getTracks().forEach(L=>L.stop()),o.current=null,s.current=null,u.current=[],t("idle")},[e,h]);return S.useEffect(()=>()=>{h(),o.current?.getTracks().forEach(k=>k.stop())},[h]),{state:e,error:n,audioLevel:i,start:x,stop:w,cancel:C}}const q_=()=>{const e=on(),t=e.formatMessage({defaultMessage:"Recording...",id:"recordingOverlay.recording"}),n=e.formatMessage({defaultMessage:"Cancel",id:"recordingOverlay.cancel"}),r=e.formatMessage({defaultMessage:"Tap the mic to stop",id:"recordingOverlay.explaination"});return{recordingTranslation:t,cancelTranslation:n,recordingExplainationTranslation:r}},V_=({isOpen:e,onStop:t,onCancel:n,audioLevel:r=0})=>{const{recordingTranslation:i}=q_(),a=S.useMemo(()=>{const s=Math.max(0,Math.min(1,r));return Array.from({length:20},(o,u)=>{const c=Math.sin(u/19*Math.PI*2)*.5+.5,d=u%2===0?.9:.65,f=6+s*(14+c*18)*d;return Math.round(f)})},[r]);return e?y.jsx("div",{className:"relative mt-3 w-full rounded-lg border border-slate-400 bg-white p-1",role:"group","aria-label":"Recording voice message",children:y.jsxs("div",{className:"flex min-h-[48px] items-center gap-3 px-2",children:[y.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[y.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-100 motion-safe:animate-ping","aria-hidden":!0}),y.jsx("span",{className:"absolute h-5 w-5 rounded-full bg-red-50","aria-hidden":!0}),y.jsx("span",{className:"absolute h-3.5 w-3.5 rounded-full bg-red-200","aria-hidden":!0}),y.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-red-500","aria-hidden":!0})]}),y.jsxs("div",{className:"min-w-0 flex-1",children:[y.jsx("div",{className:"mb-0.5 text-[11px] font-medium leading-3 text-slate-600",children:i}),y.jsx("div",{className:"flex h-5 items-center gap-[3px] overflow-hidden","aria-hidden":"true",children:a.map((s,o)=>y.jsx("span",{className:"block w-1 rounded-full bg-slate-400 transition-[height,background-color] duration-75",style:{height:`${s}px`,backgroundColor:r>.08?"rgb(59 130 246)":"rgb(148 163 184)"}},o))})]}),y.jsx("button",{type:"button",onClick:n,className:"flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-700","aria-label":"Cancel recording",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:y.jsx("path",{d:"M6 6l12 12M18 6L6 18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),y.jsx("button",{type:"button",onClick:t,className:"flex h-9 w-9 items-center justify-center rounded-full bg-violet-600 text-white hover:bg-violet-700","aria-label":"Validate recording",children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:y.jsx("path",{d:"M5 13l4 4L19 7",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}):null},W_=e=>/(\[.*|!\[.*)$/.test(e),X_=e=>/\)/.test(e),su=()=>({rendered:"",markdownTag:"",isWritingTag:!1,lastStreamSourceUuid:null});class Q_{buffers=new Map;callbacks;constructor(t){this.callbacks=t}handleStart(t){this.buffers.set(t.messageId,su()),t.role==="assistant"&&this.callbacks.onAssistantMessageStart?.(),this.callbacks.addEmptyMessage({messageStreamId:t.messageId,role:t.role})}handleDelta(t){this.ensureBufferExists(t.messageId);const n=this.buffers.get(t.messageId);this.appendSourceSeparatorIfNeeded(n,t.streamSourceUuid),this.appendDelta(n,t.delta),this.callbacks.updateMessage({id:t.messageId,newContent:n.rendered})}handleEnd(t){this.buffers.delete(t.messageId)}hasBuffer(t){return this.buffers.has(t)}ensureBufferExists(t){this.buffers.has(t)||(this.buffers.set(t,su()),this.callbacks.addEmptyMessage({messageStreamId:t,role:"assistant"}))}appendSourceSeparatorIfNeeded(t,n){t.lastStreamSourceUuid&&t.lastStreamSourceUuid!==n&&(t.rendered+='<span style="display:block;height:1rem;"></span>'),t.lastStreamSourceUuid=n??null}appendDelta(t,n){if(X_(n)){t.markdownTag+=n,t.rendered+=t.markdownTag,t.markdownTag="",t.isWritingTag=!1;return}if(t.isWritingTag||W_(n)){t.markdownTag+=n,t.isWritingTag=!0;return}t.rendered+=n}}const K_=30,J_=e=>{try{const t=e.split(".")[1];if(!t)return null;const n=t.replace(/-/g,"+").replace(/_/g,"/"),r=n.padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return typeof i.exp=="number"?i.exp:null}catch{return null}};class Z_{token=null;expiresAt=null;pendingRequest=null;pendingRequestIsInteractive=!1;generation=0;provider;constructor(t){this.provider=t}clear(){this.generation+=1,this.token=null,this.expiresAt=null,this.pendingRequest=null,this.pendingRequestIsInteractive=!1}handleIdentityChanged(){this.token=null,this.expiresAt=null,!(this.pendingRequest&&this.pendingRequestIsInteractive)&&(this.generation+=1,this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}async getToken(t){if(!this.provider)return null;const n=Math.floor(Date.now()/1e3);if(this.token&&this.expiresAt!=null&&this.expiresAt-K_>n)return this.token;if(this.pendingRequest){const a=this.pendingRequestIsInteractive,s=await this.pendingRequest;if(s||!t.interactive||a)return s}const r=this.generation;this.pendingRequestIsInteractive=t.interactive;let i;return i=this.provider.getToken(t).then(a=>{if(r!==this.generation)return null;if(!a)return this.clear(),null;const s=J_(a);return s==null||s<=Math.floor(Date.now()/1e3)?(this.clear(),null):(this.token=a,this.expiresAt=s,a)}).finally(()=>{this.pendingRequest===i&&(this.pendingRequest=null,this.pendingRequestIsInteractive=!1)}),this.pendingRequest=i,i}}const fd=S.createContext(void 0),eS=async({apiUrl:e,appToken:t,payload:n,identitySession:r,fetchImplementation:i=fetch})=>{let a=null,s;try{a=await r.getToken({interactive:!0,reason:n.reason,requiredCapabilities:n.requiredCapabilities}),a||(a=await r.getToken({interactive:!1,reason:n.reason,requiredCapabilities:n.requiredCapabilities})),s=a?{status:"success"}:{status:"cancelled"}}catch{r.clear(),s={status:"failed",code:"HOST_IDENTITY_FAILED"}}const o=await i(`${e}/ai/identity-gates/${encodeURIComponent(t)}/${encodeURIComponent(n.gateId)}/result`,{method:"POST",headers:{"Content-Type":"application/json","X-ChatSystem-Identity-Gate-Token":n.resultToken,...a?{Authorization:`Bearer ${a}`}:{}},body:JSON.stringify(s)});if(!o.ok)throw o.status===401&&a&&r.clear(),new Error(`IDENTITY_GATE_RESOLUTION_FAILED:${o.status}`)},tS="chatsystem:pending-turn:",nS=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,as=e=>`${tS}${encodeURIComponent(e)}`,hd=(e,t=Date.now())=>{if(!e||typeof e!="object"||Array.isArray(e))return null;const n=e;if(typeof n.continuationId!="string"||!nS.test(n.continuationId)||typeof n.expiresAt!="string"||typeof n.discussionId!="number"||!Number.isSafeInteger(n.discussionId)||n.discussionId<=0)return null;const r=Date.parse(n.expiresAt);return!Number.isFinite(r)||r<=t?null:{continuationId:n.continuationId,expiresAt:n.expiresAt,discussionId:n.discussionId}},rS=(e,t,n,r=sessionStorage)=>{const i=hd({...t,discussionId:n});i&&r.setItem(as(e),JSON.stringify(i))},iS=(e,t=sessionStorage,n=Date.now())=>{const r=as(e),i=t.getItem(r);if(!i)return null;try{const a=hd(JSON.parse(i),n);if(a)return a}catch{}return t.removeItem(r),null},ou=(e,t=sessionStorage)=>{t.removeItem(as(e))},aS=async({apiUrl:e,appToken:t,discussionId:n,continuation:r,identitySession:i,fetchImplementation:a=fetch})=>{if(!Number.isSafeInteger(n)||n<=0)return null;const s=await i.getToken({interactive:!1});if(!s)return null;const o={discussionId:n};return a(`${e}/ai/pending-turns/${encodeURIComponent(t)}/${encodeURIComponent(r.continuationId)}/resume`,{method:"POST",headers:{Authorization:`Bearer ${s}`,"Content-Type":"application/json"},body:JSON.stringify(o)})},sS=e=>e>=200&&e<300||e>=400&&e<500&&e!==429||e===503;function oS({conversationStarters:e,onSelect:t}){return y.jsx("div",{className:"conversation-starters",children:e.map(n=>y.jsx("button",{type:"button",className:"conversation-starter-button",onClick:()=>t(n),children:n},n))})}const uS=({conversationStarters:e,conversationItems:t,isLoading:n,isCustomerSupportMode:r,isAtMaxMessages:i})=>e.length===0||n||r||i?!1:!t.some(s=>s.userType==="user"),pd=S.createContext(void 0),lS=()=>S.useContext(pd),cS=e=>e.runtimeAdapter?e.prompt.mode!=="text"?Promise.reject(new Error("WIDGET_RUNTIME_ADAPTER_TEXT_PROMPTS_ONLY")):e.runtimeAdapter.sendTextPrompt(e.prompt.request):e.sendStandardPrompt();let Mn=new AbortController;const md=({appToken:e,agentId:t,containerClassName:n})=>{const r=Cn(),i=Jr(),a=lS(),s=S.useContext(fd);e||r.error("App Token missing");const o=S.useRef(null),u=S.useRef(null),c=S.useRef(s),d=S.useRef(new Set),f=S.useRef(null),p=S.useRef(null),h=S.useRef(null),[b,x]=S.useState(0);(!u.current||c.current!==s)&&(c.current=s,u.current=new Z_(s)),S.useEffect(()=>{const oe=u.current;if(!(!oe||!s))return oe.getToken({interactive:!1}).catch(()=>oe.clear()),s.subscribe?.(()=>{oe.handleIdentityChanged(),x(we=>we+1),oe.getToken({interactive:!1}).catch(()=>oe.clear())})},[s]);const{placeholderTranslation:w,genericErrorTranslation:C,tooManyRequestsTranslation:k,discussionFullErrorTranslation:I,infoBannerExplainationTranslation:L,infoBannerTitleTranslation:A,customerSupportConnectingTranslation:N,customerSupportConnectedTranslation:Y,customerSupportConnectionErrorTranslation:V,customerSupportProviderUnavailableTranslation:re,customerSupportClosedTranslation:v,customerSupportRestartTranslation:U,customerSupportFallbackTitleTranslation:z,customerSupportFallbackDescriptionTranslation:F,customerSupportFallbackEmailTranslation:$,customerSupportFallbackPhoneTranslation:Q,customerSupportFallbackSubmitTranslation:he,customerSupportFallbackSubmittingTranslation:pe,customerSupportFallbackSuccessTranslation:Ae,customerSupportFallbackErrorTranslation:Ne,customerSupportClosedHoursTitleTranslation:m,customerSupportClosedHoursDescriptionTranslation:G,customerSupportClosedHoursSchedulePrefixTranslation:ie,customerSupportClosedHoursReasonTranslation:T,customerSupportClosedHoursSuccessTranslation:ne}=nl(),{currentConversation:J,addEmptyMessageToCurrentConversation:W,addMessageToCurrentConversation:se,removeEmptyAssistantMessageFromCurrentConversation:ue,resetConversation:de,setCurrentConversationId:ae,updateCurrentConversationMessageById:Re,archivedConversation:q,chatboxBootState:Me,resetConversationRequestId:Be,setArchivedConversationAsMain:Ke}=is(),[je,qe]=S.useState("notLoading"),{defaultStartingStep:Ue,recentMessagesTranslation:Pt}=cd(),[Nt,be]=S.useState(null),[ve,H]=S.useState(Ue),[K,O]=S.useState(null),[M,X]=S.useState(!1),{scrollToBottom:le,showScrollButton:Z,messagesContainerRef:_e,requestScrollToBottomAfterNextRender:rt,messagesContentRef:et}=B_(J.items),{chatTransportMode:ot,isCustomerSupportMode:it,customerSupportStatusMessage:Ve,isCustomerSupportInputDisabled:Mt,enterCustomerSupportMode:gt,flushPendingCustomerSupportHandoff:Ad,sendToCustomerSupport:wd,fallbackContactCaptureConfig:us,fallbackContactCaptureStatus:Id,shouldDisplayFallbackContactCapture:vd,submitFallbackContactCapture:kd,closedHoursContactCaptureConfig:ls,closedHoursBusinessHours:Nd,closedHoursContactCaptureStatus:Rd,shouldDisplayClosedHoursContactCapture:Od,submitClosedHoursContactCapture:Ld}=N_({appToken:e,currentConversation:J,loadingStatus:je,labels:{connecting:N,connected:Y,connectionError:V,providerUnavailable:re,closed:v},logger:r,setCurrentConversationId:ae,setLoadingStatus:qe,addMessageToCurrentConversation:se,chatboxBootState:Me,resetConversationRequestId:Be}),[cs,ni]=S.useState(!1),{start:Dd,stop:Pd,cancel:Md,audioLevel:Bd}=G_(),{companySettings:sr}=S.useContext(Yt),{appCurrentLang:ri}=S.useContext(ad),[Fd,Hd]=S.useState(()=>{if(typeof window>"u")return!0;const oe=window.matchMedia("(pointer: coarse)"),we=window.matchMedia("(hover: none)");return!(oe.matches||we.matches)}),ii=S.useRef(null);ii.current||(ii.current=new Q_({addEmptyMessage:W,updateMessage:Re,onAssistantMessageStart:()=>qe("loadingDisplayedAnswer")}));const ai=ii.current;S.useEffect(()=>{if(typeof window>"u")return;const oe=window.matchMedia("(pointer: coarse)"),we=window.matchMedia("(hover: none)"),Le=()=>{Hd(!(oe.matches||we.matches))};return Le(),oe.addEventListener?(oe.addEventListener("change",Le),we.addEventListener("change",Le)):(oe.addListener(Le),we.addListener(Le)),()=>{oe.removeEventListener?(oe.removeEventListener("change",Le),we.removeEventListener("change",Le)):(oe.removeListener(Le),we.removeListener(Le))}},[]);const Ud=je!=="notLoading"||(J?.items?.length??0)>0,[jd,ds]=S.useState(!0),zd=!!q&&(q.items?.length??0)>0,$d=()=>{Ke(),ds(!1)},fs=!it&&(je!=="notLoading"||M)||it&&(je!=="notLoading"||Mt),Yd={...Ud?{maxHeight:"100vh"}:{height:"250px"}};S.useEffect(()=>{if(it){X(!1);return}Yx(J.items)>=sr?.api?.settings?.maxUserMessagesPerDiscussion&&X(!0)},[sr?.api?.settings?.maxUserMessagesPerDiscussion,J.items,it]);const hs=S.useRef(Be);S.useEffect(()=>{hs.current!==Be&&(hs.current=Be,qe("notLoading"),X(!1))},[Be]);const Gd=()=>{Mn.abort("Cancelling stream on purpose."),r.log("Stream request aborted"),qe("notLoading"),ue()},ps=async oe=>{const we=oe?.body?.getReader(),Le=new TextDecoder,ut=oe.headers.get("discussionId"),Bt=parseInt(ut,10);Number.isNaN(Bt)||ae(Bt),await new ReadableStream({start(Rt){return Rn();async function Rn(){if(!oe.ok){qe("notLoading");let Ft=C;oe.status===409?(Ft=I,X(!0)):oe.status===429?Ft=k:Ft=C,se({userType:"assistant",content:Ft,metaData:{isErrorMessage:!0},temporaryId:crypto.randomUUID()}),Mn=new AbortController;return}return we?.read().then(Ft=>{const{done:Kd,value:Jd}=Ft,Zd=Le.decode(Jd),ef=Ot.transformNDJSONChunkIntoObjects(Zd);for(const ze of ef)if(Ot.isObjectOutputstreamMessageStartDTO(ze))ai.handleStart(ze);else if(Ot.isObjectOutputstreamMessageDeltaDTO(ze))ai.handleDelta(ze);else if(Ot.isObjectOutputstreamMessageEndDTO(ze))ai.handleEnd(ze);else if(Ot.isObjectOutputstreamLoadingCurrentStepNumberDTO(ze)){const{content:Pe}=ze;Rt.enqueue(Pe),O(Pe)}else if(Ot.isObjectOutputstreamLoadingCurrentStepNameDTO(ze)){const{content:Pe}=ze;Rt.enqueue(Pe),H(Pe)}else if(Ot.isObjectOutputstreamLoadingNumberOfStepsDTO(ze)){const{content:Pe}=ze;Rt.enqueue(Pe),be(Pe)}else if(Ot.isObjectOutputstreamClientEventDTO(ze)){const Pe=e_(ze);if(Pe.type==="customer_support_handoff_requested")gt(Pe.payload);else if(Pe.type==="identity_gate_required"){if(!d.current.has(Pe.payload.gateId)){d.current.add(Pe.payload.gateId);const Es=u.current;Es&&(Pe.payload.protocolVersion===2&&(rS(e,Pe.payload.continuation,Bt),f.current=Pe.payload.continuation.continuationId),eS({apiUrl:i,appToken:e,payload:Pe.payload,identitySession:Es}).then(()=>{Pe.payload.protocolVersion===2&&ou(e)}).catch(tf=>r.error(tf)).finally(()=>{Pe.payload.protocolVersion===2&&f.current===Pe.payload.continuation.continuationId&&(f.current=null)}))}}else r.warn(`Client event not handled - ${ze.event}`)}else if(Ot.isObjectOutputstreamErrorDTO(ze)){const{message:Pe}=ze;se({userType:"assistant",metaData:{isErrorMessage:!0},content:Pe,temporaryId:crypto.randomUUID()})}else r.warn(`Packet shape not handled - ${ze}`);if(Kd){Rt.close(),qe("notLoading"),H(Ue),O(null),Ad();return}return Rn()})}}}).pipeTo(new WritableStream)};h.current=ps,S.useEffect(()=>{if(!s)return;const oe=iS(e);if(!oe){p.current=null;return}if(p.current===oe.continuationId||f.current===oe.continuationId)return;const we=u.current;we&&(p.current=oe.continuationId,aS({apiUrl:i,appToken:e,discussionId:oe.discussionId,continuation:oe,identitySession:we}).then(async Le=>{if(!Le){p.current=null;return}Le.status===401&&we.clear(),sS(Le.status)&&ou(e),qe("loadingIntermediaryStates"),await h.current?.(Le)}).catch(Le=>{r.error(Le),qe("notLoading")}))},[i,e,s,b,r]);const qd=(oe,we)=>{const Le=i,ut=t?`?agentId=${encodeURIComponent(String(t))}`:"",Bt=`${Le}/ai/prompt/${e}${ut}`,si=Mn.signal;if(oe.mode==="text"){const Rn={query:oe.text,language:ri.locale};J?.discussionId&&(Rn.discussionId=J.discussionId);const Ft=rn.getFetchConfig({httpVerb:"POST",body:Rn,contentType:"application/json",options:{signal:si,headers:{...rn.getHeaders({contentType:"application/json"}),...s?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...we?{Authorization:"Bearer "+we}:{}}}});return{url:Bt,fetchConfig:Ft}}const Rt=new FormData;return Rt.append("language",ri.locale),J?.discussionId&&Rt.append("discussionId",String(J.discussionId)),Rt.append("audioInput",oe.audioFile,oe.audioFile.name),{url:Bt,fetchConfig:{method:"POST",body:Rt,signal:si,headers:s||we?{...s?{[ee.IDENTITY_GATE_VERSION_HEADER]:"2"}:{},...we?{Authorization:"Bearer "+we}:{}}:void 0}}},ms=async oe=>{qe("loadingIntermediaryStates"),le({smooth:!1,sticky:!0});let we=null;if(!a)try{we=await u.current?.getToken({interactive:!1})??null}catch{u.current?.clear()}cS({runtimeAdapter:a,prompt:oe.mode==="audio"?{mode:"audio"}:{mode:"text",request:{apiUrl:i,appToken:e,agentId:t,query:oe.text,language:ri.locale,discussionId:J.discussionId,signal:Mn.signal}},sendStandardPrompt:()=>{const{url:ut,fetchConfig:Bt}=qd(oe,we);return fetch(ut,Bt)}}).then(async ut=>{ut.status===401&&we&&u.current?.clear(),await ps(ut),ut.ok&&await a?.onAssistantResponseCompleted?.(ut)}).catch(ut=>{r.error(ut),qe("notLoading"),Mn=new AbortController})},Vd=async()=>{ni(!0),await Dd()},Wd=async()=>{const oe=await Pd();ni(!1),oe&&ms({mode:"audio",audioFile:oe.file})},Xd=()=>{Md(),ni(!1)},gs=oe=>{if(!(!(oe.trim().length>0)||fs)){if(ds(!1),Gx(oe)){const Le=qx(oe,J.discussionId,de);if(!Le)return;rt({smooth:!0}),se({userType:"user",content:Le,temporaryId:crypto.randomUUID()});return}if(rt({smooth:!0}),se({userType:"user",content:oe,temporaryId:crypto.randomUUID()}),ot==="customer_support"){wd(oe);return}ms({mode:"text",text:oe})}},bs=sr?.agent?.text?.conversationStarters??[],Qd=uS({conversationStarters:bs,conversationItems:J.items,isLoading:je!=="notLoading",isCustomerSupportMode:it,isAtMaxMessages:M});return y.jsxs("div",{className:["chatbox-root relative p-2","flex flex-col min-h-0 overflow-visible","h-auto",n??"mx-auto"].join(" "),ref:o,style:Yd,children:[y.jsx("div",{className:"flex-1 overflow-y-auto min-h-0 messagesContainer",ref:_e,children:y.jsxs("div",{ref:et,children:[J.items.map((oe,we)=>y.jsx(Ry,{content:oe.content,userType:oe.userType,metaData:oe.metaData,context:{discussionId:J?.discussionId,messageIndex:we,appToken:e},seenRootEl:_e.current},oe.temporaryId)),y.jsx(O_,{currentStepName:ve,currentStepNumber:K,loadingStatus:je,numberOfSteps:Nt})]})}),Z&&y.jsx(j_,{label:Pt,onClick:()=>le({smooth:!0,sticky:!0})}),!it&&M&&y.jsx(U_,{onReset:de}),Od&&ls&&y.jsx($_,{config:ls,status:Rd,scheduleLabel:Nd?.todayScheduleLabel,labels:{title:m,description:G,schedulePrefix:ie,email:$,phone:Q,reason:T,submit:he,submitting:pe,success:ne,error:Ne},onSubmit:Ld}),vd&&us&&y.jsx(z_,{config:us,status:Id,labels:{title:z,description:F,email:$,phone:Q,submit:he,submitting:pe,success:Ae,error:Ne},onSubmit:kd}),Ve&&y.jsx(au,{actionLabel:U,message:Ve,onClick:de}),zd&&jd&&y.jsx(au,{actionLabel:A,message:L,onClick:$d}),Qd&&y.jsx(oS,{conversationStarters:bs,onSelect:gs}),y.jsx("div",{className:"chatbox-input-wrapper flex-shrink-0",children:cs?y.jsx(V_,{isOpen:cs,onStop:Wd,onCancel:Xd,audioLevel:Bd}):y.jsx(Fx,{classNameTextarea:"",classNameContainer:"relative mt-2 border-slate-400 border-[1px] rounded-lg p-1",SubmitComponent:Hx,isDisabled:fs,shouldDisableIfInputIsEmpty:!0,"aria-label":"TextArea For Bot Conversation",onSubmit:gs,placeholder:w,autoFocus:Fd,isLoadingStream:je==="loadingDisplayedAnswer"||je==="loadingIntermediaryStates",LoadingComponent:L_,onPressLoadingButton:Gd,onPressMicButton:()=>{Vd()},MicComponent:Y_,audioEnabled:sr?.agent?.isAudioAllowed&&!it})})]})};function Mr(){return Mr=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},Mr.apply(this,arguments)}function gd(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ya(e,t){return ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ya(e,t)}function bd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ya(e,t)}var Er={exports:{}};/*
148
150
  object-assign
149
151
  (c) Sindre Sorhus
150
152
  @license MIT
151
- */var Mi,iu;function eS(){if(iu)return Mi;iu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Mi=i()?Object.assign:function(a,s){for(var o,u=r(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)t.call(o,f)&&(u[f]=o[f]);if(e){c=e(o);for(var p=0;p<c.length;p++)n.call(o,c[p])&&(u[c[p]]=o[c[p]])}}return u},Mi}var Bi,au;function is(){if(au)return Bi;au=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bi=e,Bi}var Fi,su;function hd(){return su||(su=1,Fi=Function.call.bind(Object.prototype.hasOwnProperty)),Fi}var Hi,ou;function tS(){if(ou)return Hi;ou=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=is(),n={},r=hd();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,u,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(r(a,d)){var f;try{if(typeof a[d]!="function"){var p=Error((u||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=a[d](s,d,u,o,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+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 h=c?c():"";e("Failed "+o+" type: "+f.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Hi=i,Hi}var Ui,uu;function nS(){if(uu)return Ui;uu=1;var e=Ca(),t=eS(),n=is(),r=hd(),i=tS(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return Ui=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(m){var G=m&&(c&&m[c]||m[d]);if(typeof G=="function")return G}var p="<<anonymous>>",h={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:v(),arrayOf:k,element:L(),elementType:A(),instanceOf:N,node:I(),objectOf:X,oneOf:Y,oneOfType:ne,shape:z,exact:B};function b(m,G){return m===G?m!==0||1/m===1/G:m!==m&&G!==G}function y(m,G){this.message=m,this.data=G&&typeof G=="object"?G:{},this.stack=""}y.prototype=Error.prototype;function w(m){if(process.env.NODE_ENV!=="production")var G={},re=0;function T(ce,V,oe,ae,de,ie,ke){if(ae=ae||p,ie=ie||oe,ke!==n){if(u){var q=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 q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=ae+":"+oe;!G[Ne]&&re<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+ae+"`. 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[Ne]=!0,re++)}}return V[oe]==null?ce?V[oe]===null?new y("The "+de+" `"+ie+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new y("The "+de+" `"+ie+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:m(V,oe,ae,de,ie)}var W=T.bind(null,!1);return W.isRequired=T.bind(null,!0),W}function S(m){function G(re,T,W,ce,V,oe){var ae=re[T],de=he(ae);if(de!==m){var ie=pe(ae);return new y("Invalid "+ce+" `"+V+"` of type "+("`"+ie+"` supplied to `"+W+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return w(G)}function v(){return w(s)}function k(m){function G(re,T,W,ce,V){if(typeof m!="function")return new y("Property `"+V+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var oe=re[T];if(!Array.isArray(oe)){var ae=he(oe);return new y("Invalid "+ce+" `"+V+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected an array."))}for(var de=0;de<oe.length;de++){var ie=m(oe,de,W,ce,V+"["+de+"]",n);if(ie instanceof Error)return ie}return null}return w(G)}function L(){function m(G,re,T,W,ce){var V=G[re];if(!o(V)){var oe=he(V);return new y("Invalid "+W+" `"+ce+"` of type "+("`"+oe+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return w(m)}function A(){function m(G,re,T,W,ce){var V=G[re];if(!e.isValidElementType(V)){var oe=he(V);return new y("Invalid "+W+" `"+ce+"` of type "+("`"+oe+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return w(m)}function N(m){function G(re,T,W,ce,V){if(!(re[T]instanceof m)){var oe=m.name||p,ae=Le(re[T]);return new y("Invalid "+ce+" `"+V+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected ")+("instance of `"+oe+"`."))}return null}return w(G)}function Y(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function G(re,T,W,ce,V){for(var oe=re[T],ae=0;ae<m.length;ae++)if(b(oe,m[ae]))return null;var de=JSON.stringify(m,function(ke,q){var Ne=pe(q);return Ne==="symbol"?String(q):q});return new y("Invalid "+ce+" `"+V+"` of value `"+String(oe)+"` "+("supplied to `"+W+"`, expected one of "+de+"."))}return w(G)}function X(m){function G(re,T,W,ce,V){if(typeof m!="function")return new y("Property `"+V+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var oe=re[T],ae=he(oe);if(ae!=="object")return new y("Invalid "+ce+" `"+V+"` of type "+("`"+ae+"` supplied to `"+W+"`, expected an object."));for(var de in oe)if(r(oe,de)){var ie=m(oe,de,W,ce,V+"."+de,n);if(ie instanceof Error)return ie}return null}return w(G)}function ne(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var G=0;G<m.length;G++){var re=m[G];if(typeof re!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Se(re)+" at index "+G+"."),s}function T(W,ce,V,oe,ae){for(var de=[],ie=0;ie<m.length;ie++){var ke=m[ie],q=ke(W,ce,V,oe,ae,n);if(q==null)return null;q.data&&r(q.data,"expectedType")&&de.push(q.data.expectedType)}var Ne=de.length>0?", expected one of type ["+de.join(", ")+"]":"";return new y("Invalid "+oe+" `"+ae+"` supplied to "+("`"+V+"`"+Ne+"."))}return w(T)}function I(){function m(G,re,T,W,ce){return $(G[re])?null:new y("Invalid "+W+" `"+ce+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return w(m)}function U(m,G,re,T,W){return new y((m||"React class")+": "+G+" type `"+re+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function z(m){function G(re,T,W,ce,V){var oe=re[T],ae=he(oe);if(ae!=="object")return new y("Invalid "+ce+" `"+V+"` of type `"+ae+"` "+("supplied to `"+W+"`, expected `object`."));for(var de in m){var ie=m[de];if(typeof ie!="function")return U(W,ce,V,de,pe(ie));var ke=ie(oe,de,W,ce,V+"."+de,n);if(ke)return ke}return null}return w(G)}function B(m){function G(re,T,W,ce,V){var oe=re[T],ae=he(oe);if(ae!=="object")return new y("Invalid "+ce+" `"+V+"` of type `"+ae+"` "+("supplied to `"+W+"`, expected `object`."));var de=t({},re[T],m);for(var ie in de){var ke=m[ie];if(r(m,ie)&&typeof ke!="function")return U(W,ce,V,ie,pe(ke));if(!ke)return new y("Invalid "+ce+" `"+V+"` key `"+ie+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(re[T],null," ")+`
152
- Valid keys: `+JSON.stringify(Object.keys(m),null," "));var q=ke(oe,ie,W,ce,V+"."+ie,n);if(q)return q}return null}return w(G)}function $(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every($);if(m===null||o(m))return!0;var G=f(m);if(G){var re=G.call(m),T;if(G!==m.entries){for(;!(T=re.next()).done;)if(!$(T.value))return!1}else for(;!(T=re.next()).done;){var W=T.value;if(W&&!$(W[1]))return!1}}else return!1;return!0;default:return!1}}function K(m,G){return m==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function he(m){var G=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":K(G,m)?"symbol":G}function pe(m){if(typeof m>"u"||m===null)return""+m;var G=he(m);if(G==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return G}function Se(m){var G=pe(m);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Le(m){return!m.constructor||!m.constructor.name?p:m.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Ui}var ji,lu;function rS(){if(lu)return ji;lu=1;var e=is();function t(){}function n(){}return n.resetWarningCache=t,ji=function(){function r(s,o,u,c,d,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},ji}var cu;function iS(){if(cu)return br.exports;if(cu=1,process.env.NODE_ENV!=="production"){var e=Ca(),t=!0;br.exports=nS()(e.isElement,t)}else br.exports=rS()();return br.exports}var aS=iS();const fe=xa(aS);function sS(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function oS(e,t){e.classList?e.classList.add(t):sS(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function du(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function uS(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=du(e.className,t):e.setAttribute("class",du(e.className&&e.className.baseVal||"",t))}const fu={disabled:!1};var lS=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.number,fe.shape({enter:fe.number,exit:fe.number,appear:fe.number}).isRequired]):null,cS=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.string,fe.shape({enter:fe.string,exit:fe.string,active:fe.string}),fe.shape({enter:fe.string,enterDone:fe.string,enterActive:fe.string,exit:fe.string,exitDone:fe.string,exitActive:fe.string})]):null;const pd=C.createContext(null);var md=function(t){return t.scrollTop},Fn="unmounted",Wt="exited",Xt="entering",mn="entered",ya="exiting",It=(function(e){fd(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=Wt,a.appearStatus=Xt):u=mn:r.unmountOnExit||r.mountOnEnter?u=Fn:u=Wt,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===Fn?{status:Wt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Xt&&s!==mn&&(a=Xt):(s===Xt||s===mn)&&(a=ya)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Xt){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Mn.findDOMNode(this);s&&md(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Wt&&this.setState({status:Fn})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[Mn.findDOMNode(this),o],c=u[0],d=u[1],f=this.getTimeouts(),p=o?f.appear:f.enter;if(!i&&!s||fu.disabled){this.safeSetState({status:mn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Xt},function(){a.props.onEntering(c,d),a.onTransitionEnd(p,function(){a.safeSetState({status:mn},function(){a.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:Mn.findDOMNode(this);if(!a||fu.disabled){this.safeSetState({status:Wt},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:ya},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Wt},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:Mn.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fn)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=dd(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return C.createElement(pd.Provider,{value:null},typeof s=="function"?s(i,o):C.cloneElement(C.Children.only(s),o))},t})(C.Component);It.contextType=pd;It.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:fe.shape({current:typeof Element>"u"?fe.any:function(e,t,n,r,i,a){var s=e[t];return fe.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:fe.oneOfType([fe.func.isRequired,fe.element.isRequired]).isRequired,in:fe.bool,mountOnEnter:fe.bool,unmountOnExit:fe.bool,appear:fe.bool,enter:fe.bool,exit:fe.bool,timeout:function(t){var n=lS;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:fe.func,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}:{};function fn(){}It.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fn,onEntering:fn,onEntered:fn,onExit:fn,onExiting:fn,onExited:fn};It.UNMOUNTED=Fn;It.EXITED=Wt;It.ENTERING=Xt;It.ENTERED=mn;It.EXITING=ya;var dS=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return oS(t,r)})},zi=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return uS(t,r)})},as=(function(e){fd(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(o,u)},r.onEntering=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.addClass(d,p,"active"),r.props.onEntering&&r.props.onEntering(o,u)},r.onEntered=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.removeClasses(d,p),r.addClass(d,p,"done"),r.props.onEntered&&r.props.onEntered(o,u)},r.onExit=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(o)},r.onExiting=function(o){var u=r.resolveArguments(o),c=u[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(o)},r.onExited=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(o)},r.resolveArguments=function(o,u){return r.props.nodeRef?[r.props.nodeRef.current,o]:[o,u]},r.getClassNames=function(o){var u=r.props.classNames,c=typeof u=="string",d=c&&u?u+"-":"",f=c?""+d+o:u[o],p=c?f+"-active":u[o+"Active"],h=c?f+"-done":u[o+"Done"];return{baseClassName:f,activeClassName:p,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(i,a,s){var o=this.getClassNames(a)[s+"ClassName"],u=this.getClassNames("enter"),c=u.doneClassName;a==="appear"&&s==="done"&&c&&(o+=" "+c),s==="active"&&i&&md(i),o&&(this.appliedClasses[a][s]=o,dS(i,o))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],o=s.base,u=s.active,c=s.done;this.appliedClasses[a]={},o&&zi(i,o),u&&zi(i,u),c&&zi(i,c)},n.render=function(){var i=this.props;i.classNames;var a=dd(i,["classNames"]);return C.createElement(It,Pr({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(C.Component);as.defaultProps={classNames:""};as.propTypes=process.env.NODE_ENV!=="production"?Pr({},It.propTypes,{classNames:cS,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}):{};const gd=()=>{const e=sn(),t=e.formatMessage({defaultMessage:"Open chat menu",id:"chatbot.widget.menu.open"}),n=e.formatMessage({defaultMessage:"Start a new discussion",id:"chatbot.widget.menu.startNewDiscussion"}),r=e.formatMessage({defaultMessage:"Close chat",id:"chatbot.widget.close"});return{openMenuTranslation:t,startNewDiscussionTranslation:n,closeChatTranslation:r}},fS=({setIsWidgetOpen:e})=>{const{closeChatTranslation:t}=gd();return x.jsx(x.Fragment,{children:x.jsx("button",{type:"button","aria-label":t,onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
153
+ */var Bi,uu;function dS(){if(uu)return Bi;uu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Bi=i()?Object.assign:function(a,s){for(var o,u=r(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)t.call(o,f)&&(u[f]=o[f]);if(e){c=e(o);for(var p=0;p<c.length;p++)n.call(o,c[p])&&(u[c[p]]=o[c[p]])}}return u},Bi}var Fi,lu;function ss(){if(lu)return Fi;lu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fi=e,Fi}var Hi,cu;function Ed(){return cu||(cu=1,Hi=Function.call.bind(Object.prototype.hasOwnProperty)),Hi}var Ui,du;function fS(){if(du)return Ui;du=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ss(),n={},r=Ed();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,u,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(r(a,d)){var f;try{if(typeof a[d]!="function"){var p=Error((u||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=a[d](s,d,u,o,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+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 h=c?c():"";e("Failed "+o+" type: "+f.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ui=i,Ui}var ji,fu;function hS(){if(fu)return ji;fu=1;var e=wa(),t=dS(),n=ss(),r=Ed(),i=fS(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return ji=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(m){var G=m&&(c&&m[c]||m[d]);if(typeof G=="function")return G}var p="<<anonymous>>",h={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:k(),arrayOf:I,element:L(),elementType:A(),instanceOf:N,node:v(),objectOf:V,oneOf:Y,oneOfType:re,shape:z,exact:F};function b(m,G){return m===G?m!==0||1/m===1/G:m!==m&&G!==G}function x(m,G){this.message=m,this.data=G&&typeof G=="object"?G:{},this.stack=""}x.prototype=Error.prototype;function w(m){if(process.env.NODE_ENV!=="production")var G={},ie=0;function T(J,W,se,ue,de,ae,Re){if(ue=ue||p,ae=ae||se,Re!==n){if(u){var q=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 q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Me=ue+":"+se;!G[Me]&&ie<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ae+"` prop on `"+ue+"`. 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[Me]=!0,ie++)}}return W[se]==null?J?W[se]===null?new x("The "+de+" `"+ae+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new x("The "+de+" `"+ae+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:m(W,se,ue,de,ae)}var ne=T.bind(null,!1);return ne.isRequired=T.bind(null,!0),ne}function C(m){function G(ie,T,ne,J,W,se){var ue=ie[T],de=he(ue);if(de!==m){var ae=pe(ue);return new x("Invalid "+J+" `"+W+"` of type "+("`"+ae+"` supplied to `"+ne+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return w(G)}function k(){return w(s)}function I(m){function G(ie,T,ne,J,W){if(typeof m!="function")return new x("Property `"+W+"` of component `"+ne+"` has invalid PropType notation inside arrayOf.");var se=ie[T];if(!Array.isArray(se)){var ue=he(se);return new x("Invalid "+J+" `"+W+"` of type "+("`"+ue+"` supplied to `"+ne+"`, expected an array."))}for(var de=0;de<se.length;de++){var ae=m(se,de,ne,J,W+"["+de+"]",n);if(ae instanceof Error)return ae}return null}return w(G)}function L(){function m(G,ie,T,ne,J){var W=G[ie];if(!o(W)){var se=he(W);return new x("Invalid "+ne+" `"+J+"` of type "+("`"+se+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return w(m)}function A(){function m(G,ie,T,ne,J){var W=G[ie];if(!e.isValidElementType(W)){var se=he(W);return new x("Invalid "+ne+" `"+J+"` of type "+("`"+se+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return w(m)}function N(m){function G(ie,T,ne,J,W){if(!(ie[T]instanceof m)){var se=m.name||p,ue=Ne(ie[T]);return new x("Invalid "+J+" `"+W+"` of type "+("`"+ue+"` supplied to `"+ne+"`, expected ")+("instance of `"+se+"`."))}return null}return w(G)}function Y(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function G(ie,T,ne,J,W){for(var se=ie[T],ue=0;ue<m.length;ue++)if(b(se,m[ue]))return null;var de=JSON.stringify(m,function(Re,q){var Me=pe(q);return Me==="symbol"?String(q):q});return new x("Invalid "+J+" `"+W+"` of value `"+String(se)+"` "+("supplied to `"+ne+"`, expected one of "+de+"."))}return w(G)}function V(m){function G(ie,T,ne,J,W){if(typeof m!="function")return new x("Property `"+W+"` of component `"+ne+"` has invalid PropType notation inside objectOf.");var se=ie[T],ue=he(se);if(ue!=="object")return new x("Invalid "+J+" `"+W+"` of type "+("`"+ue+"` supplied to `"+ne+"`, expected an object."));for(var de in se)if(r(se,de)){var ae=m(se,de,ne,J,W+"."+de,n);if(ae instanceof Error)return ae}return null}return w(G)}function re(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var G=0;G<m.length;G++){var ie=m[G];if(typeof ie!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ae(ie)+" at index "+G+"."),s}function T(ne,J,W,se,ue){for(var de=[],ae=0;ae<m.length;ae++){var Re=m[ae],q=Re(ne,J,W,se,ue,n);if(q==null)return null;q.data&&r(q.data,"expectedType")&&de.push(q.data.expectedType)}var Me=de.length>0?", expected one of type ["+de.join(", ")+"]":"";return new x("Invalid "+se+" `"+ue+"` supplied to "+("`"+W+"`"+Me+"."))}return w(T)}function v(){function m(G,ie,T,ne,J){return $(G[ie])?null:new x("Invalid "+ne+" `"+J+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return w(m)}function U(m,G,ie,T,ne){return new x((m||"React class")+": "+G+" type `"+ie+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ne+"`.")}function z(m){function G(ie,T,ne,J,W){var se=ie[T],ue=he(se);if(ue!=="object")return new x("Invalid "+J+" `"+W+"` of type `"+ue+"` "+("supplied to `"+ne+"`, expected `object`."));for(var de in m){var ae=m[de];if(typeof ae!="function")return U(ne,J,W,de,pe(ae));var Re=ae(se,de,ne,J,W+"."+de,n);if(Re)return Re}return null}return w(G)}function F(m){function G(ie,T,ne,J,W){var se=ie[T],ue=he(se);if(ue!=="object")return new x("Invalid "+J+" `"+W+"` of type `"+ue+"` "+("supplied to `"+ne+"`, expected `object`."));var de=t({},ie[T],m);for(var ae in de){var Re=m[ae];if(r(m,ae)&&typeof Re!="function")return U(ne,J,W,ae,pe(Re));if(!Re)return new x("Invalid "+J+" `"+W+"` key `"+ae+"` supplied to `"+ne+"`.\nBad object: "+JSON.stringify(ie[T],null," ")+`
154
+ Valid keys: `+JSON.stringify(Object.keys(m),null," "));var q=Re(se,ae,ne,J,W+"."+ae,n);if(q)return q}return null}return w(G)}function $(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every($);if(m===null||o(m))return!0;var G=f(m);if(G){var ie=G.call(m),T;if(G!==m.entries){for(;!(T=ie.next()).done;)if(!$(T.value))return!1}else for(;!(T=ie.next()).done;){var ne=T.value;if(ne&&!$(ne[1]))return!1}}else return!1;return!0;default:return!1}}function Q(m,G){return m==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function he(m){var G=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":Q(G,m)?"symbol":G}function pe(m){if(typeof m>"u"||m===null)return""+m;var G=he(m);if(G==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return G}function Ae(m){var G=pe(m);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Ne(m){return!m.constructor||!m.constructor.name?p:m.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},ji}var zi,hu;function pS(){if(hu)return zi;hu=1;var e=ss();function t(){}function n(){}return n.resetWarningCache=t,zi=function(){function r(s,o,u,c,d,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},zi}var pu;function mS(){if(pu)return Er.exports;if(pu=1,process.env.NODE_ENV!=="production"){var e=wa(),t=!0;Er.exports=hS()(e.isElement,t)}else Er.exports=pS()();return Er.exports}var gS=mS();const fe=Sa(gS);function bS(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function ES(e,t){e.classList?e.classList.add(t):bS(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function mu(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function TS(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=mu(e.className,t):e.setAttribute("class",mu(e.className&&e.className.baseVal||"",t))}const gu={disabled:!1};var yS=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.number,fe.shape({enter:fe.number,exit:fe.number,appear:fe.number}).isRequired]):null,xS=process.env.NODE_ENV!=="production"?fe.oneOfType([fe.string,fe.shape({enter:fe.string,exit:fe.string,active:fe.string}),fe.shape({enter:fe.string,enterDone:fe.string,enterActive:fe.string,exit:fe.string,exitDone:fe.string,exitActive:fe.string})]):null;const Td=S.createContext(null);var yd=function(t){return t.scrollTop},Hn="unmounted",Qt="exited",Kt="entering",gn="entered",xa="exiting",kt=(function(e){bd(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,u;return a.appearStatus=null,r.in?o?(u=Qt,a.appearStatus=Kt):u=gn:r.unmountOnExit||r.mountOnEnter?u=Hn:u=Qt,a.state={status:u},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===Hn?{status:Qt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Kt&&s!==gn&&(a=Kt):(s===Kt||s===gn)&&(a=xa)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Kt){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Bn.findDOMNode(this);s&&yd(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qt&&this.setState({status:Hn})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[Bn.findDOMNode(this),o],c=u[0],d=u[1],f=this.getTimeouts(),p=o?f.appear:f.enter;if(!i&&!s||gu.disabled){this.safeSetState({status:gn},function(){a.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:Kt},function(){a.props.onEntering(c,d),a.onTransitionEnd(p,function(){a.safeSetState({status:gn},function(){a.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:Bn.findDOMNode(this);if(!a||gu.disabled){this.safeSetState({status:Qt},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:xa},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Qt},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:Bn.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=u[0],d=u[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Hn)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=gd(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return S.createElement(Td.Provider,{value:null},typeof s=="function"?s(i,o):S.cloneElement(S.Children.only(s),o))},t})(S.Component);kt.contextType=Td;kt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:fe.shape({current:typeof Element>"u"?fe.any:function(e,t,n,r,i,a){var s=e[t];return fe.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:fe.oneOfType([fe.func.isRequired,fe.element.isRequired]).isRequired,in:fe.bool,mountOnEnter:fe.bool,unmountOnExit:fe.bool,appear:fe.bool,enter:fe.bool,exit:fe.bool,timeout:function(t){var n=yS;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:fe.func,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}:{};function hn(){}kt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hn,onEntering:hn,onEntered:hn,onExit:hn,onExiting:hn,onExited:hn};kt.UNMOUNTED=Hn;kt.EXITED=Qt;kt.ENTERING=Kt;kt.ENTERED=gn;kt.EXITING=xa;var _S=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return ES(t,r)})},$i=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return TS(t,r)})},os=(function(e){bd(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(o,u)},r.onEntering=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.addClass(d,p,"active"),r.props.onEntering&&r.props.onEntering(o,u)},r.onEntered=function(o,u){var c=r.resolveArguments(o,u),d=c[0],f=c[1],p=f?"appear":"enter";r.removeClasses(d,p),r.addClass(d,p,"done"),r.props.onEntered&&r.props.onEntered(o,u)},r.onExit=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(o)},r.onExiting=function(o){var u=r.resolveArguments(o),c=u[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(o)},r.onExited=function(o){var u=r.resolveArguments(o),c=u[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(o)},r.resolveArguments=function(o,u){return r.props.nodeRef?[r.props.nodeRef.current,o]:[o,u]},r.getClassNames=function(o){var u=r.props.classNames,c=typeof u=="string",d=c&&u?u+"-":"",f=c?""+d+o:u[o],p=c?f+"-active":u[o+"Active"],h=c?f+"-done":u[o+"Done"];return{baseClassName:f,activeClassName:p,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(i,a,s){var o=this.getClassNames(a)[s+"ClassName"],u=this.getClassNames("enter"),c=u.doneClassName;a==="appear"&&s==="done"&&c&&(o+=" "+c),s==="active"&&i&&yd(i),o&&(this.appliedClasses[a][s]=o,_S(i,o))},n.removeClasses=function(i,a){var s=this.appliedClasses[a],o=s.base,u=s.active,c=s.done;this.appliedClasses[a]={},o&&$i(i,o),u&&$i(i,u),c&&$i(i,c)},n.render=function(){var i=this.props;i.classNames;var a=gd(i,["classNames"]);return S.createElement(kt,Mr({},a,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(S.Component);os.defaultProps={classNames:""};os.propTypes=process.env.NODE_ENV!=="production"?Mr({},kt.propTypes,{classNames:xS,onEnter:fe.func,onEntering:fe.func,onEntered:fe.func,onExit:fe.func,onExiting:fe.func,onExited:fe.func}):{};const xd=()=>{const e=on(),t=e.formatMessage({defaultMessage:"Open chat menu",id:"chatbot.widget.menu.open"}),n=e.formatMessage({defaultMessage:"Start a new discussion",id:"chatbot.widget.menu.startNewDiscussion"}),r=e.formatMessage({defaultMessage:"Close chat",id:"chatbot.widget.close"});return{openMenuTranslation:t,startNewDiscussionTranslation:n,closeChatTranslation:r}},SS=({setIsWidgetOpen:e})=>{const{closeChatTranslation:t}=xd();return y.jsx(y.Fragment,{children:y.jsx("button",{type:"button","aria-label":t,onClick:()=>e(!1),className:`absolute right-2 top-1/2 -translate-y-1/2
153
155
  inline-flex items-center justify-center
154
156
  rounded-full p-1.5
155
157
  text-white
@@ -160,16 +162,14 @@ Valid keys: `+JSON.stringify(Object.keys(m),null," "));var q=ke(oe,ie,W,ce,V+".
160
162
  focus-visible:ring-white/80
161
163
  focus-visible:ring-offset-2
162
164
  focus-visible:ring-offset-violet-700
163
- `,"data-testid":"close-button",children:x.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:x.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})})},bd=({onStartNewDiscussion:e,className:t="",tone:n="light"})=>{const[r,i]=C.useState(!1),a=C.useRef(null),{openMenuTranslation:s,startNewDiscussionTranslation:o}=gd();C.useEffect(()=>{if(!r)return;const c=f=>{a.current?.contains(f.target)||i(!1)},d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[r]);const u=n==="dark"?"text-white bg-white/10 hover:bg-white/20 focus-visible:ring-white/80 focus-visible:ring-offset-violet-700":"text-slate-700 bg-slate-100 hover:bg-slate-200 focus-visible:ring-slate-400 focus-visible:ring-offset-white";return x.jsxs("div",{ref:a,className:`relative inline-flex ${t}`,onMouseDown:c=>c.stopPropagation(),children:[x.jsx("button",{type:"button","aria-label":s,"aria-haspopup":"menu","aria-expanded":r,onClick:()=>i(c=>!c),className:`inline-flex items-center justify-center rounded-full p-1.5 transition-transform duration-150 ease-out hover:scale-110 active:scale-95 focus:outline-none focus-visible:ring-offset-2 ${u}`,"data-testid":"discussion-menu-button",children:x.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:[x.jsx("circle",{cx:"5",cy:"12",r:"1.5",fill:"currentColor"}),x.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),x.jsx("circle",{cx:"19",cy:"12",r:"1.5",fill:"currentColor"})]})}),r&&x.jsx("div",{role:"menu",className:"absolute right-0 top-full z-30 mt-2 min-w-[210px] rounded-md border border-slate-200 bg-white p-1 shadow-lg",onMouseDown:c=>c.stopPropagation(),children:x.jsx("button",{type:"button",role:"menuitem",className:"block w-full rounded px-3 py-2 text-left text-sm text-slate-800 hover:bg-slate-100",onClick:()=>{e(),i(!1)},children:o})})]})},hS=C.forwardRef(({props:e},t)=>{const{companySettings:n}=C.useContext(rn),{resetConversation:r}=ns(),i=n.agent?.customNameToDisplay||"Assistant";return x.jsxs("div",{ref:t,className:`
164
- chatBox
165
+ `,"data-testid":"close-button",children:y.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:y.jsx("path",{d:"M6 6L18 18M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})})},_d=({onStartNewDiscussion:e,className:t="",tone:n="light"})=>{const[r,i]=S.useState(!1),a=S.useRef(null),{openMenuTranslation:s,startNewDiscussionTranslation:o}=xd();S.useEffect(()=>{if(!r)return;const c=f=>{a.current?.contains(f.target)||i(!1)},d=f=>{f.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[r]);const u=n==="dark"?"text-white bg-white/10 hover:bg-white/20 focus-visible:ring-white/80 focus-visible:ring-offset-violet-700":"text-slate-700 bg-slate-100 hover:bg-slate-200 focus-visible:ring-slate-400 focus-visible:ring-offset-white";return y.jsxs("div",{ref:a,className:`relative inline-flex ${t}`,onMouseDown:c=>c.stopPropagation(),children:[y.jsx("button",{type:"button","aria-label":s,"aria-haspopup":"menu","aria-expanded":r,onClick:()=>i(c=>!c),className:`inline-flex items-center justify-center rounded-full p-1.5 transition-transform duration-150 ease-out hover:scale-110 active:scale-95 focus:outline-none focus-visible:ring-offset-2 ${u}`,"data-testid":"discussion-menu-button",children:y.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",className:"select-none outline-none",children:[y.jsx("circle",{cx:"5",cy:"12",r:"1.5",fill:"currentColor"}),y.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),y.jsx("circle",{cx:"19",cy:"12",r:"1.5",fill:"currentColor"})]})}),r&&y.jsx("div",{role:"menu",className:"absolute right-0 top-full z-30 mt-2 min-w-[210px] rounded-md border border-slate-200 bg-white p-1 shadow-lg",onMouseDown:c=>c.stopPropagation(),children:y.jsx("button",{type:"button",role:"menuitem",className:"block w-full rounded px-3 py-2 text-left text-sm text-slate-800 hover:bg-slate-100",onClick:()=>{e(),i(!1)},children:o})})]})},_a=({placement:e="inline",className:t=""})=>{const{companySettings:n}=S.useContext(Yt);if(n.branding?.poweredByChatSystemVisible===!1)return null;const r=e==="widget-badge";return y.jsxs("div",{className:t,style:{alignItems:"center",background:"rgba(255, 255, 255, 0.96)",border:r?"1px solid #e5e7eb":"0",borderRadius:r?"9999px":"0",boxShadow:r?"0 4px 14px rgba(15, 23, 42, 0.10)":"none",color:"#94a3b8",flexShrink:0,fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:"10px",fontWeight:400,gap:"3px",justifyContent:"center",lineHeight:1,padding:r?"6px 10px":"5px 12px",whiteSpace:"nowrap"},children:[y.jsx("span",{children:"Powered by"}),y.jsx("a",{href:"https://www.chatsystem.ai",target:"_blank",rel:"noopener noreferrer",style:{color:"#64748b",display:"inline",fontFamily:"inherit",fontSize:"inherit",fontWeight:600,lineHeight:"inherit",margin:0,textDecoration:"none",whiteSpace:"nowrap"},children:"ChatSystem"})]})},CS=S.forwardRef(({props:e},t)=>{const{companySettings:n}=S.useContext(Yt),{resetConversation:r}=is(),i=n.agent?.customNameToDisplay||"Assistant";return y.jsxs("div",{ref:t,className:`
165
166
  fixed z-[2147483647]
166
167
  inset-0 w-screen h-[100svh] rounded-none
167
168
  md:inset-auto md:bottom-[calc(80px+1rem)] md:right-6
168
169
  md:w-[min(100vw-1rem,400px)]
169
170
  md:h-[clamp(420px,70dvh,640px)]
170
- md:rounded-xl
171
- bg-white shadow-xl flex flex-col overflow-hidden
172
- `,children:[x.jsxs("div",{className:"pl-3 relative z-20 bg-violet-700 py-2 text-white text-left flex justify-start items-center chatsystem-header",children:[x.jsx(Gc,{className:"chatSystem-widgetLogo",logo:x.jsx(qc,{}),label:i}),x.jsx("div",{className:"absolute right-12 top-1/2 -translate-y-1/2",children:x.jsx(bd,{tone:"dark",onStartNewDiscussion:r})}),x.jsx(fS,{setIsWidgetOpen:e.setIsWidgetOpen})]}),x.jsx(cd,{appToken:e.appToken,agentId:e.agentId})]})}),pS=({isWidgetOpen:e,appToken:t,agentId:n,setIsWidgetOpen:r})=>{const i=C.useRef(null);return C.useEffect(()=>{if(!e)return;const a=s=>{const o=i.current;if(!o)return;const u=typeof s.composedPath=="function"?s.composedPath():[];if(u.length>0){if(u.includes(o))return}else{const c=s.target;if(c&&o.contains(c))return}r(!1)};return document.addEventListener("pointerdown",a,!0),()=>{document.removeEventListener("pointerdown",a,!0)}},[e,r]),x.jsx("div",{children:x.jsx(as,{nodeRef:i,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:x.jsx(hS,{ref:i,props:{appToken:t,agentId:n,setIsWidgetOpen:r}})})})},mS=()=>{const{resetConversation:e}=ns();return x.jsx("div",{className:"relative z-20 flex justify-end px-2 pt-2",children:x.jsx(bd,{tone:"light",onStartNewDiscussion:e})})},Ed=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),gS=()=>{const[e,t]=C.useState(Ed());return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:()=>{t(i=>({...i,hasFetchedSettings:!0}))},setHasDisplayedCss:()=>{t(i=>({...i,hasDisplayedCSS:!0}))}}},Td=C.createContext({appInternalContext:Ed(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}}),bS=({displayMode:e,appToken:t,agentId:n})=>{const[r,i]=C.useState(!1),{appInternalContext:a}=C.useContext(Td);return x.jsxs(x.Fragment,{children:[e===_n.LAUNCHER&&a.hasFetchedSettings&&x.jsxs(x.Fragment,{children:[x.jsx(bf,{isWidgetOpen:r,setIsWidgetOpen:i}),x.jsx(pS,{isWidgetOpen:r,appToken:t,agentId:n,setIsWidgetOpen:i})]}),e===_n.CHATBOX&&a.hasFetchedSettings&&x.jsxs("div",{className:"chatBox w-full max-w-[1200px] mx-auto",children:[x.jsx(mS,{}),x.jsx(cd,{appToken:t,agentId:n})]})]})},ES=e=>Object.values(_n).includes(e),TS=e=>{const t=Ct();return ES(e)?e:(t.warn(`Display mode not valid. Using ${_n.LAUNCHER} as default.`),_n.LAUNCHER)},yS=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem(Mx)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},xS=(e,t)=>{const[n,r]=C.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[lt.ENGLISH])};return C.useEffect(()=>{const a=yS(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},_S=e=>Object.values(lt).includes(e),SS=(e,t)=>{const n=t??Ct();return _S(e)?e:(n.warn(`Language ${e} not handled for now. Using ${lt.ENGLISH}.`),lt.ENGLISH)};function CS(e,t=Date.now()){return t-e}function AS(e,t=Date.now()){return CS(new Date(e).getTime(),t)<=a_}function wS({settings:e,setCurrentConversation:t,setArchivedConversation:n}){const r=nd({key:ei});if(!r){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]});return}AS(r.updatedAt)?t({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}):(t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]}),n({discussionId:r.discussionId,items:r.items,updatedAt:r.updatedAt}))}const IS=({agentId:e,appToken:t,onFetched:n})=>{const r=Sn(),i=Kr(),[a,s]=C.useState({}),o={companySettings:a,setCompanySettings:s},[u,c]=C.useState({discussionId:null,items:[],updatedAt:null}),[d,f]=C.useState({discussionId:null,items:[],updatedAt:null}),[p,h]=C.useState(()=>h_()),[b,y]=C.useState(0),S={currentConversation:u,setCurrentConversation:c,archivedConversation:d,setArchivedConversation:f,chatboxBootState:p,setChatboxBootState:h,resetConversationRequestId:b,resetConversation:()=>{f_(),h({mode:_t.ai,customerSupportState:null,reason:"manual_start_new_conversation"}),c({discussionId:null,items:[{userType:"assistant",content:a?.agent?.text?.initialText,temporaryId:crypto.randomUUID()}],updatedAt:null}),y(v=>v+1)}};return C.useEffect(()=>{const v=i,k=tn.getFetchConfig({httpVerb:"GET",contentType:"application/json"});let L=`${v}/company/settings/${t}`;L+=`/${e}`,fetch(L,{...k,credentials:"omit"}).then(async A=>{const N=await A.json();s(N),wS({settings:N,setCurrentConversation:c,setArchivedConversation:f}),n?.()}).catch(A=>{r.warn("error in settings fetch",A)})},[t,e,i,r]),{contextCompanySettings:o,contextInitialConversationState:S}};function vS(e,t={},n,r){const i=Sn(),{id:a,nonce:s,target:o,disableConstructable:u}=t,c=o,d=C.useRef(null),f=C.useRef(null);C.useEffect(()=>{if(!o)return;if(!e){n&&(i.log("No custom css found."),r?.());return}if(!u&&"adoptedStyleSheets"in c&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return d.current||(d.current=new CSSStyleSheet,c.adoptedStyleSheets=[...c.adoptedStyleSheets,d.current]),d.current.replaceSync(e),i.log("Loading custom css via stylesheet."),r?.(),()=>{const h=c.adoptedStyleSheets||[],b=h.indexOf(d.current);if(b>=0){const y=h.slice();y.splice(b,1),c.adoptedStyleSheets=y}d.current=null};if(!f.current){const h=document.createElement("style");h.type="text/css",a&&(h.id=a),s&&(h.nonce=s),(c instanceof Document&&c.head||c).appendChild(h),f.current=h}return f.current.textContent=e,i.log("Loading custom css via style tag."),r?.(),()=>{f.current?.parentNode?.removeChild(f.current),f.current=null}},[e,a,s,o,u,i])}function kS(e,t){const{manifest:n,origins:r}=NS(e,t);r.forEach(sf),uf(n),af(n)}function NS(e,t){const n=t??Ct(),r=RS(e),i=new Set,a=new Set,s=new Set,o=new Set;for(const{url:d,mode:f}of r)switch(OS(f,d,n)){case"svg":a.add(d);break;case"lottie":s.add(d);break;case"spritesheet":o.add(d);break;case"image":i.add(d);break}const u={images:Array.from(i),svgs:Array.from(a),lotties:Array.from(s),sprites:Array.from(o)},c=LS(u,n);return{manifest:u,origins:c}}function RS(e){if(!e?.agent?.display)return[];const t=e.agent.display,n=[t.launcher,t.assistant,t.search].filter(Boolean),r=[];for(const i of n)i?.assetUrl&&r.push({url:i.assetUrl,mode:i.mode});return r}function OS(e,t,n){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 i=new URL(t,document.baseURI).pathname.toLowerCase();if(i.endsWith(".svg"))return"svg";if(i.endsWith(".lottie")||i.endsWith(".zip")||i.endsWith(".json"))return i.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(i))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(i))return"video"}catch(r){n.warn("error in normalizeKind:",r)}return"unknown"}function LS(e,t){const n=new Set,r=i=>{if(i)try{const a=new URL(i,document.baseURI);n.add(`${a.protocol}//${a.host}`)}catch(a){t.warn("error in uniqueOriginsFromManifest",a)}};return(e.images??[]).forEach(r),(e.svgs??[]).forEach(r),(e.lotties??[]).forEach(r),(e.sprites??[]).forEach(r),Array.from(n)}const DS=({children:e,appToken:t,agentId:n,appRoot:r,logger:i,identityProvider:a})=>{const s=navigator.language;i.log("Brower language",s);const o=SS(s,i),{appCurrentLang:u,handleSetContextCurrentLang:c}=xS(Zr,o),d={appCurrentLang:u,setAppCurrentLang:c},f=gS(),{contextCompanySettings:p,contextInitialConversationState:h}=IS({agentId:n,appToken:t,onFetched:f.setHasFetchedSettings});return kS(p.companySettings,i),vS(p.companySettings?.agent?.display?.CSSRules,{id:`${n}`,target:r},f.appInternalContext.hasFetchedSettings,f.setHasDisplayedCss),x.jsx(x.Fragment,{children:x.jsx(ud.Provider,{value:a,children:x.jsx(Su.Provider,{value:i,children:x.jsx(jh,{locale:u?.locale,messages:u?.translatedText,children:x.jsx(td.Provider,{value:d,children:x.jsx(Td.Provider,{value:f,children:x.jsx(rn.Provider,{value:p,children:x.jsx(od.Provider,{value:h,children:f.appInternalContext.hasDisplayedCSS&&e})})})})})})})})};var _n=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(_n||{});function PS({appToken:e,displayMode:t="launcher",agentId:n,appRoot:r,identityProvider:i,apiUrl:a}){const s=Sn();e||s.warn("appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC");const o=TS(t);return s.log(`App boot in ${o} mode.`),x.jsx(Ty,{apiUrl:a,children:x.jsx("div",{className:"chatSystemWidget app-root",id:"chatSystemWidget",children:x.jsx(DS,{appToken:e,agentId:n,appRoot:r,logger:s,identityProvider:i,children:x.jsx(bS,{displayMode:o,appToken:e,agentId:n})})})})}const MS=`*, ::before, ::after {
171
+ flex flex-col
172
+ `,children:[y.jsxs("div",{className:"chatBox h-full w-full rounded-none bg-white shadow-xl flex flex-col overflow-hidden md:rounded-xl",children:[y.jsxs("div",{className:"chatsystem-header chatsystem-primary-background relative z-20 flex items-center justify-start py-2 pl-3 text-left text-white",children:[y.jsx(Xc,{className:"chatSystem-widgetLogo",logo:y.jsx(Qc,{}),label:i}),y.jsx("div",{className:"absolute right-12 top-1/2 -translate-y-1/2",children:y.jsx(_d,{tone:"dark",onStartNewDiscussion:r})}),y.jsx(SS,{setIsWidgetOpen:e.setIsWidgetOpen})]}),y.jsx(md,{appToken:e.appToken,agentId:e.agentId}),y.jsx(_a,{className:"chatsystem-powered-by-mobile"})]}),y.jsx(_a,{placement:"widget-badge",className:"chatsystem-powered-by-widget-badge"})]})}),AS=({isWidgetOpen:e,appToken:t,agentId:n,setIsWidgetOpen:r})=>{const i=S.useRef(null);return S.useEffect(()=>{if(!e)return;const a=s=>{const o=i.current;if(!o)return;const u=typeof s.composedPath=="function"?s.composedPath():[];if(u.length>0){if(u.includes(o))return}else{const c=s.target;if(c&&o.contains(c))return}r(!1)};return document.addEventListener("pointerdown",a,!0),()=>{document.removeEventListener("pointerdown",a,!0)}},[e,r]),y.jsx("div",{children:y.jsx(os,{nodeRef:i,in:e,timeout:200,classNames:"menuTransition",unmountOnExit:!0,children:y.jsx(CS,{ref:i,props:{appToken:t,agentId:n,setIsWidgetOpen:r}})})})},wS=()=>{const{resetConversation:e}=is();return y.jsx("div",{className:"relative z-20 flex justify-end px-2 pt-2",children:y.jsx(_d,{tone:"light",onStartNewDiscussion:e})})},Sd=()=>({hasFetchedSettings:!1,hasDisplayedCSS:!1}),IS=()=>{const[e,t]=S.useState(Sd()),n=S.useCallback(()=>{t(i=>({...i,hasFetchedSettings:!0}))},[]),r=S.useCallback(()=>{t(i=>({...i,hasDisplayedCSS:!0}))},[]);return{appInternalContext:e,setAppInternalContext:t,setHasFetchedSettings:n,setHasDisplayedCss:r}},Cd=S.createContext({appInternalContext:Sd(),setAppInternalContext:()=>{},setHasFetchedSettings:()=>{}}),vS=({displayMode:e,appToken:t,agentId:n})=>{const[r,i]=S.useState(!1),{appInternalContext:a}=S.useContext(Cd);return y.jsxs(y.Fragment,{children:[e===Sn.LAUNCHER&&a.hasFetchedSettings&&y.jsxs(y.Fragment,{children:[y.jsx(Cf,{isWidgetOpen:r,setIsWidgetOpen:i}),y.jsx(AS,{isWidgetOpen:r,appToken:t,agentId:n,setIsWidgetOpen:i})]}),e===Sn.CHATBOX&&a.hasFetchedSettings&&y.jsxs("div",{className:"chatBox w-full max-w-[1200px] mx-auto",children:[y.jsx(wS,{}),y.jsx(md,{appToken:t,agentId:n}),y.jsx(_a,{className:"chatsystem-powered-by-inline"})]})]})},kS=e=>Object.values(Sn).includes(e),NS=e=>{const t=wt();return kS(e)?e:(t.warn(`Display mode not valid. Using ${Sn.LAUNCHER} as default.`),Sn.LAUNCHER)},RS=(e,t)=>{let n,r;return typeof window<"u"&&(r=window.localStorage.getItem($x)),r&&e?.[r]!==void 0?n=e[r]:(n=e[t],n.isDefault=!0),n},OS=(e,t)=>{const[n,r]=S.useState(e[t]),i=a=>{Object.keys(e).includes(a?.locale)?r(a):r(e[ft.ENGLISH])};return S.useEffect(()=>{const a=RS(e,t);a.locale!==t&&r(e[a.locale])},[]),{appCurrentLang:n,handleSetContextCurrentLang:i}},LS=e=>Object.values(ft).includes(e),DS=(e,t)=>{const n=t??wt();return LS(e)?e:(n.warn(`Language ${e} not handled for now. Using ${ft.ENGLISH}.`),ft.ENGLISH)};function PS(e,t=Date.now()){return t-e}function MS(e,t=Date.now()){return PS(new Date(e).getTime(),t)<=f_}function BS({settings:e,setCurrentConversation:t,setArchivedConversation:n,restoreStoredConversation:r=!0}){const i=r?sd({key:ti}):null;if(!i){t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]});return}MS(i.updatedAt)?t({discussionId:i.discussionId,items:i.items,updatedAt:i.updatedAt}):(t({discussionId:null,items:[{userType:"assistant",content:e.agent.text.initialText,temporaryId:crypto.randomUUID()}]}),n({discussionId:i.discussionId,items:i.items,updatedAt:i.updatedAt}))}const FS=async e=>{const t={apiUrl:e.apiUrl,appToken:e.appToken,agentId:e.agentId};return e.runtimeAdapter?e.runtimeAdapter.loadCompanySettings(t):e.loadStandardSettings(t)},HS=async e=>{const t=rn.getFetchConfig({httpVerb:"GET",contentType:"application/json"}),n=`${e.apiUrl}/company/settings/${e.appToken}/${e.agentId}`;return await(await fetch(n,{...t,credentials:"omit"})).json()},US=({agentId:e,appToken:t,onFetched:n,runtimeAdapter:r})=>{const i=Cn(),a=Jr(),[s,o]=S.useState({}),u={companySettings:s,setCompanySettings:o},[c,d]=S.useState({discussionId:null,items:[],updatedAt:null}),[f,p]=S.useState({discussionId:null,items:[],updatedAt:null}),[h,b]=S.useState(()=>r?{mode:bt.ai,customerSupportState:null,reason:"runtime_adapter_uses_fresh_conversation"}:y_()),[x,w]=S.useState(0),k={currentConversation:c,setCurrentConversation:d,archivedConversation:f,setArchivedConversation:p,chatboxBootState:h,setChatboxBootState:b,resetConversationRequestId:x,resetConversation:()=>{r||T_(),b({mode:bt.ai,customerSupportState:null,reason:"manual_start_new_conversation"}),d({discussionId:null,items:[{userType:"assistant",content:s?.agent?.text?.initialText,temporaryId:crypto.randomUUID()}],updatedAt:null}),w(I=>I+1)}};return S.useEffect(()=>{FS({apiUrl:a,appToken:t,agentId:e,runtimeAdapter:r,loadStandardSettings:HS}).then(I=>{o(I),BS({settings:I,setCurrentConversation:d,setArchivedConversation:p,restoreStoredConversation:!r}),n?.()}).catch(I=>{i.warn("error in settings fetch",I)})},[t,e,a,i,n,r]),{contextCompanySettings:u,contextInitialConversationState:k}};function jS(e,t={},n,r){const i=Cn(),{id:a,nonce:s,target:o,disableConstructable:u}=t,c=o,d=S.useRef(null),f=S.useRef(null);S.useEffect(()=>{if(!o)return;if(!e){n&&(i.log("No custom css found."),r?.());return}if(!u&&"adoptedStyleSheets"in c&&typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)return d.current||(d.current=new CSSStyleSheet,c.adoptedStyleSheets=[...c.adoptedStyleSheets,d.current]),d.current.replaceSync(e),i.log("Loading custom css via stylesheet."),r?.(),()=>{const h=c.adoptedStyleSheets||[],b=h.indexOf(d.current);if(b>=0){const x=h.slice();x.splice(b,1),c.adoptedStyleSheets=x}d.current=null};if(!f.current){const h=document.createElement("style");h.type="text/css",a&&(h.id=a),s&&(h.nonce=s),(c instanceof Document&&c.head||c).appendChild(h),f.current=h}return f.current.textContent=e,i.log("Loading custom css via style tag."),r?.(),()=>{f.current?.parentNode?.removeChild(f.current),f.current=null}},[e,a,s,o,u,i])}function zS(e,t){const{manifest:n,origins:r}=$S(e,t);r.forEach(hf),mf(n),ff(n)}function $S(e,t){const n=t??wt(),r=YS(e),i=new Set,a=new Set,s=new Set,o=new Set;for(const{url:d,mode:f}of r)switch(GS(f,d,n)){case"svg":a.add(d);break;case"lottie":s.add(d);break;case"spritesheet":o.add(d);break;case"image":i.add(d);break}const u={images:Array.from(i),svgs:Array.from(a),lotties:Array.from(s),sprites:Array.from(o)},c=qS(u,n);return{manifest:u,origins:c}}function YS(e){if(!e?.agent?.display)return[];const t=e.agent.display,n=[t.launcher,t.assistant,t.search].filter(Boolean),r=[];for(const i of n)i?.assetUrl&&r.push({url:i.assetUrl,mode:i.mode});return r}function GS(e,t,n){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 i=new URL(t,document.baseURI).pathname.toLowerCase();if(i.endsWith(".svg"))return"svg";if(i.endsWith(".lottie")||i.endsWith(".zip")||i.endsWith(".json"))return i.endsWith(".json"),"lottie";if(/\.(png|webp|jpg|jpeg|gif|avi,ef)$/.test(i))return"image";if(/\.(mp4|webm|mov|m4v|ogg)$/.test(i))return"video"}catch(r){n.warn("error in normalizeKind:",r)}return"unknown"}function qS(e,t){const n=new Set,r=i=>{if(i)try{const a=new URL(i,document.baseURI);n.add(`${a.protocol}//${a.host}`)}catch(a){t.warn("error in uniqueOriginsFromManifest",a)}};return(e.images??[]).forEach(r),(e.svgs??[]).forEach(r),(e.lotties??[]).forEach(r),(e.sprites??[]).forEach(r),Array.from(n)}const VS=({children:e,appToken:t,agentId:n,appRoot:r,logger:i,identityProvider:a,runtimeAdapter:s})=>{const o=navigator.language;i.log("Brower language",o);const u=DS(o,i),{appCurrentLang:c,handleSetContextCurrentLang:d}=OS(ei,u),f={appCurrentLang:c,setAppCurrentLang:d},p=IS(),{contextCompanySettings:h,contextInitialConversationState:b}=US({agentId:n,appToken:t,onFetched:p.setHasFetchedSettings,runtimeAdapter:s});return zS(h.companySettings,i),jS(h.companySettings?.agent?.display?.CSSRules,{id:`${n}`,target:r},p.appInternalContext.hasFetchedSettings,p.setHasDisplayedCss),y.jsx(pd.Provider,{value:s,children:y.jsx(fd.Provider,{value:a,children:y.jsx(Iu.Provider,{value:i,children:y.jsx(Wh,{locale:c?.locale,messages:c?.translatedText,children:y.jsx(ad.Provider,{value:f,children:y.jsx(Cd.Provider,{value:p,children:y.jsx(Yt.Provider,{value:h,children:y.jsx(dd.Provider,{value:b,children:p.appInternalContext.hasDisplayedCSS&&e})})})})})})})})};var Sn=(e=>(e.LAUNCHER="launcher",e.CHATBOX="chatbox",e))(Sn||{});function WS({appToken:e,displayMode:t="launcher",agentId:n,appRoot:r,identityProvider:i,apiUrl:a,runtimeAdapter:s}){const o=Cn();e||o.warn("appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC");const u=NS(t);return o.log(`App boot in ${u} mode.`),y.jsx(wy,{apiUrl:a,children:y.jsx("div",{className:"chatSystemWidget app-root",id:"chatSystemWidget",children:y.jsx(VS,{appToken:e,agentId:n,appRoot:r,logger:o,identityProvider:i,runtimeAdapter:s,children:y.jsx(vS,{displayMode:u,appToken:e,agentId:n})})})})}const XS=`*, ::before, ::after {
173
173
  --tw-border-spacing-x: 0;
174
174
  --tw-border-spacing-y: 0;
175
175
  --tw-translate-x: 0;
@@ -2071,51 +2071,109 @@ video {
2071
2071
  padding-right: 6rem;
2072
2072
  }
2073
2073
  }
2074
- `,BS=`
2074
+ `,QS=`.chatSystemWidget {
2075
+ --chatsystem-primary-color: #7c3aed;
2076
+ --chatsystem-primary-color-hover: color-mix(
2077
+ in srgb,
2078
+ var(--chatsystem-primary-color) 84%,
2079
+ black
2080
+ );
2081
+ }
2082
+
2083
+ .chatsystem-primary-background,
2084
+ .chatsystem-primary-background:enabled {
2085
+ background-color: var(--chatsystem-primary-color);
2086
+ }
2087
+
2088
+ .chatsystem-primary-background:enabled:hover {
2089
+ background-color: var(--chatsystem-primary-color-hover);
2090
+ }
2091
+
2075
2092
  .chatBox {
2076
2093
  overflow-x: hidden; /* Hide horizontal scrollbar */
2077
2094
  overflow-wrap: anywhere;
2078
2095
  word-break: break-word;
2079
2096
  }
2080
2097
 
2081
- .chatBox ol > li {
2082
- margin-top: 10px;
2083
- background-color: rgba(0, 0, 0, 0.1);
2084
- padding: 0.5rem 1rem 1rem;
2085
- border-radius: 0.5rem;
2098
+ /*
2099
+ * Tailwind Preflight removes native list markers. Restore editorial Markdown
2100
+ * semantics only inside the public chat surface so navigation and controls are
2101
+ * unaffected.
2102
+ *
2103
+ * Cross-repository parity contract: when supported Markdown or its visual
2104
+ * semantics change, update
2105
+ * \`aibot/app/components/MarkdownContent/MarkdownContent.tsx\` and its
2106
+ * \`.markdown-content\` rules in \`aibot/app/styles/input.css\` in the same change.
2107
+ */
2108
+ .chatBox .chatsystem-markdown ul,
2109
+ .chatBox .chatsystem-markdown ol {
2110
+ margin: 0.5rem 0;
2111
+ padding-left: 1.5rem;
2086
2112
  }
2087
2113
 
2088
- .chatBox ol > li > p:first-child,
2089
- .chatBox ol > li > li:first-child,
2090
- .chatBox h3,
2091
- .chatBox h2 {
2092
- font-size: 1.5rem;
2093
- margin: 1rem 0
2114
+ .chatBox .chatsystem-markdown ul {
2115
+ list-style-type: disc;
2116
+ }
2094
2117
 
2118
+ .chatBox .chatsystem-markdown ul ul {
2119
+ list-style-type: circle;
2095
2120
  }
2096
2121
 
2097
- .chatBox a {
2098
- display: block;;
2099
- cursor: pointer;
2100
- color: blue;
2101
- font-size: 1.2rem;
2102
- margin: 1rem 0
2122
+ .chatBox .chatsystem-markdown ol {
2123
+ list-style-type: decimal;
2124
+ }
2125
+
2126
+ .chatBox .chatsystem-markdown ol ol {
2127
+ list-style-type: lower-alpha;
2128
+ }
2129
+
2130
+ .chatBox .chatsystem-markdown li {
2131
+ margin: 0.25rem 0;
2132
+ }
2133
+
2134
+ .chatBox .chatsystem-markdown p {
2135
+ margin: 0.45rem 0;
2136
+ }
2137
+
2138
+ .chatBox .chatsystem-markdown > :first-child {
2139
+ margin-top: 0;
2140
+ }
2141
+
2142
+ .chatBox .chatsystem-markdown > :last-child {
2143
+ margin-bottom: 0;
2144
+ }
2145
+
2146
+ .chatBox .chatsystem-markdown h2,
2147
+ .chatBox .chatsystem-markdown h3 {
2148
+ margin: 0.75rem 0 0.35rem;
2149
+ font-size: 1rem;
2150
+ font-weight: 700;
2103
2151
  }
2104
- .chatBox a:hover {
2152
+
2153
+ .chatBox .chatsystem-markdown a {
2154
+ display: inline;
2155
+ cursor: pointer;
2156
+ color: #4338ca;
2157
+ font-size: inherit;
2105
2158
  text-decoration: underline;
2159
+ text-underline-offset: 2px;
2106
2160
  }
2107
2161
 
2108
- .chatBox img {
2162
+ .chatBox .chatsystem-markdown a:hover {
2163
+ color: #312e81;
2164
+ }
2165
+
2166
+ .chatBox .chatsystem-markdown img {
2109
2167
  display: block;
2110
- margin: 2rem 0;
2168
+ margin: 0.75rem 0;
2111
2169
  max-width: 200px;
2112
2170
  }
2113
2171
 
2114
- .chatBox hr {
2172
+ .chatBox .chatsystem-markdown hr {
2115
2173
  margin: 1.5rem 0;
2116
2174
  }
2117
2175
 
2118
- .chatBox table {
2176
+ .chatBox .chatsystem-markdown table {
2119
2177
  margin: 1rem 0;
2120
2178
  }
2121
2179
 
@@ -2124,8 +2182,6 @@ video {
2124
2182
  height: 100%;
2125
2183
  }
2126
2184
 
2127
-
2128
-
2129
2185
  .customer-support-fallback {
2130
2186
  margin: 0.5rem 0 0;
2131
2187
  border: 1px solid rgba(22, 163, 74, 0.28);
@@ -2296,7 +2352,71 @@ video {
2296
2352
  width: 100%;
2297
2353
  }
2298
2354
  }
2299
- `,FS=`/* React-Css Transitions */
2355
+
2356
+ .chatsystem-powered-by-inline,
2357
+ .chatsystem-powered-by-mobile {
2358
+ display: flex;
2359
+ }
2360
+
2361
+ .chatsystem-powered-by-widget-badge {
2362
+ display: none;
2363
+ }
2364
+
2365
+ @media (min-width: 768px) {
2366
+ .chatsystem-powered-by-mobile {
2367
+ display: none;
2368
+ }
2369
+
2370
+ .chatsystem-powered-by-widget-badge {
2371
+ bottom: -28px;
2372
+ display: flex;
2373
+ left: 50%;
2374
+ position: absolute;
2375
+ transform: translateX(-50%);
2376
+ }
2377
+ }
2378
+
2379
+ /*
2380
+ * Keep this interaction visually aligned with the application preview in
2381
+ * \`aibot/app/components/ConversationStarters/ConversationStarters.tsx\`.
2382
+ */
2383
+ .conversation-starters {
2384
+ display: grid;
2385
+ gap: 0.5rem;
2386
+ margin-top: 0.5rem;
2387
+ padding: 0 0.5rem;
2388
+ }
2389
+
2390
+ .conversation-starter-button {
2391
+ width: 100%;
2392
+ border: 1px solid #e2e8f0;
2393
+ border-radius: 0.75rem;
2394
+ background: #ffffff;
2395
+ color: #334155;
2396
+ cursor: pointer;
2397
+ font: inherit;
2398
+ font-size: 0.875rem;
2399
+ font-weight: 600;
2400
+ line-height: 1.4;
2401
+ padding: 0.75rem 1rem;
2402
+ text-align: left;
2403
+ transition:
2404
+ background-color 150ms ease,
2405
+ border-color 150ms ease,
2406
+ color 150ms ease;
2407
+ }
2408
+
2409
+ .conversation-starter-button:hover {
2410
+ border-color: var(--chatsystem-primary-color);
2411
+ background: color-mix(in srgb, var(--chatsystem-primary-color) 9%, white);
2412
+ color: var(--chatsystem-primary-color-hover);
2413
+ }
2414
+
2415
+ .conversation-starter-button:focus-visible {
2416
+ outline: 2px solid var(--chatsystem-primary-color);
2417
+ outline-offset: 2px;
2418
+ }
2419
+ `,KS=`/* React-Css Transitions */
2300
2420
  .menuTransition-enter {
2301
2421
  opacity: 0;
2302
2422
  transform: scale(0.9) translateX(200px);
@@ -2342,7 +2462,7 @@ textarea::placeholder {
2342
2462
  }
2343
2463
 
2344
2464
  .launcher {
2345
- background-color: rgb(124 58 237);
2465
+ background-color: var(--chatsystem-primary-color, rgb(124 58 237));
2346
2466
  border-radius: 50%;
2347
2467
  box-shadow: 0 0px 4px 5px rgba(0,0,0,0.2);
2348
2468
  width: 3rem;
@@ -2365,7 +2485,7 @@ textarea::placeholder {
2365
2485
  .messagesContainer {
2366
2486
  outline:none
2367
2487
  }
2368
- `,HS=`/* Core mic button */
2488
+ `,JS=`/* Core mic button */
2369
2489
  .mic-core {
2370
2490
  position: absolute;
2371
2491
  inset: 0;
@@ -2413,7 +2533,7 @@ textarea::placeholder {
2413
2533
  70% { opacity: 0.12; }
2414
2534
  100% { transform: scale(2.1); opacity: 0; }
2415
2535
  }
2416
- `,US=`/* 1) Remove UA outline on the shadow host */
2536
+ `,ZS=`/* 1) Remove UA outline on the shadow host */
2417
2537
  :host(:focus),
2418
2538
  :host(:focus-visible) { outline: none; }
2419
2539
 
@@ -2425,9 +2545,9 @@ textarea::placeholder {
2425
2545
 
2426
2546
  /* Ensure the wrapper itself doesn't get a default outline either */
2427
2547
  .app-root:focus { outline: none; }
2428
- `,hu=`${MS}
2429
- ${BS}
2430
- ${FS}
2431
- ${US}
2432
- ${HS}`;function jS({cssHref:e,appToken:t,agentId:n,displayMode:r,shouldDisplayLogs:i,...a}){const s=r==="launcher"?"body":"inline",o=C.useRef(null),u=C.useRef(null),[c,d]=C.useState(null),[f,p]=C.useState(null),h=C.useMemo(()=>tf(i),[i]);return nf(h),C.useEffect(()=>{if(typeof document>"u")return;const b=s==="inline"?o.current:document.body;if(!b)return;const y=document.createElement("div");b.appendChild(y),u.current=y;const w=y.attachShadow({mode:"open",delegatesFocus:!0});p(w);let S=!1;try{if("adoptedStyleSheets"in w&&!e){const k=new CSSStyleSheet;k.replaceSync(hu),w.adoptedStyleSheets=[...w.adoptedStyleSheets??[],k],S=!0}}catch{}if(!S)if(e){const k=document.createElement("link");k.rel="stylesheet",k.href=e,w.appendChild(k)}else{const k=document.createElement("style");k.textContent=hu,w.appendChild(k)}const v=document.createElement("div");return w.appendChild(v),d(v),()=>{d(null),y.remove(),u.current=null}},[s,e]),x.jsxs(x.Fragment,{children:[s==="inline"&&x.jsx("div",{ref:o})," ",c&&Mn.createPortal(x.jsx(PS,{...a,appToken:t,agentId:n,displayMode:r,appRoot:f}),c)]})}exports.App=jS;
2548
+ `,bu=`${XS}
2549
+ ${QS}
2550
+ ${KS}
2551
+ ${ZS}
2552
+ ${JS}`;function eC({cssHref:e,appToken:t,agentId:n,displayMode:r,shouldDisplayLogs:i,...a}){const s=r==="launcher"?"body":"inline",o=S.useRef(null),u=S.useRef(null),[c,d]=S.useState(null),[f,p]=S.useState(null),h=S.useMemo(()=>uf(i),[i]);return lf(h),S.useEffect(()=>{if(typeof document>"u")return;const b=s==="inline"?o.current:document.body;if(!b)return;const x=document.createElement("div");b.appendChild(x),u.current=x;const w=x.attachShadow({mode:"open",delegatesFocus:!0});p(w);let C=!1;try{if("adoptedStyleSheets"in w&&!e){const I=new CSSStyleSheet;I.replaceSync(bu),w.adoptedStyleSheets=[...w.adoptedStyleSheets??[],I],C=!0}}catch{}if(!C)if(e){const I=document.createElement("link");I.rel="stylesheet",I.href=e,w.appendChild(I)}else{const I=document.createElement("style");I.textContent=bu,w.appendChild(I)}const k=document.createElement("div");return w.appendChild(k),d(k),()=>{d(null),x.remove(),u.current=null}},[s,e]),y.jsxs(y.Fragment,{children:[s==="inline"&&y.jsx("div",{ref:o})," ",c&&Bn.createPortal(y.jsx(WS,{...a,appToken:t,agentId:n,displayMode:r,appRoot:f}),c)]})}exports.App=eC;
2433
2553
  //# sourceMappingURL=index.cjs.map