@inkeep/agents-ui-js 0.0.0-dev-20260501195414 → 0.0.0-dev-20260501205503

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.
Files changed (2) hide show
  1. package/dist/embed.js +1 -1
  2. package/package.json +2 -2
package/dist/embed.js CHANGED
@@ -67,7 +67,7 @@ var NV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const MG={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"LuSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand",chatButtonClose:"LuChevronDown",chatHistory:"LuHistory",chatHistoryPanel:"LuPanelLeft",backToChat:"LuArrowLeft",fileUpload:"LuPaperclip",filePdf:"FaRegFilePdf",fileText:"PiFileText",fileMarkdown:"PiFileMarkdown",fileHtml:"PiFileHtml",fileCsv:"PiFileCsv",fileLog:"PiFileLog",fileJson:"PiFileJson"};function FG({iconKey:e,...t}){var n;const r=MG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=wR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return wg.jsx(DG,{"data-icon":e,iconSettings:i,...t})}const jG=he.createContext(void 0),zG=({children:e})=>{const[t,n]=he.useState(null),r=he.useCallback((e=>{n(e)}),[]),a=he.useCallback((()=>{n(null)}),[]),o=he.useMemo((()=>({imagePreview:t,openImagePreview:r,closeImagePreview:a})),[t,r,a]);return wg.jsx(jG.Provider,{value:o,children:e})},BG=()=>{const e=he.useContext(jG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},HG=he.createContext(void 0),UG=({children:e,message:t})=>wg.jsx(HG.Provider,{value:{message:t},children:e}),$G=()=>{const e=he.useContext(HG);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var VG=(e,t=[])=>({parts:(...n)=>{if(qG(t))return VG(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>VG(e,[...t,...n]),omit:(...n)=>VG(e,t.filter((e=>!n.includes(e)))),rename:e=>VG(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${GG(e)}"][data-part="${GG(n)}"]`,`& [data-scope="${GG(e)}"][data-part="${GG(n)}"]`].join(", "),attrs:{"data-scope":GG(e),"data-part":GG(n)}}})),{})}),GG=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),qG=e=>0===e.length,WG=VG("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),YG=Object.defineProperty,ZG=(e,t,n)=>((e,t,n)=>t in e?YG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),KG=e=>"object"==typeof e&&null!==e,XG=e=>e?"":void 0,QG=e=>KG(e)&&1===e.nodeType&&"string"==typeof e.nodeName,JG=e=>KG(e)&&void 0!==e.nodeType,eq=e=>JG(e)&&11===e.nodeType&&"host"in e;function tq(e,t){var n;if(!e||!t)return!1;if(!QG(e)||!JG(t))return!1;if(QG(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&eq(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nq(e){var t;return eq(e)?nq(e.host):(e=>KG(e)&&9===e.nodeType)(e)?e.defaultView??window:QG(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function rq(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}var aq=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},oq=class e{constructor(){ZG(this,"id",null),ZG(this,"fn_cleanup"),ZG(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};var iq={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},sq=e=>e.isDirectory,lq=e=>e.isFile,cq=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),uq=(e,t="")=>new Promise((n=>{const r=[],a=()=>{e.readEntries((e=>{if(0===e.length)return void n(Promise.all(r).then((e=>e.flat())));const o=e.map((e=>e?sq(e)?uq(e.createReader(),`${t}${e.name}`):lq(e)?new Promise((n=>{e.file((e=>{n(cq(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var dq=e=>function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}(e)||function(e){return/^.*\.[\w]+$/.test(e)}(e);var pq=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,fq=e=>null!=e;var hq=new Map("3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip".split("[").flatMap((e=>{const[t,n]=e.split("_");return t.split(",").map((e=>[e,n]))})));function mq(e,t){if(e&&t){const n=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];if(0===n.length)return!0;const r=e.name||"",a=(e.type||function(e){const t=e.split(".").pop();return t&&hq.get(t)||null}(r)||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):a===t}))}return!0}var gq=function(e){const t=new Map;return function(n,r){const a=n+(r?Object.entries(r).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"");if(t.has(a))return t.get(a);let o=new e(n,r);return t.set(a,o),o}}(Intl.NumberFormat);var yq=["","kilo","mega","giga","tera"],bq=["","kilo","mega","giga","tera","peta"],vq=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(0===e)return"0 B";const{unitSystem:r="decimal",precision:a=3,unit:o="byte",unitDisplay:i="short"}=n,s="binary"===r?1024:1e3,l="bit"===o?yq:bq,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const p=parseFloat(u.toPrecision(a));return function(e,t,n={}){return gq(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function kq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(kq(t)):e.concat(t)),[])}var xq=e=>String.fromCharCode(e+(e>25?39:97));var wq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=xq(t%52)+n;return xq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function Eq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var _q=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},Sq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},Tq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},Cq=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemDeleteTrigger)?void 0:r.call(n,t))??`file:${e.id}:item-delete:${t}`},Aq=e=>wq(`${e.name}-${e.size}`),Nq=e=>e.getById(Tq(e));function Iq(e){const t=rq(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function Oq(e,t,n=[],r=[]){const{prop:a,computed:o}=e,i=[],s=[],l={acceptedFiles:n,rejectedFiles:r};return t.forEach((e=>{var t;const[r,c]=function(e,t){const n="application/x-moz-file"===e.type||mq(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(fq(e.size))if(fq(t)&&fq(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(fq(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(fq(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>pq(t,e)))||i.some((t=>pq(t,e))),f=null==(t=a("validate"))?void 0:t(e,l),h=!f||0===f.length;if(r&&u&&h&&!p)i.push(e);else{const t=[c,d];p&&t.push("FILE_EXISTS"),h||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}})),function(e,t,n){const{prop:r,computed:a}=e;return!(!a("multiple")&&t>1||(a("multiple")||t+n.length!==2)&&t+n.length>r("maxFiles"))}(e,i.length,n)||(i.forEach((e=>{s.push({file:e,errors:["TOO_MANY_FILES"]})})),i.splice(0)),{acceptedFiles:i,rejectedFiles:s}}var Rq="accepted";function Pq(e,t){if(!e||"file"===e.getAttribute("type"))return!1;const n=e.closest("button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]");return n!=t&&tq(t,n)}function Lq(e,t){const{state:n,send:r,prop:a,computed:o,scope:i,context:s}=e,l=!!a("disabled"),c=!!a("readOnly"),u=!!a("required"),d=a("allowDrop"),p=a("translations"),f=n.matches("dragging"),h=n.matches("focused")&&!l,m=s.get("acceptedFiles"),g=a("maxFiles");return{dragging:f,focused:h,disabled:l,readOnly:c,transforming:s.get("transforming"),maxFilesReached:m.length>=g,remainingFiles:Math.max(0,g-m.length),openFilePicker(){l||c||r({type:"OPEN"})},deleteFile(e,t=Rq){l||c||r({type:"FILE.DELETE",file:e,itemType:t})},acceptedFiles:m,rejectedFiles:s.get("rejectedFiles"),setFiles(e){l||c||r({type:"FILES.SET",files:e,count:e.length})},clearRejectedFiles(){l||c||r({type:"REJECTED_FILES.CLEAR"})},clearFiles(){l||c||r({type:"FILES.CLEAR"})},getFileSize:e=>vq(e.size,a("locale")),createFileUrl(e,t){const n=i.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(l||c)return!1;const t=Array.from((null==e?void 0:e.items)??[]).reduce(((e,t)=>{if("file"!==t.kind)return e;const n=t.getAsFile();return n?[...e,n]:e}),[]);return!!t.length&&(r({type:"FILE.SELECT",files:t}),!0)},getRootProps:()=>t.element({...WG.root.attrs,dir:a("dir"),id:_q(i),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f)}),getDropzoneProps:(e={})=>t.element({...WG.dropzone.attrs,dir:a("dir"),id:Sq(i),tabIndex:l||c||e.disableClick?void 0:0,role:e.disableClick?"application":"button","aria-label":p.dropzone,"aria-disabled":l||c||void 0,"data-invalid":XG(a("invalid")),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=rq(t);tq(t.currentTarget,n)&&(Pq(n,t.currentTarget)||e.disableClick||"Enter"!==t.key&&" "!==t.key||r({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(t){if(l||c)return;if(t.defaultPrevented)return;if(e.disableClick)return;const n=rq(t);tq(t.currentTarget,n)&&(Pq(n,t.currentTarget)||("label"===t.currentTarget.localName&&t.preventDefault(),r({type:"DROPZONE.CLICK"})))},onDragOver(e){if(l||c)return;if(!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch{}if(!Iq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(tq(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;Iq(e)&&(t=e.dataTransfer.items,n=a("directory"),Promise.all(Array.from(t).filter((e=>"file"===e.kind)).map((e=>{const t=(e=>"function"==typeof e.getAsEntry?e.getAsEntry():"function"==typeof e.webkitGetAsEntry?e.webkitGetAsEntry():null)(e);if(!t)return null;if(sq(t)&&n)return uq(t.createReader(),`${t.name}`);if(lq(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?cq(t,""):null)}return lq(t)?new Promise((e=>{t.file((t=>{e(cq(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:kq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...WG.trigger.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.trigger)??`file:${e.id}:trigger`),disabled:l||c,"data-disabled":XG(l),"data-readonly":XG(c),"data-invalid":XG(a("invalid")),type:"button",onClick(e){l||c||(tq((e=>e.getById(Sq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:Tq(i),tabIndex:-1,disabled:l||c,type:"file",required:a("required"),capture:a("capture"),name:a("name"),accept:o("acceptAttr"),webkitdirectory:a("directory")?"":void 0,multiple:o("multiple")||a("maxFiles")>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=""},onInput(e){if(l||c)return;const{files:t}=e.currentTarget;r({type:"FILE.SELECT",files:t?Array.from(t):[]})},style:iq}),getItemGroupProps(e={}){const{type:n=Rq}=e;return t.element({...WG.itemGroup.attrs,dir:a("dir"),"data-disabled":XG(l),"data-type":n})},getItemProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.item.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemName.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.itemName)?void 0:u.call(c,s))??`file:${o.id}:item-name:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.itemSizeText)?void 0:u.call(c,s))??`file:${o.id}:item-size:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemPreview.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.itemPreview)?void 0:u.call(c,s))??`file:${o.id}:item-preview:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=Rq}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...WG.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":XG(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=Rq}=e;return t.button({...WG.itemDeleteTrigger.attrs,dir:a("dir"),id:Cq(i,Aq(o)),type:"button",disabled:l||c,"data-disabled":XG(l),"data-readonly":XG(c),"data-type":s,"aria-label":null==(n=p.deleteFile)?void 0:n.call(p,o),onClick(){l||c||r({type:"FILE.DELETE",file:o,itemType:s})}})},getLabelProps(){return t.label({...WG.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:Tq(i),"data-disabled":XG(l),"data-required":XG(u)});var e,n},getClearTriggerProps:()=>t.button({...WG.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":XG(l),"data-readonly":XG(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var Dq=new WeakMap,Mq=new WeakMap;function Fq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Eq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){!function(e,t){if(null==e)throw new Error(t())}(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||Eq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=(l=t,(s=e)?`${s}.${l}`:l);r(a,n)}var s,l}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}var jq,zq=(jq={props:({props:e})=>({minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:n})=>({acceptedFiles:t((()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>pq(e,t[n]))),hash:e=>e.map((e=>`${e.name}-${e.size}`)).join(","),onChange(t){var r,a;const o=n();null==(r=e("onFileAccept"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:t,rejectedFiles:o.get("rejectedFiles")})}}))),rejectedFiles:t((()=>({defaultValue:[],isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>pq(e.file,t[n].file))),onChange(t){var r,a;const o=n();null==(r=e("onFileReject"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:o.get("acceptedFiles"),rejectedFiles:t})}}))),transforming:t((()=>({defaultValue:!1})))}),computed:{acceptAttr:({prop:e})=>function(e){if(null!=e)return"string"==typeof e?e:Array.isArray(e)?e.filter(dq).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(dq).join(",")}(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],(()=>{n(["syncInputElement"])}))},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop"))return;if(!e("allowDrop"))return;if(e("disabled"))return;const n=t.getDoc();return((...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))})(aq(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),aq(n,"drop",(e=>{var n;tq((n=t).getById(_q(n)),rq(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=Nq(e);if(!n)return;!function(e,t){const n=nq(e);try{if("DataTransfer"in n){const r=new n.DataTransfer;t.forEach((e=>{r.items.add(e)})),e.files=r.files}}catch{}}(n,t.get("acceptedFiles"));const r=e.getWin();n.dispatchEvent(new r.Event("change",{bubbles:!0}))}))},openFilePicker({scope:e}){!function(e){const t=oq.create();t.request(e),t.cleanup}((()=>{var t;null==(t=Nq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=Oq(e,r.files);n.set("acceptedFiles",t("multiple")?a:a.length>0?[a[0]]:[]),n.set("rejectedFiles",o)},setEventFiles(e){const{computed:t,context:n,event:r,prop:a}=e,o=n.get("acceptedFiles"),i=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=Oq(e,r.files,o,i),c=e=>t("multiple")?(n.set("acceptedFiles",(t=>[...t,...e])),void n.set("rejectedFiles",l)):e.length?(n.set("acceptedFiles",[e[0]]),void n.set("rejectedFiles",l)):void(l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))),u=a("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch((e=>{!function(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}(`[zag-js/file-upload] error transforming files\n${e}`)})).finally((()=>{n.set("transforming",!1)}))):c(s)},removeFile({context:e,event:t}){if("rejected"===t.itemType){const n=e.get("rejectedFiles").filter((e=>!pq(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!pq(e,t.file)));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}},function(e){const t=Dq.get(e);if(t)return t;const{index:n,idIndex:r}=Fq(e);Dq.set(e,n),Mq.set(e,r)}(jq),jq);var Bq=(e,...t)=>e.filter((e=>!t.includes(e))),Hq=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Bq(e,t):((e,...t)=>e.concat(t))(e,t),Uq=e=>"Array"===(null==e?void 0:e.constructor.name),$q=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof(null==e?void 0:e.isEqual)&&"function"==typeof(null==t?void 0:t.isEqual))return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(Uq(e)&&Uq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!$q(e[n],t[n]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let a=0;a<r;a++){if(!Reflect.has(e,n[a]))return!1}for(let a=0;a<r;a++){const r=n[a];if(!$q(e[r],t[r]))return!1}return!0},Vq=e=>null!=e&&"object"==typeof e,Gq=e=>Vq(e)&&!(e=>Array.isArray(e))(e),qq=e=>"function"==typeof e,Wq=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Yq=Function.prototype.toString,Zq=Yq.call(Object),Kq=e=>{if(!Vq(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||Xq(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Wq(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Yq.call(n)==Zq},Xq=e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e),Qq=e=>e(),Jq=()=>{},eW=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function tW(e,t,...n){var r;if(e in t){const r=t[e];return qq(r)?r(...n):r}const a=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw null==(r=Error.captureStackTrace)||r.call(Error,a,tW),a}function nW(e){if(!Kq(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const r of t){const t=e[r];void 0!==t&&(n[r]=nW(t))}return n}function rW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function aW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function oW(e,t){if(null==e)throw new Error(t())}var iW=".",sW=new WeakMap,lW=new WeakMap;function cW(e){return e.join(iW)}function uW(e){return e.startsWith("#")}function dW(e,t){return e?`${e}${iW}${t}`:t}function pW(e){const t=sW.get(e);if(t)return t;const{index:n,idIndex:r}=function(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&aW(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){oW(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||aW(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=dW(e,t);r(a,n)}}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}(e);return sW.set(e,n),lW.set(e,r),n}function fW(e){return e?String(e).split(iW).filter(Boolean):[]}function hW(e,t){if(!t)return[];const n=pW(e),r=fW(t),a=[],o=[];for(const i of r){o.push(i);const e=cW(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function mW(e,t){const n=pW(e),r=fW(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=cW(a);if(!n.has(e))return t}let o=cW(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${iW}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function gW(e,t){return pW(e).has(t)}function yW(e,t,n){const r=String(t);if(uW(r)){const t=function(e){return uW(e)?e.slice(1):e}(r),n=function(e,t){var n;return pW(e),null==(n=lW.get(e))?void 0:n.get(t)}(e,t);return oW(n,(()=>`[zag-js] Unknown state id: "${t}"`)),mW(e,n)}if(function(e){return e.startsWith(iW)}(r)&&n){return mW(e,dW(n,r.slice(1)))}if(!function(e){return e.includes(iW)}(r)&&n){const t=fW(n);for(let n=t.length-1;n>=1;n--){const a=dW(t.slice(0,n).join(iW),r);if(gW(e,a))return mW(e,a)}if(gW(e,r))return mW(e,r)}return mW(e,r)}function bW(e){return pW(e),e}var vW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(vW||{}),kW="__init__",xW=Object.defineProperty,wW=(e,t,n)=>((e,t,n)=>t in e?xW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function EW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var _W=()=>{},SW=e=>"object"==typeof e&&null!==e,TW=e=>e?"":void 0,CW=e=>e?"true":void 0,AW=e=>SW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,NW=e=>SW(e)&&9===e.nodeType,IW=e=>AW(e)?e.localName||"":"#document";var OW=e=>SW(e)&&void 0!==e.nodeType,RW=e=>OW(e)&&11===e.nodeType&&"host"in e,PW=e=>AW(e)&&"input"===e.localName;function LW(e){if(!e)return!1;return zW(e.getRootNode())===e}var DW=/(textarea|select)/;function MW(e,t){var n;if(!e||!t)return!1;if(!AW(e)||!OW(t))return!1;if(AW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&RW(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function FW(e){return NW(e)?e:(e=>SW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function jW(e){var t;return RW(e)?jW(e.host):NW(e)?e.defaultView??window:AW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function zW(e){let t=e.activeElement;for(;null==t?void 0:t.shadowRoot;){const e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function BW(e){if("html"===IW(e))return e;const t=e.assignedSlot||e.parentNode||RW(e)&&e.host||FW(e).documentElement;return RW(t)?t.host:t}function HW(e){let t;try{if(t=e.getRootNode({composed:!0}),NW(t)||RW(t))return t}catch{}return e.ownerDocument??document}var UW=new WeakMap;function $W(e){return UW.has(e)||UW.set(e,jW(e).getComputedStyle(e)),UW.get(e)}var VW=new Set(["menu","listbox","dialog","grid","tree","region"]),GW=e=>VW.has(e),qW=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function WW(e,t){const n=new Set,r=HW(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=qW(i);for(const o of e){if(!o||n.has(o))continue;n.add(o);const e=r.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");if(n&&GW(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function YW(e){const t=new Set;return function(e,t){const n=HW(e),r=new Set,a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=qW(i);for(const o of e){if(!o||r.has(o))continue;r.add(o);const e=n.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");n&&VW.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function ZW(e){if(!e.id)return!1;const t=HW(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`,a=t.querySelector(r);return Boolean(a&&function(e){const t=e.getAttribute("role");return Boolean(t&&VW.has(t))}(e))}var KW=()=>"undefined"!=typeof document;var XW=e=>KW()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),QW=e=>KW()&&e.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((({brand:e,version:t})=>`${e}/${t}`)).join(" "):navigator.userAgent}()),JW=()=>KW()&&!!navigator.maxTouchPoints,eY=()=>XW(/^iPhone/i)||XW(/^iPad/i)||tY()&&navigator.maxTouchPoints>1,tY=()=>XW(/^Mac/i);function nY(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}function rY(e){const t=e.currentTarget;if(!t)return!1;if(!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const n=1===e.button,r=(a=e,tY()?a.metaKey:a.ctrlKey);var a;return n||r}function aY(e){return!(""!==e.pointerType||!e.isTrusted)||(QW(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var oY=e=>0===e.button,iY=e=>2===e.button||tY()&&e.ctrlKey&&0===e.button,sY={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},lY={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function cY(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=sY[a]??a;return"rtl"===n&&"horizontal"===r&&a in lY&&(a=lY[a]),a}var uY=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},dY=e=>AW(e)&&"IFRAME"===e.tagName,pY=/^(audio|video|details)$/;function fY(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function hY(e){if(!function(e){return PW(e)&&"radio"===e.type}(e)||!e.name)return!0;if(e.checked)return!0;const t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter((t=>t.form===e.form&&vY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function mY(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;const n=t(e);return(!0===n?e.shadowRoot:n)||null}function gY(e,t,n){const r=[...e],a=[...e],o=new Set,i=new Map;e.forEach(((e,t)=>i.set(e,t)));let s=0;for(;s<a.length;){const e=a[s++];if(!e||o.has(e))continue;o.add(e);const l=mY(e,t);if(l){const t=Array.from(l.querySelectorAll(yY)).filter(n),o=i.get(e);if(void 0!==o){const e=o+1;r.splice(e,0,...t),t.forEach(((t,n)=>{i.set(t,e+n)}));for(let n=e+t.length;n<r.length;n++)i.set(r[n],n)}else{const e=r.length;r.push(...t),t.forEach(((t,n)=>{i.set(t,e+n)}))}a.push(...t)}}return r}var yY="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",bY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));(1==n||"if-empty"==n&&0===a.length)&&AW(e)&&vY(e)&&a.unshift(e);const o=[];for(const i of a)if(vY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...bY(e,{getShadowRoot:r}))}else o.push(i);return r?gY(o,r,vY):o};function vY(e){return!(!AW(e)||e.closest("[inert]"))&&(e.matches(yY)&&(!!AW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function kY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));n&&xY(e)&&a.unshift(e);const o=[];for(const i of a)if(xY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...kY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=gY(o,r,xY);return!e.length&&n?a:e}return!o.length&&n?a:o}function xY(e){return!!(AW(e)&&e.tabIndex>0)||!(!vY(e)||(e=>fY(e)<0)(e))&&hY(e)}function wY(e){return e.tabIndex<0&&(pY.test(e.localName)||function(e){if(null==e||!AW(e))return!1;try{return PW(e)&&null!=e.selectionStart||DW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(fY(t)))?0:e.tabIndex;var t}var EY=class e{constructor(){wW(this,"id",null),wW(this,"fn_cleanup"),wW(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function _Y(e){const t=EY.create();return t.request(e),t.cleanup}function SY(e){const t=new Set;function n(e){const n=globalThis.requestAnimationFrame(e);t.add((()=>globalThis.cancelAnimationFrame(n)))}return n((()=>n(e))),function(){t.forEach((e=>e()))}}function TY(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(function(e,t){if(!e)return;const{attributes:n,callback:r}=t,a=new(e.ownerDocument.defaultView||window).MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&n.includes(t.attributeName)&&r(t)}));return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function CY(e){const t=()=>{const t=jW(e);e.dispatchEvent(new t.MouseEvent("click"))};QW(/Firefox/i)?function(e,t,n){const r=_Y((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function AY(e){const t=BW(e);return["html","body","#document"].includes(IW(t))?FW(t).body:AW(t)&&OY(t)?t:AY(t)}var NY=/auto|scroll|overlay|hidden|clip/,IY=new Set(["inline","contents"]);function OY(e){const t=jW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return NY.test(n+a+r)&&!IY.has(o)}function RY(e,t){const{rootEl:n,...r}=t||{};e&&n&&OY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function PY(e,t){if(!e)return _W;const n=Object.keys(t).reduce(((t,n)=>(t[n]=e.style.getPropertyValue(n),t)),{});return r=n,a=t,Object.keys(r).every((e=>r[e]===a[e]))?_W:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function LY(e,t){const{timeout:n,rootNode:r}=t,a=jW(r),o=FW(r),i=new a.AbortController;return function(e,t,n){const{signal:r}=t;return[new Promise(((t,a)=>{const o=setTimeout((()=>{a(new Error(`Timeout of ${n}ms exceeded`))}),n);r.addEventListener("abort",(()=>{clearTimeout(o),a(new DOMException("Promise aborted","AbortError"))})),e.then((e=>{r.aborted||(clearTimeout(o),t(e))})).catch((e=>{r.aborted||(clearTimeout(o),a(e))}))})),()=>t.abort()]}(new Promise((t=>{const n=e();if(n)return void t(n);const r=new a.MutationObserver((()=>{const n=e();n&&n.isConnected&&(r.disconnect(),t(n))}));r.observe(o.body,{childList:!0,subtree:!0})})),i,n)}var DY=void 0!==globalThis.document?he.useLayoutEffect:he.useEffect;function MY(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=he.useState(t),[a,o]=he.useState(r),i=void 0!==e().value,s=he.useRef(a);s.current=i?e().value:a;const l=he.useRef(s.current);DY((()=>{l.current=s.current}),[a,e().value]);return{initial:r,ref:s,get:function(){return i?e().value:a},set(t){(e().sync?Ce.flushSync:Qq)((()=>(t=>{var r,a;const s=l.current,c=qq(t)?t(s):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:s}),i||o(c),n(c,s)||null==(a=(r=e()).onChange)||a.call(r,c,s)})(t)))},invoke(t,n){var r,a;null==(a=(r=e()).onChange)||a.call(r,t,n)},hash(t){var n,r;return(null==(r=(n=e()).hash)?void 0:r.call(n,t))??String(t)}}}MY.cleanup=e=>{he.useEffect((()=>e),[])},MY.ref=e=>{const t=he.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var FY=(e,t)=>{const n=he.useRef(!1),r=he.useRef(!1);he.useEffect((()=>{if(n.current&&r.current)return t();r.current=!0}),[...(e??[]).map((e=>"function"==typeof e?e():e))]),he.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])};function jY(e,t={}){var n,r,a,o;const i=he.useMemo((()=>{const{id:e,ids:n,getRootNode:r}=t;return function(e){const t=()=>{var t;return(null==(t=e.getRootNode)?void 0:t.call(e))??document},n=()=>FW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>zW(t()),isActiveElement:LW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=zY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:nW(t),scope:i}))??t),c=zY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:MY,scope:i,flush:BY,getContext:()=>u,getComputed:()=>E,getRefs:()=>y,getEvent:()=>m()})),u={get(e){var t;return null==(t=c.current)?void 0:t[e].ref.current},set(e,t){var n;null==(n=c.current)||n[e].set(t)},initial(e){var t;return null==(t=c.current)?void 0:t[e].initial},hash(e){var t,n;const r=null==(t=c.current)?void 0:t[e].get();return null==(n=c.current)?void 0:n[e].hash(r)}},d=he.useRef(new Map),p=he.useRef(null),f=he.useRef(null),h=he.useRef({type:""}),m=()=>({...h.current,current:()=>h.current,previous:()=>f.current}),g=()=>({..._,matches:(...e)=>e.some((e=>function(e,t){return!!e&&(e===t||e.startsWith(`${t}${iW}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return hW(e,t).some((e=>{var t;return null==(t=e.state.tags)?void 0:t.includes(n)}))}(e,_.ref.current,t)}),y=function(e){const t=he.useRef(e);return{get:e=>t.current[e],set(e,n){t.current[e]=n}}}((null==(a=e.refs)?void 0:a.call(e,{prop:l,context:u}))??{}),b=()=>({state:g(),context:u,event:m(),prop:l,send:A,action:v,guard:k,track:FY,refs:y,computed:E,flush:BY,scope:i,choose:w}),v=t=>{const n=qq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.actions)?void 0:r[t];return a||rW(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),a}));for(const e of r)null==e||e(b())},k=t=>{var n,r;return qq(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=qq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.effects)?void 0:r[t];return a||rW(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),a})),a=[];for(const e of r){const t=null==e?void 0:e(b());t&&a.push(t)}return()=>a.forEach((e=>null==e?void 0:e()))},w=e=>{return(t=e,null==t?[]:Array.isArray(t)?t:[t]).find((e=>{let t=!e.guard;return(e=>"string"==typeof e)(e.guard)?t=!!k(e.guard):qq(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{oW(e.computed,(()=>"[zag-js] No computed object found on machine"));return(0,e.computed[t])({context:u,event:m(),prop:l,refs:y,scope:i,computed:E})},_=MY((()=>({defaultValue:yW(e,e.initialState({prop:l})),onChange(t,n){var r,a;const{exiting:o,entering:i}=function(e,t,n,r){var a,o,i,s;const l=t?hW(e,t):[],c=hW(e,n);let u=0;for(;u<l.length&&u<c.length&&(null==(a=l[u])?void 0:a.path)===(null==(o=c[u])?void 0:o.path);)u+=1;let d=l.slice(u).reverse(),p=c.slice(u);const f=(null==(i=l.at(-1))?void 0:i.path)===(null==(s=c.at(-1))?void 0:s.path);return r&&f&&(d=l.slice().reverse(),p=c),{exiting:d,entering:p}}(e,n,t,null==(r=p.current)?void 0:r.reenter);if(o.forEach((e=>{const t=d.current.get(e.path);null==t||t(),d.current.delete(e.path)})),o.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.exit)})),v(null==(a=p.current)?void 0:a.actions),i.forEach((e=>{var t;const n=x(null==(t=e.state)?void 0:t.effects);n&&d.current.set(e.path,n)})),n===kW){v(e.entry);const t=x(e.effects);t&&d.current.set(kW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=he.useRef(void 0),T=he.useRef(vW.NotStarted);DY((()=>{queueMicrotask((()=>{const e=T.current===vW.Started;T.current=vW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():kW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=vW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=vW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==vW.Started)return;f.current=h.current,h.current=t;let n=C();const{transitions:r,source:a}=function(e,t,n){var r,a;const o=hW(e,t);for(let s=o.length-1;s>=0;s--){const e=null==(r=o[s])?void 0:r.state.on,t=null==e?void 0:e[n];if(t)return{transitions:t,source:null==(a=o[s])?void 0:a.path}}const i=e.on;return{transitions:null==i?void 0:i[n],source:void 0}}(e,n,t.type),o=w(r);if(!o)return;p.current=o;const i=yW(e,o.target??n,a);s("transition",t.type,o.target||n,`(${o.actions})`);i!==n?Ce.flushSync((()=>_.set(i))):o.reenter?_.invoke(n,n):v(o.actions??[])}))};return null==(o=e.watch)||o.call(e,b()),{state:g(),send:A,context:u,prop:l,scope:i,refs:y,computed:E,event:m(),getStatus:()=>T.current}}function zY(e){const t=he.useRef(e);return t.current=e,t}function BY(e){queueMicrotask((()=>{Ce.flushSync((()=>e()))}))}var HY,UY=(HY=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>HY({style:e}).style:HY}));const $Y=he.createContext(null);function VY({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=he.useId(),u=cR(),d=Lq(jY(zq,{id:c,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,getRootNode:()=>{var e;return(null==(e=null==u?void 0:u.shadowHost)?void 0:e.shadowRoot)??document},onFileAccept:i,onFileChange:s,onFileReject:l}),UY);return wg.jsx($Y.Provider,{value:d,children:e})}function GY(){const e=he.useContext($Y);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function qY(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const WY={"application/pdf":"filePdf","text/plain":"fileText","text/markdown":"fileMarkdown","text/html":"fileHtml","text/csv":"fileCsv","text/x-log":"fileLog","application/json":"fileJson"};function YY(e){return e.startsWith("image/")}const ZY={"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/webp":[".webp"],"application/pdf":[".pdf"],"text/plain":[".txt"],"text/markdown":[".md"],"text/html":[".html"],"text/csv":[".csv"],"text/x-log":[".log"],"application/json":[".json"]},KY=new Set(Object.keys(ZY)),XY=Object.values(ZY).flat().join(", "),QY=10485760,JY=Object.entries(ZY).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function eZ(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=JY[n];return r?new File([e],e.name,{type:r}):e}const tZ=vV("div",{_id:"aiChatMessage__Files"}),nZ=({children:e,...t})=>{const{message:n}=$G();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return KY.has(t??"")}));return r.length?wg.jsx(tZ,{...t,children:e(r)}):null},rZ=vV("button",{_id:"aiChatMessage__File"}),aZ=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=BG(),[i,s]=he.useState(!0),l=he.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return wg.jsx(TZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:wg.jsx(rZ,{type:"button","aria-label":YY(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":aV(i),onClick:qY(r,(()=>{if(YY(n??""))o({url:e,name:t??"file"});else if(e)if(e.startsWith("data:")){const n=document.createElement("a");n.href=e,n.download=t??"file",n.click()}else window.open(e,"_blank","noopener,noreferrer")})),...a})})},oZ=vV("div",{_id:"aiChatInput__Fieldset"}),iZ=e=>{const t=GY();return wg.jsx(oZ,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":aV(t.dragging),...e})},sZ=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=EJ();return wg.jsx(VY,{accept:ZY,maxFiles:10,maxFileSize:QY,preventDocumentDrop:!0,acceptedFiles:t,onFileAccept:e=>n(e.files),onFileReject:e=>{const t=function(e){var t;if(!e.length)return null;const n=t=>e.some((e=>e.errors.includes(t)));if(n("TOO_MANY_FILES"))return{title:"Attachment limit reached",message:"You can only attach up to 10 files per message."};if(n("FILE_INVALID_TYPE"))return{title:"Unsupported file type",message:`Only ${XY} files are supported.`};if(n("FILE_TOO_LARGE"))return{title:"File too large",message:"Files must be smaller than 10MB."};if(n("FILE_EXISTS"))return{title:"File already exists",message:`The file "${(null==(t=e.find((e=>e.errors.includes("FILE_EXISTS"))))?void 0:t.file.name)??"file"}" is already attached to this message.`};return{title:"File rejected",message:"This file could not be added."}}(e.files);t&&r(t)},children:wg.jsx(iZ,{...e})})},lZ=vV("div",{_id:"aiChatInput__DropZone"}),cZ=vV("div",{_id:"aiChatInput__Notification"}),uZ=e=>{const{inputNotification:t}=EJ();return t?wg.jsx(cZ,{role:"alert",...e}):null},dZ=vV("p",{_id:"aiChatInput__NotificationTitle"}),pZ=({children:e,...t})=>{const{inputNotification:n}=EJ();return(null==n?void 0:n.title)?wg.jsxs(dZ,{...t,children:[e,n.title]}):null},fZ=vV("p",{_id:"aiChatInput__NotificationMessage"}),hZ=e=>{const{inputNotification:t}=EJ();return wg.jsx(fZ,{...e,children:null==t?void 0:t.message})},mZ=vV("button",{_id:"aiChatInput__NotificationClose"}),gZ=({onClick:e,...t})=>{const{clearInputNotification:n}=EJ();return wg.jsx(mZ,{type:"button","aria-label":"Dismiss",onClick:qY(e,n),...t})},yZ=vV("div",{_id:"aiChatInput__NotificationContent"}),bZ=vV("div",{_id:"aiChatInput__NotificationHeader"}),vZ=vV(FG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),kZ=vV("button",{_id:"aiChatInput__FileUploadButton"}),xZ=e=>{const{aiChatSettings:t}=wR(),n=GY(),{onClick:r,...a}=e;return wg.jsx(kZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:qY(r,(()=>n.openFilePicker())),...a})},wZ=vV("input",{_id:"aiChatInput__FileInput"}),EZ=e=>{const t=GY();return wg.jsx(wZ,{...e,...t.getHiddenInputProps()})},_Z=vV("div",{_id:"aiChatInput__FileList"}),SZ=({children:e,...t})=>{const n=GY().acceptedFiles;return n.length?wg.jsx(_Z,{...t,children:e(n)}):null},TZ=me.createContext(null);function CZ(){const e=me.useContext(TZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const AZ=vV("div",{_id:"aiChatInput__FileItem"}),NZ=({file:e,...t})=>{const n=GY(),[r,a]=he.useState(void 0),[o,i]=he.useState(!0);he.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return wg.jsx(TZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:wg.jsx(AZ,{"data-loading":aV(o),...t})})},IZ=vV("button",{_id:"aiChatInput__FilePreviewTrigger"}),OZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=CZ(),{openImagePreview:a}=BG();return wg.jsx(IZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:qY(e,(()=>{n&&a({url:n,name:r.name})})),...t})},RZ=vV("span",{_id:"aiChatInput__FileContent"}),PZ=e=>wg.jsx(RZ,{...e}),LZ=vV("img",{_id:"aiChatInput__FileThumbnail"}),DZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=CZ();return wg.jsx(LZ,{src:n,alt:r.name,onLoad:qY(e,(()=>a(!1))),...t})},MZ=({className:e})=>{const{file:t}=CZ(),n=WY[eZ(t).type]??"fileText";return wg.jsx(FG,{iconKey:n,className:e})},FZ=vV("span",{_id:"aiChatInput__FileName"}),jZ=e=>{const{file:t}=CZ();return wg.jsx(FZ,{...e,children:t.name})},zZ=vV("button",{_id:"aiChatInput__FileRemove"}),BZ=vV(FG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),HZ=({onClick:e,...t})=>{const{onRemove:n}=CZ();return wg.jsx(zZ,{type:"button","aria-label":"Remove file",onClick:qY(e,n),...t})},UZ=e=>{const[t,n]=he.useState(!1);return he.useEffect((()=>{const t=window.matchMedia(e);n(t.matches);const r=e=>n(e.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}),[e]),t};function $Z(e,t){if(401===e&&"object"==typeof t&&null!==t){const e=t.detail??"";if(e.includes("Invalid end-user JWT")||e.includes("Bearer token required"))return"session"}return null}function VZ(e){if(!e)return{};if(e instanceof Headers){const t={};return e.forEach(((e,n)=>{t[n]=e})),t}return Array.isArray(e)?Object.fromEntries(e):e}function GZ(e,t,n){return{...e?{"x-inkeep-app-id":e}:{},...t?{Authorization:`Bearer ${t}`}:{},...VZ(n)}}function qZ({appId:e,authToken:t,refreshSession:n}){const r=he.useRef(e);r.current=e;const a=he.useRef(t);a.current=t;const o=he.useRef(n);o.current=n;return{fetchWithAuth:he.useCallback((async(e,t)=>{const n=GZ(r.current,a.current,null==t?void 0:t.headers),i=await fetch(e,{...t,headers:n});if(401!==i.status)return i;let s;try{s=await i.clone().json()}catch{return i}if("session"===$Z(i.status,s)&&o.current){const n=await o.current();if(!n)return i;const a=GZ(r.current,n,null==t?void 0:t.headers);return fetch(e,{...t,headers:a})}return i}),[])}}function WZ(e){return new Date(e.expiresAt).getTime()-3e4<=Date.now()}const YZ=({baseUrl:e,appId:t,optOutAllAnalytics:n,enabled:r=!0})=>{const a=r&&t&&!n?`inkeep_session_${t}`:null,[o,i]=(e=>{const[t,n]=he.useState((()=>{if(!e)return null;try{const t=localStorage.getItem(e);return null!==t?JSON.parse(t):null}catch{return null}}));return[t,he.useCallback((t=>{if(n(t),e)try{null===t?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}catch{}}),[e])]})(a),s=he.useRef(r);he.useEffect((()=>{const e=s.current;if(s.current=r,e&&!r&&t&&!n){try{localStorage.removeItem(`inkeep_session_${t}`)}catch{}i(null)}}),[r,t,n,i]);const{fetchWithAuth:l}=qZ({appId:t,authToken:void 0}),c=he.useRef(e);c.current=e;const u=he.useRef(t);u.current=t;const d=he.useRef(o);d.current=o;const p=he.useRef(i);p.current=i;const f=he.useRef(l);f.current=l;const h=he.useRef(null),m=he.useRef(r);m.current=r;const g=he.useCallback((async e=>{if(!m.current)return null;if(!c.current||!u.current)return null;if(!e&&h.current)return h.current;const t=`${c.current}/run/auth/apps/${u.current}/anonymous-session`,n=(async()=>{var n;try{const r={"Content-Type":"application/json"},a=null==(n=d.current)?void 0:n.token;a&&(r.Authorization=`Bearer ${a}`);const o=await f.current(t,{method:"POST",headers:r,signal:e});if(!o.ok)throw new Error(`Failed to fetch anonymous session: ${o.status}`);const i=await o.json();return p.current({token:i.token,expiresAt:i.expiresAt}),i.token}catch(fNe){return fNe instanceof Error&&"AbortError"===fNe.name||console.error("[anonymous-session] fetch failed",fNe),null}finally{e||(h.current=null)}})();return e||(h.current=n),n}),[]),y=he.useRef(!1);he.useEffect((()=>{if(!r)return;if(!e||!t)return;const n=!y.current;if(y.current=!0,!n&&d.current&&!WZ(d.current))return;if(h.current)return;const a=new AbortController;return g(a.signal),()=>a.abort()}),[e,t,r,g]),he.useEffect((()=>{if(!r)return;if(!e||!t||!(null==o?void 0:o.expiresAt))return;const n=new Date(o.expiresAt).getTime()-3e4-Date.now();if(n<=0)return;const a=setTimeout((()=>g()),Math.min(n,2147483647));return()=>clearTimeout(a)}),[e,t,r,null==o?void 0:o.expiresAt,g]),he.useEffect((()=>{if(!r)return;if(!e||!t)return;const n=()=>{if("visible"!==document.visibilityState)return;const e=d.current;e&&!WZ(e)||g()};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)}),[e,t,r,g]);const b=he.useCallback((()=>g()),[g]);return{sessionToken:(null==o?void 0:o.token)??null,refreshSession:b}};const ZZ=()=>{const{baseSettings:e}=wR(),{getAuthToken:t}=e,[n,r]=he.useState(null),[a,o]=he.useState(!!t),i=he.useRef(null),s=he.useRef(t);s.current=t;const l=he.useCallback((async()=>{const e=s.current;if(!e)return null;if(i.current)return i.current;const t=(async()=>{try{const t=await e();return r(t),t}catch(fNe){return console.error("[useAuthToken] getAuthToken failed",fNe),r(null),null}finally{i.current=null,o(!1)}})();return i.current=t,t}),[]);he.useEffect((()=>{if(!t)return r(null),void o(!1);l()}),[t,l]),he.useEffect((()=>{if(!t||!n)return;const e=function(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return"number"==typeof n.exp?1e3*n.exp:null}catch{return null}}(n);if(!e)return;const r=e-3e4-Date.now();if(r<=0)return;const a=setTimeout((()=>l()),Math.min(r,2147483647));return()=>clearTimeout(a)}),[t,n,l]);const c=he.useCallback((async()=>s.current?l():null),[l]);return{authToken:n,isLoading:a,refreshToken:c}};function KZ(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const XZ=new Map;function QZ(e="id"){const t=(XZ.get(e)||0)+1;return XZ.set(e,t),`${e}${t}`}var JZ=ge[" useInsertionEffect ".trim().toString()]||aR;function eK({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=he.useState(e),a=he.useRef(n),o=he.useRef(t);return JZ((()=>{o.current=t}),[t]),he.useEffect((()=>{var e;a.current!==n&&(null==(e=o.current)||e.call(o,n),a.current=n)}),[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=he.useRef(void 0!==e);he.useEffect((()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s}),[s,r])}const c=he.useCallback((t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else o(t)}),[s,e,o,i]);return[l,c]}function tK(e){const t=Number(e.code)||Number(e.statusCode);if(t&&!Number.isNaN(t))return t;try{const t=Number(JSON.parse(e.message??"").status);return t&&!Number.isNaN(t)?t:null}catch{return null}}const nK="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",rK="Please try again.",aK=()=>{const{baseSettings:e,aiChatSettings:t}=wR(),[n="",r]=eK({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),{logEvent:a}=SR(),{setConversationId:o,emitToParent:i}=function(){const e=cR(),t=null==e?void 0:e.shadowHost,n=he.useRef("");return{setConversationId:he.useCallback((e=>{n.current=e}),[]),emitToParent:he.useCallback(((e,r)=>{if(!t)return void console.warn("useStreamingEvents: No host element available for parent event emission");const a=new CustomEvent(`ikp-${e}`,{detail:{...r,conversationId:n.current,timestamp:Date.now()},bubbles:!0,composed:!0});t.dispatchEvent(a)}),[t])}}(),s=he.useRef(n);he.useEffect((()=>{const e=s.current;s.current=n,e!==n&&a({eventName:"chat_conversation_changed",properties:{conversationId:n,previousConversationId:e}})}),[n,a]);const[l,c]=he.useState(""),{filters:u,privacyPreferences:d,userProperties:p}=e,{authToken:f,isLoading:h,refreshToken:m}=ZZ(),g=!!e.getAuthToken,y=!!f,{onInputMessageChange:b,filters:v,baseUrl:k,agentUrl:x,context:w,headers:E,appId:_,apiKey:S,files:T}=t,C=x||`${k}/run/api/chat`,{sessionToken:A,refreshSession:N}=YZ({baseUrl:k,appId:_,optOutAllAnalytics:null==d?void 0:d.optOutAllAnalytics,enabled:!y&&!h}),I=S??(y?f:A),{loadConversation:O}=(({baseUrl:e,appId:t,authToken:n,refreshSession:r})=>{const{fetchWithAuth:a}=qZ({appId:t,authToken:n,refreshSession:r});return{loadConversation:he.useCallback((async(t,r)=>{var o;if(!e||!n)return null;try{const n=`${e}/run/v1/conversations/${t}`,i=await a(n,{signal:r});if(!i.ok)throw new Error(`Failed to load conversation: ${i.status}`);return(null==(o=(await i.json()).data)?void 0:o.messages)??[]}catch(fNe){return fNe instanceof Error&&"AbortError"===fNe.name||console.error("[useConversationLoader]",fNe),null}}),[e,n,a])}})({baseUrl:k,appId:_,authToken:I,refreshSession:S||y?void 0:N}),[R,P]=he.useState(!1),L=he.useRef(null);L.current=A;const D=he.useRef(null);D.current=f;const M=he.useRef(void 0);M.current=p&&Object.keys(p).length>0?JSON.stringify(p):void 0;const F=he.useRef(0),j=he.useRef(null),z=he.useRef(null),B=he.useRef(void 0),H=(null==T?void 0:T.map((e=>`${e.filename??""}:${e.mediaType}:${e.url.length}:${e.url.slice(0,64)}:${e.url.slice(-32)}`)).join("\n"))??"";he.useEffect((()=>{B.current=(null==T?void 0:T.length)?T:void 0}),[H]);const U=he.useRef(E);U.current=E;const $=he.useRef(void 0);$.current=u||v?JSON.stringify({...u,...v}):void 0;const[V,G]=he.useState([]),q=he.useMemo((()=>new GU({api:C,headers:()=>{const e=S??D.current??L.current;return{"x-inkeep-client-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-inkeep-client-timestamp":(new Date).toISOString(),"x-inkeep-invocation-type":"chat_widget",..._?{"x-inkeep-app-id":_}:{},...e?{Authorization:`Bearer ${e}`}:{},...$.current?{"inkeep-filters":$.current}:{},...M.current?{"x-inkeep-user-properties":M.current}:{},...U.current}},prepareSendMessagesRequest:e=>{const t=e.messages[e.messages.length-1];return t||console.warn("[useInkeepChat] prepareSendMessagesRequest called with empty messages array"),{body:{...e.body,id:e.id,messages:t?[t]:[],trigger:e.trigger,messageId:e.messageId},headers:e.headers}},body:{requestContext:w}})),[C,w,_,S]),{messages:W,sendMessage:Y,addToolApprovalResponse:Z,status:K,setMessages:X,stop:Q,error:J}=function({experimental_throttle:e,resume:t=!1,...n}={}){const r=he.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const a={...n,onToolCall:e=>{var t,n;return null==(n=(t=r.current).onToolCall)?void 0:n.call(t,e)},onData:e=>{var t,n;return null==(n=(t=r.current).onData)?void 0:n.call(t,e)},onFinish:e=>{var t,n;return null==(n=(t=r.current).onFinish)?void 0:n.call(t,e)},onError:e=>{var t,n;return null==(n=(t=r.current).onError)?void 0:n.call(t,e)},sendAutomaticallyWhen:e=>{var t,n,a;return null!=(a=null==(n=(t=r.current).sendAutomaticallyWhen)?void 0:n.call(t,e))&&a}},o=he.useRef("chat"in n?n.chat:new k$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new k$(a));const i=he.useCallback((t=>o.current["~registerMessagesCallback"](t,e)),[e,o.current.id]),s=he.useSyncExternalStore(i,(()=>o.current.messages),(()=>o.current.messages)),l=he.useSyncExternalStore(o.current["~registerStatusCallback"],(()=>o.current.status),(()=>o.current.status)),c=he.useSyncExternalStore(o.current["~registerErrorCallback"],(()=>o.current.error),(()=>o.current.error)),u=he.useCallback((e=>{"function"==typeof e&&(e=e(o.current.messages)),o.current.messages=e}),[o]);return he.useEffect((()=>{t&&o.current.resumeStream()}),[t,o]),{id:o.current.id,messages:s,setMessages:u,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:l,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}({transport:q,onData(e){i(e.type,e.data)},async onFinish(){i("completion",{conversationId:n}),await a({eventName:"assistant_message_received",properties:{conversationId:n}}),a({eventName:"assistant_answer_displayed",properties:{conversationId:n}})},onError(t){var r;console.error("onError",{code:t.code,message:t.message});const o=S?null:function(e){const t=tK(e),n=$Z(t??0,{detail:e.message??""});return null!==n?n:401===t?"session":null}(t);if(null!==o&&F.current<1){F.current++;const e=z.current,t=j.current;return void(async()=>{var n;if("session"===o&&g){const e=await m();if(!e)throw new Error("Auth token refresh failed");D.current=e}else if("session"===o){const e=await N();e&&(L.current=e)}e?Z(e):t&&(X((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r})),Y((null==(n=t.files)?void 0:n.length)?{parts:[{type:"text",text:t.content},...t.files]}:{text:t.content},{body:t.body}))})().catch((()=>{F.current=0,X((e=>{const t=[...e],n=t[t.length-1];if(!n)return t;const r=nK;return"user"===n.role?t.push({id:KZ(16),role:"assistant",parts:[{type:"text",text:r}]}):n.parts=[{type:"text",text:r}],t}))}))}F.current=0;const i=function(e){const t=tK(e);return 400===t||429===t}(t),s=(t=>{var n,r;switch(tK(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??rK}catch{return(null==(r=t.message)?void 0:r.trim())||rK}case 401:return g?"Authentication failed. Please try again.":nK;case 403:return`There seems to be a configuration error. Please contact ${e.organizationDisplayName??"Administrator"}`;case 429:return"You're sending requests too quickly. Please wait a moment and try again.";default:return nK}})(t);if(a({eventName:"chat_error",properties:{conversationId:n,error:t.message}}),i){ge({title:"Request failed",message:s},8e3),X((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r}));const e=null==(r=j.current)?void 0:r.content;return e&&c(e),void(fe.current=t)}X((e=>{const t=[...e],n=t[t.length-1];return n&&("user"===n.role?t.push({id:KZ(16),role:"assistant",parts:[{type:"text",text:s}]}):n.parts=[{type:"text",text:s}]),t}))}}),ee=he.useRef(y);he.useEffect((()=>{const e=ee.current;ee.current=y,e!==y&&(Q(),pe(null),X([]),r(""),c(""),G([]))}),[y,Q,X,r]);const te="submitted"===K,ne="streaming"===K,re=he.useMemo((()=>{var e,t;const n=[...W??[]].reverse().find((e=>"assistant"===e.role));if(!n)return!1;const r=null==(e=n.parts)?void 0:e.at(-1);return!!(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.type&&t.type.startsWith("tool-")})(r)&&("output-available"===r.state&&(!!(null==(t=r.approval)?void 0:t.id)&&!ne))}),[W,ne]),[ae,oe]=he.useState(!1),ie=ne||re&&!ae,se=te||ie,le=0===W.length,ce=!l.trim()&&0===V.length||se,ue=UZ("(max-width: 768px)"),[de,pe]=he.useState(null),fe=he.useRef(null);he.useEffect((()=>{if(J){if(fe.current===J)return void(fe.current=null);pe(J)}}),[J]);const{inputNotification:me,showInputNotification:ge,clearInputNotification:ye}=function(){const[e,t]=he.useState(null),n=he.useRef(null),r=he.useCallback(((e,r=5e3)=>{n.current&&clearTimeout(n.current),t(e),n.current=setTimeout((()=>t(null)),r)}),[]),a=he.useCallback((()=>{n.current&&clearTimeout(n.current),t(null)}),[]);return he.useEffect((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{inputNotification:e,showInputNotification:r,clearInputNotification:a}}(),be=he.useRef(null);he.useEffect((()=>{null==b||b(l)}),[l]);const ve=async(e=l)=>{if(ce&&(!e||0===e.trim().length)&&0===V.length)return;const t=V;G([]),c(""),F.current=0,z.current=null,oe(!1),await a({eventName:"user_message_submitted",properties:{conversationId:n}});let i=n;i||(i=`conv_${KZ(16)}`,r(i)),o(i);const s=B.current;let u,d;if(B.current=void 0,null==s?void 0:s.length){let n;try{n=await Promise.all(t.map((e=>{const t=eZ(e);return new Promise(((e,n)=>{const r=new FileReader;r.onload=()=>{"string"==typeof r.result?e({type:"file",url:r.result,mediaType:t.type,filename:t.name}):n(new Error(`Failed to read file "${t.name}"`))},r.onerror=()=>n(new Error(`Failed to read file "${t.name}"`)),r.readAsDataURL(t)}))})))}catch(p){return void ge({title:"Failed to attach files",message:"Could not read one or more files. Please try again."})}d=[...n,...s],u=e.trim()?{parts:[{type:"text",text:e},...d]}:{parts:d}}else if(t.length>0){const n=new DataTransfer;for(const e of t)n.items.add(eZ(e));const r=n.files;u=e.trim()?{text:e,files:r}:{files:r}}else u={text:e};j.current={content:e,body:{conversationId:i},files:d},Y(u,{body:{conversationId:i}})},ke=he.useCallback((e=>{F.current=0,z.current=e,oe(!1),Z(e)}),[Z]),xe=he.useCallback((()=>{oe(!0),Q().then((()=>{i("aborted",{conversationId:n})}))}),[Q,n,i]),we=()=>{pe(null),X([]),r(""),B.current=(null==T?void 0:T.length)?T:void 0,a({eventName:"chat_clear_button_clicked",properties:{conversationId:n}})},Ee=he.useCallback(((e,t)=>{pe(null),X(t),r(e),B.current=void 0}),[X,r]),_e=he.useCallback((async(e,t)=>{xe(),Ee(e,[]),P(!0);try{const n=await O(e,t);if(null===n)return!1;const r=n[n.length-1],a="user"===(null==r?void 0:r.role)?[...n,{id:KZ(16),role:"assistant",parts:[{type:"text",text:"This session was interrupted. Please check back in a few minutes or start a new conversation."}]}]:n;return Ee(e,a),!0}finally{(null==t?void 0:t.aborted)||P(!1)}}),[Ee,O,xe]);(({conversationId:e,effectiveAuthToken:t,loadAndRestoreSession:n,onLoadFailed:r})=>{const a=he.useRef(null),o=he.useRef(n);o.current=n;const i=he.useRef(r);i.current=r,he.useEffect((()=>{if(!e||!t)return;if(a.current===e)return;a.current=e;const n=new AbortController,r=t=>{var n;a.current=null,console.error("[useInitialConversation] failed to load conversation:",e,t),null==(n=i.current)||n.call(i)};return(async()=>{try{await o.current(e,n.signal)||n.signal.aborted||r()}catch(fNe){n.signal.aborted||r(fNe)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:I,loadAndRestoreSession:_e,onLoadFailed:()=>Ee("",[])});const{openForm:Se}=tL(),Te=c0();return he.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:ve,updateInputMessage(e){c(e)},clearChat:we,openForm:e=>{null==Te||Te.setView("chat"),Se(e,void 0)},focusInput:()=>{var e;null==(e=be.current)||e.focus()}}))),{messages:W,sendMessage:Y,addToolApprovalResponse:ke,isLoading:te,isStreaming:ie,isBusy:se,error:de,setError:pe,isSubmitDisabled:ce,input:l,handleInputChange:e=>c(e.target.value),handleInputKeyDown:e=>{"Enter"!==e.key||e.shiftKey||ce||e.nativeEvent.isComposing||(e.preventDefault(),ve())},handleSubmit:ve,stop:xe,clear:we,inputRef:be,isMobile:ue,files:V,setFiles:G,isNewChat:le,conversationId:n,restoreSession:Ee,loadAndRestoreSession:_e,isSessionLoading:R,authToken:y?f:A,refreshSession:y?m:N,inputNotification:me,showInputNotification:ge,clearInputNotification:ye}};const oK=he.createContext(void 0);function iK(){const{baseSettings:e,aiChatSettings:t}=wR(),[n,r]=he.useState(null),[a,o]=he.useState({}),{conversationId:i,messages:s,authToken:l,refreshSession:c}=EJ(),{analyticsProperties:u}=e,{logEvent:d}=SR(),{submitFeedback:p}=function({baseUrl:e,appId:t,authToken:n,refreshSession:r}){const{fetchWithAuth:a}=qZ({appId:t,authToken:n,refreshSession:r});return{submitFeedback:he.useCallback((async({conversationId:t,messageId:r,type:o,details:i})=>{if(!e||!n)return;const s=`${e}/run/v1/feedback`,l=await a(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,messageId:r,type:o,details:i})});if(!l.ok)throw new Error(`Feedback submission failed: ${l.status}`);return l.json()}),[e,n,a])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,refreshSession:c}),f=he.useCallback((async(t,n,r)=>{o((e=>({...e,[t]:{type:n,messageId:t,details:r}}))),e.onFeedback?e.onFeedback({type:n,messageId:t,details:r,properties:u}).catch((e=>console.warn("[feedback] onFeedback error:",e))):p({conversationId:i,messageId:t,type:n,details:r}).catch((e=>console.warn("[feedback] submitFeedbackToApi error:",e)));const a=s.findIndex((e=>e.id===t)),l=s[a],c={conversationId:i,question:lV(s[a-1]),answer:lV(l),messageId:t,details:r};d({eventName:"positive"===n?"assistant_positive_feedback_submitted":"assistant_negative_feedback_submitted",properties:c}),"negative"===n&&d({eventName:"user_escalation_indicated",properties:{escalationType:"downvote",conversationId:i}})}),[s,i,u,e,d,p]);return{feedback:a,currentFeedback:n,setCurrentFeedback:r,submitPositiveFeedback:he.useCallback((async e=>{f(e,"positive")}),[f]),submitNegativeFeedback:he.useCallback((async(e,t)=>{f(e,"negative",t)}),[f])}}const sK=({children:e})=>{const t=iK();return wg.jsx(oK.Provider,{value:t,children:e})},lK=()=>{const e=he.useContext(oK);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function cK(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function uK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function dK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=uK(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():uK(e[t],null)}}}}function pK(...e){return he.useCallback(dK(...e),e)}function fK(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>he.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return he.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=he.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=he.useMemo((()=>s),Object.values(s));return wg.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=he.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},hK(r,...t)]}function hK(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return he.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var mK=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=he.Children.toArray(n),o=a.find(bK);if(o){const e=o.props.children,n=a.map((t=>t===o?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(gK,{...r,ref:t,children:he.isValidElement(e)?he.cloneElement(e,void 0,n):null})}return wg.jsx(gK,{...r,ref:t,children:n})}));mK.displayName="Slot";var gK=he.forwardRef(((e,t)=>{const{children:n,...r}=e;if(he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n);return he.cloneElement(n,{...vK(r,n.props),ref:t?dK(t,e):e})}return he.Children.count(n)>1?he.Children.only(null):null}));gK.displayName="SlotClone";var yK=({children:e})=>wg.jsx(wg.Fragment,{children:e});function bK(e){return he.isValidElement(e)&&e.type===yK}function vK(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}var kK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=he.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?mK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function xK(e){const t=he.useRef(e);return he.useEffect((()=>{t.current=e})),he.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function wK(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e);he.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var EK,_K="dismissableLayer.update",SK="dismissableLayer.pointerDownOutside",TK="dismissableLayer.focusOutside",CK=he.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),AK=he.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=he.useContext(CK),[u,d]=he.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=he.useState({}),h=pK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1),a=he.useRef((()=>{}));return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){IK(SK,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1);return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){IK(TK,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return wK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),he.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(EK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),NK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=EK)}}),[u,p,n,c]),he.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),NK())}),[u,c]),he.useEffect((()=>{const e=()=>f({});return document.addEventListener(_K,e),()=>document.removeEventListener(_K,e)}),[]),wg.jsx(kK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:cK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:cK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:cK(e.onPointerDownCapture,x.onPointerDownCapture)})}));AK.displayName="DismissableLayer";function NK(){const e=new CustomEvent(_K);document.dispatchEvent(e)}function IK(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Ce.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}he.forwardRef(((e,t)=>{const n=he.useContext(CK),r=he.useRef(null),a=pK(t,r);return he.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),wg.jsx(kK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var OK=Boolean(null==globalThis?void 0:globalThis.document)?he.useLayoutEffect:()=>{},RK=ge["useId".toString()]||(()=>{}),PK=0;function LK(e){const[t,n]=he.useState(RK());return OK((()=>{n((e=>e??String(PK++)))}),[e]),e||(t?`radix-${t}`:"")}const DK=["top","right","bottom","left"],MK=Math.min,FK=Math.max,jK=Math.round,zK=Math.floor,BK=e=>({x:e,y:e}),HK={left:"right",right:"left",bottom:"top",top:"bottom"};function UK(e,t,n){return FK(e,MK(t,n))}function $K(e,t){return"function"==typeof e?e(t):e}function VK(e){return e.split("-")[0]}function GK(e){return e.split("-")[1]}function qK(e){return"x"===e?"y":"x"}function WK(e){return"y"===e?"height":"width"}function YK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ZK(e){return qK(YK(e))}function KK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const XK=["left","right"],QK=["right","left"],JK=["top","bottom"],eX=["bottom","top"];function tX(e,t,n,r){const a=GK(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?QK:XK:t?XK:QK;case"left":case"right":return t?JK:eX;default:return[]}}(VK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(KK)))),o}function nX(e){const t=VK(e);return HK[t]+e.slice(t.length)}function rX(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function aX(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function oX(e,t,n){let{reference:r,floating:a}=e;const o=YK(t),i=ZK(t),s=WK(i),l=VK(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch(GK(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function iX(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=$K(t,e),h=rX(f),m=s[p?"floating"===d?"reference":"floating":d],g=aX(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},k=aX(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-k.top+h.top)/v.y,bottom:(k.bottom-g.bottom+h.bottom)/v.y,left:(g.left-k.left+h.left)/v.x,right:(k.right-g.right+h.right)/v.x}}function sX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lX(e){return DK.some((t=>e[t]>=0))}const cX=new Set(["left","top"]);function uX(){return"undefined"!=typeof window}function dX(e){return hX(e)?(e.nodeName||"").toLowerCase():"#document"}function pX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function fX(e){var t;return null==(t=(hX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function hX(e){return!!uX()&&(e instanceof Node||e instanceof pX(e).Node)}function mX(e){return!!uX()&&(e instanceof Element||e instanceof pX(e).Element)}function gX(e){return!!uX()&&(e instanceof HTMLElement||e instanceof pX(e).HTMLElement)}function yX(e){return!(!uX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof pX(e).ShadowRoot)}function bX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=AX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function vX(e){return/^(table|td|th)$/.test(dX(e))}function kX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const xX=/transform|translate|scale|rotate|perspective|filter/,wX=/paint|layout|strict|content/,EX=e=>!!e&&"none"!==e;let _X;function SX(e){const t=mX(e)?AX(e):e;return EX(t.transform)||EX(t.translate)||EX(t.scale)||EX(t.rotate)||EX(t.perspective)||!TX()&&(EX(t.backdropFilter)||EX(t.filter))||xX.test(t.willChange||"")||wX.test(t.contain||"")}function TX(){return null==_X&&(_X="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_X}function CX(e){return/^(html|body|#document)$/.test(dX(e))}function AX(e){return pX(e).getComputedStyle(e)}function NX(e){return mX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function IX(e){if("html"===dX(e))return e;const t=e.assignedSlot||e.parentNode||yX(e)&&e.host||fX(e);return yX(t)?t.host:t}function OX(e){const t=IX(e);return CX(t)?e.ownerDocument?e.ownerDocument.body:e.body:gX(t)&&bX(t)?t:OX(t)}function RX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=OX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=pX(a);if(o){const e=PX(i);return t.concat(i,i.visualViewport||[],bX(a)?a:[],e&&n?RX(e):[])}return t.concat(a,RX(a,[],n))}function PX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function LX(e){const t=AX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=gX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=jK(n)!==o||jK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function DX(e){return mX(e)?e:e.contextElement}function MX(e){const t=DX(e);if(!gX(t))return BK(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=LX(t);let i=(o?jK(n.width):n.width)/r,s=(o?jK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const FX=BK(0);function jX(e){const t=pX(e);return TX()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:FX}function zX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=DX(e);let i=BK(1);t&&(r?mX(r)&&(i=MX(r)):i=MX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==pX(e))&&t}(o,n,r)?jX(o):BK(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=pX(o),t=r&&mX(r)?pX(r):r;let n=e,a=PX(n);for(;a&&r&&t!==n;){const e=MX(a),t=a.getBoundingClientRect(),r=AX(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=pX(a),a=PX(n)}}return aX({width:u,height:d,x:l,y:c})}function BX(e,t){const n=NX(e).scrollLeft;return t?t.left+n:zX(fX(e)).left+n}function HX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-BX(e,n),y:n.top+t.scrollTop}}function UX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=pX(e),r=fX(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=TX();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=BX(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=fX(e),n=NX(e),r=e.ownerDocument.body,a=FK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=FK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+BX(e);const s=-n.scrollTop;return"rtl"===AX(r).direction&&(i+=FK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(fX(e));else if(mX(t))r=function(e,t){const n=zX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=gX(e)?MX(e):BK(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=jX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return aX(r)}function $X(e,t){const n=IX(e);return!(n===t||!mX(n)||CX(n))&&("fixed"===AX(n).position||$X(n,t))}function VX(e,t,n){const r=gX(t),a=fX(t),o="fixed"===n,i=zX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=BK(0);function c(){l.x=BX(a)}if(r||!r&&!o)if(("body"!==dX(t)||bX(a))&&(s=NX(t)),r){const e=zX(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?BK(0):HX(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function GX(e){return"static"===AX(e).position}function qX(e,t){if(!gX(e)||"fixed"===AX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return fX(e)===n&&(n=n.ownerDocument.body),n}function WX(e,t){const n=pX(e);if(kX(e))return n;if(!gX(e)){let t=IX(e);for(;t&&!CX(t);){if(mX(t)&&!GX(t))return t;t=IX(t)}return n}let r=qX(e,t);for(;r&&vX(r)&&GX(r);)r=qX(r,t);return r&&CX(r)&&GX(r)&&!SX(r)?n:r||function(e){let t=IX(e);for(;gX(t)&&!CX(t);){if(SX(t))return t;if(kX(t))return null;t=IX(t)}return null}(e)||n}const YX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=fX(r),s=!!t&&kX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=BK(1);const u=BK(0),d=gX(r);if((d||!d&&!o)&&(("body"!==dX(r)||bX(i))&&(l=NX(r)),d)){const e=zX(r);c=MX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?BK(0):HX(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:fX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?kX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=RX(e,[],!1).filter((e=>mX(e)&&"body"!==dX(e))),a=null;const o="fixed"===AX(e).position;let i=o?IX(e):e;for(;mX(i)&&!CX(i);){const t=AX(i),n=SX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||bX(i)&&!n&&$X(e,i))?r=r.filter((e=>e!==i)):a=t,i=IX(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=UX(t,o[0],a);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<o.length;d++){const e=UX(t,o[d],a);s=FK(e.top,s),l=MK(e.right,l),c=MK(e.bottom,c),u=FK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:WX,getElementRects:async function(e){const t=this.getOffsetParent||WX,n=this.getDimensions,r=await n(e.floating);return{reference:VX(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=LX(e);return{width:t,height:n}},getScale:MX,isElement:mX,isRTL:function(e){return"rtl"===AX(e).direction}};function ZX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=DX(e),u=a||o?[...c?RX(c):[],...t?RX(t):[]]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=fX(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-zK(d)+"px "+-zK(a.clientWidth-(u+p))+"px "+-zK(a.clientHeight-(d+f))+"px "+-zK(u)+"px",threshold:FK(0,MK(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}1!==r||ZX(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:a.ownerDocument})}catch(y){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null;let p,f=-1,h=null;i&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?zX(e):null;return l&&function t(){const r=zX(e);m&&!ZX(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const XX=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=VK(n),s=GK(n),l="y"===YK(n),c=cX.has(i)?-1:1,u=o&&l?-1:1,d=$K(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},QX=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=$K(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=YK(VK(a)),f=qK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=UK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=UK(m+d["y"===p?"top":"left"],m,m-d[e])}const g=l.fn({...t,[f]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:s}}}}}},JX=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=$K(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=VK(a),b=YK(s),v=VK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[nX(s)]:function(e){const t=nX(e);return[KK(e),t,KK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...tX(s,m,h,k));const E=[s,...x],_=await l.detectOverflow(t,g),S=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=GK(e),a=ZK(e),o=WK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nX(i)),[i,nX(i)]}(a,i,k);S.push(_[e[0]],_[e[1]])}if(T=[...T,{placement:a,overflows:S}],!S.every((e=>e<=0))){var C,A;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&b!==YK(t))||T.every((e=>YK(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(A=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=T.filter((e=>{if(w){const t=YK(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},eQ=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=$K(e,t),u=await i.detectOverflow(t,c),d=VK(a),p=GK(a),f="y"===YK(a),{width:h,height:m}=o.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,k=MK(m-u[g],b),x=MK(h-u[y],v),w=!t.middlewareData.shift;let E=k,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),w&&!p){const e=FK(u.left,0),t=FK(u.right,0),n=FK(u.top,0),r=FK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:FK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:FK(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const S=await i.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},tQ=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=$K(e,t);switch(a){case"referenceHidden":{const e=sX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:lX(e)}}}case"escaped":{const e=sX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:lX(e)}}}default:return{}}}}},nQ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=$K(e,t)||{};if(null==c)return{};const d=rX(u),p={x:n,y:r},f=ZK(a),h=WK(f),m=await i.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[f]-p[f]-o.floating[h],x=p[f]-o.reference[f],w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=w?w[v]:0;E&&await(null==i.isElement?void 0:i.isElement(w))||(E=s.floating[v]||o.floating[h]);const _=k/2-x/2,S=E/2-m[h]/2-1,T=MK(d[y],S),C=MK(d[b],S),A=T,N=E-m[h]-C,I=E/2-m[h]/2+_,O=UK(A,I,N),R=!l.arrow&&null!=GK(a)&&I!==O&&o.reference[h]/2-(I<A?T:C)-m[h]/2<0,P=R?I<A?I-A:I-N:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:I-O-P,...R&&{alignmentOffset:P}},reset:R}}}),rQ=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=$K(e,t),u={x:n,y:r},d=YK(a),p=qK(d);let f=u[p],h=u[d];const m=$K(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+g.mainAxis,n=o.reference[p]+o.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=cX.has(VK(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},aQ=(e,t,n)=>{const r=new Map,a={platform:YX,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:iX},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=oX(c,r,l),p=r,f=0;const h={};for(let m=0;m<o.length;m++){const n=o[m];if(!n)continue;const{name:g,fn:y}=n,{x:b,y:v,data:k,reset:x}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=v?v:d,h[g]={...h[g],...k},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:u,y:d}=oX(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var oQ="undefined"!=typeof document?he.useLayoutEffect:function(){};function iQ(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!iQ(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!iQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function sQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lQ(e,t){const n=sQ(e);return Math.round(t*n)/n}function cQ(e){const t=he.useRef(e);return oQ((()=>{t.current=e})),t}function uQ(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=he.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=he.useState(r);iQ(p,r)||f(r);const[h,m]=he.useState(null),[g,y]=he.useState(null),b=he.useCallback((e=>{e!==w.current&&(w.current=e,m(e))}),[]),v=he.useCallback((e=>{e!==E.current&&(E.current=e,y(e))}),[]),k=o||h,x=i||g,w=he.useRef(null),E=he.useRef(null),_=he.useRef(u),S=null!=l,T=cQ(l),C=cQ(a),A=cQ(c),N=he.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),aQ(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!iQ(_.current,t)&&(_.current=t,Ce.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);oQ((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const I=he.useRef(!1);oQ((()=>(I.current=!0,()=>{I.current=!1})),[]),oQ((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,N);N()}}),[k,x,N,T,S]);const O=he.useMemo((()=>({reference:w,floating:E,setReference:b,setFloating:v})),[b,v]),R=he.useMemo((()=>({reference:k,floating:x})),[k,x]),P=he.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=lQ(R.floating,u.x),r=lQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...sQ(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,u.x,u.y]);return he.useMemo((()=>({...u,update:N,refs:O,elements:R,floatingStyles:P})),[u,N,O,R,P])}const dQ=(e,t)=>{const n=XX(e);return{name:n.name,fn:n.fn,options:[e,t]}},pQ=(e,t)=>{const n=QX(e);return{name:n.name,fn:n.fn,options:[e,t]}},fQ=(e,t)=>({fn:rQ(e).fn,options:[e,t]}),hQ=(e,t)=>{const n=JX(e);return{name:n.name,fn:n.fn,options:[e,t]}},mQ=(e,t)=>{const n=eQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},gQ=(e,t)=>{const n=tQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},yQ=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?nQ({element:n.current,padding:r}).fn(t):{}:n?nQ({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var bQ=he.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return wg.jsx(kK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:wg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));bQ.displayName="Arrow";var vQ=bQ;function kQ(e){const[t,n]=he.useState(void 0);return OK((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var xQ="Popper",[wQ,EQ]=fK(xQ),[_Q,SQ]=wQ(xQ),TQ=e=>{const{__scopePopper:t,children:n}=e,[r,a]=he.useState(null);return wg.jsx(_Q,{scope:t,anchor:r,onAnchorChange:a,children:n})};TQ.displayName=xQ;var CQ="PopperAnchor",AQ=he.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=SQ(CQ,n),i=he.useRef(null),s=pK(t,i);return he.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:wg.jsx(kK.div,{...a,ref:s})}));AQ.displayName=CQ;var NQ="PopperContent",[IQ,OQ]=wQ(NQ),RQ=he.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=SQ(NQ,l),[E,_]=he.useState(null),S=pK(t,(e=>_(e))),[T,C]=he.useState(null),A=kQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(MQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=uQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>KX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[dQ({mainAxis:u+I,alignmentAxis:p}),h&&pQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?fQ():void 0,...D}),h&&hQ({...D}),mQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&yQ({element:T,padding:f}),FQ({arrowWidth:N,arrowHeight:I}),b&&gQ({strategy:"referenceHidden",...D})]}),[H,U]=jQ(j),$=xK(k);OK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=he.useState();return OK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),wg.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:wg.jsx(IQ,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:wg.jsx(kK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));RQ.displayName=NQ;var PQ="PopperArrow",LQ={top:"bottom",right:"left",bottom:"top",left:"right"},DQ=he.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=OQ(PQ,n),o=LQ[a.placedSide];return wg.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:wg.jsx(vQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function MQ(e){return null!==e}DQ.displayName=PQ;var FQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=jQ(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function jQ(e){const[t,n="center"]=e.split("-");return[t,n]}var zQ=TQ,BQ=AQ,HQ=RQ,UQ=DQ;var $Q=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=he.useState(),r=he.useRef({}),a=he.useRef(e),o=he.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return he.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return he.useEffect((()=>{const e=VQ(r.current);o.current="mounted"===s?e:"none"}),[s]),OK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=VQ(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),OK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=VQ(r.current).includes(o.animationName);if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=VQ(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:he.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):he.Children.only(n),o=pK(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?he.cloneElement(a,{ref:o}):null};function VQ(e){return(null==e?void 0:e.animationName)||"none"}function GQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=function({defaultProp:e,onChange:t}){const n=he.useState(e),[r]=n,a=he.useRef(r),o=xK(t);return he.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=xK(n);return[i,he.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}$Q.displayName="Presence";var qQ=he.forwardRef(((e,t)=>wg.jsx(kK.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));qQ.displayName="VisuallyHidden";var WQ=qQ,[YQ]=fK("Tooltip",[EQ]),ZQ=EQ(),KQ="TooltipProvider",XQ=700,QQ="tooltip.open",[JQ,eJ]=YQ(KQ),tJ=e=>{const{__scopeTooltip:t,delayDuration:n=XQ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=he.useState(!0),l=he.useRef(!1),c=he.useRef(0);return he.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),wg.jsx(JQ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:he.useCallback((()=>{window.clearTimeout(c.current),s(!1)}),[]),onClose:he.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:he.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:o})};tJ.displayName=KQ;var nJ="Tooltip",[rJ,aJ]=YQ(nJ),oJ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=eJ(nJ,e.__scopeTooltip),c=ZQ(t),[u,d]=he.useState(null),p=LK(),f=he.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=he.useRef(!1),[y=!1,b]=GQ({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(QQ))):l.onClose(),null==o||o(e)}}),v=he.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),k=he.useCallback((()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,b(!0)}),[b]),x=he.useCallback((()=>{window.clearTimeout(f.current),f.current=0,b(!1)}),[b]),w=he.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{g.current=!0,b(!0),f.current=0}),m)}),[m,b]);return he.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),wg.jsx(zQ,{...c,children:wg.jsx(rJ,{scope:t,contentId:p,open:y,stateAttribute:v,trigger:u,onTriggerChange:d,onTriggerEnter:he.useCallback((()=>{l.isOpenDelayed?w():k()}),[l.isOpenDelayed,w,k]),onTriggerLeave:he.useCallback((()=>{h?x():(window.clearTimeout(f.current),f.current=0)}),[x,h]),onOpen:k,onClose:x,disableHoverableContent:h,children:n})})};oJ.displayName=nJ;var iJ="TooltipTrigger",sJ=he.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=aJ(iJ,n),o=eJ(iJ,n),i=ZQ(n),s=pK(t,he.useRef(null),a.onTriggerChange),l=he.useRef(!1),c=he.useRef(!1),u=he.useCallback((()=>l.current=!1),[]);return he.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),wg.jsx(BQ,{asChild:!0,...i,children:wg.jsx(kK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:cK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:cK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:cK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:cK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:cK(e.onBlur,a.onClose),onClick:cK(e.onClick,a.onClose)})})}));sJ.displayName=iJ;var[lJ,cJ]=YQ("TooltipPortal",{forceMount:void 0}),uJ="TooltipContent",dJ=he.forwardRef(((e,t)=>{const n=cJ(uJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=aJ(uJ,e.__scopeTooltip);return wg.jsx($Q,{present:r||i.open,children:i.disableHoverableContent?wg.jsx(mJ,{side:a,...o,ref:t}):wg.jsx(pJ,{side:a,...o,ref:t})})})),pJ=he.forwardRef(((e,t)=>{const n=aJ(uJ,e.__scopeTooltip),r=eJ(uJ,e.__scopeTooltip),a=he.useRef(null),o=pK(t,a),[i,s]=he.useState(null),{trigger:l,onClose:c}=n,u=a.current,{onPointerInTransitChange:d}=r,p=he.useCallback((()=>{s(null),d(!1)}),[d]),f=he.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return he.useEffect((()=>()=>p()),[p]),he.useEffect((()=>{if(l&&u){const e=e=>f(e,u),t=e=>f(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[l,u,f,p]),he.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==u?void 0:u.contains(t)),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o].x,s=t[o].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(a=!a)}return a}(n,i);r?p():a&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,u,i,c,p]),wg.jsx(mJ,{...e,ref:o})})),[fJ,hJ]=YQ(nJ,{isInside:!1}),mJ=he.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=aJ(uJ,n),c=ZQ(n),{onClose:u}=l;return he.useEffect((()=>(document.addEventListener(QQ,u),()=>document.removeEventListener(QQ,u))),[u]),he.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;(null==t?void 0:t.contains(l.trigger))&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,u]),wg.jsx(AK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:wg.jsxs(HQ,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[wg.jsx(yK,{children:r}),wg.jsx(fJ,{scope:n,isInside:!0,children:wg.jsx(WQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));dJ.displayName=uJ;var gJ="TooltipArrow",yJ=he.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=ZQ(n);return hJ(gJ,n).isInside?null:wg.jsx(UQ,{...a,...r,ref:t})}));yJ.displayName=gJ;var bJ=tJ,vJ=sJ,kJ=yJ;const xJ=he.createContext(void 0),wJ=({children:e,...t})=>{const n=aK();return wg.jsx(xJ.Provider,{value:{...n,...t},children:wg.jsx(sK,{children:wg.jsx(bJ,{children:e})})})},EJ=()=>{const e=he.useContext(xJ);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},_J=he.createContext(void 0);const SJ=({layout:e,children:t})=>{const n=function(e){const{stop:t,clear:n,conversationId:r,isStreaming:a,loadAndRestoreSession:o,authToken:i,refreshSession:s}=EJ(),{aiChatSettings:l,baseSettings:c}=wR(),{baseUrl:u,appId:d,apiKey:p}=l,f=!!c.getAuthToken,h=!p&&!!d&&(!!i||f),{fetchWithAuth:m}=qZ({appId:d,authToken:i,refreshSession:s}),[g,y]=he.useState(!1),[b,v]=he.useState([]),[k,x]=he.useState(!i&&h),[w,E]=he.useState(0),[_,S]=he.useState(!1),T=he.useRef(!1),C=he.useRef(null),A=he.useRef(f),N=he.useRef(i);he.useEffect((()=>{const e=A.current,t=N.current;A.current=f,N.current=i,(e!==f||null!==t&&null!==i&&t!==i)&&(v([]),E(0),S(!1),T.current=!1)}),[f,i]);const I=he.useRef([]);I.current=b;const O=he.useRef(m);O.current=m;const R=he.useCallback((async(e,t=!1)=>{if(u&&i&&h){t||x(!0);try{const n=`${u}/run/v1/conversations?page=${e+1}&limit=25`,r=await O.current(n);if(!r.ok)throw new Error(`Failed to fetch conversations: ${r.status}`);const a=await r.json(),o=(a.data??[]).map((e=>({id:e.id,title:e.title??"",createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})));v((n=>{if(0===e&&!t)return o;if(0===e&&t){const e=new Set(o.map((e=>e.id)));return[...o,...n.slice(25).filter((t=>!e.has(t.id)))]}const r=new Set(n.map((e=>e.id)));return[...n,...o.filter((e=>!r.has(e.id)))]}));const{page:i,pages:s}=a.pagination??{};S(null!=i&&null!=s&&i<s),t||E(e)}catch(fNe){console.error("[useChatHistory] Failed to load conversations:",fNe)}finally{x(!1)}}}),[u,i,h]);he.useEffect((()=>{g&&(i||f)&&h&&("stack"===e?R(0):!T.current&&i&&(T.current=!0,R(0)))}),[g,i,f,h,e,R]);const P=he.useRef("");he.useEffect((()=>{h&&"sidepane"===e&&r&&a&&T.current&&P.current!==r&&(I.current.some((e=>e.id===r))||(P.current=r,R(0,!0)))}),[r,h,e,R,a]);const L=he.useCallback((()=>{!k&&_&&R(w+1)}),[k,_,w,R]),D=he.useCallback((()=>{t(),n(),"sidepane"!==e&&y(!1)}),[e,t,n]),M=he.useCallback((async t=>{var n;null==(n=C.current)||n.abort();const r=new AbortController;C.current=r,await o(t,r.signal),r.signal.aborted||"sidepane"===e||y(!1)}),[e,o]);return{isEnabled:h,isOpen:g,setIsOpen:y,sessions:b,isLoading:k,hasMore:_,loadMore:L,startNewConversation:D,loadSession:M}}(e);return wg.jsx(_J.Provider,{value:n,children:"function"==typeof t?t(n):t})},TJ=()=>{const e=he.useContext(_J);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},CJ=he.createContext(void 0),AJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=tL(),o=a[t.name];return wg.jsx(CJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},NJ=()=>{const e=he.useContext(CJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},IJ=he.createContext(void 0);const OJ=({children:e,value:t})=>wg.jsx(IJ.Provider,{value:t,children:e});function RJ(e){return new Promise(((t,n)=>{if(document.querySelector(`script[src="${e}"]`))return void t();let r=document.createElement("script");r.src=e,r.async=!0,r.onload=()=>t(),r.onerror=e=>{console.error("Error loading script",e),n(e)},document.head.appendChild(r)}))}var PJ=(f=class{constructor(){var e;__privateAdd(this,o),__privateAdd(this,i),__privateAdd(this,s,0),__publicField(this,"getChallenge",(async()=>(await __privateGet(this,u).call(this),await __privateGet(this,o).then((e=>"function"==typeof e?e():e))))),__privateAdd(this,l,(()=>{var e;if(document.hidden)return;let{promise:t,resolve:n}=__privateMethod(e=f,p,h).call(e);__privateSet(this,o,t),__privateSet(this,i,n),window.V_C=[],window.V_C.push=n;let r=document.querySelector('script[src*="c.js"]');r&&r.remove(),__privateSet(this,s,__privateGet(this,s)+1)})),__privateAdd(this,c,(()=>{if(window.V_C){let e=window.V_C.pop();e&&__privateGet(this,i).call(this,e)}else window.V_C=[],window.V_C.push=__privateGet(this,i)})),__privateAdd(this,u,(()=>{let e=new URL("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js",window.location.origin);return e.searchParams.set("i",String(__privateGet(this,s))),e.searchParams.set("v",String(3)),e.searchParams.set("h",window.location.host),RJ(e.pathname+e.search)})),__privateAdd(this,d,(()=>{window.V_C=void 0}));let{promise:t,resolve:n}=__privateMethod(e=f,p,h).call(e);__privateSet(this,o,t),__privateSet(this,i,n),__privateGet(this,c).call(this),window.addEventListener("online",__privateGet(this,l)),window.addEventListener("visibilitychange",__privateGet(this,l))}},o=new WeakMap,i=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakSet,h=function(){let e,t;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}},__privateAdd(f,p),f),LJ=(k=class{constructor(e){__privateAdd(this,m,!1),__privateAdd(this,g),__publicField(this,"load",(async()=>{__privateGet(this,m)||await __privateGet(this,b).call(this)})),__privateAdd(this,y,(()=>{if(typeof globalThis.window>"u")throw new Error("KPSDK is not available in the server");if(!window.KPSDK)throw new Error("KPSDK is not loaded");let e=__privateGet(this,g).map((e=>{var t;let n=__privateMethod(t=k,v,x).call(t,e.path);return{domain:n.host,path:n.pathname,method:e.method}}));try{window.KPSDK.configure(e)}catch(Qce){console.error("Error configuring KPSDK...",Qce)}})),__privateAdd(this,b,(async()=>{let e=this;return new Promise(((t,n)=>{let r=()=>{document.removeEventListener("kpsdk-load",r),__privateGet(this,y).call(this)},a=()=>{document.removeEventListener("kpsdk-ready",a),__privateSet(e,m,!0),t()};document.addEventListener("kpsdk-load",r,{once:!0}),document.addEventListener("kpsdk-ready",a,{once:!0}),RJ("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js").catch((e=>{document.removeEventListener("kpsdk-load",r),document.removeEventListener("kpsdk-ready",a),n(e)}))}))})),__privateSet(this,g,e)}get loaded(){return __privateGet(this,m)}},m=new WeakMap,g=new WeakMap,y=new WeakMap,b=new WeakMap,v=new WeakSet,x=function(e){let t;try{t=new URL(e)}catch{t=new URL(e,location.origin)}return t},__privateAdd(k,v),k),DJ=e=>{let t=e.replace(/[.?+^$[\]\\(){}|-]/g,"\\$&").split("*").join(".*");return new RegExp(`^${t}$`)},MJ=({path:e,pattern:t})=>-1!==e.search(t);function FJ({protect:e=[]}){var t;for(let a of e)if(void 0!==(null==(t=a.advancedOptions)?void 0:t.checkLevel)&&"deepAnalysis"!==a.advancedOptions.checkLevel&&"basic"!==a.advancedOptions.checkLevel)throw new Error(`Invalid checkLevel "${a.advancedOptions.checkLevel}" for route "${a.path}". Must be one of: deepAnalysis, basic`);let n=new PJ,r=new LJ(e);(async function(e,t,n){let r=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(e,t,n,a,o){return this._requestUrl=t.toString(),this._requestMethod=e,r.call(this,e,t,n??!0,a,o)},XMLHttpRequest.prototype.send=async function(r){var o;let i=this._requestUrl;if(!i)return a.call(this,r);if(this._isReexecution)return a.call(this,r);let s=new URL(i,location.href),l=s.origin===location.origin,c=this._requestMethod??"GET",u=n.find((e=>{let t=MJ({path:s.pathname,pattern:DJ(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||"*"===e.method;return t&&n}));if(!u||!l)return a.call(this,r);let d=await e.getChallenge();if(this.setRequestHeader("x-is-human",JSON.stringify(d)),this.setRequestHeader("x-path",s.pathname),this.setRequestHeader("x-method",c),0!==d.b)return a.call(this,r);if(t.loaded)return a.call(this,r);if((1===d.d||"deepAnalysis"===(null==(o=null==u?void 0:u.advancedOptions)?void 0:o.checkLevel))&&await t.load(),!t.loaded)return a.call(this,r);this.setRequestHeader("x-is-human",JSON.stringify(d)),this.setRequestHeader("x-path",s.pathname),this.setRequestHeader("x-method",c);let p=new XMLHttpRequest;return p._isReexecution=!0,p.open(c,i,!0),p.setRequestHeader("x-is-human",JSON.stringify(d)),p.setRequestHeader("x-path",s.pathname),p.setRequestHeader("x-method",c),this.timeout&&(p.timeout=this.timeout),this.responseType&&(p.responseType=this.responseType),this.withCredentials&&(p.withCredentials=this.withCredentials),p.onreadystatechange=()=>{Object.defineProperty(this,"readyState",{value:p.readyState,writable:!0,configurable:!0}),p.readyState===XMLHttpRequest.DONE&&(Object.defineProperty(this,"status",{value:p.status,writable:!0,configurable:!0}),Object.defineProperty(this,"statusText",{value:p.statusText,writable:!0,configurable:!0}),Object.defineProperty(this,"response",{value:p.response,writable:!0,configurable:!0}),Object.defineProperty(this,"responseText",{value:p.responseText,writable:!0,configurable:!0}),Object.defineProperty(this,"responseXML",{value:p.responseXML,writable:!0,configurable:!0}),this.getAllResponseHeaders=()=>p.getAllResponseHeaders(),this.getResponseHeader=e=>p.getResponseHeader(e)),this.onreadystatechange&&this.onreadystatechange.call(this,new Event("readystatechange"))},p.onload=e=>{this.onload&&this.onload.call(this,e)},p.onerror=e=>{this.onerror&&this.onerror.call(this,e)},p.onabort=e=>{this.onabort&&this.onabort.call(this,e)},p.ontimeout=e=>{this.ontimeout&&this.ontimeout.call(this,e)},p.onloadstart=e=>{this.onloadstart&&this.onloadstart.call(this,e)},p.onloadend=e=>{this.onloadend&&this.onloadend.call(this,e)},p.onprogress=e=>{this.onprogress&&this.onprogress.call(this,e)},p.send(r)}})(n,r,e).catch((e=>{console.error("Error patching XMLHttpRequest:",e)})),function(e,t,n){let r=window.fetch;window.fetch=async(a,o)=>{var i;let s=new URL(a instanceof Request?a.url:a,location.href),l=s.origin===location.origin,c=(null==o?void 0:o.method)??(a instanceof Request?a.method:"GET"),u=n.find((e=>{let t=MJ({path:s.pathname,pattern:DJ(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||"*"===e.method;return t&&n}));if(null==u||!l)return r(a,o);let d=await e.getChallenge(),p=new Headers((null==o?void 0:o.headers)||(a instanceof Request?a.headers:void 0));p.set("x-is-human",JSON.stringify(d)),p.set("x-path",s.pathname),p.set("x-method",c);let f={...o,headers:p};return t.loaded||0!==d.b?r(a,f):1===d.d||"deepAnalysis"===(null==(i=null==u?void 0:u.advancedOptions)?void 0:i.checkLevel)?(await t.load(),window.fetch(a,f)):r(a,f)}}(n,r,e)}function jJ(){const{baseSettings:e,aiChatSettings:t}=wR(),{shouldBypassCaptcha:n}=e,{baseUrl:r,apiKey:a,botProtectionLevel:o}=t,i=he.useRef(!1);return he.useEffect((()=>{if(i.current)return;if(n||a)return;if(!r)return;if("undefined"!=typeof window&&!window.__INKEEP_FETCH_DEBUG__){window.__INKEEP_FETCH_DEBUG__=!0;const e=window.fetch;window.fetch=async function(t,n){var r;let a;a="string"==typeof t?t:t instanceof URL?t.toString():t.url;try{const o=new URL(a,location.href);if(o.pathname.startsWith("/run/")){const a=new Headers((null==n?void 0:n.headers)??(t instanceof Request?t.headers:void 0)),i=(null==n?void 0:n.method)??(t instanceof Request?t.method:"GET");console.log("[botid-debug] fetch →",{url:o.toString(),method:i,locationOrigin:location.origin,targetOrigin:o.origin,sameOrigin:o.origin===location.origin,hasXIsHuman:a.has("x-is-human"),xIsHumanLength:(null==(r=a.get("x-is-human"))?void 0:r.length)??null,xPath:a.get("x-path"),xMethod:a.get("x-method")});const s=await e.call(this,t,n);return console.log("[botid-debug] fetch ←",{url:o.toString(),status:s.status,statusText:s.statusText}),s}}catch{}return e.call(this,t,n)}}const e={checkLevel:o};try{console.log("[botid-debug] calling initBotId",{baseUrl:r,advancedOptions:e}),FJ({protect:[{path:`${r}/run/auth/apps/*/anonymous-session`,method:"POST",advancedOptions:e},{path:`${r}/run/api/chat`,method:"POST",advancedOptions:e},{path:`${r}/run/v1/feedback`,method:"POST",advancedOptions:e}]}),i.current=!0,console.log("[botid-debug] initBotId returned successfully")}catch(fNe){console.warn("[botid-debug] initBotId threw",fNe)}}),[r,a,n,o]),null}const zJ=["light","dark"],BJ="(prefers-color-scheme: dark)",HJ="undefined"==typeof window,UJ=he.createContext(void 0),$J={setColorMode:e=>{},colorModes:[]};function VJ(e,t){const n=he.useContext(UJ)??$J;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const GJ=e=>(he.useContext(UJ),wg.jsx(WJ,{...e})),qJ=["light","dark"],WJ=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=qJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=he.useState((()=>ZJ(a,i))),[m,g]=he.useState((()=>ZJ(a))),y=l?Object.values(l):o,b=he.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=XJ());const c=l?l[o]:o,u=t?KJ():null,f=d&&p&&(null==(a=document.getElementById(d))?void 0:a.shadowRoot),h=f?f.getElementById(p)??document.documentElement:document.documentElement;if("class"===s?(h.classList.remove(...y),c&&h.classList.add(c)):c?h.setAttribute(s,c):h.removeAttribute(s),r){const e=zJ.includes(i)?i:null,t=zJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=he.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Kce){}}),[e]),k=he.useCallback((t=>{const r=XJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);he.useEffect((()=>{const e=window.matchMedia(BJ);return e.addListener(k),k(e),()=>e.removeListener(k)}),[k]),he.useEffect((()=>{const e=e=>{if(e.key!==a)return;const t=e.newValue||i;v(t)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[v]),he.useEffect((()=>{b(e??f)}),[e,f]);const x=he.useMemo((()=>({colorMode:f,setColorMode:v,forcedColorMode:e,resolvedColorMode:"system"===f?m:f,colorModes:n?[...o,"system"]:o,systemColorMode:n?m:void 0})),[f,v,e,m,n,o]);return wg.jsxs(UJ.Provider,{value:x,children:[wg.jsx(YJ,{forcedColorMode:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:a,colorModes:o,defaultColorMode:i,attribute:s,value:l,children:c,attrs:y,nonce:u,shadowHostId:d,rootId:p}),c]})},YJ=he.memo((({forcedColorMode:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultColorMode:o,value:i,attrs:s,nonce:l,shadowHostId:c,rootId:u})=>{const d="system"===o,p=(()=>{const e=c&&u?`document.getElementById('${c}').shadowRoot.getElementById('${u}')`:"document.documentElement";if("class"===n){return`var d=${e},c=d.classList;${`c.remove(${s.map((e=>`'${e}'`)).join(",")})`};`}return`var d=${e},n='${n}',s='setAttribute';`})(),f=(()=>{if(!a)return"";return(zJ.includes(o)?o:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e"})(),h=(e,t=!1,r=!0)=>{const o=i?i[e]:e,s=t?`${e}|| ''`:`'${o}'`;let l="";return a&&r&&!t&&zJ.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=e?`!function(){${p}${h(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${BJ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":`else{${h(o,!1,!1)}}`}${f}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(o,!1,!1)};}${f}}catch(t){}}();`;return wg.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),ZJ=(e,t)=>{if(HJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Kce){}return n||t},KJ=()=>{const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout((()=>{document.head.removeChild(e)}),1)}},XJ=e=>{e||(e=window.matchMedia(BJ));return e.matches?"dark":"light"};var QJ=Object.prototype.hasOwnProperty;function JJ(e,t,n){for(n of e.keys())if(e0(n,t))return n}function e0(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&e0(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=JJ(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=JJ(t,a)))return!1;if(!e0(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(QJ.call(e,n)&&++r&&!QJ.call(t,n))return!1;if(!(n in t)||!e0(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function t0(){const{baseSettings:e}=wR(),[t,n]=he.useState([]),r=function(e){const t=he.useRef(void 0);e0(t.current,e)||(t.current=e);return t.current}(e.theme.styles),{customStyles:a,linksCount:o}=he.useMemo((()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:e,styleSheets:t}=r.reduce(((e,t)=>("link"===t.type?e.links.push(t):"style"===t.type&&e.styleSheets.push(t),e)),{links:[],styleSheets:[]}),a=t.map((e=>wg.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??QZ("link_")))),o=e.map((e=>{const t=e.key??QZ("stylesheet_");return wg.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:wg.jsxs(wg.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const n0=({children:e})=>{const{baseSettings:t}=wR(),{theme:n,primaryBrandColor:r,shadowHost:a,rootElement:o,colorMode:i}=t,{primaryColors:s,varsClassName:l}=n,{disableLoadingDefaultFont:c,fontFamily:u,fontSize:d,zIndex:p}=n,f=Dk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=Fk[n]||n,a=(n,r=[])=>{for(const[o,i]of Object.entries(n)){const n=[...r,o];if("object"==typeof i&&null!==i)a(i,n);else{const r=n.map((e=>e.replace(/([A-Z])/g,"-$1").toLowerCase())).join("-");t[`--ikp-${e}-${r}`]=i}}};a(r)}return t}({colors:lg(n.colors,f),fontFamily:u,fontSize:d,zIndex:p}),{customStyles:m,loaded:g}=t0(),{sync:y,forcedColorMode:b,...v}=i??{},[k,x]=he.useState(),w=he.useRef(null);return he.useEffect((()=>{var e,t;if(!(null==y?void 0:y.target))return;const n="string"==typeof y.target?document.querySelector(y.target):y.target;if(!n)return;function r(e,t){return t.reduce(((t,n)=>({...t,[n]:e.getAttribute(n)})),{})}const a=new MutationObserver((()=>{var e,t;const a=r(n,y.attributes),o=(null==(e=y.isDarkMode)?void 0:e.call(y,a))?"dark":"light";null==(t=y.onChange)||t.call(y,o),x(o)}));a.observe(n,{attributes:!0,attributeFilter:y.attributes,childList:!1,subtree:!1}),w.current=a;const o=(null==(e=y.isDarkMode)?void 0:e.call(y,r(n,null==y?void 0:y.attributes)))?"dark":"light";return null==(t=y.onChange)||t.call(y,o),x(o),()=>a.disconnect()}),[y]),wg.jsxs(wg.Fragment,{children:[!c&&wg.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');\n "}}),m,g&&wg.jsx(GJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:wg.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function r0(e){const{children:t,config:n,componentType:r}=e;return wg.jsxs(xR,{value:{...n,componentType:r},children:[wg.jsx(jJ,{}),wg.jsx(n0,{children:wg.jsx(_R,{children:t})})]})}const a0=he.createContext(void 0),o0=({children:e,source:t})=>wg.jsx(a0.Provider,{value:{source:t},children:e}),i0=()=>{const e=he.useContext(a0);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},s0=he.createContext(void 0),l0=({children:e,widget:t})=>wg.jsx(s0.Provider,{value:t,children:e}),c0=()=>he.useContext(s0),u0=(e,t)=>{const{isOpen:n,onOpenChange:r,defaultOpen:a=!1,shortcutKey:o,triggerSelector:i=t.defaultTriggerSelector}=e??{},{logEvent:s}=SR(),[l=a,c]=eK({prop:n,defaultProp:a??!1,onChange:r}),u=i||t.defaultTriggerSelector;(e=>{const{triggerSelector:t,onTriggerClick:n}=e;he.useEffect((()=>{const e=e=>{var r;const a=e.target;t&&(null==(r=null==a?void 0:a.matches)?void 0:r.call(a,t))&&(null==n||n())};return t&&document.addEventListener("click",e),()=>{t&&document.removeEventListener("click",e)}}),[t,n])})({triggerSelector:u,onTriggerClick:u?()=>c(!l):void 0});const d=he.useRef(!0);he.useEffect((()=>{d.current?d.current=!1:s({eventName:l?`${t.eventNamePrefix}_opened`:`${t.eventNamePrefix}_closed`,properties:{}})}),[l,t.eventNamePrefix]);const p=he.useRef(l);return p.current=l,he.useEffect((()=>{const e=e=>{o&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===o.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),c(!0)),"Escape"===e.key&&p.current&&(e.preventDefault(),c(!1))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o,c]),{isOpen:l,setOpen:c,shortcutKey:o}},d0=he.createContext(void 0),p0=({children:e,value:t})=>wg.jsx(d0.Provider,{value:t,children:e}),f0=()=>{const e=he.useContext(d0);if(!e)throw new Error("useSidebarChat must be used within a SidebarChatProvider");return e},h0=he.createContext(void 0),m0=({children:e,value:t})=>wg.jsx(h0.Provider,{value:t,children:e});var g0=he.useLayoutEffect,y0=function(e,t){"function"!=typeof e?e.current=t:e(t)},b0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},v0=function(e){Object.keys(b0).forEach((function(t){e.style.setProperty(t,b0[t],"important")}))},k0=null,x0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var w0=function(){},E0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],_0=!!document.documentElement.currentStyle,S0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,E0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(_0&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function T0(e,t,n){var r,a,o=(r=n,a=me.useRef(r),g0((function(){a.current=r})),a);he.useLayoutEffect((function(){var n=function(e){return o.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}}),[])}var C0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],A0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?w0:o,s=e.onHeightChange,l=void 0===s?w0:s,c=x$(e,C0),u=void 0!==c.value,d=he.useRef(null),p=function(e,t){var n=me.useRef();return me.useCallback((function(r){e.current=r,n.current&&y0(n.current,null),n.current=t,t&&y0(t,r)}),[t])}(d,t),f=he.useRef(0),h=he.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:S0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),k0||((k0=document.createElement("textarea")).setAttribute("tabindex","-1"),k0.setAttribute("aria-hidden","true"),v0(k0)),null===k0.parentNode&&document.body.appendChild(k0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;k0.style[t]=i[t]})),v0(k0),k0.value=t;var l=x0(k0,e);k0.value=t,l=x0(k0,e),k0.value="x";var c=k0.scrollHeight-a,u=c*n;"border-box"===s&&(u=u+a+o),l=Math.max(u,l);var d=c*r;return"border-box"===s&&(d=d+a+o),[l=Math.min(d,l),c]}(t,e.value||e.placeholder||"x",a,r),i=o[0],s=o[1];f.current!==i&&(f.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return he.useLayoutEffect(m),function(e,t){T0(document.body,"reset",(function(n){e.current.form===n.target&&t(n)}))}(d,(function(){if(!u){var e=d.current,t=e.value;requestAnimationFrame((function(){t!==e.value&&m()}))}})),T0(window,"resize",m),function(e){T0(document.fonts,"loadingdone",e)}(m),he.createElement("textarea",w$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},N0=he.forwardRef(A0),I0="Avatar",[O0]=fK(I0),[R0,P0]=O0(I0),L0=he.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=he.useState("idle");return wg.jsx(R0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:wg.jsx(kK.span,{...r,ref:t})})}));L0.displayName=I0;var D0="AvatarImage",M0=he.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=P0(D0,n),s=function(e,t){const[n,r]=he.useState("idle");return OK((()=>{if(!e)return void r("error");let n=!0;const a=new window.Image,o=e=>()=>{n&&r(e)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{n=!1}}),[e,t]),n}(r,o.referrerPolicy),l=xK((e=>{a(e),i.onImageLoadingStatusChange(e)}));return OK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?wg.jsx(kK.img,{...o,ref:t,src:r}):null}));M0.displayName=D0;var F0="AvatarFallback",j0=he.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=P0(F0,n),[i,s]=he.useState(void 0===r);return he.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>s(!0)),r);return()=>window.clearTimeout(e)}}),[r]),i&&"loaded"!==o.imageLoadingStatus?wg.jsx(kK.span,{...a,ref:t}):null}));j0.displayName=F0;var z0=L0,B0=M0,H0=j0;var U0="Checkbox",[$0]=fK(U0),[V0,G0]=$0(U0),q0=he.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[p,f]=he.useState(null),h=pK(t,(e=>f(e))),m=he.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=GQ({prop:a,defaultProp:o,onChange:c}),v=he.useRef(y);return he.useEffect((()=>{const e=null==p?void 0:p.form;if(e){const t=()=>b(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[p,b]),wg.jsxs(V0,{scope:n,state:y,disabled:s,children:[wg.jsx(kK.button,{type:"button",role:"checkbox","aria-checked":K0(y)?"mixed":y,"aria-required":i,"data-state":X0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:cK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:cK(e.onClick,(e=>{b((e=>!!K0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&wg.jsx(Z0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!K0(o)&&o})]})}));q0.displayName=U0;var W0="CheckboxIndicator",Y0=he.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=G0(W0,n);return wg.jsx($Q,{present:r||K0(o.state)||!0===o.state,children:wg.jsx(kK.span,{"data-state":X0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));Y0.displayName=W0;var Z0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,i=he.useRef(null),s=function(e){const t=he.useRef({value:e,previous:e});return he.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n),l=kQ(t);he.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=K0(n),a.call(e,!K0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=he.useRef(!K0(n)&&n);return wg.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function K0(e){return"indeterminate"===e}function X0(e){return K0(e)?"indeterminate":e?"checked":"unchecked"}var Q0=q0,J0=Y0,e1=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=he.Children.toArray(n),o=a.find(r1);if(o){const e=o.props.children,n=a.map((t=>t===o?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(t1,{...r,ref:t,children:he.isValidElement(e)?he.cloneElement(e,void 0,n):null})}return wg.jsx(t1,{...r,ref:t,children:n})}));e1.displayName="Slot";var t1=he.forwardRef(((e,t)=>{const{children:n,...r}=e;if(he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==he.Fragment&&(a.ref=t?dK(t,e):e),he.cloneElement(n,a)}return he.Children.count(n)>1?he.Children.only(null):null}));t1.displayName="SlotClone";var n1=({children:e})=>wg.jsx(wg.Fragment,{children:e});function r1(e){return he.isValidElement(e)&&e.type===n1}var a1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=he.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?e1:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var o1,i1="dismissableLayer.update",s1="dismissableLayer.pointerDownOutside",l1="dismissableLayer.focusOutside",c1=he.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u1=he.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=he.useContext(c1),[u,d]=he.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=he.useState({}),h=pK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1),a=he.useRef((()=>{}));return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){p1(s1,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1);return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){p1(l1,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return wK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),he.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(o1=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),d1(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o1)}}),[u,p,n,c]),he.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),d1())}),[u,c]),he.useEffect((()=>{const e=()=>f({});return document.addEventListener(i1,e),()=>document.removeEventListener(i1,e)}),[]),wg.jsx(a1.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:cK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:cK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:cK(e.onPointerDownCapture,x.onPointerDownCapture)})}));u1.displayName="DismissableLayer";function d1(){const e=new CustomEvent(i1);document.dispatchEvent(e)}function p1(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Ce.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}he.forwardRef(((e,t)=>{const n=he.useContext(c1),r=he.useRef(null),a=pK(t,r);return he.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),wg.jsx(a1.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var f1=0;function h1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var m1="focusScope.autoFocusOnMount",g1="focusScope.autoFocusOnUnmount",y1={bubbles:!1,cancelable:!0},b1=he.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=he.useState(null),c=xK(a),u=xK(o),d=he.useRef(null),p=pK(t,(e=>l(e))),f=he.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;he.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:w1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||w1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&w1(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),he.useEffect((()=>{if(s){E1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(m1,y1);s.addEventListener(m1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(w1(r,{select:t}),document.activeElement!==n)return}((e=v1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&w1(s))}return()=>{s.removeEventListener(m1,c),setTimeout((()=>{const e=new CustomEvent(g1,y1);s.addEventListener(g1,u),s.dispatchEvent(e),e.defaultPrevented||w1(t??document.body,{select:!0}),s.removeEventListener(g1,u),E1.remove(f)}),0)}}var e}),[s,c,u,f]);const h=he.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=v1(e),n=k1(t,e),r=k1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&w1(o,{select:!0})):(e.preventDefault(),n&&w1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return wg.jsx(a1.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function v1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function k1(e,t){for(const n of e)if(!x1(n,{upTo:t}))return n}function x1(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function w1(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}b1.displayName="FocusScope";var E1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_1(e,t),e.unshift(t)},remove(t){var n;e=_1(e,t),null==(n=e[0])||n.resume()}}}();function _1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var S1=he.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return wg.jsx(a1.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:wg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));S1.displayName="Arrow";var T1=S1,C1="Popper",[A1,N1]=fK(C1),[I1,O1]=A1(C1),R1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=he.useState(null);return wg.jsx(I1,{scope:t,anchor:r,onAnchorChange:a,children:n})};R1.displayName=C1;var P1="PopperAnchor",L1=he.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=O1(P1,n),i=he.useRef(null),s=pK(t,i);return he.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:wg.jsx(a1.div,{...a,ref:s})}));L1.displayName=P1;var D1="PopperContent",[M1,F1]=A1(D1),j1=he.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=O1(D1,l),[E,_]=he.useState(null),S=pK(t,(e=>_(e))),[T,C]=he.useState(null),A=kQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(U1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=uQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>KX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[dQ({mainAxis:u+I,alignmentAxis:p}),h&&pQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?fQ():void 0,...D}),h&&hQ({...D}),mQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&yQ({element:T,padding:f}),$1({arrowWidth:N,arrowHeight:I}),b&&gQ({strategy:"referenceHidden",...D})]}),[H,U]=V1(j),$=xK(k);OK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=he.useState();return OK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),wg.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:wg.jsx(M1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:wg.jsx(a1.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));j1.displayName=D1;var z1="PopperArrow",B1={top:"bottom",right:"left",bottom:"top",left:"right"},H1=he.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=F1(z1,n),o=B1[a.placedSide];return wg.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:wg.jsx(T1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function U1(e){return null!==e}H1.displayName=z1;var $1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=V1(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function V1(e){const[t,n="center"]=e.split("-");return[t,n]}var G1=R1,q1=L1,W1=j1,Y1=H1,Z1=new WeakMap,K1=new WeakMap,X1={},Q1=0,J1=function(e){return e&&(e.host||J1(e.parentNode))},e2=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=J1(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);X1[n]||(X1[n]=new WeakMap);var o=X1[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(Z1.get(e)||0)+1,c=(o.get(e)||0)+1;Z1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&K1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Kce){console.error("aria-hidden: cannot operate on ",e,Kce)}}))};return u(t),s.clear(),Q1++,function(){i.forEach((function(e){var t=Z1.get(e)-1,a=o.get(e)-1;Z1.set(e,t),o.set(e,a),t||(K1.has(e)||e.removeAttribute(r),K1.delete(e)),a||e.removeAttribute(n)})),--Q1||(Z1=new WeakMap,Z1=new WeakMap,K1=new WeakMap,X1={})}},t2=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),e2(r,a,n,"aria-hidden")):function(){return null}},n2="right-scroll-bar-position",r2="width-before-scroll-bar";function a2(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var o2="undefined"!=typeof window?he.useLayoutEffect:he.useEffect,i2=new WeakMap;function s2(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return a2(e,t)}))},(a=he.useState((function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=r,a.facade);return o2((function(){var t=i2.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||a2(e,null)})),r.forEach((function(e){n.has(e)||a2(e,a)}))}i2.set(o,e)}),[e]),o}function l2(e){return e}var c2=function(e){var t=e.sideCar,n=S$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return he.createElement(r,_$({},n))};c2.isSideCarExport=!0;var u2=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=l2);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=_$({async:!0,ssr:!1},e),t}(),d2=function(){},p2=he.forwardRef((function(e,t){var n=he.useRef(null),r=he.useState({onScrollCapture:d2,onWheelCapture:d2,onTouchMoveCapture:d2}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,v=e.gapMode,k=S$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=s2([n,t]),E=_$(_$({},k),a);return he.createElement(he.Fragment,null,u&&he.createElement(x,{sideCar:u2,removeScrollBar:c,shards:d,noRelative:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:v}),i?he.cloneElement(he.Children.only(s),_$(_$({},E),{ref:w})):he.createElement(b,_$({},E,{className:l,ref:w}),s))}));p2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},p2.classNames={fullWidth:r2,zeroRight:n2};function f2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var h2=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=f2())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},m2=function(){var e,t=(e=h2(),function(t,n){he.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},g2={left:0,top:0,right:0,gap:0},y2=function(e){return parseInt(e||"",10)||0},b2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return g2;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[y2(n),y2(r),y2(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},v2=m2(),k2="data-scroll-locked",x2=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(k2,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(n2," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(r2," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(n2," .").concat(n2," {\n right: 0 ").concat(r,";\n }\n \n .").concat(r2," .").concat(r2," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(k2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},w2=function(){var e=parseInt(document.body.getAttribute(k2)||"0",10);return isFinite(e)?e:0},E2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;he.useEffect((function(){return document.body.setAttribute(k2,(w2()+1).toString()),function(){var e=w2()-1;e<=0?document.body.removeAttribute(k2):document.body.setAttribute(k2,e.toString())}}),[]);var o=he.useMemo((function(){return b2(a)}),[a]);return he.createElement(v2,{styles:x2(o,!t,a,n?"":"!important")})},_2=!1;if("undefined"!=typeof window)try{var S2=Object.defineProperty({},"passive",{get:function(){return _2=!0,!0}});window.addEventListener("test",S2,S2),window.removeEventListener("test",S2,S2)}catch(fNe){_2=!1}var T2=!!_2&&{passive:!1},C2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},A2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),N2(e,r)){var a=I2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},N2=function(e,t){return"v"===e?function(e){return C2(e,"overflowY")}(t):function(e){return C2(e,"overflowX")}(t)},I2=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},O2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},R2=function(e){return[e.deltaX,e.deltaY]},P2=function(e){return e&&"current"in e?e.current:e},L2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},D2=0,M2=[];function F2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const j2=(z2=function(e){var t=he.useRef([]),n=he.useRef([0,0]),r=he.useRef(),a=he.useState(D2++)[0],o=he.useState(m2)[0],i=he.useRef(e);he.useEffect((function(){i.current=e}),[e]),he.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=T$([e.lockRef.current],(e.shards||[]).map(P2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=he.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=O2(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===u||f.contains(u)))return!1;var h=A2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=A2(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=a*r,i=n.target,s=t.contains(i),l=!1,c=o>0,u=0,d=0;do{if(!i)break;var p=I2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&N2(e,i)&&(u+=h,d+=f);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:c)}),[]),l=he.useCallback((function(e){var n=e;if(M2.length&&M2[M2.length-1]===o){var r="deltaY"in n?R2(n):O2(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a}))[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(P2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=he.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:F2(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=he.useCallback((function(e){n.current=O2(e),r.current=void 0}),[]),d=he.useCallback((function(t){c(t.type,R2(t),t.target,s(t,e.lockRef.current))}),[]),p=he.useCallback((function(t){c(t.type,O2(t),t.target,s(t,e.lockRef.current))}),[]);he.useEffect((function(){return M2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,T2),document.addEventListener("touchmove",l,T2),document.addEventListener("touchstart",u,T2),function(){M2=M2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,T2),document.removeEventListener("touchmove",l,T2),document.removeEventListener("touchstart",u,T2)}}),[]);var f=e.removeScrollBar,h=e.inert;return he.createElement(he.Fragment,null,h?he.createElement(o,{styles:L2(a)}):null,f?he.createElement(E2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},u2.useMedium(z2),c2);var z2,B2=he.forwardRef((function(e,t){return he.createElement(p2,_$({},e,{ref:t,sideCar:j2}))}));B2.classNames=p2.classNames;var H2="Popover",[U2]=fK(H2,[N1]),$2=N1(),[V2,G2]=U2(H2),q2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=$2(t),l=he.useRef(null),[c,u]=he.useState(!1),[d=!1,p]=GQ({prop:r,defaultProp:a,onChange:o});return wg.jsx(G1,{...s,children:wg.jsx(V2,{scope:t,contentId:LK(),triggerRef:l,open:d,onOpenChange:p,onOpenToggle:he.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:c,onCustomAnchorAdd:he.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:he.useCallback((()=>u(!1)),[]),modal:i,children:n})})};q2.displayName=H2;var W2="PopoverAnchor";he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=G2(W2,n),o=$2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return he.useEffect((()=>(i(),()=>s())),[i,s]),wg.jsx(q1,{...o,...r,ref:t})})).displayName=W2;var Y2="PopoverTrigger",Z2=he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=G2(Y2,n),o=$2(n),i=pK(t,a.triggerRef),s=wg.jsx(a1.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":o5(a.open),...r,ref:i,onClick:cK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:wg.jsx(q1,{asChild:!0,...o,children:s})}));Z2.displayName=Y2;var[K2,X2]=U2("PopoverPortal",{forceMount:void 0}),Q2="PopoverContent",J2=he.forwardRef(((e,t)=>{const n=X2(Q2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=G2(Q2,e.__scopePopover);return wg.jsx($Q,{present:r||o.open,children:o.modal?wg.jsx(e5,{...a,ref:t}):wg.jsx(t5,{...a,ref:t})})}));J2.displayName=Q2;var e5=he.forwardRef(((e,t)=>{const n=G2(Q2,e.__scopePopover),r=he.useRef(null),a=pK(t,r),o=he.useRef(!1);return he.useEffect((()=>{const e=r.current;if(e)return t2(e)}),[]),wg.jsx(B2,{as:e1,allowPinchZoom:!0,children:wg.jsx(n5,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:cK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:cK(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:cK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),t5=he.forwardRef(((e,t)=>{const n=G2(Q2,e.__scopePopover),r=he.useRef(!1),a=he.useRef(!1);return wg.jsx(n5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),n5=he.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=G2(Q2,n),f=$2(n);return he.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??h1()),document.body.insertAdjacentElement("beforeend",e[1]??h1()),f1++,()=>{1===f1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),f1--}}),[]),wg.jsx(b1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:wg.jsx(u1,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:wg.jsx(W1,{"data-state":o5(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),r5="PopoverClose";he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=G2(r5,n);return wg.jsx(a1.button,{type:"button",...r,ref:t,onClick:cK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=r5;var a5=he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=$2(n);return wg.jsx(Y1,{...a,...r,ref:t})}));function o5(e){return e?"open":"closed"}a5.displayName="PopoverArrow";var i5=q2,s5=Z2,l5=J2,c5=a5,u5=he.createContext(void 0);var d5="ScrollArea",[p5]=fK(d5),[f5,h5]=p5(d5),m5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=he.useState(null),[c,u]=he.useState(null),[d,p]=he.useState(null),[f,h]=he.useState(null),[m,g]=he.useState(null),[y,b]=he.useState(0),[v,k]=he.useState(0),[x,w]=he.useState(!1),[E,_]=he.useState(!1),S=pK(t,(e=>l(e))),T=function(e){const t=he.useContext(u5);return e||t||"ltr"}(a);return wg.jsx(f5,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:w,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:k,children:wg.jsx(kK.div,{dir:T,...i,ref:S,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})})}));m5.displayName=d5;var g5="ScrollAreaViewport",y5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=h5(g5,n),s=pK(t,he.useRef(null),i.onViewportChange);return wg.jsxs(wg.Fragment,{children:[wg.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),wg.jsx(kK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:wg.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));y5.displayName=g5;var b5="ScrollAreaScrollbar",v5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(b5,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s="horizontal"===e.orientation;return he.useEffect((()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)})),[s,o,i]),"hover"===a.type?wg.jsx(k5,{...r,ref:t,forceMount:n}):"scroll"===a.type?wg.jsx(x5,{...r,ref:t,forceMount:n}):"auto"===a.type?wg.jsx(w5,{...r,ref:t,forceMount:n}):"always"===a.type?wg.jsx(E5,{...r,ref:t}):null}));v5.displayName=b5;var k5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(b5,e.__scopeScrollArea),[o,i]=he.useState(!1);return he.useEffect((()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout((()=>i(!1)),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[a.scrollArea,a.scrollHideDelay]),wg.jsx($Q,{present:n||o,children:wg.jsx(w5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),x5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(b5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=U5((()=>l("SCROLL_END")),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},he.useReducer(((e,t)=>u[e][t]??e),c));var c,u;return he.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),a.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,a.scrollHideDelay,l]),he.useEffect((()=>{const e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[a.viewport,o,l,i]),wg.jsx($Q,{present:n||"hidden"!==s,children:wg.jsx(E5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:cK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:cK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),w5=he.forwardRef(((e,t)=>{const n=h5(b5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=he.useState(!1),s="horizontal"===e.orientation,l=U5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return $5(n.viewport,l),$5(n.content,l),wg.jsx($Q,{present:r||o,children:wg.jsx(E5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),E5=he.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=h5(b5,e.__scopeScrollArea),o=he.useRef(null),i=he.useRef(0),[s,l]=he.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=M5(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const a=F5(n),o=a/2,i=t||o,s=a-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return z5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?wg.jsx(_5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=j5(a.viewport.scrollLeft,s,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?wg.jsx(S5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=j5(a.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null})),_5=he.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=h5(b5,e.__scopeScrollArea),[i,s]=he.useState(),l=he.useRef(null),c=pK(t,l,o.onScrollbarXChange);return he.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),wg.jsx(A5,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":F5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),B5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:D5(i.paddingLeft),paddingEnd:D5(i.paddingRight)}})}})})),S5=he.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=h5(b5,e.__scopeScrollArea),[i,s]=he.useState(),l=he.useRef(null),c=pK(t,l,o.onScrollbarYChange);return he.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),wg.jsx(A5,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":F5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),B5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:D5(i.paddingTop),paddingEnd:D5(i.paddingBottom)}})}})})),[T5,C5]=p5(b5),A5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=h5(b5,n),[h,m]=he.useState(null),g=pK(t,(e=>m(e))),y=he.useRef(null),b=he.useRef(""),v=f.viewport,k=r.content-r.viewport,x=xK(u),w=xK(l),E=U5(d,10);function _(e){if(y.current){const t=e.clientX-y.current.left,n=e.clientY-y.current.top;c({x:t,y:n})}}return he.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[v,h,k,x]),he.useEffect(w,[r,w]),$5(h,E),$5(f.content,E),wg.jsx(T5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:xK(o),onThumbPointerUp:xK(i),onThumbPositionChange:w,onThumbPointerDown:xK(s),children:wg.jsx(kK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:cK(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),y.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),_(e)}})),onPointerMove:cK(e.onPointerMove,_),onPointerUp:cK(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,f.viewport&&(f.viewport.style.scrollBehavior=""),y.current=null}))})})})),N5="ScrollAreaThumb",I5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=C5(N5,e.__scopeScrollArea);return wg.jsx($Q,{present:n||a.hasThumb,children:wg.jsx(O5,{ref:t,...r})})})),O5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=h5(N5,n),i=C5(N5,n),{onThumbPositionChange:s}=i,l=pK(t,(e=>i.onThumbChange(e))),c=he.useRef(void 0),u=U5((()=>{c.current&&(c.current(),c.current=void 0)}),100);return he.useEffect((()=>{const e=o.viewport;if(e){const t=()=>{if(u(),!c.current){const t=H5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),wg.jsx(kK.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:cK(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})})),onPointerUp:cK(e.onPointerUp,i.onThumbPointerUp)})}));I5.displayName=N5;var R5="ScrollAreaCorner",P5=he.forwardRef(((e,t)=>{const n=h5(R5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?wg.jsx(L5,{...e,ref:t}):null}));P5.displayName=R5;var L5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=h5(R5,n),[o,i]=he.useState(0),[s,l]=he.useState(0),c=Boolean(o&&s);return $5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),$5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?wg.jsx(kK.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null}));function D5(e){return e?parseInt(e,10):0}function M5(e,t){const n=e/t;return isNaN(n)?0:n}function F5(e){const t=M5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function j5(e,t,n="ltr"){const r=F5(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-r,l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,i]:[-1*i,0]);return z5([0,i],[0,s])(l)}function z5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function B5(e,t){return e>0&&e<t}var H5=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,s=n.top!==o.top;(i||s)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function U5(e,t){const n=xK(e),r=he.useRef(0);return he.useEffect((()=>()=>window.clearTimeout(r.current)),[]),he.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function $5(e,t){const n=xK(t);OK((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}var V5=m5,G5=y5,q5=P5;function W5(e,[t,n]){return Math.min(n,Math.max(t,e))}function Y5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function Z5(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>he.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return he.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=he.createContext(r);a.displayName=t+"Context";const o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=he.useMemo((()=>s),Object.values(s));return wg.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=he.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},K5(r,...t)]}function K5(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return he.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function X5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Q5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=X5(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():X5(e[t],null)}}}}function J5(...e){return he.useCallback(Q5(...e),e)}var e3=Symbol.for("react.lazy"),t3=ge[" use ".trim().toString()];function n3(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===e3&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function r3(e){const t=a3(e),n=he.forwardRef(((e,n)=>{let{children:r,...a}=e;n3(r)&&"function"==typeof t3&&(r=t3(r._payload));const o=he.Children.toArray(r),i=o.find(i3);if(i){const e=i.props.children,r=o.map((t=>t===i?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(t,{...a,ref:n,children:he.isValidElement(e)?he.cloneElement(e,void 0,r):null})}return wg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function a3(e){const t=he.forwardRef(((e,t)=>{let{children:n,...r}=e;if(n3(n)&&"function"==typeof t3&&(n=t3(n._payload)),he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==he.Fragment&&(a.ref=t?Q5(t,e):e),he.cloneElement(n,a)}return he.Children.count(n)>1?he.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var o3=Symbol("radix.slottable");function i3(e){return he.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o3}var s3=he.createContext(void 0);function l3(e){const t=he.useContext(s3);return e||t||"ltr"}function c3(e){const t=u3(e),n=he.forwardRef(((e,n)=>{const{children:r,...a}=e,o=he.Children.toArray(r),i=o.find(p3);if(i){const e=i.props.children,r=o.map((t=>t===i?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(t,{...a,ref:n,children:he.isValidElement(e)?he.cloneElement(e,void 0,r):null})}return wg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function u3(e){const t=he.forwardRef(((e,t)=>{const{children:n,...r}=e;if(he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==he.Fragment&&(a.ref=t?Q5(t,e):e),he.cloneElement(n,a)}return he.Children.count(n)>1?he.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var d3=Symbol("radix.slottable");function p3(e){return he.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===d3}var f3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=c3(`Primitive.${t}`),r=he.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function h3(e){const t=he.useRef(e);return he.useEffect((()=>{t.current=e})),he.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}var m3,g3="dismissableLayer.update",y3="dismissableLayer.pointerDownOutside",b3="dismissableLayer.focusOutside",v3=he.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),k3=he.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=he.useContext(v3),[u,d]=he.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=he.useState({}),h=J5(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=h3(e),r=he.useRef(!1),a=he.useRef((()=>{}));return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){w3(y3,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=h3(e),r=he.useRef(!1);return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){w3(b3,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=h3(e);he.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),he.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(m3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),x3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=m3)}}),[u,p,n,c]),he.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),x3())}),[u,c]),he.useEffect((()=>{const e=()=>f({});return document.addEventListener(g3,e),()=>document.removeEventListener(g3,e)}),[]),wg.jsx(f3.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:Y5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Y5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Y5(e.onPointerDownCapture,x.onPointerDownCapture)})}));k3.displayName="DismissableLayer";function x3(){const e=new CustomEvent(g3);document.dispatchEvent(e)}function w3(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Ce.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}he.forwardRef(((e,t)=>{const n=he.useContext(v3),r=he.useRef(null),a=J5(t,r);return he.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),wg.jsx(f3.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var E3=0;function _3(){he.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??S3()),document.body.insertAdjacentElement("beforeend",e[1]??S3()),E3++,()=>{1===E3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),E3--}}),[])}function S3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var T3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=r3(`Primitive.${t}`),r=he.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),C3="focusScope.autoFocusOnMount",A3="focusScope.autoFocusOnUnmount",N3={bubbles:!1,cancelable:!0},I3=he.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=he.useState(null),c=h3(a),u=h3(o),d=he.useRef(null),p=J5(t,(e=>l(e))),f=he.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;he.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:L3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||L3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&L3(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),he.useEffect((()=>{if(s){D3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(C3,N3);s.addEventListener(C3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(L3(r,{select:t}),document.activeElement!==n)return}((e=O3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&L3(s))}return()=>{s.removeEventListener(C3,c),setTimeout((()=>{const e=new CustomEvent(A3,N3);s.addEventListener(A3,u),s.dispatchEvent(e),e.defaultPrevented||L3(t??document.body,{select:!0}),s.removeEventListener(A3,u),D3.remove(f)}),0)}}var e}),[s,c,u,f]);const h=he.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=O3(e),n=R3(t,e),r=R3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&L3(o,{select:!0})):(e.preventDefault(),n&&L3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return wg.jsx(T3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function O3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function R3(e,t){for(const n of e)if(!P3(n,{upTo:t}))return n}function P3(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function L3(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}I3.displayName="FocusScope";var D3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=M3(e,t),e.unshift(t)},remove(t){var n;e=M3(e,t),null==(n=e[0])||n.resume()}}}();function M3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var F3=he.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return wg.jsx(f3.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:wg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));F3.displayName="Arrow";var j3=F3;function z3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>he.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return he.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=he.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=he.useMemo((()=>s),Object.values(s));return wg.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=he.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},B3(r,...t)]}function B3(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return he.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var H3="Popper",[U3,$3]=z3(H3),[V3,G3]=U3(H3),q3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=he.useState(null);return wg.jsx(V3,{scope:t,anchor:r,onAnchorChange:a,children:n})};q3.displayName=H3;var W3="PopperAnchor",Y3=he.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=G3(W3,n),i=he.useRef(null),s=J5(t,i),l=he.useRef(null);return he.useEffect((()=>{const e=l.current;l.current=(null==r?void 0:r.current)||i.current,e!==l.current&&o.onAnchorChange(l.current)})),r?null:wg.jsx(f3.div,{...a,ref:s})}));Y3.displayName=W3;var Z3="PopperContent",[K3,X3]=U3(Z3),Q3=he.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=G3(Z3,l),[E,_]=he.useState(null),S=J5(t,(e=>_(e))),[T,C]=he.useState(null),A=function(e){const[t,n]=he.useState(void 0);return aR((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(n4),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=uQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>KX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[dQ({mainAxis:u+I,alignmentAxis:p}),h&&pQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?fQ():void 0,...D}),h&&hQ({...D}),mQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&yQ({element:T,padding:f}),r4({arrowWidth:N,arrowHeight:I}),b&&gQ({strategy:"referenceHidden",...D})]}),[H,U]=a4(j),$=h3(k);aR((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=he.useState();return aR((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),wg.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:wg.jsx(K3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:wg.jsx(f3.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));Q3.displayName=Z3;var J3="PopperArrow",e4={top:"bottom",right:"left",bottom:"top",left:"right"},t4=he.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=X3(J3,n),o=e4[a.placedSide];return wg.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:wg.jsx(j3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function n4(e){return null!==e}t4.displayName=J3;var r4=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=a4(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function a4(e){const[t,n="center"]=e.split("-");return[t,n]}var o4=q3,i4=Y3,s4=Q3,l4=t4,c4=he.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=he.useState(!1);aR((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?Ae.createPortal(wg.jsx(T3.div,{...a,ref:t}),s):null}));c4.displayName="Portal";const u4=[" ","Enter","ArrowUp","ArrowDown"],d4=[" ","Enter"],p4="Select",[f4,h4,m4]=function(e){const t=e+"CollectionProvider",[n,r]=Z5(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=me.useRef(null),o=me.useRef(new Map).current;return wg.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=r3(s),c=me.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=J5(t,o(s,n).collectionRef);return wg.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=r3(u),f=me.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=me.useRef(null),s=J5(t,i),l=o(u,n);return me.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),wg.jsx(p,{[d]:"",ref:s,children:r})}));return f.displayName=u,[{Provider:i,Slot:c,ItemSlot:f},function(t){const n=o(e+"CollectionConsumer",t);return me.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(p4),[g4]=Z5(p4,[m4,$3]),y4=$3(),[b4,v4]=g4(p4),[k4,x4]=g4(p4),w4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:c,disabled:u,required:d}=e,p=y4(t),[f,h]=he.useState(null),[m,g]=he.useState(null),[y,b]=he.useState(!1),v=l3(c),[k,x]=eK({prop:r,defaultProp:a??!1,onChange:o,caller:p4}),[w,E]=eK({prop:i,defaultProp:s,onChange:l,caller:p4}),_=he.useRef(null),[S,T]=he.useState(new Set);return wg.jsx(o4,{...p,children:wg.jsx(b4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:sR(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:wg.jsx(f4.Provider,{scope:t,children:wg.jsx(k4,{scope:e.__scopeSelect,onNativeOptionAdd:he.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:he.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:n})})})})};w4.displayName=p4;const E4="SelectTrigger",_4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=y4(n),i=v4(E4,n),s=i.disabled||r,l=J5(t,i.onTriggerChange),c=h4(n),u=he.useRef("touch"),[d,p,f]=a6((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=o6(t,e,n);void 0!==r&&i.onValueChange(r.value)})),h=e=>{s||(i.onOpenChange(!0),f()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return wg.jsx(i4,{asChild:!0,...o,children:wg.jsx(T3.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":r6(i.value)?"":void 0,...a,ref:l,onClick:Y5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:Y5(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:Y5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||u4.includes(e.key)&&(h(),e.preventDefault())}))})})}));_4.displayName=E4;const S4="SelectValue",T4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=v4(S4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=J5(t,l.onValueNodeChange);return aR((()=>{c(u)}),[c,u]),wg.jsx(T3.span,{...s,ref:d,style:{pointerEvents:"none"},children:r6(l.value)?wg.jsx(wg.Fragment,{children:i}):o})}));T4.displayName=S4;const C4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return wg.jsx(T3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));C4.displayName="SelectIcon";const A4="SelectContent",N4=he.forwardRef(((e,t)=>{const n=v4(A4,e.__scopeSelect),[r,a]=he.useState();if(aR((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?Ce.createPortal(wg.jsx(O4,{scope:e.__scopeSelect,children:wg.jsx(f4.Slot,{scope:e.__scopeSelect,children:wg.jsx("div",{children:e.children})})}),t):null}return wg.jsx(L4,{...e,ref:t})}));N4.displayName=A4;const I4=10,[O4,R4]=g4(A4),P4=r3("SelectContent.RemoveScroll"),L4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g,...y}=e,b=v4(A4,n),[v,k]=he.useState(null),[x,w]=he.useState(null),E=J5(t,(e=>k(e))),[_,S]=he.useState(null),[T,C]=he.useState(null),A=h4(n),[N,I]=he.useState(!1),O=he.useRef(!1);he.useEffect((()=>{if(v)return t2(v)}),[v]),_3();const R=he.useCallback((e=>{const[t,...n]=A().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const o of e){if(o===a)return;if(null==o||o.scrollIntoView({block:"nearest"}),o===t&&x&&(x.scrollTop=0),o===r&&x&&(x.scrollTop=x.scrollHeight),null==o||o.focus(),document.activeElement!==a)return}}),[A,x]),P=he.useCallback((()=>R([_,v])),[R,_,v]);he.useEffect((()=>{N&&P()}),[N,P]);const{onOpenChange:L,triggerPointerDownPosRef:D}=b;he.useEffect((()=>{if(v){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=D.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=D.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():v.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[v,L,D]),he.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[M,F]=a6((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=o6(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),j=he.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(S(e),r&&(O.current=!0))}),[b.value]),z=he.useCallback((()=>null==v?void 0:v.focus()),[v]),B=he.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),H="popper"===r?M4:D4,U=H===M4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return wg.jsx(O4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:N,searchRef:M,children:wg.jsx(B2,{as:P4,allowPinchZoom:!0,removeScrollBar:!1,children:wg.jsx(I3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Y5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:wg.jsx(k3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:wg.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Y5(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=A().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));L4.displayName="SelectContentImpl";const D4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=v4(A4,n),i=R4(A4,n),[s,l]=he.useState(null),[c,u]=he.useState(null),d=J5(t,(e=>u(e))),p=h4(n),f=he.useRef(!1),h=he.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,v=he.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&g&&y){const e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=y.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-I4,d=W5(o,[I4,Math.max(I4,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-I4,d=W5(o,[I4,Math.max(I4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*I4,u=m.scrollHeight,d=window.getComputedStyle(c),h=Number.parseInt(d.borderTopWidth,10),b=Number.parseInt(d.paddingTop,10),v=Number.parseInt(d.borderBottomWidth,10),k=h+b+u+Number.parseInt(d.paddingBottom,10)+v,x=Math.min(5*g.offsetHeight,k),w=window.getComputedStyle(m),E=Number.parseInt(w.paddingTop,10),_=Number.parseInt(w.paddingBottom,10),S=e.top+e.height/2-I4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),N=k-A;if(A<=S){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=A+Math.max(T,C+(e?_:0)+t+v);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?E:0)+C)+N;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${I4}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>f.current=!0))}}),[p,o.trigger,o.valueNode,s,c,m,g,y,o.dir,r]);aR((()=>v()),[v]);const[k,x]=he.useState();aR((()=>{c&&x(window.getComputedStyle(c).zIndex)}),[c]);const w=he.useCallback((e=>{e&&!0===h.current&&(v(),null==b||b(),h.current=!1)}),[v,b]);return wg.jsx(F4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:wg.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:wg.jsx(T3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));D4.displayName="SelectItemAlignedPosition";const M4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=I4,...o}=e,i=y4(n);return wg.jsx(s4,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));M4.displayName="SelectPopperPosition";const[F4,j4]=g4(A4,{}),z4="SelectViewport",B4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=R4(z4,n),i=j4(z4,n),s=J5(t,o.onViewportChange),l=he.useRef(0);return wg.jsxs(wg.Fragment,{children:[wg.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),wg.jsx(f4.Slot,{scope:n,children:wg.jsx(T3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Y5(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if((null==r?void 0:r.current)&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*I4,a=Number.parseFloat(n.style.minHeight),o=Number.parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))})})]})}));B4.displayName=z4;const H4="SelectGroup",[U4,$4]=g4(H4);he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=sR();return wg.jsx(U4,{scope:n,id:a,children:wg.jsx(T3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=H4;const V4="SelectLabel";he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=$4(V4,n);return wg.jsx(T3.div,{id:a.id,...r,ref:t})})).displayName=V4;const G4="SelectItem",[q4,W4]=g4(G4),Y4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=v4(G4,n),l=R4(G4,n),c=s.value===r,[u,d]=he.useState(o??""),[p,f]=he.useState(!1),h=J5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=sR(),g=he.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return wg.jsx(q4,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:he.useCallback((e=>{d((t=>t||((null==e?void 0:e.textContent)??"").trim()))}),[]),children:wg.jsx(f4.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:wg.jsx(T3.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:Y5(i.onFocus,(()=>f(!0))),onBlur:Y5(i.onBlur,(()=>f(!1))),onClick:Y5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:Y5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:Y5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:Y5(i.onPointerMove,(e=>{var t;g.current=e.pointerType,a?null==(t=l.onItemLeave)||t.call(l):"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Y5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:Y5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(d4.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));Y4.displayName=G4;const Z4="SelectItemText",K4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=v4(Z4,n),s=R4(Z4,n),l=W4(Z4,n),c=x4(Z4,n),[u,d]=he.useState(null),p=J5(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,l.value,l.disabled)})),f=null==u?void 0:u.textContent,h=he.useMemo((()=>wg.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return aR((()=>(m(h),()=>g(h))),[m,g,h]),wg.jsxs(wg.Fragment,{children:[wg.jsx(T3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ce.createPortal(o.children,i.valueNode):null]})}));K4.displayName=Z4;const X4="SelectItemIndicator",Q4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return W4(X4,n).isSelected?wg.jsx(T3.span,{"aria-hidden":!0,...r,ref:t}):null}));Q4.displayName=X4;const J4="SelectScrollUpButton";he.forwardRef(((e,t)=>{const n=R4(J4,e.__scopeSelect),r=j4(J4,e.__scopeSelect),[a,o]=he.useState(!1),i=J5(t,r.onScrollButtonChange);return aR((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?wg.jsx(t6,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=J4;const e6="SelectScrollDownButton";he.forwardRef(((e,t)=>{const n=R4(e6,e.__scopeSelect),r=j4(e6,e.__scopeSelect),[a,o]=he.useState(!1),i=J5(t,r.onScrollButtonChange);return aR((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?wg.jsx(t6,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=e6;const t6=he.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=R4("SelectScrollButton",n),i=he.useRef(null),s=h4(n),l=he.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return he.useEffect((()=>()=>l()),[l]),aR((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})}),[s]),wg.jsx(T3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Y5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:Y5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:Y5(a.onPointerLeave,(()=>{l()}))})}));he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return wg.jsx(T3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const n6="SelectArrow";function r6(e){return""===e||void 0===e}function a6(e){const t=h3(e),n=he.useRef(""),r=he.useRef(0),a=he.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=he.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return he.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function o6(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map(((e,t)=>i[(s+t)%i.length])));var i,s;1===r.length&&(o=o.filter((e=>e!==n)));const l=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=y4(n),o=v4(n6,n),i=R4(n6,n);return o.open&&"popper"===i.position?wg.jsx(l4,{...a,...r,ref:t}):null})).displayName=n6;const i6=w4,s6=_4,l6=T4,c6=C4,u6=N4,d6=B4,p6=Y4,f6=K4,h6=Q4;var m6=(e,t=[])=>({parts:(...n)=>{if(y6(t))return m6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>m6(e,[...t,...n]),omit:(...n)=>m6(e,t.filter((e=>!n.includes(e)))),rename:e=>m6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${g6(e)}"][data-part="${g6(n)}"]`,`& [data-scope="${g6(e)}"][data-part="${g6(n)}"]`].join(", "),attrs:{"data-scope":g6(e),"data-part":g6(n)}}})),{})}),g6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),y6=e=>0===e.length,b6=m6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),v6=Object.defineProperty,k6=(e,t,n)=>((e,t,n)=>t in e?v6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),x6={itemToValue:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"label")?e.label:x6.itemToValue(e),isItemDisabled:e=>!(!Gq(e)||!Wq(e,"disabled"))&&!!e.disabled},w6=class e{constructor(t){this.options=t,k6(this,"items"),k6(this,"indexMap",null),k6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),k6(this,"isEqual",(e=>$q(this.items,e.items))),k6(this,"setItems",(e=>this.copy(e))),k6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),k6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),k6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),k6(this,"at",(e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;const n=this.group();for(const[,r]of n)for(const n of r){if(t===e)return n;t++}return null})),k6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),k6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),k6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??x6.itemToValue(e)})),k6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??x6.isItemDisabled(e))})),k6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??x6.itemToString(e)})),k6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),k6(this,"stringifyItems",((e,t=", ")=>{const n=[];for(const r of e){const e=this.stringifyItem(r);null!=e&&n.push(e)}return n.join(t)})),k6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),k6(this,"has",(e=>-1!==this.indexOf(e))),k6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),k6(this,"group",(()=>{const{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];const n=new Map;this.items.forEach(((t,r)=>{const a=e(t,r);n.has(a)||n.set(a,[]),n.get(a).push(t)}));let r=Array.from(n.entries());return t&&r.sort((([e],[n])=>{if("function"==typeof t)return t(e,n);if(Array.isArray(t)){const r=t.indexOf(e),a=t.indexOf(n);return-1===r?1:-1===a?-1:r-a}return"asc"===t?e.localeCompare(n):"desc"===t?n.localeCompare(e):0})),r})),k6(this,"getNextValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))})),k6(this,"getPreviousValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))})),k6(this,"indexOf",(e=>{if(null==e)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex((t=>this.getItemValue(t)===e));if(!this.indexMap){this.indexMap=new Map;let e=0;const t=this.group();for(const[,n]of t)for(const t of n){const n=this.getItemValue(t);null!=n&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1})),k6(this,"getByText",((e,t)=>{const n=null!=t?this.indexOf(t):-1,r=1===e.length;for(let a=0;a<this.items.length;a++){const o=this.items[(n+a+1)%this.items.length];if((!r||this.getItemValue(o)!==t)&&(!this.getItemDisabled(o)&&E6(this.stringifyItem(o),e)))return o}})),k6(this,"search",((e,t)=>{const{state:n,currentValue:r,timeout:a=350}=t,o=n.keysSoFar+e,i=o.length>1&&Array.from(o).every((e=>e===o[0]))?o[0]:o,s=this.getByText(i,r),l=this.getItemValue(s);function c(){clearTimeout(n.timer),n.timer=-1}return function e(t){n.keysSoFar=t,c(),""!==t&&(n.timer=+setTimeout((()=>{e(""),c()}),a))}(o),l})),k6(this,"update",((e,t)=>{let n=this.indexOf(e);return-1===n?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])})),k6(this,"upsert",((e,t,n="append")=>{let r=this.indexOf(e);if(-1===r){return("append"===n?this.append:this.prepend)(t)}return this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])})),k6(this,"insert",((e,...t)=>this.copy(_6(this.items,e,...t)))),k6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(_6(this.items,n,...t))})),k6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(_6(this.items,n+1,...t))})),k6(this,"prepend",((...e)=>this.copy(_6(this.items,0,...e)))),k6(this,"append",((...e)=>this.copy(_6(this.items,this.items.length,...e)))),k6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),k6(this,"remove",((...e)=>{const t=e.map((e=>"string"==typeof e?e:this.getItemValue(e)));return this.copy(this.items.filter((e=>{const n=this.getItemValue(e);return null!=n&&!t.includes(n)})))})),k6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(S6(this.items,[n],t))})),k6(this,"moveBefore",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(S6(this.items,r,n))})),k6(this,"moveAfter",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(S6(this.items,r,n+1))})),k6(this,"reorder",((e,t)=>this.copy(S6(this.items,[e],t)))),k6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),k6(this,"range",((e,t)=>{let n=[],r=e;for(;null!=r;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]})),k6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),k6(this,"toString",(()=>{let e="";for(const t of this.items){e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+","}return e})),k6(this,"toJSON",(()=>({size:this.size,first:this.firstValue,last:this.lastValue}))),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},E6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function _6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function S6(e,t,n){const r=(t=[...t].sort(((e,t)=>e-t))).map((t=>e[t]));for(let a=t.length-1;a>=0;a--)e=[...e.slice(0,t[a]),...e.slice(t[a]+1)];return n=Math.max(0,n-t.filter((e=>e<n)).length),[...e.slice(0,n),...r,...e.slice(n)]}function T6({values:e,collection:t,selectedItemMap:n}){const r=[];for(const a of e){const e=t.find(a)??n.get(a);null!=e&&r.push(e)}return r}function C6({selectedItemMap:e,values:t,selectedItems:n,collection:r}){const a=new Map(e);for(const i of n){const e=r.getItemValue(i);null!=e&&a.set(e,i)}const o=new Set(t);for(const i of a.keys())o.has(i)||a.delete(i);return a}function A6({values:e,collection:t,selectedItemMap:n}){const r=T6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:C6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function N6({selectedItems:e,collection:t}){return C6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var I6=e=>new w6(e);function O6(e=0,t=0,n=0,r=0){if("function"==typeof DOMRect)return new DOMRect(e,t,n,r);const a={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...a,toJSON:()=>a}}function R6(e,t){return{contextElement:AW(e)?e:null==e?void 0:e.contextElement,getBoundingClientRect:()=>{const n=e,r=null==t?void 0:t(n);return r||!n?function(e){if(!e)return O6();const{x:t,y:n,width:r,height:a}=e;return O6(t,n,r,a)}(r):n.getBoundingClientRect()}}}I6.empty=()=>new w6({items:[]});var P6=e=>({variable:e,reference:`var(${e})`}),L6={arrowSize:P6("--arrow-size"),arrowSizeHalf:P6("--arrow-size-half"),arrowBg:P6("--arrow-background"),transformOrigin:P6("--transform-origin"),arrowOffset:P6("--arrow-offset")};function D6(e,t){return{name:"transformOrigin",fn(n){var r,a,o,i;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,p=c.split("-")[0],f=(e=>"top"===e||"bottom"===e?"y":"x")(p),h=(null==(r=l.arrow)?void 0:r.x)||0,m=(null==(a=l.arrow)?void 0:a.y)||0,g=(null==t?void 0:t.clientWidth)||0,y=(null==t?void 0:t.clientHeight)||0,b=h+g/2,v=m+y/2,k=Math.abs((null==(o=l.shift)?void 0:o.y)||0),x=u.reference.height/2,w=y/2,E=(null==(i=e.offset)?void 0:i.mainAxis)??e.gutter,_="number"==typeof E?E+w:E??w,S=k>_,T={top:`${b}px calc(100% + ${_}px)`,bottom:`${b}px ${-_}px`,left:`calc(100% + ${_}px) ${v}px`,right:`${-_}px ${v}px`}[p],C=`${b}px ${u.reference.y+x-d}px`,A=Boolean(e.overlap)&&"y"===f&&S;return s.floating.style.setProperty(L6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var M6={name:"rects",fn:({rects:e})=>({data:e})},F6=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:a}=n.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=r?`${r}px`:"",top:null!=a?`${a}px`:"",[o]:`calc(100% + ${L6.arrowOffset.reference})`}),{}}}};var j6={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function z6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function B6(e,t){return null!=e&&Math.abs(e-t)<.5}function H6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function U6(e,t,n){const r=e||t.createElement("div");return nQ({element:r,padding:n.arrowPadding})}function $6(e,t){if(null!=(t.offset??t.gutter))return XX((({placement:n})=>{var r,a;const o=((null==e?void 0:e.clientHeight)||0)/2,i=(null==(r=t.offset)?void 0:r.mainAxis)??t.gutter,s="number"==typeof i?i+o:i??o,{hasAlign:l}=function(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:null!=n}}(n),c=l?void 0:t.shift;return nW({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function V6(e){if(!e.flip)return;const t=H6(e.boundary);return JX({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function G6(e){if(!e.slide&&!e.overlap)return;const t=H6(e.boundary);return QX({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:rQ()})}function q6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return eQ({padding:e.overflowPadding,apply({elements:e,rects:o,availableHeight:i,availableWidth:s}){const l=e.floating,c=Math.round(o.reference.width),u=Math.round(o.reference.height);s=Math.floor(s),i=Math.floor(i),B6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),B6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),B6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),B6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function W6(e){if(e.hideWhenDetached)return tQ({strategy:"referenceHidden",boundary:H6(e.boundary)??"clippingAncestors"})}var Y6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],Z6=["top","right","bottom","left"];function K6(e,t){if(!e)return Jq;const n=new Map(t.map((t=>[t,e.style.getPropertyValue(t)])));return()=>{n.forEach(((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)})),0===e.style.length&&e.removeAttribute("style")}}function X6(e,t,n={}){const{defer:r,...a}=n,o=r?_Y:e=>e(),i=[];return i.push(o((()=>{const n="function"==typeof e?e():e,r="function"==typeof t?t():t;i.push(function(e,t,n={}){var r;const a=R6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},j6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?K6(t,Y6):void 0,l=o.restoreStyles?K6(i,Z6):void 0,c=[$6(i,o),V6(o),G6(o),U6(i,t.ownerDocument,o),F6(i),D6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),q6(o),W6(o),M6],{placement:u,strategy:d,onComplete:p,onPositioned:f}=o;let h,m,g=!1;const y=async()=>{var e;if(!a||!t)return;const n=await aQ(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=jW(t),i=z6(r,n.x),s=z6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,B6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),B6(m,s)||(t.style.setProperty("--y",`${s}px`),m=s),o.hideWhenDetached&&((null==(e=n.middlewareData.hide)?void 0:e.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events"))),!g){const e=t.firstElementChild;e&&(t.style.setProperty("--z-index",$W(e).zIndex),g=!0)}},b=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:y,floatingElement:t}),null==f||f({placed:!0})):await y()},v=function(e){return e?!0===e?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}(o.listeners),k=o.listeners?KX(a,t,b,v):Jq;return b(),()=>{null==k||k(),null==l||l(),null==s||s(),null==f||f({placed:!1})}}(n,r,a))}))),()=>{i.forEach((e=>null==e?void 0:e()))}}var Q6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var J6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},e8=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},t8=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},n8=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},r8=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},a8=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},o8=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},i8=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroup)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup:${t}`},s8=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroupLabel)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup-label:${t}`},l8=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.item)?void 0:r.call(n,t))??`combobox:${e.id}:option:${t}`},c8=e=>e.getById(n8(e)),u8=e=>e.getById(t8(e)),d8=e=>e.getById(r8(e)),p8=e=>e.getById(e8(e)),f8=e=>e.getById(a8(e)),h8=(e,t)=>{if(null==t)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return function(e,t){return(null==e?void 0:e.querySelector(t))??null}(c8(e),n)},m8=e=>{const t=u8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),EW(t)};function g8(e,t){const{context:n,prop:r,state:a,send:o,scope:i,computed:s,event:l}=e,c=r("translations"),u=r("collection"),d=!!r("disabled"),p=s("isInteractive"),f=!!r("invalid"),h=!!r("required"),m=!!r("readOnly"),g=a.hasTag("open"),y=a.hasTag("focused"),b=r("composite"),v=n.get("highlightedValue"),k=function(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:a="absolute"}=e;return{arrow:{position:"absolute",width:L6.arrowSize.reference,height:L6.arrowSize.reference,[L6.arrowSizeHalf.variable]:`calc(${L6.arrowSize.reference} / 2)`,[L6.arrowOffset.variable]:`calc(${L6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Q6[t.split("-")[0]]:void 0,background:L6.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:a,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}({...r("positioning"),placement:n.get("currentPlacement")});function x(e){const t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return oW(r,(()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`)),{value:r,disabled:Boolean(d||t),highlighted:v===r,selected:n.get("value").includes(r)}}return{focused:y,open:g,inputValue:n.get("inputValue"),highlightedValue:v,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:s("valueAsString"),hasSelectedItems:s("hasSelectedItems"),selectedItems:s("selectedItems"),collection:r("collection"),multiple:!!r("multiple"),disabled:!!d,syncSelectedItems(){o({type:"SELECTED_ITEMS.SYNC"})},reposition(e={}){o({type:"POSITIONING.SET",options:e})},setHighlightValue(e){o({type:"HIGHLIGHTED_VALUE.SET",value:e})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(e){o({type:"ITEM.SELECT",value:e})},setValue(e){o({type:"VALUE.SET",value:e})},setInputValue(e,t="script"){o({type:"INPUT_VALUE.SET",value:e,src:t})},clearValue(e){o(null!=e?{type:"ITEM.CLEAR",value:e}:{type:"VALUE.CLEAR"})},focus(){var e;null==(e=u8(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...b6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":TW(f),"data-readonly":TW(m)});var e,n},getLabelProps:()=>t.label({...b6.label.attrs,dir:r("dir"),htmlFor:t8(i),id:J6(i),"data-readonly":TW(m),"data-disabled":TW(d),"data-invalid":TW(f),"data-required":TW(h),"data-focus":TW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=f8(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...b6.control.attrs,dir:r("dir"),id:e8(i),"data-state":g?"open":"closed","data-focus":TW(y),"data-disabled":TW(d),"data-invalid":TW(f)}),getPositionerProps:()=>t.element({...b6.positioner.attrs,dir:r("dir"),id:r8(i),style:k.floating}),getInputProps:()=>t.input({...b6.input.attrs,dir:r("dir"),"aria-invalid":CW(f),"data-invalid":TW(f),"data-autofocus":TW(r("autoFocus")),name:r("name"),form:r("form"),disabled:d,required:r("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:m,placeholder:r("placeholder"),id:t8(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":n8(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?l8(i,v):void 0,onClick(e){e.defaultPrevented||r("openOnClick")&&p&&o({type:"INPUT.CLICK",src:"input-click"})},onFocus(){d||o({type:"INPUT.FOCUS"})},onBlur(){d||o({type:"INPUT.BLUR"})},onChange(e){o({type:"INPUT.CHANGE",value:e.currentTarget.value,src:"input-change"})},onKeyDown(e){if(e.defaultPrevented)return;if(!p)return;if(e.ctrlKey||e.shiftKey||function(e){return function(e){return e.nativeEvent??e}(e).isComposing||229===e.keyCode}(e))return;const t=r("openOnKeyPress"),n=e.ctrlKey||e.metaKey||e.shiftKey,a=!0,l={ArrowDown(e){(t||g)&&(o({type:e.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:a,src:"arrow-key"}),e.preventDefault())},ArrowUp(){(t||g)&&(o({type:e.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:a,src:"arrow-key"}),e.preventDefault())},Home(e){n||(o({type:"INPUT.HOME",keypress:a}),g&&e.preventDefault())},End(e){n||(o({type:"INPUT.END",keypress:a}),g&&e.preventDefault())},Enter(e){var t;o({type:"INPUT.ENTER",keypress:a,src:"item-select"});const n=s("isCustomValue")&&r("allowCustomValue"),l=null!=v,c=r("alwaysSubmitOnEnter");if(g&&!n&&!c&&l&&e.preventDefault(),null==v)return;const u=h8(i,v);var d;(null==(d=u)?void 0:d.matches("a[href]"))&&(null==(t=r("navigate"))||t({value:v,node:u,href:u.href}))},Escape(){o({type:"INPUT.ESCAPE",keypress:a,src:"escape-key"}),e.preventDefault()}}[cY(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...b6.trigger.attrs,dir:r("dir"),id:a8(i),"aria-haspopup":b?"listbox":"dialog",type:"button",tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":g,"data-state":g?"open":"closed","aria-controls":g?n8(i):void 0,disabled:d,"data-invalid":TW(f),"data-focusable":TW(e.focusable),"data-readonly":TW(m),"data-disabled":TW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&oY(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&oY(e)&&(e.preventDefault(),queueMicrotask((()=>{m8(i)})))},onKeyDown(e){if(e.defaultPrevented)return;if(b)return;const t={ArrowDown(){o({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){o({type:"INPUT.ARROW_UP",src:"arrow-key"})}}[cY(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...b6.content.attrs,dir:r("dir"),id:n8(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":J6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":TW(0===u.size),onPointerDown(e){oY(e)&&e.preventDefault()}}),getListProps:()=>t.element({...b6.list.attrs,role:b?void 0:"listbox","data-empty":TW(0===u.size),"aria-labelledby":J6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...b6.clearTrigger.attrs,dir:r("dir"),id:o8(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":TW(f),"aria-label":c.clearTriggerLabel,"aria-controls":t8(i),hidden:!n.get("value").length,onPointerDown(e){oY(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||p&&o({type:"VALUE.CLEAR",src:"clear-trigger"})}}),getItemState:x,getItemProps(e){const n=x(e),a=n.value;return t.element({...b6.item.attrs,dir:r("dir"),id:l8(i,a),role:"option",tabIndex:-1,"data-highlighted":TW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":CW(n.selected),"aria-disabled":CW(n.disabled),"data-disabled":TW(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||o({type:"ITEM.POINTER_MOVE",value:a})},onPointerLeave(){if(e.persistFocus)return;if(n.disabled)return;const t=l.previous();(null==t?void 0:t.type.includes("POINTER"))&&o({type:"ITEM.POINTER_LEAVE",value:a})},onClick(e){(function(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)})(e)||rY(e)||iY(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...b6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":TW(n.disabled),"data-highlighted":TW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...b6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...b6.itemGroup.attrs,dir:r("dir"),id:i8(i,n),"aria-labelledby":s8(i,n),"data-empty":TW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...b6.itemGroupLabel.attrs,dir:r("dir"),id:s8(i,n),role:"presentation"})}}}var y8="pointerdown.outside",b8="focus.outside";function v8(e){for(const t of e)if(AW(t)&&vY(t))return!0;return!1}var k8=e=>"clientY"in e;function x8(e,t){if(!t||!k8(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,o=a&&e.clientY>t.offsetTop+t.clientHeight;return!!function(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(a?16:0)},{x:e.clientX,y:e.clientY})&&(r||o)}function w8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=FW(e),c=jW(e),u=function(e){const t={each(t){var n;for(let r=0;r<(null==(n=e.frames)?void 0:n.length);r+=1){const n=e.frames[r];n&&t(n)}},addEventListener:(e,n,r)=>(t.each((t=>{try{t.document.addEventListener(e,n,r)}catch{}})),()=>{try{t.removeEventListener(e,n,r)}catch{}}),removeEventListener(e,n,r){t.each((t=>{try{t.document.removeEventListener(e,n,r)}catch{}}))}};return t}(c),d=function(e){const t=null!=e.frameElement?e.parent:null;return{addEventListener:(e,n,r)=>{try{null==t||t.addEventListener(e,n,r)}catch{}return()=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}}}(c);function p(t,r){if(!AW(r))return!1;if(!r.isConnected)return!1;if(MW(e,r))return!1;if(function(e,t){if(!k8(t)||!e)return!1;const n=e.getBoundingClientRect();return 0!==n.width&&0!==n.height&&n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}(e,t))return!1;if(s&&WW(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(x8(t,AY(a)))return!1}return!x8(t,AY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=RW(null==e?void 0:e.getRootNode());let m=!1;function g(t){m=!0;const n=()=>{m=!1};function r(n){var r;const s=i&&!JW()?_Y:e=>e(),l=n??t,c=(null==(r=null==l?void 0:l.composedPath)?void 0:r.call(l))??[null==l?void 0:l.target];s((()=>{const n=h?c[0]:nY(t);if(e&&p(t,n)){if(a||o){const t=eW(a,o);e.addEventListener(y8,t,{once:!0})}_8(e,y8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:iY(l),focusable:v8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(uY(l,"click",r,{once:!0})),f.add(d.addEventListener("click",r,{once:!0})),f.add(u.addEventListener("click",r,{once:!0}))):r()}const y=new Set,b=setTimeout((()=>{y.add(uY(l,"pointerdown",g,!0)),y.add(d.addEventListener("pointerdown",g,!0)),y.add(u.addEventListener("pointerdown",g,!0))}),0);function v(t){if(m)return;(i?_Y:e=>e())((()=>{var n;const a=(null==(n=null==t?void 0:t.composedPath)?void 0:n.call(t))??[null==t?void 0:t.target],i=h?a[0]:nY(t);if(e&&p(t,i)){if(r||o){const t=eW(r,o);e.addEventListener(b8,t,{once:!0})}_8(e,b8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:vY(i),target:i}})}}))}return JW()||(y.add(uY(l,"focusin",v,!0)),y.add(d.addEventListener("focusin",v,!0)),y.add(u.addEventListener("focusin",v,!0))),()=>{clearTimeout(b),f.forEach((e=>e())),y.forEach((e=>e()))}}function E8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(w8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function _8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function S8(e,t){return uY(FW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var T8,C8="layer:request-dismiss",A8={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter((e=>e.pointerBlocking))},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(null==(t=this.topMostPointerBlockingLayer())?void 0:t.node):-1)},isTopMost(e){const t=this.layers[this.count()-1];return(null==t?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter((t=>t.type===e))},getNestedLayersByType(e,t){const n=this.indexOf(e);return-1===n?[]:this.layers.slice(n+1).filter((e=>e.type===t))},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find((e=>e.type===t))},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!this.getNestedLayers(e).some((e=>MW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>MW(t,e)))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);if(!(t<0)){if(this.recentlyRemoved.add(e),SY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>A8.dismiss(t.node,e)))}this.layers.splice(t,1),this.syncLayers()}},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach(((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested");this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)}))},indexOf(e){return this.layers.findIndex((t=>t.node===e))},dismiss(e,t){const n=this.indexOf(e);if(-1===n)return;const r=this.layers[n];var a,o;a=C8,o=e=>{var t;null==(t=r.requestDismiss)||t.call(r,e),e.defaultPrevented||null==r||r.dismiss()},e.addEventListener(a,o,{once:!0}),function(e,t,n){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});e.dispatchEvent(a)}(e,C8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function N8(){A8.layers.forEach((({node:e})=>{e.style.pointerEvents=A8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function I8(e,t){const n=FW(e),r=[];return A8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(T8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=LY((()=>{const t=e();return AW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(PY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{A8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=T8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function O8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n=qq(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void rW("[@zag-js/dismissable] node is `null` or `undefined`");if(!e)return;const{onDismiss:r,onRequestDismiss:a,pointerBlocking:o,exclude:i,debug:s,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:o,requestDismiss:a};A8.add(c),N8();const u=[o?I8(e,t.persistentElements):void 0,S8(e,(function(n){var a;A8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),E8(e,{exclude:function(n){var r;if(!e)return!1;const a="function"==typeof i?i():i,o=Array.isArray(a)?a:[a],s=null==(r=t.persistentElements)?void 0:r.map((e=>e())).filter(AW);return s&&o.push(...s),o.some((e=>MW(e,n)))||A8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=nY(e.detail.originalEvent);A8.isInBranch(o)||(null==(n=t.onFocusOutside)||n.call(t,e),null==(a=t.onInteractOutside)||a.call(t,e),e.defaultPrevented||(s&&console.log("onFocusOutside:",e.detail.originalEvent),null==r||r()))},onPointerDownOutside:function(n){var a,o;const i=nY(n.detail.originalEvent);A8.isBelowPointerBlockingLayer(e)||A8.isInBranch(i)||(null==(a=t.onPointerDownOutside)||a.call(t,n),null==(o=t.onInteractOutside)||o.call(t,n),n.defaultPrevented||(s&&console.log("onPointerDownOutside:",n.detail.originalEvent),null==r||r()))},defer:t.defer})];return()=>{A8.remove(e),N8(),function(e){e.style.pointerEvents=""}(e),u.forEach((e=>null==e?void 0:e()))}}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}var R8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var P8=null,L8=new Set,D8=new Map,M8=!1,F8=!1,j8={Tab:!0,Escape:!0};function z8(e,t){for(let n of L8)n(e,t)}function B8(e){M8=!0,function(e){return!(e.metaKey||!tY()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(P8="keyboard",z8("keyboard",e))}function H8(e){P8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(M8=!0,z8("pointer",e))}function U8(e){aY(e)&&(M8=!0,P8="virtual")}function $8(e){const t=nY(e);t!==jW(t)&&t!==FW(t)&&e.isTrusted&&(M8||F8||(P8="virtual",z8("virtual",e)),M8=!1,F8=!1)}function V8(){M8=!1,F8=!0}var G8=(e,t)=>{const n=jW(e),r=FW(e),a=D8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",B8,!0),r.removeEventListener("keyup",B8,!0),r.removeEventListener("click",U8,!0),n.removeEventListener("focus",$8,!0),n.removeEventListener("blur",V8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",H8,!0),r.removeEventListener("pointermove",H8,!0),r.removeEventListener("pointerup",H8,!0)):(r.removeEventListener("mousedown",H8,!0),r.removeEventListener("mousemove",H8,!0),r.removeEventListener("mouseup",H8,!0)),D8.delete(n)}};function q8(){return"keyboard"===P8||"virtual"===P8}function W8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||D8.get(jW(e)))return;const t=jW(e),n=FW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){M8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",B8,!0),n.addEventListener("keyup",B8,!0),n.addEventListener("click",U8,!0),t.addEventListener("focus",$8,!0),t.addEventListener("blur",V8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",H8,!0),n.addEventListener("pointermove",H8,!0),n.addEventListener("pointerup",H8,!0)):(n.addEventListener("mousedown",H8,!0),n.addEventListener("mousemove",H8,!0),n.addEventListener("mouseup",H8,!0)),t.addEventListener("beforeunload",(()=>{G8(e)}),{once:!0}),D8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||q8(),modality:P8});const o=(e,n)=>{(function(e,t,n){const r=n?nY(n):null,a=FW(r),o=jW(r),i=zW(a);return!((e=e||i instanceof o.HTMLInputElement&&!R8.has(null==i?void 0:i.type)||i instanceof o.HTMLTextAreaElement||i instanceof o.HTMLElement&&i.isContentEditable)&&"keyboard"===t&&n instanceof o.KeyboardEvent&&!Reflect.has(j8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:q8(),modality:e}))};return L8.add(o),()=>{L8.delete(o)}}var{guards:Y8,createMachine:Z8,choose:K8}={guards:{and:(...e)=>function(t){return e.every((e=>t.guard(e)))},or:(...e)=>function(t){return e.some((e=>t.guard(e)))},not:e=>function(t){return!t.guard(e)}},createMachine:e=>bW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:X8,not:Q8}=Y8,J8=Z8({props:({props:e})=>({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){CY(e)},collection:I6.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open.suggesting":"closed.idle",context({prop:e,bindable:t,getContext:n,getEvent:r}){const a=e("value")??e("defaultValue")??[],o=e("collection").findMany(a);return{currentPlacement:t((()=>({defaultValue:void 0}))),value:t((()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:$q,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=A6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:A6({values:s,collection:o,selectedItemMap:i.nextSelectedItemMap});a.set("selectedItemMap",l.nextSelectedItemMap),null==(r=e("onValueChange"))||r({value:t,items:i.selectedItems})}}))),highlightedValue:t((()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){var n;const r=e("collection").find(t);null==(n=e("onHighlightChange"))||n({highlightedValue:t,highlightedItem:r})}}))),inputValue:t((()=>{let t=e("inputValue")||e("defaultInputValue");const n=e("value")||e("defaultValue");if(!t.trim()&&!e("multiple")){const r=e("collection").stringifyMany(n);t=tW(e("selectionBehavior"),{preserve:t||r,replace:r,clear:""})}return{defaultValue:t,value:e("inputValue"),onChange(t){var n;const a=r(),o=(a.previousEvent||a).src;null==(n=e("onInputValueChange"))||n({inputValue:t,reason:o})}}})),highlightedItem:t((()=>{const t=e("highlightedValue");return{defaultValue:e("collection").find(t)}})),selectedItemMap:t((()=>({defaultValue:N6({selectedItems:o,collection:e("collection")})})))}},computed:{isInputValueEmpty:({context:e})=>0===e.get("inputValue").length,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>"autocomplete"===e("inputBehavior"),autoHighlight:({prop:e})=>"autohighlight"===e("inputBehavior"),hasSelectedItems:({context:e})=>e.get("value").length>0,selectedItems:({context:e,prop:t})=>T6({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:r,send:a}){n([()=>e.hash("value")],(()=>{r(["syncSelectedItems"])})),n([()=>e.get("inputValue")],(()=>{r(["syncInputValue"])})),n([()=>e.get("highlightedValue")],(()=>{r(["syncHighlightedItem","autofillInputValue"])})),n([()=>t("open")],(()=>{r(["toggleVisibility"])})),n([()=>t("collection").toString()],(()=>{a({type:"CHILDREN_CHANGE"})}))},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:K8([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{closed:{tags:["closed"],initial:"idle",states:{idle:{tags:["idle"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"open.interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"open.suggesting"},{target:"open.interacting"}],"INPUT.CHANGE":[{guard:X8("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"open.suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:X8("isCustomValue",Q8("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:X8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:X8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}}}},open:{tags:["open","focused"],entry:["setInitialFocus"],effects:["trackFocusVisible","scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"closed.focused",actions:["setFinalFocus"]},{target:"closed.idle"}],"INPUT.ENTER":[{guard:X8("isOpenControlled","isCustomValue",Q8("hasHighlightedItem"),Q8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:X8("isCustomValue",Q8("hasHighlightedItem"),Q8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:X8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:X8("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:X8("isOpenControlled","isCustomValue",Q8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:X8("isCustomValue",Q8("allowCustomValue")),target:"closed.idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"closed.focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]},initial:"interacting",states:{interacting:{on:{CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:X8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:X8("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.ESCAPE":[{guard:X8("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"closed.focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:X8("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open"),openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return!0===(r=n)||!1===r?n:!!(null==n?void 0:n({inputValue:t.get("inputValue")}));var r},restoreFocus:({event:e})=>{var t;const n=e.restoreFocus??(null==(t=e.previousEvent)?void 0:t.restoreFocus);return null==n||!!n},isChangeEvent:({event:e})=>{var t;return"INPUT.CHANGE"===(null==(t=e.previousEvent)?void 0:t.type)},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackFocusVisible({scope:e}){var t;return W8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return O8((()=>c8(n)),{type:"listbox",defer:!0,exclude:()=>{return[u8(n),f8(n),(e=n,e.getById(o8(e)))];var e},onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement:({context:e,prop:t,scope:n})=>(e.set("currentPlacement",t("positioning").placement),X6((()=>p8(n)||f8(n)),(()=>d8(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=u8(n);let a=[];const o=r=>{if("pointer"===P8)return;const o=e.get("highlightedValue");if(!o)return;const i=c8(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>h8(n,o)})}const l=h8(n,o),c=_Y((()=>{RY(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=_Y((()=>{var e;P8=e="virtual",z8(e,null),o(!0)}));a.push(i);const s=TY(r,{attributes:["aria-activedescendant"],callback:()=>o(!1)});return a.push(s),()=>{a.forEach((e=>e()))}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){X6((()=>p8(n)),(()=>d8(n)),{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setHighlightedValue({context:e,event:t}){null!=t.value&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:r}=e,a=r("collection"),o=n.get("highlightedValue");if(!o||!a.has(o))return;const i=r("multiple")?Hq(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=tW(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){SY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=h8(n,r),o=c8(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>h8(n,r)})}else RY(a,{rootEl:o,block:"nearest"})}))},selectItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{var e;const r=a("multiple")?Hq(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r),clear:""});t.set("inputValue",o)}))},clearItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{const e=Bq(t.get("value"),n.value);t.set("value",e);const r=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){_Y((()=>{m8(e)}))},setFinalFocus({scope:e}){_Y((()=>{const t=f8(e);null==(null==t?void 0:t.dataset.focusable)?m8(e):(e=>{const t=f8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=u8(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&EW(r)})))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const r=tW(t("selectionBehavior"),{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){const{context:t,flush:n,event:r,prop:a}=e;n((()=>{t.set("value",r.value);const e=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r.value),clear:""});t.set("inputValue",e)}))},clearSelectedItems(e){const{context:t,flush:n,prop:r}=e;n((()=>{t.set("value",[]);const e=tW(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany([]),clear:""});t.set("inputValue",e)}))},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const r=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>h8(t,r)})}else{const e=c8(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=e9(t);null==(r=e("onOpenChange"))||r({open:!0,reason:a,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;const a=e9(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(c8(n)?queueMicrotask:_Y)((()=>{const n=t("collection").firstValue;n&&e.set("highlightedValue",n)}))},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(c8(n)?queueMicrotask:_Y)((()=>{const n=t("collection").lastValue;n&&e.set("highlightedValue",n)}))},highlightNextItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getNextValue(r),!n&&t("loopFocus")&&(n=a.firstValue)):n=a.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getPreviousValue(r),!n&&t("loopFocus")&&(n=a.lastValue)):n=a.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){_Y((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){_Y((()=>{let r=null;r=n("hasSelectedItems")?t("collection").sort(e.get("value"))[0]:t("collection").firstValue,r&&e.set("highlightedValue",r)}))},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){_Y((()=>{const r=t("collection");let a=null;a=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue,a&&e.set("highlightedValue",a)}))},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:a}){const o=u8(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));_Y((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=A6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=tW(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:r.stringifyMany(a),clear:""});t.set("inputValue",i)}))},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function e9(e){return(e.previousEvent||e).src}const t9=he.forwardRef(((e,t)=>{const{children:n,defaultValue:r=[],items:a,multiple:o=!1,placeholder:i,name:s,disabled:l,required:c,id:u,onValueChange:d}=e,p=he.useId(),f=u??p,h=cR(),[m,g]=he.useState(a),y=he.useMemo((()=>I6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=g8(jY(J8,{id:f,collection:y,defaultValue:r,multiple:o,placeholder:i,name:s,disabled:l,required:c,openOnClick:!0,getRootNode:()=>{var e;return(null==(e=null==h?void 0:h.shadowHost)?void 0:e.shadowRoot)??document},selectionBehavior:o?"clear":"replace",onOpenChange(e){e.open||g(a)},onInputValueChange(e){const t=""===e.inputValue.trim()?a:a.filter((t=>t.label.toLowerCase().includes(e.inputValue.toLowerCase())));g(t.length>0?t:[])},onValueChange(e){null==d||d(e)}}),UY),v=he.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return wg.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:wg.jsx(m9.Provider,{value:v,children:n})})}));t9.displayName="ComboboxRoot";const n9=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=g9(),o=a.getControlProps();return wg.jsx("div",{"data-scope":"combobox","data-part":"control","data-state":a.open?"open":"closed","data-disabled":a.disabled?"":void 0,"data-focus":a.focused?"":void 0,...o,ref:r9(t,o.ref),...r,children:n})}));function r9(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}n9.displayName="ComboboxControl";const a9=he.forwardRef(((e,t)=>{const n=g9(),r=n.getInputProps();return wg.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:r9(t,r.ref)})}));a9.displayName="ComboboxInput";const o9=he.forwardRef(((e,t)=>{const n=g9(),r=n.getTriggerProps();return wg.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:r9(t,r.ref),...e,children:e.children??"▼"})}));o9.displayName="ComboboxTrigger";const i9=he.forwardRef((function(e,t){const n=g9();return wg.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),s9=he.forwardRef(((e,t)=>{const n=g9(),r=n.getContentProps();return wg.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:r9(t,r.ref),...e,children:e.children})}));s9.displayName="ComboboxContent";const l9=he.forwardRef(((e,t)=>{const n=g9().getListProps();return wg.jsx("div",{ref:r9(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));l9.displayName="ComboboxList";const c9=({children:e})=>{const t=function(){const e=he.useContext(m9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return wg.jsx(wg.Fragment,{children:e(t)})};c9.displayName="ComboboxListItems";const u9=he.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return wg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));u9.displayName="ComboboxListEmpty";const d9=he.createContext(null),p9=he.forwardRef(((e,t)=>{const{item:n,...r}=e,a=g9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return wg.jsx(d9.Provider,{value:n,children:wg.jsx("div",{ref:r9(t,i.ref),"data-scope":"combobox","data-part":"item","data-value":n.value,"data-highlighted":o.highlighted?"":void 0,"data-state":o.selected?"checked":"unchecked","data-disabled":o.disabled?"":void 0,...i,...r,children:e.children})})}));p9.displayName="ComboboxItem";const f9=he.forwardRef(((e,t)=>{const n=he.useContext(d9),r=g9(),a=n?r.getItemTextProps({item:n}):{};return wg.jsx("span",{ref:r9(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));f9.displayName="ComboboxItemText";const h9=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=he.useContext(d9),o=g9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?wg.jsx("span",{ref:r9(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??wg.jsx(DG,{iconSettings:{builtIn:"LuCheck"}})}):null}));h9.displayName="ComboboxItemIndicator";const m9=he.createContext(null);function g9(){const e=he.useContext(m9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const y9=he.forwardRef(((e,t)=>{const n=g9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:wg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>wg.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,wg.jsx("button",{type:"button","data-part":"tag-clear","aria-label":`Remove ${t.label}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t.value)},children:wg.jsx(DG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));y9.displayName="ComboboxSelectedTags";var b9=Object.defineProperty,v9=(e,t,n)=>((e,t,n)=>t in e?b9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),k9={activateTrap(e,t){if(e.length>0){const n=e[e.length-1];n!==t&&n.pause()}const n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},x9=[],w9=class{constructor(e,t){v9(this,"trapStack"),v9(this,"config"),v9(this,"doc"),v9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),v9(this,"portalContainers",new Set),v9(this,"listenerCleanups",[]),v9(this,"handleFocus",(e=>{const t=nY(e),n=this.findContainerIndex(t,e)>=0;if(n||NW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(wY(this.state.mostRecentlyFocusedNode)>0){const e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){const e=r.findIndex((e=>e===this.state.mostRecentlyFocusedNode));e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some((e=>e.tabbableNodes.some((e=>wY(e)>0))))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0})),v9(this,"handlePointerDown",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||(C9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):C9(this.config.allowOutsideClick,e)||e.preventDefault())})),v9(this,"handleClick",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||C9(this.config.clickOutsideDeactivates,e)||C9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),v9(this,"handleTabKey",(e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;const t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;_9(e)&&e.preventDefault(),this.tryFocus(n)}})),v9(this,"handleEscapeKey",(e=>{A9(e)&&!1!==C9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),v9(this,"_mutationObserver"),v9(this,"setupMutationObserver",(()=>{const e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver((e=>{e.some((e=>Array.from(e.removedNodes).some((e=>e===this.state.mostRecentlyFocusedNode))))&&this.tryFocus(this.getInitialFocusNode());e.some((e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return!!function(e){var t;return!!function(e){return e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")}(e)||Boolean(null==(t=e.querySelector)?void 0:t.call(e,'[aria-controls][aria-expanded="true"]'))}(t)||!(!t.id||this.state.containers.some((e=>e.contains(t))))&&ZW(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),v9(this,"updateObservedNodes",(()=>{var e;null==(e=this._mutationObserver)||e.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map((e=>{var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})})),this.portalContainers.forEach((e=>{this.observePortalContainer(e)})))})),v9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!vY(e)){const t=zW(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{const t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");if(e.isConnected||(e=this.getNodeForOption("fallbackFocus")),!e||!e.isConnected)throw new Error("Your focus-trap needs to have at least one focusable element");return e})),v9(this,"tryFocus",(e=>{!1!==e&&e!==zW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,I9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),v9(this,"deactivate",(e=>{if(!this.state.active)return this;const t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),k9.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const n=this.getOption(t,"onDeactivate"),r=this.getOption(t,"onPostDeactivate"),a=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");null==n||n();const i=()=>{N9((()=>{if(o){const e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}null==r||r()}))};if(o&&a){return a(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(i,i),this}return i(),this})),v9(this,"pause",(e=>{if(this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onPause"),n=this.getOption(e,"onPostPause");return this.state.paused=!0,null==t||t(),this.removeListeners(),this.updateObservedNodes(),null==n||n(),this})),v9(this,"unpause",(e=>{if(!this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onUnpause"),n=this.getOption(e,"onPostUnpause");return this.state.paused=!1,null==t||t(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n(),this})),v9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),v9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),v9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),v9(this,"getNodeForOption",((e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if("function"==typeof r&&(r=r(...n)),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let a=r;if("string"==typeof r){try{a=this.doc.querySelector(r)}catch(fNe){throw new Error(`\`${e}\` appears to be an invalid selector; error="${fNe.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),v9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||nY(t);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const e=this.findContainerIndex(r,t),o=e>=0?this.state.containerGroups[e]:void 0;if(e<0)a=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex((({firstTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||vY(r)&&!xY(r)&&!(null==o?void 0:o.nextTabbableNode(r,!1)))&&(n=e),n>=0){const e=0===n?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];a=wY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else _9(t)||(a=null==o?void 0:o.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex((({lastTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||vY(r)&&!xY(r)&&!(null==o?void 0:o.nextTabbableNode(r)))&&(n=e),n>=0){const e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];a=wY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else _9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||x9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:S9,isKeyBackward:T9,...t};this.doc=n.document||FW(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach((e=>{YW(e).forEach((e=>{this.addPortalContainer(e)}))}))}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return this.state.containerGroups.findIndex((({container:t,tabbableNodes:r})=>t.contains(e)||(null==n?void 0:n.includes(t))||r.find((t=>t===e))||this.isControlledElement(t,e)))}isControlledElement(e,t){return!!this.config.followControlledElements&&WW(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=kY(e,{getShadowRoot:this.config.getShadowRoot}),n=bY(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],a=t[t.length-1],o=r,i=a;let s=!1;for(let l=0;l<t.length;l++)if(wY(t[l])>0){s=!0;break}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:i,nextTabbableNode:function(e,r=!0){const a=t.indexOf(e);if(a>=0)return t[a+(r?1:-1)];const o=n.indexOf(e);if(!(o<0))if(r){for(let t=o+1;t<n.length;t++)if(xY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(xY(n[t]))return n[t]}}})),this.state.tabbableGroups=this.state.containerGroups.filter((e=>e.tabbableNodes.length>0)),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find((e=>e.posTabIndexesFound))&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return k9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?N9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(uY(this.doc,"focusin",this.handleFocus,!0),uY(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),uY(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),uY(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach((e=>e())),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=zW(this.doc),null==t||t();const a=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n()};return r?(r(this.state.containers.concat()).then(a,a),this):(a(),this)}},E9=e=>"keydown"===(null==e?void 0:e.type),_9=e=>E9(e)&&"Tab"===(null==e?void 0:e.key),S9=e=>E9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),T9=e=>E9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),C9=(e,...t)=>"function"==typeof e?e(...t):e,A9=e=>!e.isComposing&&"Escape"===e.key,N9=e=>setTimeout(e,0),I9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var O9=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=he.useState(),r=he.useRef(null),a=he.useRef(e),o=he.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return he.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return he.useEffect((()=>{const e=R9(r.current);o.current="mounted"===s?e:"none"}),[s]),aR((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=R9(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),aR((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=R9(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=R9(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:he.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):he.Children.only(n),o=J5(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?he.cloneElement(a,{ref:o}):null};function R9(e){return(null==e?void 0:e.animationName)||"none"}O9.displayName="Presence";var P9="data-scroll-lock";function L9(e){const t=$W(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function D9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(P9))return;const o=L9(r)||L9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(P9,"");const s=function(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}(r),l=[function(e,t,n){if(!e)return _W;const r=e.style.getPropertyValue(t);return r===n?_W:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),eY()?(()=>{const{scrollX:e,scrollY:t,visualViewport:r}=n,l=(null==r?void 0:r.offsetLeft)??0,c=(null==r?void 0:r.offsetTop)??0,u={position:"fixed",overflow:"hidden",top:-(t-Math.floor(c))+"px",left:-(e-Math.floor(l))+"px",right:"0"};!o&&i>0&&(u[s]=`${i}px`);const d=PY(a,u);return()=>{null==d||d(),n.scrollTo({left:e,top:t,behavior:"instant"})}})():(()=>{const e={overflow:"hidden"};return!o&&i>0&&(e[s]=`${i}px`),PY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(P9)}}const M9="Dialog",[F9]=Z5(M9),[j9,z9]=F9(M9),B9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=he.useRef(null),l=he.useRef(null),[c=!1,u]=eK({prop:r,defaultProp:a??!1,onChange:o});return wg.jsx(j9,{scope:t,triggerRef:s,contentRef:l,contentId:sR(),titleId:sR(),descriptionId:sR(),open:c,onOpenChange:u,onOpenToggle:he.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};B9.displayName=M9;const H9="DialogTrigger";he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(H9,n),o=J5(t,a.triggerRef);return wg.jsx(T3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":o7(a.open),...r,ref:o,onClick:Y5(e.onClick,a.onOpenToggle)})})).displayName=H9;const U9="DialogPortal",[$9,V9]=F9(U9,{forceMount:void 0}),G9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=z9(U9,t);return wg.jsx($9,{scope:t,forceMount:n,children:he.Children.map(r,(e=>wg.jsx(O9,{present:n||o.open,children:wg.jsx(c4,{asChild:!0,container:a,children:e})})))})};G9.displayName=U9;const q9="DialogOverlay",W9=he.forwardRef(((e,t)=>{const n=V9(q9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=z9(q9,e.__scopeDialog);return o.modal?wg.jsx(O9,{present:r||o.open,children:wg.jsx(Y9,{...a,ref:t})}):null}));W9.displayName=q9;const Y9=he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(q9,n),o=cR();return he.useEffect((()=>{var e;return D9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),wg.jsx(T3.div,{"data-dialog-overlay":"","data-state":o7(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),Z9="DialogContent",K9=he.forwardRef(((e,t)=>{const n=V9(Z9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=z9(Z9,e.__scopeDialog);return wg.jsx(O9,{present:r||o.open,children:o.modal?wg.jsx(X9,{...a,ref:t}):wg.jsx(Q9,{...a,ref:t})})}));K9.displayName=Z9;const X9=he.forwardRef(((e,t)=>{const n=z9(Z9,e.__scopeDialog),r=he.useRef(null),a=J5(t,n.contentRef,r);return he.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return t2([e,...Array.from(t)])}}),[]),wg.jsx(J9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:Y5(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault();e.target.closest("[data-ikp-component]")&&e.preventDefault()})),onFocusOutside:Y5(e.onFocusOutside,(e=>e.preventDefault()))})})),Q9=he.forwardRef(((e,t)=>{const n=z9(Z9,e.__scopeDialog),r=he.useRef(!1),a=he.useRef(!1);return wg.jsx(J9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),J9=he.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=z9(Z9,n),l=he.useRef(null),c=J5(t,l);return _3(),he.useEffect((()=>{if(r)return function(e,t={}){let n;const r=_Y((()=>{const r=(Array.isArray(e)?e:[e]).map((e=>"function"==typeof e?e():e)).filter((e=>null!=e));if(0===r.length)return;const a=r[0];n=new w9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:FW(a)});try{n.activate()}catch{}}));return function(){null==n||n.deactivate(),r()}}(l.current,{preventScroll:!0,onActivate:a,onDeactivate:o,initialFocus:!1,allowOutsideClick:e=>{var t;const n=(null==(t=e.composedPath)?void 0:t.call(e)[0])??e.target;return!!n.closest("[data-ikp-component]")||!!n.closest("[data-dialog-overlay]")}})}),[]),wg.jsx(k3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":o7(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),e7="DialogTitle",t7=he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(e7,n);return wg.jsx(T3.h2,{id:a.titleId,...r,ref:t})}));t7.displayName=e7;const n7="DialogDescription";he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(n7,n);return wg.jsx(T3.p,{id:a.descriptionId,...r,ref:t})})).displayName=n7;const r7="DialogClose",a7=he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(r7,n);return wg.jsx(T3.button,{type:"button",...r,ref:t,onClick:Y5(e.onClick,(()=>a.onOpenChange(!1)))})}));function o7(e){return e?"open":"closed"}a7.displayName=r7;const i7=B9,s7=G9,l7=W9,c7=K9,u7=t7,d7=a7,p7=he.forwardRef(((e,t)=>{const n=he.useId();return wg.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[wg.jsx("title",{children:"AI Avatar"}),wg.jsx("path",{d:"M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",stroke:`url(#${n}-stroke1)`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),wg.jsx("path",{d:"M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",stroke:`url(#${n}-stroke2)`,strokeLinecap:"round",strokeLinejoin:"round"}),wg.jsx("path",{d:"M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",stroke:`url(#${n}-stroke3)`,strokeLinecap:"round",strokeLinejoin:"round"}),wg.jsxs("defs",{children:[wg.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[wg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),wg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),wg.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[wg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),wg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),wg.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[wg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),wg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),f7=he.forwardRef(((e,t)=>wg.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[wg.jsx("title",{children:"User Avatar"}),wg.jsx("path",{d:"M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",fill:"currentColor"})]}))),h7=he.forwardRef((({isExternal:e,...t},n)=>wg.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));h7.displayName="Link";const m7=he.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=wR(),o=Object.assign({},a.urlQueryParamsToAppend,t),i=e?function(e,t){if(!t)return e;try{const n=new URL(e);for(const e of Object.keys(t))t[e]&&n.searchParams.append(e,t[e]);return n.href}catch{return e}}(e,o):e;return wg.jsx(h7,{ref:r,href:i,...n})}));function g7(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(a,r).trim();!e&&o||t.push(e),a=r+1,r=n.indexOf(",",a)}return t}function y7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}m7.displayName="LinkWithQueryParams";const b7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,v7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,k7={};function x7(e,t){return(k7.jsx?v7:b7).test(e)}const w7=/[ \t\n\f\r]/g;function E7(e){return""===e.replace(w7,"")}class _7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function S7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new _7(n,r,t)}function T7(e){return e.toLowerCase()}_7.prototype.normal={},_7.prototype.property={},_7.prototype.space=void 0;class C7{constructor(e,t){this.attribute=t,this.property=e}}C7.prototype.attribute="",C7.prototype.booleanish=!1,C7.prototype.boolean=!1,C7.prototype.commaOrSpaceSeparated=!1,C7.prototype.commaSeparated=!1,C7.prototype.defined=!1,C7.prototype.mustUseProperty=!1,C7.prototype.number=!1,C7.prototype.overloadedBoolean=!1,C7.prototype.property="",C7.prototype.spaceSeparated=!1,C7.prototype.space=void 0;let A7=0;const N7=M7(),I7=M7(),O7=M7(),R7=M7(),P7=M7(),L7=M7(),D7=M7();function M7(){return 2**++A7}const F7=Object.freeze(Object.defineProperty({__proto__:null,boolean:N7,booleanish:I7,commaOrSpaceSeparated:D7,commaSeparated:L7,number:R7,overloadedBoolean:O7,spaceSeparated:P7},Symbol.toStringTag,{value:"Module"})),j7=Object.keys(F7);class z7 extends C7{constructor(e,t,n,r){let a=-1;if(super(e,t),B7(this,"space",r),"number"==typeof n)for(;++a<j7.length;){const e=j7[a];B7(this,j7[a],(n&F7[e])===F7[e])}}}function B7(e,t,n){n&&(e[t]=n)}function H7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new z7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[T7(r)]=r,n[T7(o.attribute)]=r}return new _7(t,n,e.space)}z7.prototype.defined=!0;const U7=H7({properties:{ariaActiveDescendant:null,ariaAtomic:I7,ariaAutoComplete:null,ariaBusy:I7,ariaChecked:I7,ariaColCount:R7,ariaColIndex:R7,ariaColSpan:R7,ariaControls:P7,ariaCurrent:null,ariaDescribedBy:P7,ariaDetails:null,ariaDisabled:I7,ariaDropEffect:P7,ariaErrorMessage:null,ariaExpanded:I7,ariaFlowTo:P7,ariaGrabbed:I7,ariaHasPopup:null,ariaHidden:I7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P7,ariaLevel:R7,ariaLive:null,ariaModal:I7,ariaMultiLine:I7,ariaMultiSelectable:I7,ariaOrientation:null,ariaOwns:P7,ariaPlaceholder:null,ariaPosInSet:R7,ariaPressed:I7,ariaReadOnly:I7,ariaRelevant:null,ariaRequired:I7,ariaRoleDescription:P7,ariaRowCount:R7,ariaRowIndex:R7,ariaRowSpan:R7,ariaSelected:I7,ariaSetSize:R7,ariaSort:null,ariaValueMax:R7,ariaValueMin:R7,ariaValueNow:R7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function $7(e,t){return t in e?e[t]:t}function V7(e,t){return $7(e,t.toLowerCase())}const G7=H7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:L7,acceptCharset:P7,accessKey:P7,action:null,allow:null,allowFullScreen:N7,allowPaymentRequest:N7,allowUserMedia:N7,alt:null,as:null,async:N7,autoCapitalize:null,autoComplete:P7,autoFocus:N7,autoPlay:N7,blocking:P7,capture:null,charSet:null,checked:N7,cite:null,className:P7,cols:R7,colSpan:null,content:null,contentEditable:I7,controls:N7,controlsList:P7,coords:R7|L7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N7,defer:N7,dir:null,dirName:null,disabled:N7,download:O7,draggable:I7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N7,formTarget:null,headers:P7,height:R7,hidden:O7,high:R7,href:null,hrefLang:null,htmlFor:P7,httpEquiv:P7,id:null,imageSizes:null,imageSrcSet:null,inert:N7,inputMode:null,integrity:null,is:null,isMap:N7,itemId:null,itemProp:P7,itemRef:P7,itemScope:N7,itemType:P7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N7,low:R7,manifest:null,max:null,maxLength:R7,media:null,method:null,min:null,minLength:R7,multiple:N7,muted:N7,name:null,nonce:null,noModule:N7,noValidate:N7,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:N7,optimum:R7,pattern:null,ping:P7,placeholder:null,playsInline:N7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N7,referrerPolicy:null,rel:P7,required:N7,reversed:N7,rows:R7,rowSpan:R7,sandbox:P7,scope:null,scoped:N7,seamless:N7,selected:N7,shadowRootClonable:N7,shadowRootDelegatesFocus:N7,shadowRootMode:null,shape:null,size:R7,sizes:null,slot:null,span:R7,spellCheck:I7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R7,step:null,style:null,tabIndex:R7,target:null,title:null,translate:null,type:null,typeMustMatch:N7,useMap:null,value:I7,width:R7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P7,axis:null,background:null,bgColor:null,border:R7,borderColor:null,bottomMargin:R7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N7,declare:N7,event:null,face:null,frame:null,frameBorder:null,hSpace:R7,leftMargin:R7,link:null,longDesc:null,lowSrc:null,marginHeight:R7,marginWidth:R7,noResize:N7,noHref:N7,noShade:N7,noWrap:N7,object:null,profile:null,prompt:null,rev:null,rightMargin:R7,rules:null,scheme:null,scrolling:I7,standby:null,summary:null,text:null,topMargin:R7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N7,disableRemotePlayback:N7,prefix:null,property:null,results:R7,security:null,unselectable:null},space:"html",transform:V7}),q7=H7({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"},properties:{about:D7,accentHeight:R7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R7,amplitude:R7,arabicForm:null,ascent:R7,attributeName:null,attributeType:null,azimuth:R7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R7,by:null,calcMode:null,capHeight:R7,className:P7,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:R7,diffuseConstant:R7,direction:null,display:null,dur:null,divisor:R7,dominantBaseline:null,download:N7,dx:null,dy:null,edgeMode:null,editable:null,elevation:R7,enableBackground:null,end:null,event:null,exponent:R7,externalResourcesRequired:null,fill:null,fillOpacity:R7,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:L7,g2:L7,glyphName:L7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R7,horizOriginX:R7,horizOriginY:R7,id:null,ideographic:R7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R7,k:R7,k1:R7,k2:R7,k3:R7,k4:R7,kernelMatrix:D7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R7,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:R7,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:R7,overlineThickness:R7,paintOrder:null,panose1:null,path:null,pathLength:R7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R7,pointsAtY:R7,pointsAtZ:R7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:D7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:D7,rev:D7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:D7,requiredFeatures:D7,requiredFonts:D7,requiredFormats:D7,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:R7,specularExponent:R7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R7,strikethroughThickness:R7,string:null,stroke:null,strokeDashArray:D7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R7,strokeOpacity:R7,strokeWidth:null,style:null,surfaceScale:R7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:D7,tabIndex:R7,tableValues:null,target:null,targetX:R7,targetY:R7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:D7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R7,underlineThickness:R7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R7,values:null,vAlphabetic:R7,vMathematical:R7,vectorEffect:null,vHanging:R7,vIdeographic:R7,version:null,vertAdvY:R7,vertOriginX:R7,vertOriginY:R7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$7}),W7=H7({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Y7=H7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:V7}),Z7=H7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),K7={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"},X7=/[A-Z]/g,Q7=/-[a-z]/g,J7=/^data[-\w.:]+$/i;function eee(e,t){const n=T7(t);let r=t,a=C7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&J7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Q7,nee);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Q7.test(e)){let n=e.replace(X7,tee);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=z7}return new a(r,t)}function tee(e){return"-"+e.toLowerCase()}function nee(e){return e.charAt(1).toUpperCase()}const ree=S7([U7,G7,W7,Y7,Z7],"html"),aee=S7([U7,q7,W7,Y7,Z7],"svg");function oee(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function iee(e){return e.join(" ").trim()}var see={},lee=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,cee=/\n/g,uee=/^\s*/,dee=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pee=/^:\s*/,fee=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,hee=/^[;\s]*/,mee=/^\s+|\s+$/g,gee="";function yee(e){return e?e.replace(mee,gee):gee}var bee=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(cee);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(uee)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;gee!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,gee===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(dee);if(t){if(d(),!l(pee))return s("property missing ':'");var n=l(fee),r=e({type:"declaration",property:yee(t[0].replace(lee,gee)),value:n?yee(n[0].replace(lee,gee)):gee});return l(hee),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},vee=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(see,"__esModule",{value:!0}),see.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,kee.default)(e),a="function"==typeof t;return r.forEach((e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)})),n};const kee=vee(bee);var xee={};Object.defineProperty(xee,"__esModule",{value:!0}),xee.camelCase=void 0;var wee=/^--[a-zA-Z0-9_-]+$/,Eee=/-([a-z])/g,_ee=/^[^-]+$/,See=/^-(webkit|moz|ms|o|khtml)-/,Tee=/^-(ms)-/,Cee=function(e,t){return t.toUpperCase()},Aee=function(e,t){return"".concat(t,"-")};xee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||_ee.test(e)||wee.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Tee,Aee):e.replace(See,Aee)).replace(Eee,Cee))};var Nee=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Iee=Nee(see),Oee=xee;function Ree(e,t){var n={};return e&&"string"==typeof e?((0,Iee.default)(e,(function(e,r){e&&r&&(n[(0,Oee.camelCase)(e,t)]=r)})),n):n}Ree.default=Ree;const Pee=S(Ree),Lee=Mee("end"),Dee=Mee("start");function Mee(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Fee(e){return e&&"object"==typeof e?"position"in e||"type"in e?zee(e.position):"start"in e||"end"in e?zee(e):"line"in e||"column"in e?jee(e):"":""}function jee(e){return Bee(e&&e.line)+":"+Bee(e&&e.column)}function zee(e){return jee(e&&e.start)+"-"+jee(e&&e.end)}function Bee(e){return e&&"number"==typeof e?e:1}class Hee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=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=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=Fee(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=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Hee.prototype.file="",Hee.prototype.name="",Hee.prototype.reason="",Hee.prototype.message="",Hee.prototype.stack="",Hee.prototype.column=void 0,Hee.prototype.line=void 0,Hee.prototype.ancestors=void 0,Hee.prototype.cause=void 0,Hee.prototype.fatal=void 0,Hee.prototype.place=void 0,Hee.prototype.ruleId=void 0,Hee.prototype.source=void 0;const Uee={}.hasOwnProperty,$ee=new Map,Vee=/[A-Z]/g,Gee=new Set(["table","tbody","thead","tfoot","tr"]),qee=new Set(["td","th"]),Wee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yee(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,a,o){const i=Array.isArray(a.children),s=Dee(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?aee:ree,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Zee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Zee(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=aee,e.schema=a);e.ancestors.push(t);const o=ete(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Uee.call(t.properties,a)){const o=Jee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&qee.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Qee(e,t);Gee.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&E7(t.value):E7(t));var t})));return Kee(e,i,o,t),Xee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}tte(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=aee,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:ete(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const a=t.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else tte(e,t.position);else{const a=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,o=e.evaluater.evaluateExpression(t.expression)}else tte(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=Qee(e,t);return Kee(e,i,o,t),Xee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tte(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Xee(r,Qee(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Kee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Qee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:$ee;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=Zee(e,o,i);void 0!==s&&n.push(s)}return n}function Jee(e,t,n){const r=eee(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?y7(n):iee(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Pee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Hee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Wee+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Uee.call(e,n)&&(t[nte(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?K7[r.property]||r.property:r.attribute,n]}}function ete(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=x7(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=x7(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Uee.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tte(e)}function tte(e,t){const n=new Hee("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=Wee+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nte(e){let t=e.replace(Vee,rte);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function rte(e){return"-"+e.toLowerCase()}const ate={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"]},ote={};function ite(e,t){return ste(e,"boolean"!=typeof ote.includeImageAlt||ote.includeImageAlt,"boolean"!=typeof ote.includeHtml||ote.includeHtml)}function ste(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lte(e.children,t,n)}return Array.isArray(e)?lte(e,t,n):""}function lte(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ste(e[a],t,n);return r.join("")}const cte=document.createElement("i");function ute(e){const t="&"+e+";";cte.innerHTML=t;const n=cte.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function dte(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function pte(e,t){return e.length>0?(dte(e,e.length,0,t),e):t}const fte={}.hasOwnProperty;function hte(e){const t={};let n=-1;for(;++n<e.length;)mte(t,e[n]);return t}function mte(e,t){let n;for(n in t){const r=(fte.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){fte.call(r,o)||(r[o]=[]);const e=a[o];gte(r[o],Array.isArray(e)?e:e?[e]:[])}}}function gte(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);dte(e,0,0,r)}function yte(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function bte(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vte=Ote(/[A-Za-z]/),kte=Ote(/[\dA-Za-z]/),xte=Ote(/[#-'*+\--9=?A-Z^-~]/);function wte(e){return null!==e&&(e<32||127===e)}const Ete=Ote(/\d/),_te=Ote(/[\dA-Fa-f]/),Ste=Ote(/[!-/:-@[-`{-~]/);function Tte(e){return null!==e&&e<-2}function Cte(e){return null!==e&&(e<0||32===e)}function Ate(e){return-2===e||-1===e||32===e}const Nte=Ote(new RegExp("\\p{P}|\\p{S}","u")),Ite=Ote(/\s/);function Ote(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Rte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&kte(e.charCodeAt(n+1))&&kte(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Pte(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(Ate(r))return e.enter(n),i(r);return t(r)};function i(r){return Ate(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const Lte={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Pte(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Tte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const Dte={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}y(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return dte(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return h(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mte,u,d)(a)}function u(e){return r&&b(),y(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(Mte,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Tte(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(y(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;dte(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Mte={tokenize:function(e,t,n){return Pte(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Fte(e){return null===e||Cte(e)||Ite(e)?1:Nte(e)?2:void 0}function jte(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const zte={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Bte(d,-s),Bte(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=pte(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=pte(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=pte(l,jte(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=pte(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=pte(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,dte(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Fte(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=Fte(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Bte(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Hte={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return vte(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||kte(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||kte(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wte(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):xte(t)?(e.consume(t),l):n(t)}function c(e){return kte(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||kte(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Ute={partial:!0,tokenize:function(e,t,n){return function(t){return Ate(t)?Pte(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Tte(e)?t(e):n(e)}}};const $te={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Ate(t))return Pte(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt($te,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return Ate(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Vte={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Ste(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Gte={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=kte,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=_te,c):(e.enter("characterReferenceValue"),a=7,o=Ete,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==kte||ute(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const qte={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Wte={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Ate(t)?Pte(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),Ate(t)?Pte(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Tte(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Ate(t)?Pte(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Tte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(qte,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Tte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Ate(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pte(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||Tte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Tte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&Ate(t)?Pte(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||Tte(t)?e.check(qte,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Tte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const Yte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Pte(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):Tte(t)?e.attempt(Zte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Tte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Zte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):Tte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):Pte(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Tte(e)?a(e):n(e)}}};const Kte={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):Tte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Tte(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class Xte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Qte(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Qte(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Qte(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Qte(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Qte(this.left,t.reverse())}}}function Qte(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Jte(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new Xte(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,ene(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return dte(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function ene(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const tne={resolve:function(e){return Jte(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):Tte(t)?e.check(nne,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},nne={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Pte(e,a,"linePrefix")};function a(a){if(null===a||Tte(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function rne(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||wte(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Tte(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(a){return u||null!==a&&41!==a&&!Cte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||wte(a)?n(a):(e.consume(a),92===a?m:h):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function ane(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):Tte(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Tte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Ate(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function one(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):Tte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Pte(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||Tte(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function ine(e,t){let n;return function r(a){if(Tte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(Ate(a))return Pte(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const sne={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return ane.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=bte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return Cte(t)?ine(e,s)(t):s(t)}function s(t){return rne(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(lne,c,c)(t)}function c(t){return Ate(t)?Pte(e,u,"whitespace")(t):u(t)}function u(o){return null===o||Tte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},lne={partial:!0,tokenize:function(e,t,n){return function(t){return Cte(t)?ine(e,r)(t):n(t)};function r(t){return one(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return Ate(t)?Pte(e,o,"whitespace")(t):o(t)}function o(e){return null===e||Tte(e)?t(e):n(e)}}};const cne={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Tte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const une={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},dte(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||Cte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Tte(n)?(e.exit("atxHeading"),t(n)):Ate(n)?Pte(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||Cte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const dne=["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"],pne=["pre","script","style","textarea"],fne={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):vte(s)?(e.consume(s),i=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):vte(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return vte(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||Cte(s)){const l=47===s,c=i.toLowerCase();return l||o||!pne.includes(c)?dne.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||kte(s)?(e.consume(s),i+=String.fromCharCode(s),h):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function g(t){return Ate(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||vte(t)?(e.consume(t),b):Ate(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||kte(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):Ate(t)?(e.consume(t),v):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):Ate(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||Tte(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Cte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||Ate(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||Tte(t)?T(t):Ate(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),I):60===t&&1===a?(e.consume(t),O):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!Tte(t)||6!==a&&7!==a?null===t||Tte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(hne,M,C)(t))}function C(t){return e.check(mne,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||Tte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function I(t){return 45===t?(e.consume(t),L):T(t)}function O(t){return 47===t?(e.consume(t),i="",R):T(t)}function R(t){if(62===t){const n=i.toLowerCase();return pne.includes(n)?(e.consume(t),D):T(t)}return vte(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),R):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||Tte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},hne={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Ute,t,n)}}},mne={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Tte(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const gne={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),b):vte(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):vte(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Tte(t)?(i=u,R(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Tte(t)?(i=h,R(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):Tte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):Tte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return vte(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||kte(t)?(e.consume(t),x):w(t)}function w(t){return Tte(t)?(i=w,R(t)):Ate(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||kte(t)?(e.consume(t),E):47===t||62===t||Cte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||vte(t)?(e.consume(t),S):Tte(t)?(i=_,R(t)):Ate(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||kte(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):Tte(t)?(i=T,R(t)):Ate(t)?(e.consume(t),T):_(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,A):Tte(t)?(i=C,R(t)):Ate(t)?(e.consume(t),C):(e.consume(t),N)}function A(t){return t===a?(e.consume(t),a=void 0,I):null===t?n(t):Tte(t)?(i=A,R(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Cte(t)?_(t):(e.consume(t),N)}function I(e){return 47===e||62===e||Cte(e)?_(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Ate(t)?Pte(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const yne={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&dte(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=pte(o,e.slice(r+1,r+s+3)),o=pte(o,[["enter",u,t]]),o=pte(o,jte(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=pte(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=pte(o,e.slice(a+1)),o=pte(o,[["exit",l,t]]),dte(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(bte(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(bne,c,o?c:u)(t):91===t?e.attempt(vne,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(kne,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},bne={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Cte(t)?ine(e,a)(t):a(t)}function a(t){return 41===t?c(t):rne(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Cte(t)?ine(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?one(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Cte(t)?ine(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},vne={tokenize:function(e,t,n){const r=this;return function(t){return ane.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(bte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},kne={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const xne={name:"labelStartImage",resolveAll:yne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const wne={name:"labelStartLink",resolveAll:yne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ene={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Pte(e,t,"linePrefix")}}};const _ne={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||Tte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),Ate(t)?Pte(e,o,"whitespace")(t):o(t))}}};const Sne={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ute,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pte(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!Ate(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Cne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pte(e,e.attempt(Sne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:Ete(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(_ne,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Ete(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Ute,r.interrupt?n:c,e.attempt(Tne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return Ate(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Tne={partial:!0,tokenize:function(e,t,n){const r=this;return Pte(e,(function(e){const a=r.events[r.events.length-1];return!Ate(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Cne={partial:!0,tokenize:function(e,t,n){const r=this;return Pte(e,(function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const Ane={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Ate(t)?Pte(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Tte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Nne={tokenize:function(e){const t=this,n=e.attempt(Ute,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Pte(e,e.attempt(this.parser.constructs.flow,r,e.attempt(tne,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Ine={resolveAll:Lne()},One=Pne("string"),Rne=Pne("text");function Pne(e){return{resolveAll:Lne("text"===e?Dne:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Lne(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function Dne(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const Mne={42:Sne,43:Sne,45:Sne,48:Sne,49:Sne,50:Sne,51:Sne,52:Sne,53:Sne,54:Sne,55:Sne,56:Sne,57:Sne,62:$te},Fne={91:sne},jne={[-2]:Yte,[-1]:Yte,32:Yte},zne={35:une,42:_ne,45:[Ane,_ne],60:fne,61:Ane,95:_ne,96:Wte,126:Wte},Bne={38:Gte,92:Vte},Hne={[-5]:Ene,[-4]:Ene,[-3]:Ene,33:xne,38:Gte,42:zte,60:[Hte,gne],91:wne,92:[cne,Vte],93:yne,95:zte,96:Kte},Une={null:[zte,Ine]},$ne=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Fne,disable:{null:[]},document:Mne,flow:zne,flowInitial:jne,insideSpan:Une,string:Bne,text:Hne},Symbol.toStringTag,{value:"Module"}));function Vne(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let i=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){Tte(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=pte(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=jte(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),a}function y(e){return f.restore(),++u<i.length?m(i[u]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&dte(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const Gne=/[\0\t\n\r]/g;const qne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return yte(n.slice(t?2:1),t?16:10)}return ute(n)||e}const Yne={}.hasOwnProperty;function Zne(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:o(X),blockQuote:o(q),characterEscape:S,characterReference:S,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:S,data:S,codeFlowValue:S,definition:o(Z),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(K),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:S,htmlText:o(J,i),htmlTextData:S,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:z,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(X),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:G,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:$,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(O),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:T,htmlText:l(I),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:F,resource:j,setextHeading:l(_),setextHeadingLineSequence:E,setextHeadingText:w,strong:l(),thematicBreak:l()}};Xne(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Yne.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Jne).call(o,void 0,e[0])}for(r.position={start:Kne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Kne(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Kne(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Fee({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||Jne).call(this,e,r[0])}n.position.end=Kne(e.end)}function u(){return ite(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bte(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Kne(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Kne(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Kne(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(qne,Wne)}(t),n.identifier=bte(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function j(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bte(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=yte(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=ute(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Kne(e.end)}function V(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Jte(e););return e}(function(e){const t={constructs:hte([$ne,...(e||{}).extensions||[]]),content:n(Lte),defined:[],document:n(Dte),flow:n(Nne),lazy:{},string:n(One),text:n(Rne)};return t;function n(e){return function(n){return Vne(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(Gne.lastIndex=u,l=Gne.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Kne(e){return{line:e.line,column:e.column,offset:e.offset}}function Xne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xne(e,r):Qne(e,r)}}function Qne(e,t){let n;for(n in t)if(Yne.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 Jne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fee({start:t.start,end:t.end})+") is still open")}function ere(e){const t=this;t.parser=function(n){return Zne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tre(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function nre(e){const t=e.spread;return null==t?e.children.length>1:t}function rre(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(are(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(are(t.slice(a),a>0,!1)),o.join("")}function are(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const ore={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Rte(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tre(e,t);const a={src:Rte(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Rte(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tre(e,t);const a={href:Rte(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Rte(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nre(n[r])}return t}(n):nre(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Dee(t.children[1]),i=Lee(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:rre(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ire,yaml:ire,definition:ire,footnoteDefinition:ire};function ire(){}const sre="object"==typeof self?self:globalThis,lre=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new sre[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new sre[o](i),a)};return r})(new Map,e)(0),cre="",{toString:ure}={},{keys:dre}=Object,pre=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=ure.call(e).slice(8,-1);switch(n){case"Array":return[1,cre];case"Object":return[2,cre];case"Date":return[3,cre];case"RegExp":return[4,cre];case"Map":return[5,cre];case"Set":return[6,cre];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},fre=([e,t])=>0===e&&("function"===t||"symbol"===t),hre=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=pre(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of dre(r))!e&&fre(pre(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[a,i]of r)(e||!fre(pre(a))&&!fre(pre(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&fre(pre(a))||t.push(o(a));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},mre="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?lre(hre(e,t)):structuredClone(e):(e,t)=>lre(hre(e,t));function gre(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 yre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const bre=function(e){if(null==e)return kre;if("function"==typeof e)return vre(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bre(e[n]);return vre(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return vre(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return vre(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function vre(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function kre(){return!0}const xre=[],wre=!0,Ere=!1;function _re(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=bre(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=xre;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[wre,e];return null==e?xre:[e]}(n(a,l)),p[0]===Ere))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Ere)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function Sre(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),_re(e,o,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),a)}const Tre={}.hasOwnProperty,Cre={};function Are(e,t){e.position&&(t.position=function(e){const t=Dee(e),n=Lee(e);if(t&&n)return{start:t,end:n}}(e))}function Nre(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&a&&Object.assign(n.properties,mre(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Ire(e,t){const n=t.data||{},r=!("value"in t)||Tre.call(n,"hProperties")||Tre.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Ore(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Rre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Pre(e,t){const n=function(e,t){const n=t||Cre,r=new Map,a=new Map,o=new Map,i={...ore,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=Rre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=Rre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:Nre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(Tre.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=mre(n);return r.children=s.all(e),r}return mre(e)}return(s.options.unknownHandler||Ire)(s,e,t)},options:n,patch:Are,wrap:Ore};return Sre(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gre,r=e.options.footnoteBackLabel||yre,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=Rte(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...mre(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function Lre(e,t){return e&&"run"in e?async function(n,r){const a=Pre(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Pre(n,{file:r,...e||t})}}function Dre(e){if(e)throw e}var Mre=Object.prototype.hasOwnProperty,Fre=Object.prototype.toString,jre=Object.defineProperty,zre=Object.getOwnPropertyDescriptor,Bre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Fre.call(e)},Hre=function(e){if(!e||"[object Object]"!==Fre.call(e))return!1;var t,n=Mre.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Mre.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Mre.call(e,t)},Ure=function(e,t){jre&&"__proto__"===t.name?jre(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},$re=function(e,t){if("__proto__"===t){if(!Mre.call(e,t))return;if(zre)return zre(e,t).value}return e[t]},Vre=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=$re(s,n),s!==(a=$re(t,n))&&(u&&a&&(Hre(a)||(o=Bre(a)))?(o?(o=!1,i=r&&Bre(r)?r:[]):i=r&&Hre(r)?r:{},Ure(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Ure(s,{name:n,newValue:a}));return s};const Gre=S(Vre);function qre(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Wre(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(a);try{s=e.apply(this,t)}catch(o){if(r&&n)throw o;return a(o)}r||(s&&s.then&&"function"==typeof s.then?s.then(i,a):s instanceof Error?a(s):i(s))}function a(e,...r){n||(n=!0,t(e,...r))}function i(e){a(null,e)}}(s,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Yre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Zre(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(Zre(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Zre(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Zre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Zre(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Zre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Kre={cwd:function(){return"/"}};function Xre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Qre(e){if("string"==typeof e)e=new URL(e);else if(!Xre(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Jre=["history","path","basename","stem","extname","dirname"];class eae{constructor(e){let t;t=e?Xre(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Kre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Jre.length;){const e=Jre[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Jre.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Yre.basename(this.path):void 0}set basename(e){nae(e,"basename"),tae(e,"basename"),this.path=Yre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Yre.dirname(this.path):void 0}set dirname(e){rae(this.basename,"dirname"),this.path=Yre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Yre.extname(this.path):void 0}set extname(e){if(tae(e,"extname"),rae(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Xre(e)&&(e=Qre(e)),nae(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Yre.basename(this.path,this.extname):void 0}set stem(e){nae(e,"stem"),tae(e,"stem"),this.path=Yre.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Hee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function tae(e,t){if(e&&e.includes(Yre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yre.sep+"`")}function nae(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rae(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const aae=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},oae={}.hasOwnProperty;class iae extends aae{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=Wre()}copy(){const e=new iae;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Gre(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(uae("data",this.frozen),this.namespace[e]=t,this):oae.call(this.namespace,e)&&this.namespace[e]||void 0:e?(uae("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=fae(e),n=this.parser||this.Parser;return lae("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),lae("process",this.parser||this.Parser),cae("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=fae(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,(function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),lae("processSync",this.parser||this.Parser),cae("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Dre(e),t=r})),pae("processSync","process",n),t}run(e,t,n){dae(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=fae(t);r.run(e,i,(function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Dre(e),n=t,r=!0})),pae("runSync","run",r),n}stringify(e,t){this.freeze();const n=fae(t),r=this.compiler||this.Compiler;return cae("stringify",r),dae(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(uae("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=Gre(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];qre(i)&&qre(r)&&(r=Gre(!0,i,r)),n[a]=[e,r,...o]}}}}const sae=(new iae).freeze();function lae(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function cae(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function uae(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 dae(e){if(!qre(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function pae(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fae(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new eae(e)}const hae=[],mae={allowDangerousHtml:!0},gae=/^(https?|ircs?|mailto|xmpp)$/i,yae=[{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 bae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||hae,l=e.remarkPlugins||hae,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mae}:mae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||vae,f=sae().use(ere).use(l).use(Lre,c).use(s),h=new eae;"string"==typeof r&&(h.value=r);for(const y of yae)Object.hasOwn(e,y.from)&&(y.from,y.to&&y.to,y.id);const m=f.parse(h);let g=f.runSync(m,h);return a&&(g={type:"element",tagName:"div",properties:{className:a},children:"root"===g.type?g.children:[g]}),Sre(g,(function(e,r,a){if("raw"===e.type&&a&&"number"==typeof r)return u?a.children.splice(r,1):a.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in ate)if(Object.hasOwn(ate,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=ate[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof r&&(o=!n(e,r,a)),o&&a&&"number"==typeof r)return d&&e.children?a.children.splice(r,1,...e.children):a.children.splice(r,1),r}})),Yee(g,{Fragment:wg.Fragment,components:o,ignoreInvalidStyle:!0,jsx:wg.jsx,jsxs:wg.jsxs,passKeys:!0,passNode:!0})}function vae(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||gae.test(e.slice(0,t))?e:""}const kae=/[#.]/g;function xae(e,t,n){const r=n?function(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,a,...o){let i;if(null==n){i={type:"root",children:[]};const e=a;o.unshift(e)}else{i=function(e,t){const n=e||"",r={};let a,o,i=0;for(;i<n.length;){kae.lastIndex=i;const e=kae.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?"#"===a?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=i.tagName.toLowerCase(),l=r?r.get(s):void 0;if(i.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(a))o.unshift(a);else for(const[t,n]of Object.entries(a))wae(e,i.properties,t,n)}for(const e of o)Eae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function wae(e,t,n,r){const a=eee(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?oee(r):a.commaSeparated?g7(r):a.commaOrSpaceSeparated?oee(g7(r).join(" ")):_ae(a,a.property,r):Array.isArray(r)?[...r]:"style"===a.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push(_ae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function Eae(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Eae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Eae(e,t.children):e.push(t)}}function _ae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||T7(n)===T7(t)))return!0}return n}const Sae=xae(ree,"div"),Tae=xae(aee,"g",["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"]);function Cae(e,t){const n=e.indexOf("\r",t),r=e.indexOf("\n",t);return-1===r?n:-1===n||n+1===r?r:n<r?n:r}const Aae={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/"},Nae={}.hasOwnProperty,Iae=Object.prototype;function Oae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pae(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r&&("quirks"===r.mode||"limited-quirks"===r.mode);if(n={type:"root",children:Rae(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[];return{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){const e=n[n.length-1],r=Cae(t,e),a=-1===r?t.length+1:r+1;if(e===a)break;n.push(a)}const r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let r=0;for(;;){let a=n[r];if(void 0===a){const e=Cae(t,n[r-1]);a=-1===e?t.length+1:e+1,n[r]=a}if(a>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),a=r.toPoint(0),o=r.toPoint(t.length);n.position={start:a,end:o}}return n}case"#documentType":return n={type:"doctype"},Pae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},Pae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===Aae.svg?aee:ree;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;Nae.call(Iae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?Tae:Sae,i=o(t.tagName,a,Rae(e,t.childNodes));if(Pae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&Lae(r.startTag),o=r&&r.endTag&&Lae(r.endTag),s=Oae(e,n.content);a&&o&&e.file&&(s.position={start:a.end,end:o.start}),i.content=s}return e.schema=n,i}(e,t),n}}function Rae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Oae(e,t[n]);r.push(a)}return r}function Pae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=Lae(n);if("element"===t.type){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const r={};let a;if(n.attrs)for(a in n.attrs)Nae.call(n.attrs,a)&&(r[eee(e.schema,a).property]=Lae(n.attrs[a]));n.startTag;const o=Lae(n.startTag),i=n.endTag?Lae(n.endTag):void 0,s={opening:o};i&&(s.closing=i),s.properties=r,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Lae(e){const t=Dae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Dae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Dae(e){return e.line&&e.column?e:void 0}const Mae={}.hasOwnProperty;function Fae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&Mae.call(t,e)){const n=String(t[e]);a=Mae.call(o,n)?o[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jae={},zae={}.hasOwnProperty,Bae=Fae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Uae(e.children,n,t),$ae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=aee);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&zae.call(e.properties,o)){const t=Hae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Aae[i],childNodes:[],parentNode:null};s.childNodes=Uae(e.children,s,r),$ae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Uae(e.children,n,t),$ae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return $ae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return $ae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return $ae(e,t),t}}});function Hae(e,t,n){const r=eee(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?y7(n):iee(n));const a={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){const e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=r.attribute.slice(0,e)),a.namespace=Aae[r.space]}return a}function Uae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Bae(e[r],n);o.parentNode=t,a.push(o)}return a}function $ae(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 Vae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Gae=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]),qae="�";var Wae,Yae;(Yae=Wae||(Wae={}))[Yae.EOF=-1]="EOF",Yae[Yae.NULL=0]="NULL",Yae[Yae.TABULATION=9]="TABULATION",Yae[Yae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Yae[Yae.LINE_FEED=10]="LINE_FEED",Yae[Yae.FORM_FEED=12]="FORM_FEED",Yae[Yae.SPACE=32]="SPACE",Yae[Yae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Yae[Yae.QUOTATION_MARK=34]="QUOTATION_MARK",Yae[Yae.AMPERSAND=38]="AMPERSAND",Yae[Yae.APOSTROPHE=39]="APOSTROPHE",Yae[Yae.HYPHEN_MINUS=45]="HYPHEN_MINUS",Yae[Yae.SOLIDUS=47]="SOLIDUS",Yae[Yae.DIGIT_0=48]="DIGIT_0",Yae[Yae.DIGIT_9=57]="DIGIT_9",Yae[Yae.SEMICOLON=59]="SEMICOLON",Yae[Yae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Yae[Yae.EQUALS_SIGN=61]="EQUALS_SIGN",Yae[Yae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Yae[Yae.QUESTION_MARK=63]="QUESTION_MARK",Yae[Yae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Yae[Yae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Yae[Yae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Yae[Yae.GRAVE_ACCENT=96]="GRAVE_ACCENT",Yae[Yae.LATIN_SMALL_A=97]="LATIN_SMALL_A",Yae[Yae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const Zae="--",Kae="[CDATA[",Xae="doctype",Qae="script",Jae="public",eoe="system";function toe(e){return e>=55296&&e<=57343}function noe(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function roe(e){return e>=64976&&e<=65007||Gae.has(e)}var aoe,ooe;(ooe=aoe||(aoe={})).controlCharacterInInputStream="control-character-in-input-stream",ooe.noncharacterInInputStream="noncharacter-in-input-stream",ooe.surrogateInInputStream="surrogate-in-input-stream",ooe.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",ooe.endTagWithAttributes="end-tag-with-attributes",ooe.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",ooe.unexpectedSolidusInTag="unexpected-solidus-in-tag",ooe.unexpectedNullCharacter="unexpected-null-character",ooe.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",ooe.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",ooe.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",ooe.missingEndTagName="missing-end-tag-name",ooe.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",ooe.unknownNamedCharacterReference="unknown-named-character-reference",ooe.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",ooe.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",ooe.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",ooe.eofBeforeTagName="eof-before-tag-name",ooe.eofInTag="eof-in-tag",ooe.missingAttributeValue="missing-attribute-value",ooe.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",ooe.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",ooe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",ooe.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",ooe.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",ooe.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",ooe.missingDoctypePublicIdentifier="missing-doctype-public-identifier",ooe.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",ooe.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",ooe.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",ooe.cdataInHtmlContent="cdata-in-html-content",ooe.incorrectlyOpenedComment="incorrectly-opened-comment",ooe.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",ooe.eofInDoctype="eof-in-doctype",ooe.nestedComment="nested-comment",ooe.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",ooe.eofInComment="eof-in-comment",ooe.incorrectlyClosedComment="incorrectly-closed-comment",ooe.eofInCdata="eof-in-cdata",ooe.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",ooe.nullCharacterReference="null-character-reference",ooe.surrogateCharacterReference="surrogate-character-reference",ooe.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",ooe.controlCharacterReference="control-character-reference",ooe.noncharacterCharacterReference="noncharacter-character-reference",ooe.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",ooe.missingDoctypeName="missing-doctype-name",ooe.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",ooe.duplicateAttribute="duplicate-attribute",ooe.nonConformingDoctype="non-conforming-doctype",ooe.missingDoctype="missing-doctype",ooe.misplacedDoctype="misplaced-doctype",ooe.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",ooe.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",ooe.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",ooe.openElementsLeftAfterEof="open-elements-left-after-eof",ooe.abandonedHeadElementChild="abandoned-head-element-child",ooe.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",ooe.nestedNoscriptInHead="nested-noscript-in-head",ooe.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class ioe{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:a}=this,o=r+t,i=a+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:i,endOffset:i}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Wae.EOF;return this._err(aoe.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++){if((32|this.html.charCodeAt(this.pos+n))!==e.charCodeAt(n))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Wae.EOF;const n=this.html.charCodeAt(t);return n===Wae.CARRIAGE_RETURN?Wae.LINE_FEED:n}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,Wae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Wae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Wae.LINE_FEED;if(e===Wae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,toe(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Wae.LINE_FEED||e===Wae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){noe(e)?this._err(aoe.controlCharacterInInputStream):roe(e)&&this._err(aoe.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var soe,loe;function coe(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}(loe=soe||(soe={}))[loe.CHARACTER=0]="CHARACTER",loe[loe.NULL_CHARACTER=1]="NULL_CHARACTER",loe[loe.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",loe[loe.START_TAG=3]="START_TAG",loe[loe.END_TAG=4]="END_TAG",loe[loe.COMMENT=5]="COMMENT",loe[loe.DOCTYPE=6]="DOCTYPE",loe[loe.EOF=7]="EOF",loe[loe.HIBERNATION=8]="HIBERNATION";const uoe=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)))),doe=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]]);var poe,foe;(foe=poe||(poe={}))[foe.NUM=35]="NUM",foe[foe.SEMI=59]="SEMI",foe[foe.EQUALS=61]="EQUALS",foe[foe.ZERO=48]="ZERO",foe[foe.NINE=57]="NINE",foe[foe.LOWER_A=97]="LOWER_A",foe[foe.LOWER_F=102]="LOWER_F",foe[foe.LOWER_X=120]="LOWER_X",foe[foe.LOWER_Z=122]="LOWER_Z",foe[foe.UPPER_A=65]="UPPER_A",foe[foe.UPPER_F=70]="UPPER_F",foe[foe.UPPER_Z=90]="UPPER_Z";var hoe,moe,goe,yoe,boe,voe,koe,xoe,woe,Eoe,_oe,Soe,Toe,Coe,Aoe,Noe;function Ioe(e){return e>=poe.ZERO&&e<=poe.NINE}function Ooe(e){return e===poe.EQUALS||function(e){return e>=poe.UPPER_A&&e<=poe.UPPER_Z||e>=poe.LOWER_A&&e<=poe.LOWER_Z||Ioe(e)}(e)}(moe=hoe||(hoe={}))[moe.VALUE_LENGTH=49152]="VALUE_LENGTH",moe[moe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",moe[moe.JUMP_TABLE=127]="JUMP_TABLE",(yoe=goe||(goe={}))[yoe.EntityStart=0]="EntityStart",yoe[yoe.NumericStart=1]="NumericStart",yoe[yoe.NumericDecimal=2]="NumericDecimal",yoe[yoe.NumericHex=3]="NumericHex",yoe[yoe.NamedEntity=4]="NamedEntity",(voe=boe||(boe={}))[voe.Legacy=0]="Legacy",voe[voe.Strict=1]="Strict",voe[voe.Attribute=2]="Attribute";class Roe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=goe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=boe.Strict}startEntity(e){this.decodeMode=e,this.state=goe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case goe.EntityStart:return e.charCodeAt(t)===poe.NUM?(this.state=goe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=goe.NamedEntity,this.stateNamedEntity(e,t));case goe.NumericStart:return this.stateNumericStart(e,t);case goe.NumericDecimal:return this.stateNumericDecimal(e,t);case goe.NumericHex:return this.stateNumericHex(e,t);case goe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===poe.LOWER_X?(this.state=goe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=goe.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const a=n-t;this.result=this.result*Math.pow(r,a)+Number.parseInt(e.substr(t,a),r),this.consumed+=a}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const a=e.charCodeAt(t);if(!(Ioe(a)||(r=a,r>=poe.UPPER_A&&r<=poe.UPPER_F||r>=poe.LOWER_A&&r<=poe.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(a,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!Ioe(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===poe.SEMI)this.consumed+=1;else if(this.decodeMode===boe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=doe.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==poe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],a=(r&hoe.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=Poe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===boe.Attribute&&(0===a||Ooe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&hoe.VALUE_LENGTH)>>14,0!==a){if(o===poe.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==boe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&hoe.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~hoe.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case goe.NamedEntity:return 0===this.result||this.decodeMode===boe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case goe.NumericDecimal:return this.emitNumericEntity(0,2);case goe.NumericHex:return this.emitNumericEntity(0,3);case goe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case goe.EntityStart:return 0}}}function Poe(e,t,n,r){const a=(t&hoe.BRANCH_LENGTH)>>7,o=t&hoe.JUMP_TABLE;if(0===a)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=a?-1:e[n+t]-1}let i=n,s=i+a-1;for(;i<=s;){const t=i+s>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+a];s=t-1}}return-1}(xoe=koe||(koe={})).HTML="http://www.w3.org/1999/xhtml",xoe.MATHML="http://www.w3.org/1998/Math/MathML",xoe.SVG="http://www.w3.org/2000/svg",xoe.XLINK="http://www.w3.org/1999/xlink",xoe.XML="http://www.w3.org/XML/1998/namespace",xoe.XMLNS="http://www.w3.org/2000/xmlns/",(Eoe=woe||(woe={})).TYPE="type",Eoe.ACTION="action",Eoe.ENCODING="encoding",Eoe.PROMPT="prompt",Eoe.NAME="name",Eoe.COLOR="color",Eoe.FACE="face",Eoe.SIZE="size",(Soe=_oe||(_oe={})).NO_QUIRKS="no-quirks",Soe.QUIRKS="quirks",Soe.LIMITED_QUIRKS="limited-quirks",(Coe=Toe||(Toe={})).A="a",Coe.ADDRESS="address",Coe.ANNOTATION_XML="annotation-xml",Coe.APPLET="applet",Coe.AREA="area",Coe.ARTICLE="article",Coe.ASIDE="aside",Coe.B="b",Coe.BASE="base",Coe.BASEFONT="basefont",Coe.BGSOUND="bgsound",Coe.BIG="big",Coe.BLOCKQUOTE="blockquote",Coe.BODY="body",Coe.BR="br",Coe.BUTTON="button",Coe.CAPTION="caption",Coe.CENTER="center",Coe.CODE="code",Coe.COL="col",Coe.COLGROUP="colgroup",Coe.DD="dd",Coe.DESC="desc",Coe.DETAILS="details",Coe.DIALOG="dialog",Coe.DIR="dir",Coe.DIV="div",Coe.DL="dl",Coe.DT="dt",Coe.EM="em",Coe.EMBED="embed",Coe.FIELDSET="fieldset",Coe.FIGCAPTION="figcaption",Coe.FIGURE="figure",Coe.FONT="font",Coe.FOOTER="footer",Coe.FOREIGN_OBJECT="foreignObject",Coe.FORM="form",Coe.FRAME="frame",Coe.FRAMESET="frameset",Coe.H1="h1",Coe.H2="h2",Coe.H3="h3",Coe.H4="h4",Coe.H5="h5",Coe.H6="h6",Coe.HEAD="head",Coe.HEADER="header",Coe.HGROUP="hgroup",Coe.HR="hr",Coe.HTML="html",Coe.I="i",Coe.IMG="img",Coe.IMAGE="image",Coe.INPUT="input",Coe.IFRAME="iframe",Coe.KEYGEN="keygen",Coe.LABEL="label",Coe.LI="li",Coe.LINK="link",Coe.LISTING="listing",Coe.MAIN="main",Coe.MALIGNMARK="malignmark",Coe.MARQUEE="marquee",Coe.MATH="math",Coe.MENU="menu",Coe.META="meta",Coe.MGLYPH="mglyph",Coe.MI="mi",Coe.MO="mo",Coe.MN="mn",Coe.MS="ms",Coe.MTEXT="mtext",Coe.NAV="nav",Coe.NOBR="nobr",Coe.NOFRAMES="noframes",Coe.NOEMBED="noembed",Coe.NOSCRIPT="noscript",Coe.OBJECT="object",Coe.OL="ol",Coe.OPTGROUP="optgroup",Coe.OPTION="option",Coe.P="p",Coe.PARAM="param",Coe.PLAINTEXT="plaintext",Coe.PRE="pre",Coe.RB="rb",Coe.RP="rp",Coe.RT="rt",Coe.RTC="rtc",Coe.RUBY="ruby",Coe.S="s",Coe.SCRIPT="script",Coe.SEARCH="search",Coe.SECTION="section",Coe.SELECT="select",Coe.SOURCE="source",Coe.SMALL="small",Coe.SPAN="span",Coe.STRIKE="strike",Coe.STRONG="strong",Coe.STYLE="style",Coe.SUB="sub",Coe.SUMMARY="summary",Coe.SUP="sup",Coe.TABLE="table",Coe.TBODY="tbody",Coe.TEMPLATE="template",Coe.TEXTAREA="textarea",Coe.TFOOT="tfoot",Coe.TD="td",Coe.TH="th",Coe.THEAD="thead",Coe.TITLE="title",Coe.TR="tr",Coe.TRACK="track",Coe.TT="tt",Coe.U="u",Coe.UL="ul",Coe.SVG="svg",Coe.VAR="var",Coe.WBR="wbr",Coe.XMP="xmp",(Noe=Aoe||(Aoe={}))[Noe.UNKNOWN=0]="UNKNOWN",Noe[Noe.A=1]="A",Noe[Noe.ADDRESS=2]="ADDRESS",Noe[Noe.ANNOTATION_XML=3]="ANNOTATION_XML",Noe[Noe.APPLET=4]="APPLET",Noe[Noe.AREA=5]="AREA",Noe[Noe.ARTICLE=6]="ARTICLE",Noe[Noe.ASIDE=7]="ASIDE",Noe[Noe.B=8]="B",Noe[Noe.BASE=9]="BASE",Noe[Noe.BASEFONT=10]="BASEFONT",Noe[Noe.BGSOUND=11]="BGSOUND",Noe[Noe.BIG=12]="BIG",Noe[Noe.BLOCKQUOTE=13]="BLOCKQUOTE",Noe[Noe.BODY=14]="BODY",Noe[Noe.BR=15]="BR",Noe[Noe.BUTTON=16]="BUTTON",Noe[Noe.CAPTION=17]="CAPTION",Noe[Noe.CENTER=18]="CENTER",Noe[Noe.CODE=19]="CODE",Noe[Noe.COL=20]="COL",Noe[Noe.COLGROUP=21]="COLGROUP",Noe[Noe.DD=22]="DD",Noe[Noe.DESC=23]="DESC",Noe[Noe.DETAILS=24]="DETAILS",Noe[Noe.DIALOG=25]="DIALOG",Noe[Noe.DIR=26]="DIR",Noe[Noe.DIV=27]="DIV",Noe[Noe.DL=28]="DL",Noe[Noe.DT=29]="DT",Noe[Noe.EM=30]="EM",Noe[Noe.EMBED=31]="EMBED",Noe[Noe.FIELDSET=32]="FIELDSET",Noe[Noe.FIGCAPTION=33]="FIGCAPTION",Noe[Noe.FIGURE=34]="FIGURE",Noe[Noe.FONT=35]="FONT",Noe[Noe.FOOTER=36]="FOOTER",Noe[Noe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",Noe[Noe.FORM=38]="FORM",Noe[Noe.FRAME=39]="FRAME",Noe[Noe.FRAMESET=40]="FRAMESET",Noe[Noe.H1=41]="H1",Noe[Noe.H2=42]="H2",Noe[Noe.H3=43]="H3",Noe[Noe.H4=44]="H4",Noe[Noe.H5=45]="H5",Noe[Noe.H6=46]="H6",Noe[Noe.HEAD=47]="HEAD",Noe[Noe.HEADER=48]="HEADER",Noe[Noe.HGROUP=49]="HGROUP",Noe[Noe.HR=50]="HR",Noe[Noe.HTML=51]="HTML",Noe[Noe.I=52]="I",Noe[Noe.IMG=53]="IMG",Noe[Noe.IMAGE=54]="IMAGE",Noe[Noe.INPUT=55]="INPUT",Noe[Noe.IFRAME=56]="IFRAME",Noe[Noe.KEYGEN=57]="KEYGEN",Noe[Noe.LABEL=58]="LABEL",Noe[Noe.LI=59]="LI",Noe[Noe.LINK=60]="LINK",Noe[Noe.LISTING=61]="LISTING",Noe[Noe.MAIN=62]="MAIN",Noe[Noe.MALIGNMARK=63]="MALIGNMARK",Noe[Noe.MARQUEE=64]="MARQUEE",Noe[Noe.MATH=65]="MATH",Noe[Noe.MENU=66]="MENU",Noe[Noe.META=67]="META",Noe[Noe.MGLYPH=68]="MGLYPH",Noe[Noe.MI=69]="MI",Noe[Noe.MO=70]="MO",Noe[Noe.MN=71]="MN",Noe[Noe.MS=72]="MS",Noe[Noe.MTEXT=73]="MTEXT",Noe[Noe.NAV=74]="NAV",Noe[Noe.NOBR=75]="NOBR",Noe[Noe.NOFRAMES=76]="NOFRAMES",Noe[Noe.NOEMBED=77]="NOEMBED",Noe[Noe.NOSCRIPT=78]="NOSCRIPT",Noe[Noe.OBJECT=79]="OBJECT",Noe[Noe.OL=80]="OL",Noe[Noe.OPTGROUP=81]="OPTGROUP",Noe[Noe.OPTION=82]="OPTION",Noe[Noe.P=83]="P",Noe[Noe.PARAM=84]="PARAM",Noe[Noe.PLAINTEXT=85]="PLAINTEXT",Noe[Noe.PRE=86]="PRE",Noe[Noe.RB=87]="RB",Noe[Noe.RP=88]="RP",Noe[Noe.RT=89]="RT",Noe[Noe.RTC=90]="RTC",Noe[Noe.RUBY=91]="RUBY",Noe[Noe.S=92]="S",Noe[Noe.SCRIPT=93]="SCRIPT",Noe[Noe.SEARCH=94]="SEARCH",Noe[Noe.SECTION=95]="SECTION",Noe[Noe.SELECT=96]="SELECT",Noe[Noe.SOURCE=97]="SOURCE",Noe[Noe.SMALL=98]="SMALL",Noe[Noe.SPAN=99]="SPAN",Noe[Noe.STRIKE=100]="STRIKE",Noe[Noe.STRONG=101]="STRONG",Noe[Noe.STYLE=102]="STYLE",Noe[Noe.SUB=103]="SUB",Noe[Noe.SUMMARY=104]="SUMMARY",Noe[Noe.SUP=105]="SUP",Noe[Noe.TABLE=106]="TABLE",Noe[Noe.TBODY=107]="TBODY",Noe[Noe.TEMPLATE=108]="TEMPLATE",Noe[Noe.TEXTAREA=109]="TEXTAREA",Noe[Noe.TFOOT=110]="TFOOT",Noe[Noe.TD=111]="TD",Noe[Noe.TH=112]="TH",Noe[Noe.THEAD=113]="THEAD",Noe[Noe.TITLE=114]="TITLE",Noe[Noe.TR=115]="TR",Noe[Noe.TRACK=116]="TRACK",Noe[Noe.TT=117]="TT",Noe[Noe.U=118]="U",Noe[Noe.UL=119]="UL",Noe[Noe.SVG=120]="SVG",Noe[Noe.VAR=121]="VAR",Noe[Noe.WBR=122]="WBR",Noe[Noe.XMP=123]="XMP";const Loe=new Map([[Toe.A,Aoe.A],[Toe.ADDRESS,Aoe.ADDRESS],[Toe.ANNOTATION_XML,Aoe.ANNOTATION_XML],[Toe.APPLET,Aoe.APPLET],[Toe.AREA,Aoe.AREA],[Toe.ARTICLE,Aoe.ARTICLE],[Toe.ASIDE,Aoe.ASIDE],[Toe.B,Aoe.B],[Toe.BASE,Aoe.BASE],[Toe.BASEFONT,Aoe.BASEFONT],[Toe.BGSOUND,Aoe.BGSOUND],[Toe.BIG,Aoe.BIG],[Toe.BLOCKQUOTE,Aoe.BLOCKQUOTE],[Toe.BODY,Aoe.BODY],[Toe.BR,Aoe.BR],[Toe.BUTTON,Aoe.BUTTON],[Toe.CAPTION,Aoe.CAPTION],[Toe.CENTER,Aoe.CENTER],[Toe.CODE,Aoe.CODE],[Toe.COL,Aoe.COL],[Toe.COLGROUP,Aoe.COLGROUP],[Toe.DD,Aoe.DD],[Toe.DESC,Aoe.DESC],[Toe.DETAILS,Aoe.DETAILS],[Toe.DIALOG,Aoe.DIALOG],[Toe.DIR,Aoe.DIR],[Toe.DIV,Aoe.DIV],[Toe.DL,Aoe.DL],[Toe.DT,Aoe.DT],[Toe.EM,Aoe.EM],[Toe.EMBED,Aoe.EMBED],[Toe.FIELDSET,Aoe.FIELDSET],[Toe.FIGCAPTION,Aoe.FIGCAPTION],[Toe.FIGURE,Aoe.FIGURE],[Toe.FONT,Aoe.FONT],[Toe.FOOTER,Aoe.FOOTER],[Toe.FOREIGN_OBJECT,Aoe.FOREIGN_OBJECT],[Toe.FORM,Aoe.FORM],[Toe.FRAME,Aoe.FRAME],[Toe.FRAMESET,Aoe.FRAMESET],[Toe.H1,Aoe.H1],[Toe.H2,Aoe.H2],[Toe.H3,Aoe.H3],[Toe.H4,Aoe.H4],[Toe.H5,Aoe.H5],[Toe.H6,Aoe.H6],[Toe.HEAD,Aoe.HEAD],[Toe.HEADER,Aoe.HEADER],[Toe.HGROUP,Aoe.HGROUP],[Toe.HR,Aoe.HR],[Toe.HTML,Aoe.HTML],[Toe.I,Aoe.I],[Toe.IMG,Aoe.IMG],[Toe.IMAGE,Aoe.IMAGE],[Toe.INPUT,Aoe.INPUT],[Toe.IFRAME,Aoe.IFRAME],[Toe.KEYGEN,Aoe.KEYGEN],[Toe.LABEL,Aoe.LABEL],[Toe.LI,Aoe.LI],[Toe.LINK,Aoe.LINK],[Toe.LISTING,Aoe.LISTING],[Toe.MAIN,Aoe.MAIN],[Toe.MALIGNMARK,Aoe.MALIGNMARK],[Toe.MARQUEE,Aoe.MARQUEE],[Toe.MATH,Aoe.MATH],[Toe.MENU,Aoe.MENU],[Toe.META,Aoe.META],[Toe.MGLYPH,Aoe.MGLYPH],[Toe.MI,Aoe.MI],[Toe.MO,Aoe.MO],[Toe.MN,Aoe.MN],[Toe.MS,Aoe.MS],[Toe.MTEXT,Aoe.MTEXT],[Toe.NAV,Aoe.NAV],[Toe.NOBR,Aoe.NOBR],[Toe.NOFRAMES,Aoe.NOFRAMES],[Toe.NOEMBED,Aoe.NOEMBED],[Toe.NOSCRIPT,Aoe.NOSCRIPT],[Toe.OBJECT,Aoe.OBJECT],[Toe.OL,Aoe.OL],[Toe.OPTGROUP,Aoe.OPTGROUP],[Toe.OPTION,Aoe.OPTION],[Toe.P,Aoe.P],[Toe.PARAM,Aoe.PARAM],[Toe.PLAINTEXT,Aoe.PLAINTEXT],[Toe.PRE,Aoe.PRE],[Toe.RB,Aoe.RB],[Toe.RP,Aoe.RP],[Toe.RT,Aoe.RT],[Toe.RTC,Aoe.RTC],[Toe.RUBY,Aoe.RUBY],[Toe.S,Aoe.S],[Toe.SCRIPT,Aoe.SCRIPT],[Toe.SEARCH,Aoe.SEARCH],[Toe.SECTION,Aoe.SECTION],[Toe.SELECT,Aoe.SELECT],[Toe.SOURCE,Aoe.SOURCE],[Toe.SMALL,Aoe.SMALL],[Toe.SPAN,Aoe.SPAN],[Toe.STRIKE,Aoe.STRIKE],[Toe.STRONG,Aoe.STRONG],[Toe.STYLE,Aoe.STYLE],[Toe.SUB,Aoe.SUB],[Toe.SUMMARY,Aoe.SUMMARY],[Toe.SUP,Aoe.SUP],[Toe.TABLE,Aoe.TABLE],[Toe.TBODY,Aoe.TBODY],[Toe.TEMPLATE,Aoe.TEMPLATE],[Toe.TEXTAREA,Aoe.TEXTAREA],[Toe.TFOOT,Aoe.TFOOT],[Toe.TD,Aoe.TD],[Toe.TH,Aoe.TH],[Toe.THEAD,Aoe.THEAD],[Toe.TITLE,Aoe.TITLE],[Toe.TR,Aoe.TR],[Toe.TRACK,Aoe.TRACK],[Toe.TT,Aoe.TT],[Toe.U,Aoe.U],[Toe.UL,Aoe.UL],[Toe.SVG,Aoe.SVG],[Toe.VAR,Aoe.VAR],[Toe.WBR,Aoe.WBR],[Toe.XMP,Aoe.XMP]]);function Doe(e){var t;return null!==(t=Loe.get(e))&&void 0!==t?t:Aoe.UNKNOWN}const Moe=Aoe,Foe={[koe.HTML]:new Set([Moe.ADDRESS,Moe.APPLET,Moe.AREA,Moe.ARTICLE,Moe.ASIDE,Moe.BASE,Moe.BASEFONT,Moe.BGSOUND,Moe.BLOCKQUOTE,Moe.BODY,Moe.BR,Moe.BUTTON,Moe.CAPTION,Moe.CENTER,Moe.COL,Moe.COLGROUP,Moe.DD,Moe.DETAILS,Moe.DIR,Moe.DIV,Moe.DL,Moe.DT,Moe.EMBED,Moe.FIELDSET,Moe.FIGCAPTION,Moe.FIGURE,Moe.FOOTER,Moe.FORM,Moe.FRAME,Moe.FRAMESET,Moe.H1,Moe.H2,Moe.H3,Moe.H4,Moe.H5,Moe.H6,Moe.HEAD,Moe.HEADER,Moe.HGROUP,Moe.HR,Moe.HTML,Moe.IFRAME,Moe.IMG,Moe.INPUT,Moe.LI,Moe.LINK,Moe.LISTING,Moe.MAIN,Moe.MARQUEE,Moe.MENU,Moe.META,Moe.NAV,Moe.NOEMBED,Moe.NOFRAMES,Moe.NOSCRIPT,Moe.OBJECT,Moe.OL,Moe.P,Moe.PARAM,Moe.PLAINTEXT,Moe.PRE,Moe.SCRIPT,Moe.SECTION,Moe.SELECT,Moe.SOURCE,Moe.STYLE,Moe.SUMMARY,Moe.TABLE,Moe.TBODY,Moe.TD,Moe.TEMPLATE,Moe.TEXTAREA,Moe.TFOOT,Moe.TH,Moe.THEAD,Moe.TITLE,Moe.TR,Moe.TRACK,Moe.UL,Moe.WBR,Moe.XMP]),[koe.MATHML]:new Set([Moe.MI,Moe.MO,Moe.MN,Moe.MS,Moe.MTEXT,Moe.ANNOTATION_XML]),[koe.SVG]:new Set([Moe.TITLE,Moe.FOREIGN_OBJECT,Moe.DESC]),[koe.XLINK]:new Set,[koe.XML]:new Set,[koe.XMLNS]:new Set},joe=new Set([Moe.H1,Moe.H2,Moe.H3,Moe.H4,Moe.H5,Moe.H6]);var zoe,Boe;Toe.STYLE,Toe.SCRIPT,Toe.XMP,Toe.IFRAME,Toe.NOEMBED,Toe.NOFRAMES,Toe.PLAINTEXT,(Boe=zoe||(zoe={}))[Boe.DATA=0]="DATA",Boe[Boe.RCDATA=1]="RCDATA",Boe[Boe.RAWTEXT=2]="RAWTEXT",Boe[Boe.SCRIPT_DATA=3]="SCRIPT_DATA",Boe[Boe.PLAINTEXT=4]="PLAINTEXT",Boe[Boe.TAG_OPEN=5]="TAG_OPEN",Boe[Boe.END_TAG_OPEN=6]="END_TAG_OPEN",Boe[Boe.TAG_NAME=7]="TAG_NAME",Boe[Boe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Boe[Boe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Boe[Boe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Boe[Boe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Boe[Boe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Boe[Boe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Boe[Boe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Boe[Boe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Boe[Boe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Boe[Boe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Boe[Boe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Boe[Boe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Boe[Boe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Boe[Boe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Boe[Boe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Boe[Boe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Boe[Boe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Boe[Boe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Boe[Boe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Boe[Boe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Boe[Boe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Boe[Boe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Boe[Boe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Boe[Boe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Boe[Boe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Boe[Boe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Boe[Boe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Boe[Boe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Boe[Boe.COMMENT_START=42]="COMMENT_START",Boe[Boe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Boe[Boe.COMMENT=44]="COMMENT",Boe[Boe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Boe[Boe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Boe[Boe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Boe[Boe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Boe[Boe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Boe[Boe.COMMENT_END=50]="COMMENT_END",Boe[Boe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Boe[Boe.DOCTYPE=52]="DOCTYPE",Boe[Boe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Boe[Boe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Boe[Boe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Boe[Boe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Boe[Boe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Boe[Boe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Boe[Boe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Boe[Boe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Boe[Boe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Boe[Boe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Boe[Boe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Boe[Boe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Boe[Boe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Boe[Boe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Boe[Boe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Boe[Boe.CDATA_SECTION=68]="CDATA_SECTION",Boe[Boe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Boe[Boe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Boe[Boe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Boe[Boe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Hoe={DATA:zoe.DATA,RCDATA:zoe.RCDATA,RAWTEXT:zoe.RAWTEXT,SCRIPT_DATA:zoe.SCRIPT_DATA,PLAINTEXT:zoe.PLAINTEXT,CDATA_SECTION:zoe.CDATA_SECTION};function Uoe(e){return e>=Wae.LATIN_CAPITAL_A&&e<=Wae.LATIN_CAPITAL_Z}function $oe(e){return function(e){return e>=Wae.LATIN_SMALL_A&&e<=Wae.LATIN_SMALL_Z}(e)||Uoe(e)}function Voe(e){return $oe(e)||function(e){return e>=Wae.DIGIT_0&&e<=Wae.DIGIT_9}(e)}function Goe(e){return e+32}function qoe(e){return e===Wae.SPACE||e===Wae.LINE_FEED||e===Wae.TABULATION||e===Wae.FORM_FEED}function Woe(e){return qoe(e)||e===Wae.SOLIDUS||e===Wae.GREATER_THAN_SIGN}class Yoe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=zoe.DATA,this.returnState=zoe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ioe(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Roe(uoe,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(aoe.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(aoe.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Wae.NULL?aoe.nullCharacterReference:e>1114111?aoe.characterReferenceOutsideUnicodeRange:toe(e)?aoe.surrogateCharacterReference:roe(e)?aoe.noncharacterCharacterReference:noe(e)||e===Wae.CARRIAGE_RETURN?aoe.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:soe.START_TAG,tagName:"",tagID:Aoe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:soe.END_TAG,tagName:"",tagID:Aoe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:soe.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:soe.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(null===coe(n,this.currentAttr.name)){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){(null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(aoe.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Doe(e.tagName),e.type===soe.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(aoe.endTagWithAttributes),e.selfClosing&&this._err(aoe.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case soe.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case soe.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case soe.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:soe.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=qoe(e)?soe.WHITESPACE_CHARACTER:e===Wae.NULL?soe.NULL_CHARACTER:soe.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(soe.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=zoe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?boe.Attribute:boe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===zoe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===zoe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===zoe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case zoe.DATA:this._stateData(e);break;case zoe.RCDATA:this._stateRcdata(e);break;case zoe.RAWTEXT:this._stateRawtext(e);break;case zoe.SCRIPT_DATA:this._stateScriptData(e);break;case zoe.PLAINTEXT:this._statePlaintext(e);break;case zoe.TAG_OPEN:this._stateTagOpen(e);break;case zoe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case zoe.TAG_NAME:this._stateTagName(e);break;case zoe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case zoe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case zoe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case zoe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case zoe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case zoe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case zoe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case zoe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case zoe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case zoe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case zoe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case zoe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case zoe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case zoe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case zoe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case zoe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case zoe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case zoe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case zoe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case zoe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case zoe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case zoe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case zoe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case zoe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case zoe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case zoe.BOGUS_COMMENT:this._stateBogusComment(e);break;case zoe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case zoe.COMMENT_START:this._stateCommentStart(e);break;case zoe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case zoe.COMMENT:this._stateComment(e);break;case zoe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case zoe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case zoe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case zoe.COMMENT_END:this._stateCommentEnd(e);break;case zoe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case zoe.DOCTYPE:this._stateDoctype(e);break;case zoe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case zoe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case zoe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case zoe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case zoe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case zoe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case zoe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case zoe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case zoe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case zoe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case zoe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case zoe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case zoe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case zoe.CDATA_SECTION:this._stateCdataSection(e);break;case zoe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case zoe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case zoe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case zoe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Wae.LESS_THAN_SIGN:this.state=zoe.TAG_OPEN;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitCodePoint(e);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.LESS_THAN_SIGN:this.state=zoe.RCDATA_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Wae.LESS_THAN_SIGN:this.state=zoe.RAWTEXT_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if($oe(e))this._createStartTagToken(),this.state=zoe.TAG_NAME,this._stateTagName(e);else switch(e){case Wae.EXCLAMATION_MARK:this.state=zoe.MARKUP_DECLARATION_OPEN;break;case Wae.SOLIDUS:this.state=zoe.END_TAG_OPEN;break;case Wae.QUESTION_MARK:this._err(aoe.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=zoe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Wae.EOF:this._err(aoe.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(aoe.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=zoe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if($oe(e))this._createEndTagToken(),this.state=zoe.TAG_NAME,this._stateTagName(e);else switch(e){case Wae.GREATER_THAN_SIGN:this._err(aoe.missingEndTagName),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(aoe.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=zoe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_ATTRIBUTE_NAME;break;case Wae.SOLIDUS:this.state=zoe.SELF_CLOSING_START_TAG;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.tagName+=qae;break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Uoe(e)?Goe(e):e)}}_stateRcdataLessThanSign(e){e===Wae.SOLIDUS?this.state=zoe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=zoe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){$oe(e)?(this.state=zoe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=zoe.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=zoe.BEFORE_ATTRIBUTE_NAME,!1;case Wae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=zoe.SELF_CLOSING_START_TAG,!1;case Wae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=zoe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Wae.SOLIDUS?this.state=zoe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=zoe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){$oe(e)?(this.state=zoe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=zoe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Wae.SOLIDUS:this.state=zoe.SCRIPT_DATA_END_TAG_OPEN;break;case Wae.EXCLAMATION_MARK:this.state=zoe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=zoe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){$oe(e)?(this.state=zoe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Wae.HYPHEN_MINUS?(this.state=zoe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Wae.HYPHEN_MINUS?(this.state=zoe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Wae.HYPHEN_MINUS:this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.SCRIPT_DATA,this._emitChars(">");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Wae.SOLIDUS?this.state=zoe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$oe(e)?(this._emitChars("<"),this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){$oe(e)?(this.state=zoe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Qae,!1)&&Woe(this.preprocessor.peek(Qae.length))){this._emitCodePoint(e);for(let e=0;e<Qae.length;e++)this._emitCodePoint(this._consume());this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Wae.HYPHEN_MINUS:this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Wae.GREATER_THAN_SIGN:this.state=zoe.SCRIPT_DATA,this._emitChars(">");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Wae.SOLIDUS?(this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Qae,!1)&&Woe(this.preprocessor.peek(Qae.length))){this._emitCodePoint(e);for(let e=0;e<Qae.length;e++)this._emitCodePoint(this._consume());this.state=zoe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.SOLIDUS:case Wae.GREATER_THAN_SIGN:case Wae.EOF:this.state=zoe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Wae.EQUALS_SIGN:this._err(aoe.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=zoe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=zoe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:case Wae.SOLIDUS:case Wae.GREATER_THAN_SIGN:case Wae.EOF:this._leaveAttrName(),this.state=zoe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Wae.EQUALS_SIGN:this._leaveAttrName(),this.state=zoe.BEFORE_ATTRIBUTE_VALUE;break;case Wae.QUOTATION_MARK:case Wae.APOSTROPHE:case Wae.LESS_THAN_SIGN:this._err(aoe.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.name+=qae;break;default:this.currentAttr.name+=String.fromCodePoint(Uoe(e)?Goe(e):e)}}_stateAfterAttributeName(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.SOLIDUS:this.state=zoe.SELF_CLOSING_START_TAG;break;case Wae.EQUALS_SIGN:this.state=zoe.BEFORE_ATTRIBUTE_VALUE;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=zoe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.QUOTATION_MARK:this.state=zoe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this.state=zoe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingAttributeValue),this.state=zoe.DATA,this.emitCurrentTagToken();break;default:this.state=zoe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Wae.QUOTATION_MARK:this.state=zoe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.value+=qae;break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Wae.APOSTROPHE:this.state=zoe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.value+=qae;break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this._leaveAttrValue(),this.state=zoe.BEFORE_ATTRIBUTE_NAME;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.value+=qae;break;case Wae.QUOTATION_MARK:case Wae.APOSTROPHE:case Wae.LESS_THAN_SIGN:case Wae.EQUALS_SIGN:case Wae.GRAVE_ACCENT:this._err(aoe.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this._leaveAttrValue(),this.state=zoe.BEFORE_ATTRIBUTE_NAME;break;case Wae.SOLIDUS:this._leaveAttrValue(),this.state=zoe.SELF_CLOSING_START_TAG;break;case Wae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this._err(aoe.missingWhitespaceBetweenAttributes),this.state=zoe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Wae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this._err(aoe.unexpectedSolidusInTag),this.state=zoe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.data+=qae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Zae,!0)?(this._createCommentToken(Zae.length+1),this.state=zoe.COMMENT_START):this._consumeSequenceIfMatch(Xae,!1)?(this.currentLocation=this.getCurrentLocation(Xae.length+1),this.state=zoe.DOCTYPE):this._consumeSequenceIfMatch(Kae,!0)?this.inForeignNode?this.state=zoe.CDATA_SECTION:(this._err(aoe.cdataInHtmlContent),this._createCommentToken(Kae.length+1),this.currentToken.data="[CDATA[",this.state=zoe.BOGUS_COMMENT):this._ensureHibernation()||(this._err(aoe.incorrectlyOpenedComment),this._createCommentToken(2),this.state=zoe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_START_DASH;break;case Wae.GREATER_THAN_SIGN:{this._err(aoe.abruptClosingOfEmptyComment),this.state=zoe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_END;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptClosingOfEmptyComment),this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=zoe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_END_DASH;break;case Wae.LESS_THAN_SIGN:t.data+="<",this.state=zoe.COMMENT_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.data+=qae;break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Wae.EXCLAMATION_MARK:t.data+="!",this.state=zoe.COMMENT_LESS_THAN_SIGN_BANG;break;case Wae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Wae.HYPHEN_MINUS?this.state=zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=zoe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Wae.HYPHEN_MINUS?this.state=zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=zoe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Wae.GREATER_THAN_SIGN&&e!==Wae.EOF&&this._err(aoe.nestedComment),this.state=zoe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_END;break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EXCLAMATION_MARK:this.state=zoe.COMMENT_END_BANG;break;case Wae.HYPHEN_MINUS:t.data+="-";break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:t.data+="--!",this.state=zoe.COMMENT_END_DASH;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.incorrectlyClosedComment),this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=zoe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_DOCTYPE_NAME;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Wae.EOF:{this._err(aoe.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(aoe.missingWhitespaceBeforeDoctypeName),this.state=zoe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Uoe(e))this._createDoctypeToken(String.fromCharCode(Goe(e))),this.state=zoe.DOCTYPE_NAME;else switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._createDoctypeToken(qae),this.state=zoe.DOCTYPE_NAME;break;case Wae.GREATER_THAN_SIGN:{this._err(aoe.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=zoe.DATA;break}case Wae.EOF:{this._err(aoe.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=zoe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.AFTER_DOCTYPE_NAME;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.name+=qae;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Uoe(e)?Goe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Jae,!1)?this.state=zoe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(eoe,!1)?this.state=zoe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(aoe.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Wae.QUOTATION_MARK:this._err(aoe.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this._err(aoe.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.QUOTATION_MARK:t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Wae.QUOTATION_MARK:this.state=zoe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.publicId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Wae.APOSTROPHE:this.state=zoe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.publicId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.QUOTATION_MARK:this._err(aoe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this._err(aoe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.QUOTATION_MARK:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Wae.QUOTATION_MARK:this._err(aoe.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this._err(aoe.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.QUOTATION_MARK:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Wae.QUOTATION_MARK:this.state=zoe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.systemId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Wae.APOSTROPHE:this.state=zoe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.systemId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Wae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter);break;case Wae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Wae.RIGHT_SQUARE_BRACKET:this.state=zoe.CDATA_SECTION_BRACKET;break;case Wae.EOF:this._err(aoe.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Wae.RIGHT_SQUARE_BRACKET?this.state=zoe.CDATA_SECTION_END:(this._emitChars("]"),this.state=zoe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA;break;case Wae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=zoe.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(!this.preprocessor.lastChunkWritten)return this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,void(this.preprocessor.endOfChunkHit=!0);e=this.entityDecoder.end()}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Wae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Voe(this.preprocessor.peek(1))?zoe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Voe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Wae.SEMICOLON&&this._err(aoe.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Zoe=new Set([Aoe.DD,Aoe.DT,Aoe.LI,Aoe.OPTGROUP,Aoe.OPTION,Aoe.P,Aoe.RB,Aoe.RP,Aoe.RT,Aoe.RTC]),Koe=new Set([...Zoe,Aoe.CAPTION,Aoe.COLGROUP,Aoe.TBODY,Aoe.TD,Aoe.TFOOT,Aoe.TH,Aoe.THEAD,Aoe.TR]),Xoe=new Set([Aoe.APPLET,Aoe.CAPTION,Aoe.HTML,Aoe.MARQUEE,Aoe.OBJECT,Aoe.TABLE,Aoe.TD,Aoe.TEMPLATE,Aoe.TH]),Qoe=new Set([...Xoe,Aoe.OL,Aoe.UL]),Joe=new Set([...Xoe,Aoe.BUTTON]),eie=new Set([Aoe.ANNOTATION_XML,Aoe.MI,Aoe.MN,Aoe.MO,Aoe.MS,Aoe.MTEXT]),tie=new Set([Aoe.DESC,Aoe.FOREIGN_OBJECT,Aoe.TITLE]),nie=new Set([Aoe.TR,Aoe.TEMPLATE,Aoe.HTML]),rie=new Set([Aoe.TBODY,Aoe.TFOOT,Aoe.THEAD,Aoe.TEMPLATE,Aoe.HTML]),aie=new Set([Aoe.TABLE,Aoe.TEMPLATE,Aoe.HTML]),oie=new Set([Aoe.TD,Aoe.TH]);class iie{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Aoe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Aoe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===koe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==koe.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(joe,koe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(oie,koe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(aie,koe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rie,koe.HTML)}clearBackToTableRowContext(){this.clearBackTo(nie,koe.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Aoe.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===Aoe.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case koe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case koe.SVG:if(tie.has(r))return!1;break;case koe.MATHML:if(eie.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Xoe)}hasInListItemScope(e){return this.hasInDynamicScope(e,Qoe)}hasInButtonScope(e){return this.hasInDynamicScope(e,Joe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case koe.HTML:if(joe.has(t))return!0;if(Xoe.has(t))return!1;break;case koe.SVG:if(tie.has(t))return!1;break;case koe.MATHML:if(eie.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===koe.HTML)switch(this.tagIDs[t]){case e:return!0;case Aoe.TABLE:case Aoe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===koe.HTML)switch(this.tagIDs[e]){case Aoe.TBODY:case Aoe.THEAD:case Aoe.TFOOT:return!0;case Aoe.TABLE:case Aoe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===koe.HTML)switch(this.tagIDs[t]){case e:return!0;case Aoe.OPTION:case Aoe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&Zoe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Koe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Koe.has(this.currentTagId);)this.pop()}}var sie,lie;(lie=sie||(sie={}))[lie.Marker=0]="Marker",lie[lie.Element=1]="Element";const cie={type:sie.Marker};class uie{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,a=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let i=0;i<this.entries.length;i++){const e=this.entries[i];if(e.type===sie.Marker)break;const{element:t}=e;if(this.treeAdapter.getTagName(t)===a&&this.treeAdapter.getNamespaceURI(t)===o){const e=this.treeAdapter.getAttrList(t);e.length===r&&n.push({idx:i,attrs:e})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let a=0;for(let o=0;o<n.length;o++){const e=n[o];e.attrs.every((e=>r.get(e.name)===e.value))&&(a+=1,a>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(cie)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:sie.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:sie.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(cie);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===sie.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===sie.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===sie.Element&&t.element===e))}}const die={createDocument:()=>({nodeName:"#document",mode:_oe.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({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=>e.content,setDocumentType(e,t,n,r){const a=e.childNodes.find((e=>"#documentType"===e.nodeName));if(a)a.name=t,a.publicId=n,a.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};die.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>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(die.isTextNode(n))return void(n.value+=t)}die.appendChild(e,die.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&die.isTextNode(r)?r.value+=t:die.insertBefore(e,die.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},pie="html",fie=["+//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//"],hie=[...fie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],mie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),gie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],yie=[...gie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function bie(e,t){return t.some((t=>e.startsWith(t)))}const vie="text/html",kie="application/xhtml+xml",xie=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]))),wie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:koe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:koe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:koe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:koe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:koe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:koe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:koe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:koe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:koe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:koe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:koe.XMLNS}]]),Eie=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]))),_ie=new Set([Aoe.B,Aoe.BIG,Aoe.BLOCKQUOTE,Aoe.BODY,Aoe.BR,Aoe.CENTER,Aoe.CODE,Aoe.DD,Aoe.DIV,Aoe.DL,Aoe.DT,Aoe.EM,Aoe.EMBED,Aoe.H1,Aoe.H2,Aoe.H3,Aoe.H4,Aoe.H5,Aoe.H6,Aoe.HEAD,Aoe.HR,Aoe.I,Aoe.IMG,Aoe.LI,Aoe.LISTING,Aoe.MENU,Aoe.META,Aoe.NOBR,Aoe.OL,Aoe.P,Aoe.PRE,Aoe.RUBY,Aoe.S,Aoe.SMALL,Aoe.SPAN,Aoe.STRONG,Aoe.STRIKE,Aoe.SUB,Aoe.SUP,Aoe.TABLE,Aoe.TT,Aoe.U,Aoe.UL,Aoe.VAR]);function Sie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function Tie(e){for(let t=0;t<e.attrs.length;t++){const n=xie.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function Cie(e){for(let t=0;t<e.attrs.length;t++){const n=wie.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 Aie(e,t,n,r){return(!r||r===koe.HTML)&&function(e,t,n){if(t===koe.MATHML&&e===Aoe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===woe.ENCODING){const e=n[r].value.toLowerCase();return e===vie||e===kie}return t===koe.SVG&&(e===Aoe.FOREIGN_OBJECT||e===Aoe.DESC||e===Aoe.TITLE)}(e,t,n)||(!r||r===koe.MATHML)&&function(e,t){return t===koe.MATHML&&(e===Aoe.MI||e===Aoe.MO||e===Aoe.MN||e===Aoe.MS||e===Aoe.MTEXT)}(e,t)}var Nie,Iie;(Iie=Nie||(Nie={}))[Iie.INITIAL=0]="INITIAL",Iie[Iie.BEFORE_HTML=1]="BEFORE_HTML",Iie[Iie.BEFORE_HEAD=2]="BEFORE_HEAD",Iie[Iie.IN_HEAD=3]="IN_HEAD",Iie[Iie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",Iie[Iie.AFTER_HEAD=5]="AFTER_HEAD",Iie[Iie.IN_BODY=6]="IN_BODY",Iie[Iie.TEXT=7]="TEXT",Iie[Iie.IN_TABLE=8]="IN_TABLE",Iie[Iie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",Iie[Iie.IN_CAPTION=10]="IN_CAPTION",Iie[Iie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",Iie[Iie.IN_TABLE_BODY=12]="IN_TABLE_BODY",Iie[Iie.IN_ROW=13]="IN_ROW",Iie[Iie.IN_CELL=14]="IN_CELL",Iie[Iie.IN_SELECT=15]="IN_SELECT",Iie[Iie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",Iie[Iie.IN_TEMPLATE=17]="IN_TEMPLATE",Iie[Iie.AFTER_BODY=18]="AFTER_BODY",Iie[Iie.IN_FRAMESET=19]="IN_FRAMESET",Iie[Iie.AFTER_FRAMESET=20]="AFTER_FRAMESET",Iie[Iie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",Iie[Iie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const Oie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Rie=new Set([Aoe.TABLE,Aoe.TBODY,Aoe.TFOOT,Aoe.THEAD,Aoe.TR]),Pie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:die,onParseError:null};class Lie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Nie.INITIAL,this.originalInsertionMode=Nie.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={...Pie,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Yoe(this.options,this),this.activeFormattingElements=new uie(this.treeAdapter),this.fragmentContextID=n?Doe(this.treeAdapter.getTagName(n)):Aoe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new iie(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...Pie,...t};null!=e||(e=n.treeAdapter.createElement(Toe.TEMPLATE,koe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",koe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===Aoe.TEMPLATE&&a.tmplInsertionModeStack.unshift(Nie.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const a=null!==(r=e.location)&&void 0!==r?r:Oie,o={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(e,t,n){var r,a;null===(a=(r=this.treeAdapter).onItemPush)||void 0===a||a.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===koe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,koe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Nie.TEXT}switchToPlaintextParsing(){this.insertionMode=Nie.TEXT,this.originalInsertionMode=Nie.IN_BODY,this.tokenizer.state=Hoe.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Toe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===koe.HTML)switch(this.fragmentContextID){case Aoe.TITLE:case Aoe.TEXTAREA:this.tokenizer.state=Hoe.RCDATA;break;case Aoe.STYLE:case Aoe.XMP:case Aoe.IFRAME:case Aoe.NOEMBED:case Aoe.NOFRAMES:case Aoe.NOSCRIPT:this.tokenizer.state=Hoe.RAWTEXT;break;case Aoe.SCRIPT:this.tokenizer.state=Hoe.SCRIPT_DATA;break;case Aoe.PLAINTEXT:this.tokenizer.state=Hoe.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,koe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,koe.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Toe.HTML,koe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Aoe.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),a=n?r.lastIndexOf(n):r.length,o=r[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),a=t.type===soe.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==Aoe.SVG||this.treeAdapter.getTagName(t)!==Toe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==koe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===Aoe.MGLYPH||e.tagID===Aoe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,koe.HTML))}_processToken(e){switch(e.type){case soe.CHARACTER:this.onCharacter(e);break;case soe.NULL_CHARACTER:this.onNullCharacter(e);break;case soe.COMMENT:this.onComment(e);break;case soe.DOCTYPE:this.onDoctype(e);break;case soe.START_TAG:this._processStartTag(e);break;case soe.END_TAG:this.onEndTag(e);break;case soe.EOF:this.onEof(e);break;case soe.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Aie(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===sie.Marker||this.openElements.contains(e.element)));for(let n=-1===t?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Nie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Aoe.P),this.openElements.popUntilTagNamePopped(Aoe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Aoe.TR:return void(this.insertionMode=Nie.IN_ROW);case Aoe.TBODY:case Aoe.THEAD:case Aoe.TFOOT:return void(this.insertionMode=Nie.IN_TABLE_BODY);case Aoe.CAPTION:return void(this.insertionMode=Nie.IN_CAPTION);case Aoe.COLGROUP:return void(this.insertionMode=Nie.IN_COLUMN_GROUP);case Aoe.TABLE:return void(this.insertionMode=Nie.IN_TABLE);case Aoe.BODY:return void(this.insertionMode=Nie.IN_BODY);case Aoe.FRAMESET:return void(this.insertionMode=Nie.IN_FRAMESET);case Aoe.SELECT:return void this._resetInsertionModeForSelect(e);case Aoe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case Aoe.HTML:return void(this.insertionMode=this.headElement?Nie.AFTER_HEAD:Nie.BEFORE_HEAD);case Aoe.TD:case Aoe.TH:if(e>0)return void(this.insertionMode=Nie.IN_CELL);break;case Aoe.HEAD:if(e>0)return void(this.insertionMode=Nie.IN_HEAD)}this.insertionMode=Nie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===Aoe.TEMPLATE)break;if(e===Aoe.TABLE)return void(this.insertionMode=Nie.IN_SELECT_IN_TABLE)}this.insertionMode=Nie.IN_SELECT}_isElementCausesFosterParenting(e){return Rie.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Aoe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===koe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Aoe.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Foe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:Gie(this,e);break;case Nie.BEFORE_HEAD:qie(this,e);break;case Nie.IN_HEAD:Zie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:Kie(this,e);break;case Nie.AFTER_HEAD:Xie(this,e);break;case Nie.IN_BODY:case Nie.IN_CAPTION:case Nie.IN_CELL:case Nie.IN_TEMPLATE:ese(this,e);break;case Nie.TEXT:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Nie.IN_TABLE:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:cse(this,e);break;case Nie.IN_TABLE_TEXT:hse(this,e);break;case Nie.IN_COLUMN_GROUP:bse(this,e);break;case Nie.AFTER_BODY:Cse(this,e);break;case Nie.AFTER_AFTER_BODY:Ase(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=qae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:Gie(this,e);break;case Nie.BEFORE_HEAD:qie(this,e);break;case Nie.IN_HEAD:Zie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:Kie(this,e);break;case Nie.AFTER_HEAD:Xie(this,e);break;case Nie.TEXT:this._insertCharacters(e);break;case Nie.IN_TABLE:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:cse(this,e);break;case Nie.IN_COLUMN_GROUP:bse(this,e);break;case Nie.AFTER_BODY:Cse(this,e);break;case Nie.AFTER_AFTER_BODY:Ase(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Uie(this,e);else switch(this.insertionMode){case Nie.INITIAL:case Nie.BEFORE_HTML:case Nie.BEFORE_HEAD:case Nie.IN_HEAD:case Nie.IN_HEAD_NO_SCRIPT:case Nie.AFTER_HEAD:case Nie.IN_BODY:case Nie.IN_TABLE:case Nie.IN_CAPTION:case Nie.IN_COLUMN_GROUP:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:case Nie.IN_CELL:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:case Nie.IN_TEMPLATE:case Nie.IN_FRAMESET:case Nie.AFTER_FRAMESET:Uie(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case Nie.AFTER_AFTER_BODY:case Nie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Nie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?_oe.QUIRKS:function(e){if(e.name!==pie)return _oe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return _oe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),mie.has(n))return _oe.QUIRKS;let e=null===t?hie:fie;if(bie(n,e))return _oe.QUIRKS;if(e=null===t?gie:yie,bie(n,e))return _oe.LIMITED_QUIRKS}return _oe.NO_QUIRKS}(t);(function(e){return e.name===pie&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,aoe.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Nie.BEFORE_HTML}(this,e);break;case Nie.BEFORE_HEAD:case Nie.IN_HEAD:case Nie.IN_HEAD_NO_SCRIPT:case Nie.AFTER_HEAD:this._err(e,aoe.misplacedDoctype);break;case Nie.IN_TABLE_TEXT:mse(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,aoe.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===Aoe.FONT&&e.attrs.some((({name:e})=>e===woe.COLOR||e===woe.SIZE||e===woe.FACE))||_ie.has(t)}(t))Nse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===koe.MATHML?Sie(t):r===koe.SVG&&(!function(e){const t=Eie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Doe(e.tagName))}(t),Tie(t)),Cie(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:!function(e,t){t.tagID===Aoe.HTML?(e._insertElement(t,koe.HTML),e.insertionMode=Nie.BEFORE_HEAD):Gie(e,t)}(this,e);break;case Nie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.HEAD:e._insertElement(t,koe.HTML),e.headElement=e.openElements.current,e.insertionMode=Nie.IN_HEAD;break;default:qie(e,t)}}(this,e);break;case Nie.IN_HEAD:Wie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.HEAD:case Aoe.LINK:case Aoe.META:case Aoe.NOFRAMES:case Aoe.STYLE:Wie(e,t);break;case Aoe.NOSCRIPT:e._err(t,aoe.nestedNoscriptInHead);break;default:Kie(e,t)}}(this,e);break;case Nie.AFTER_HEAD:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.BODY:e._insertElement(t,koe.HTML),e.framesetOk=!1,e.insertionMode=Nie.IN_BODY;break;case Aoe.FRAMESET:e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_FRAMESET;break;case Aoe.BASE:case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.LINK:case Aoe.META:case Aoe.NOFRAMES:case Aoe.SCRIPT:case Aoe.STYLE:case Aoe.TEMPLATE:case Aoe.TITLE:e._err(t,aoe.abandonedHeadElementChild),e.openElements.push(e.headElement,Aoe.HEAD),Wie(e,t),e.openElements.remove(e.headElement);break;case Aoe.HEAD:e._err(t,aoe.misplacedStartTagForHeadElement);break;default:Xie(e,t)}}(this,e);break;case Nie.IN_BODY:ose(this,e);break;case Nie.IN_TABLE:use(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.IN_CAPTION:!function(e,t){const n=t.tagID;gse.has(n)?e.openElements.hasInTableScope(Aoe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Aoe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Nie.IN_TABLE,use(e,t)):ose(e,t)}(this,e);break;case Nie.IN_COLUMN_GROUP:yse(this,e);break;case Nie.IN_TABLE_BODY:vse(this,e);break;case Nie.IN_ROW:xse(this,e);break;case Nie.IN_CELL:!function(e,t){const n=t.tagID;gse.has(n)?(e.openElements.hasInTableScope(Aoe.TD)||e.openElements.hasInTableScope(Aoe.TH))&&(e._closeTableCell(),xse(e,t)):ose(e,t)}(this,e);break;case Nie.IN_SELECT:Ese(this,e);break;case Nie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===Aoe.CAPTION||n===Aoe.TABLE||n===Aoe.TBODY||n===Aoe.TFOOT||n===Aoe.THEAD||n===Aoe.TR||n===Aoe.TD||n===Aoe.TH?(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ese(e,t)}(this,e);break;case Nie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case Aoe.BASE:case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.LINK:case Aoe.META:case Aoe.NOFRAMES:case Aoe.SCRIPT:case Aoe.STYLE:case Aoe.TEMPLATE:case Aoe.TITLE:Wie(e,t);break;case Aoe.CAPTION:case Aoe.COLGROUP:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:e.tmplInsertionModeStack[0]=Nie.IN_TABLE,e.insertionMode=Nie.IN_TABLE,use(e,t);break;case Aoe.COL:e.tmplInsertionModeStack[0]=Nie.IN_COLUMN_GROUP,e.insertionMode=Nie.IN_COLUMN_GROUP,yse(e,t);break;case Aoe.TR:e.tmplInsertionModeStack[0]=Nie.IN_TABLE_BODY,e.insertionMode=Nie.IN_TABLE_BODY,vse(e,t);break;case Aoe.TD:case Aoe.TH:e.tmplInsertionModeStack[0]=Nie.IN_ROW,e.insertionMode=Nie.IN_ROW,xse(e,t);break;default:e.tmplInsertionModeStack[0]=Nie.IN_BODY,e.insertionMode=Nie.IN_BODY,ose(e,t)}}(this,e);break;case Nie.AFTER_BODY:!function(e,t){t.tagID===Aoe.HTML?ose(e,t):Cse(e,t)}(this,e);break;case Nie.IN_FRAMESET:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.FRAMESET:e._insertElement(t,koe.HTML);break;case Aoe.FRAME:e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.NOFRAMES:Wie(e,t)}}(this,e);break;case Nie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.NOFRAMES:Wie(e,t)}}(this,e);break;case Nie.AFTER_AFTER_BODY:!function(e,t){t.tagID===Aoe.HTML?ose(e,t):Ase(e,t)}(this,e);break;case Nie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.NOFRAMES:Wie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===Aoe.P||t.tagID===Aoe.BR)return Nse(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===koe.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==Aoe.HTML&&n!==Aoe.HEAD&&n!==Aoe.BODY&&n!==Aoe.BR||Gie(e,t)}(this,e);break;case Nie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===Aoe.HEAD||n===Aoe.BODY||n===Aoe.HTML||n===Aoe.BR?qie(e,t):e._err(t,aoe.endTagWithoutMatchingOpenElement)}(this,e);break;case Nie.IN_HEAD:!function(e,t){switch(t.tagID){case Aoe.HEAD:e.openElements.pop(),e.insertionMode=Nie.AFTER_HEAD;break;case Aoe.BODY:case Aoe.BR:case Aoe.HTML:Zie(e,t);break;case Aoe.TEMPLATE:Yie(e,t);break;default:e._err(t,aoe.endTagWithoutMatchingOpenElement)}}(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Aoe.NOSCRIPT:e.openElements.pop(),e.insertionMode=Nie.IN_HEAD;break;case Aoe.BR:Kie(e,t);break;default:e._err(t,aoe.endTagWithoutMatchingOpenElement)}}(this,e);break;case Nie.AFTER_HEAD:!function(e,t){switch(t.tagID){case Aoe.BODY:case Aoe.HTML:case Aoe.BR:Xie(e,t);break;case Aoe.TEMPLATE:Yie(e,t);break;default:e._err(t,aoe.endTagWithoutMatchingOpenElement)}}(this,e);break;case Nie.IN_BODY:sse(this,e);break;case Nie.TEXT:!function(e,t){var n;t.tagID===Aoe.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case Nie.IN_TABLE:dse(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case Aoe.CAPTION:case Aoe.TABLE:e.openElements.hasInTableScope(Aoe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Aoe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Nie.IN_TABLE,n===Aoe.TABLE&&dse(e,t));break;case Aoe.BODY:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TBODY:case Aoe.TD:case Aoe.TFOOT:case Aoe.TH:case Aoe.THEAD:case Aoe.TR:break;default:sse(e,t)}}(this,e);break;case Nie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case Aoe.COLGROUP:e.openElements.currentTagId===Aoe.COLGROUP&&(e.openElements.pop(),e.insertionMode=Nie.IN_TABLE);break;case Aoe.TEMPLATE:Yie(e,t);break;case Aoe.COL:break;default:bse(e,t)}}(this,e);break;case Nie.IN_TABLE_BODY:kse(this,e);break;case Nie.IN_ROW:wse(this,e);break;case Nie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case Aoe.TD:case Aoe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Nie.IN_ROW);break;case Aoe.TABLE:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:case Aoe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),wse(e,t));break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:break;default:sse(e,t)}}(this,e);break;case Nie.IN_SELECT:_se(this,e);break;case Nie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===Aoe.CAPTION||n===Aoe.TABLE||n===Aoe.TBODY||n===Aoe.TFOOT||n===Aoe.THEAD||n===Aoe.TR||n===Aoe.TD||n===Aoe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):_se(e,t)}(this,e);break;case Nie.IN_TEMPLATE:!function(e,t){t.tagID===Aoe.TEMPLATE&&Yie(e,t)}(this,e);break;case Nie.AFTER_BODY:Tse(this,e);break;case Nie.IN_FRAMESET:!function(e,t){t.tagID!==Aoe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===Aoe.FRAMESET||(e.insertionMode=Nie.AFTER_FRAMESET))}(this,e);break;case Nie.AFTER_FRAMESET:!function(e,t){t.tagID===Aoe.HTML&&(e.insertionMode=Nie.AFTER_AFTER_FRAMESET)}(this,e);break;case Nie.AFTER_AFTER_BODY:Ase(this,e)}}onEof(e){switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:Gie(this,e);break;case Nie.BEFORE_HEAD:qie(this,e);break;case Nie.IN_HEAD:Zie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:Kie(this,e);break;case Nie.AFTER_HEAD:Xie(this,e);break;case Nie.IN_BODY:case Nie.IN_TABLE:case Nie.IN_CAPTION:case Nie.IN_COLUMN_GROUP:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:case Nie.IN_CELL:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:lse(this,e);break;case Nie.TEXT:!function(e,t){e._err(t,aoe.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.IN_TEMPLATE:Sse(this,e);break;case Nie.AFTER_BODY:case Nie.IN_FRAMESET:case Nie.AFTER_FRAMESET:case Nie.AFTER_AFTER_BODY:case Nie.AFTER_AFTER_FRAMESET:$ie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Wae.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Nie.IN_HEAD:case Nie.IN_HEAD_NO_SCRIPT:case Nie.AFTER_HEAD:case Nie.TEXT:case Nie.IN_COLUMN_GROUP:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:case Nie.IN_FRAMESET:case Nie.AFTER_FRAMESET:this._insertCharacters(e);break;case Nie.IN_BODY:case Nie.IN_CAPTION:case Nie.IN_CELL:case Nie.IN_TEMPLATE:case Nie.AFTER_BODY:case Nie.AFTER_AFTER_BODY:case Nie.AFTER_AFTER_FRAMESET:Jie(this,e);break;case Nie.IN_TABLE:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:cse(this,e);break;case Nie.IN_TABLE_TEXT:fse(this,e)}}}function Die(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):ise(e,t),n}function Mie(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Fie(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,i=a;i!==n;o++,i=a){a=e.openElements.getCommonAncestor(i);const n=e.activeFormattingElements.getElementEntry(i),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(i)):(i=jie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function jie(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 zie(e,t,n){const r=Doe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===Aoe.TEMPLATE&&a===koe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Bie(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function Hie(e,t){for(let n=0;n<8;n++){const n=Die(e,t);if(!n)break;const r=Mie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=Fie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&zie(e,o,a),Bie(e,r,n)}}function Uie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function $ie(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 n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Vie(e,t){e._err(t,aoe.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,_oe.QUIRKS),e.insertionMode=Nie.BEFORE_HTML,e._processToken(t)}function Gie(e,t){e._insertFakeRootElement(),e.insertionMode=Nie.BEFORE_HEAD,e._processToken(t)}function qie(e,t){e._insertFakeElement(Toe.HEAD,Aoe.HEAD),e.headElement=e.openElements.current,e.insertionMode=Nie.IN_HEAD,e._processToken(t)}function Wie(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.BASE:case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.LINK:case Aoe.META:e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.TITLE:e._switchToTextParsing(t,Hoe.RCDATA);break;case Aoe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Hoe.RAWTEXT):(e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_HEAD_NO_SCRIPT);break;case Aoe.NOFRAMES:case Aoe.STYLE:e._switchToTextParsing(t,Hoe.RAWTEXT);break;case Aoe.SCRIPT:e._switchToTextParsing(t,Hoe.SCRIPT_DATA);break;case Aoe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Nie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Nie.IN_TEMPLATE);break;case Aoe.HEAD:e._err(t,aoe.misplacedStartTagForHeadElement);break;default:Zie(e,t)}}function Yie(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Aoe.TEMPLATE&&e._err(t,aoe.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Aoe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,aoe.endTagWithoutMatchingOpenElement)}function Zie(e,t){e.openElements.pop(),e.insertionMode=Nie.AFTER_HEAD,e._processToken(t)}function Kie(e,t){const n=t.type===soe.EOF?aoe.openElementsLeftAfterEof:aoe.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Nie.IN_HEAD,e._processToken(t)}function Xie(e,t){e._insertFakeElement(Toe.BODY,Aoe.BODY),e.insertionMode=Nie.IN_BODY,Qie(e,t)}function Qie(e,t){switch(t.type){case soe.CHARACTER:ese(e,t);break;case soe.WHITESPACE_CHARACTER:Jie(e,t);break;case soe.COMMENT:Uie(e,t);break;case soe.START_TAG:ose(e,t);break;case soe.END_TAG:sse(e,t);break;case soe.EOF:lse(e,t)}}function Jie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ese(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function tse(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,koe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nse(e){const t=coe(e,woe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function rse(e,t){e._switchToTextParsing(t,Hoe.RAWTEXT)}function ase(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML)}function ose(e,t){switch(t.tagID){case Aoe.I:case Aoe.S:case Aoe.B:case Aoe.U:case Aoe.EM:case Aoe.TT:case Aoe.BIG:case Aoe.CODE:case Aoe.FONT:case Aoe.SMALL:case Aoe.STRIKE:case Aoe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Aoe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Toe.A);n&&(Hie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Aoe.H1:case Aoe.H2:case Aoe.H3:case Aoe.H4:case Aoe.H5:case Aoe.H6:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&joe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.P:case Aoe.DL:case Aoe.OL:case Aoe.UL:case Aoe.DIV:case Aoe.DIR:case Aoe.NAV:case Aoe.MAIN:case Aoe.MENU:case Aoe.ASIDE:case Aoe.CENTER:case Aoe.FIGURE:case Aoe.FOOTER:case Aoe.HEADER:case Aoe.HGROUP:case Aoe.DIALOG:case Aoe.DETAILS:case Aoe.ADDRESS:case Aoe.ARTICLE:case Aoe.SEARCH:case Aoe.SECTION:case Aoe.SUMMARY:case Aoe.FIELDSET:case Aoe.BLOCKQUOTE:case Aoe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.LI:case Aoe.DD:case Aoe.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===Aoe.LI&&t===Aoe.LI||(n===Aoe.DD||n===Aoe.DT)&&(t===Aoe.DD||t===Aoe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==Aoe.ADDRESS&&t!==Aoe.DIV&&t!==Aoe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.BR:case Aoe.IMG:case Aoe.WBR:case Aoe.AREA:case Aoe.EMBED:case Aoe.KEYGEN:tse(e,t);break;case Aoe.HR:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._appendElement(t,koe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case Aoe.RB:case Aoe.RTC:!function(e,t){e.openElements.hasInScope(Aoe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.RT:case Aoe.RP:!function(e,t){e.openElements.hasInScope(Aoe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Aoe.RTC),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.PRE:case Aoe.LISTING:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case Aoe.XMP:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Hoe.RAWTEXT)}(e,t);break;case Aoe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),Tie(t),Cie(t),t.selfClosing?e._appendElement(t,koe.SVG):e._insertElement(t,koe.SVG),t.ackSelfClosing=!0}(e,t);break;case Aoe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case Aoe.BASE:case Aoe.LINK:case Aoe.META:case Aoe.STYLE:case Aoe.TITLE:case Aoe.SCRIPT:case Aoe.BGSOUND:case Aoe.BASEFONT:case Aoe.TEMPLATE:Wie(e,t);break;case Aoe.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case Aoe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case Aoe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Aoe.NOBR)&&(Hie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,koe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Aoe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),Sie(t),Cie(t),t.selfClosing?e._appendElement(t,koe.MATHML):e._insertElement(t,koe.MATHML),t.ackSelfClosing=!0}(e,t);break;case Aoe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==_oe.QUIRKS&&e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),e.framesetOk=!1,e.insertionMode=Nie.IN_TABLE}(e,t);break;case Aoe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,koe.HTML),nse(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case Aoe.PARAM:case Aoe.TRACK:case Aoe.SOURCE:!function(e,t){e._appendElement(t,koe.HTML),t.ackSelfClosing=!0}(e,t);break;case Aoe.IMAGE:!function(e,t){t.tagName=Toe.IMG,t.tagID=Aoe.IMG,tse(e,t)}(e,t);break;case Aoe.BUTTON:!function(e,t){e.openElements.hasInScope(Aoe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Aoe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.framesetOk=!1}(e,t);break;case Aoe.APPLET:case Aoe.OBJECT:case Aoe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case Aoe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Hoe.RAWTEXT)}(e,t);break;case Aoe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Nie.IN_TABLE||e.insertionMode===Nie.IN_CAPTION||e.insertionMode===Nie.IN_TABLE_BODY||e.insertionMode===Nie.IN_ROW||e.insertionMode===Nie.IN_CELL?Nie.IN_SELECT_IN_TABLE:Nie.IN_SELECT}(e,t);break;case Aoe.OPTION:case Aoe.OPTGROUP:!function(e,t){e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.NOEMBED:case Aoe.NOFRAMES:rse(e,t);break;case Aoe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_FRAMESET)}(e,t);break;case Aoe.TEXTAREA:!function(e,t){e._insertElement(t,koe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Hoe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Nie.TEXT}(e,t);break;case Aoe.NOSCRIPT:e.options.scriptingEnabled?rse(e,t):ase(e,t);break;case Aoe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),e.tokenizer.state=Hoe.PLAINTEXT}(e,t);break;case Aoe.COL:case Aoe.TH:case Aoe.TD:case Aoe.TR:case Aoe.HEAD:case Aoe.FRAME:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:case Aoe.CAPTION:case Aoe.COLGROUP:break;default:ase(e,t)}}function ise(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const t=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==Aoe.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(t,o))break}}function sse(e,t){switch(t.tagID){case Aoe.A:case Aoe.B:case Aoe.I:case Aoe.S:case Aoe.U:case Aoe.EM:case Aoe.TT:case Aoe.BIG:case Aoe.CODE:case Aoe.FONT:case Aoe.NOBR:case Aoe.SMALL:case Aoe.STRIKE:case Aoe.STRONG:Hie(e,t);break;case Aoe.P:!function(e){e.openElements.hasInButtonScope(Aoe.P)||e._insertFakeElement(Toe.P,Aoe.P),e._closePElement()}(e);break;case Aoe.DL:case Aoe.UL:case Aoe.OL:case Aoe.DIR:case Aoe.DIV:case Aoe.NAV:case Aoe.PRE:case Aoe.MAIN:case Aoe.MENU:case Aoe.ASIDE:case Aoe.BUTTON:case Aoe.CENTER:case Aoe.FIGURE:case Aoe.FOOTER:case Aoe.HEADER:case Aoe.HGROUP:case Aoe.DIALOG:case Aoe.ADDRESS:case Aoe.ARTICLE:case Aoe.DETAILS:case Aoe.SEARCH:case Aoe.SECTION:case Aoe.SUMMARY:case Aoe.LISTING:case Aoe.FIELDSET:case Aoe.BLOCKQUOTE:case Aoe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case Aoe.LI:!function(e){e.openElements.hasInListItemScope(Aoe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Aoe.LI),e.openElements.popUntilTagNamePopped(Aoe.LI))}(e);break;case Aoe.DD:case Aoe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case Aoe.H1:case Aoe.H2:case Aoe.H3:case Aoe.H4:case Aoe.H5:case Aoe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case Aoe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Toe.BR,Aoe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case Aoe.BODY:!function(e,t){if(e.openElements.hasInScope(Aoe.BODY)&&(e.insertionMode=Nie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case Aoe.HTML:!function(e,t){e.openElements.hasInScope(Aoe.BODY)&&(e.insertionMode=Nie.AFTER_BODY,Tse(e,t))}(e,t);break;case Aoe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Aoe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Aoe.FORM):n&&e.openElements.remove(n))}(e);break;case Aoe.APPLET:case Aoe.OBJECT:case Aoe.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case Aoe.TEMPLATE:Yie(e,t);break;default:ise(e,t)}}function lse(e,t){e.tmplInsertionModeStack.length>0?Sse(e,t):$ie(e,t)}function cse(e,t){if(void 0!==e.openElements.currentTagId&&Rie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Nie.IN_TABLE_TEXT,t.type){case soe.CHARACTER:hse(e,t);break;case soe.WHITESPACE_CHARACTER:fse(e,t)}else pse(e,t)}function use(e,t){switch(t.tagID){case Aoe.TD:case Aoe.TH:case Aoe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Toe.TBODY,Aoe.TBODY),e.insertionMode=Nie.IN_TABLE_BODY,vse(e,t)}(e,t);break;case Aoe.STYLE:case Aoe.SCRIPT:case Aoe.TEMPLATE:Wie(e,t);break;case Aoe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Toe.COLGROUP,Aoe.COLGROUP),e.insertionMode=Nie.IN_COLUMN_GROUP,yse(e,t)}(e,t);break;case Aoe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,koe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case Aoe.TABLE:!function(e,t){e.openElements.hasInTableScope(Aoe.TABLE)&&(e.openElements.popUntilTagNamePopped(Aoe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_TABLE_BODY}(e,t);break;case Aoe.INPUT:!function(e,t){nse(t)?e._appendElement(t,koe.HTML):pse(e,t),t.ackSelfClosing=!0}(e,t);break;case Aoe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_CAPTION}(e,t);break;case Aoe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_COLUMN_GROUP}(e,t);break;default:pse(e,t)}}function dse(e,t){switch(t.tagID){case Aoe.TABLE:e.openElements.hasInTableScope(Aoe.TABLE)&&(e.openElements.popUntilTagNamePopped(Aoe.TABLE),e._resetInsertionMode());break;case Aoe.TEMPLATE:Yie(e,t);break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TBODY:case Aoe.TD:case Aoe.TFOOT:case Aoe.TH:case Aoe.THEAD:case Aoe.TR:break;default:pse(e,t)}}function pse(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Qie(e,t),e.fosterParentingEnabled=n}function fse(e,t){e.pendingCharacterTokens.push(t)}function hse(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function mse(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)pse(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const gse=new Set([Aoe.CAPTION,Aoe.COL,Aoe.COLGROUP,Aoe.TBODY,Aoe.TD,Aoe.TFOOT,Aoe.TH,Aoe.THEAD,Aoe.TR]);function yse(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.COL:e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.TEMPLATE:Wie(e,t);break;default:bse(e,t)}}function bse(e,t){e.openElements.currentTagId===Aoe.COLGROUP&&(e.openElements.pop(),e.insertionMode=Nie.IN_TABLE,e._processToken(t))}function vse(e,t){switch(t.tagID){case Aoe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_ROW;break;case Aoe.TH:case Aoe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Toe.TR,Aoe.TR),e.insertionMode=Nie.IN_ROW,xse(e,t);break;case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE,use(e,t));break;default:use(e,t)}}function kse(e,t){const n=t.tagID;switch(t.tagID){case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE);break;case Aoe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE,dse(e,t));break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TD:case Aoe.TH:case Aoe.TR:break;default:dse(e,t)}}function xse(e,t){switch(t.tagID){case Aoe.TH:case Aoe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_CELL,e.activeFormattingElements.insertMarker();break;case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:case Aoe.TR:e.openElements.hasInTableScope(Aoe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY,vse(e,t));break;default:use(e,t)}}function wse(e,t){switch(t.tagID){case Aoe.TR:e.openElements.hasInTableScope(Aoe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY);break;case Aoe.TABLE:e.openElements.hasInTableScope(Aoe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY,kse(e,t));break;case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(Aoe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY,kse(e,t));break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TD:case Aoe.TH:break;default:dse(e,t)}}function Ese(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.OPTION:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e._insertElement(t,koe.HTML);break;case Aoe.OPTGROUP:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Aoe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,koe.HTML);break;case Aoe.HR:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Aoe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.INPUT:case Aoe.KEYGEN:case Aoe.TEXTAREA:case Aoe.SELECT:e.openElements.hasInSelectScope(Aoe.SELECT)&&(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode(),t.tagID!==Aoe.SELECT&&e._processStartTag(t));break;case Aoe.SCRIPT:case Aoe.TEMPLATE:Wie(e,t)}}function _se(e,t){switch(t.tagID){case Aoe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===Aoe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Aoe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Aoe.OPTGROUP&&e.openElements.pop();break;case Aoe.OPTION:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop();break;case Aoe.SELECT:e.openElements.hasInSelectScope(Aoe.SELECT)&&(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode());break;case Aoe.TEMPLATE:Yie(e,t)}}function Sse(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Aoe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):$ie(e,t)}function Tse(e,t){var n;if(t.tagID===Aoe.HTML){if(e.fragmentContext||(e.insertionMode=Nie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Aoe.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else Cse(e,t)}function Cse(e,t){e.insertionMode=Nie.IN_BODY,Qie(e,t)}function Ase(e,t){e.insertionMode=Nie.IN_BODY,Qie(e,t)}function Nse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==koe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}Toe.AREA,Toe.BASE,Toe.BASEFONT,Toe.BGSOUND,Toe.BR,Toe.COL,Toe.EMBED,Toe.FRAME,Toe.HR,Toe.IMG,Toe.INPUT,Toe.KEYGEN,Toe.LINK,Toe.META,Toe.PARAM,Toe.SOURCE,Toe.TRACK,Toe.WBR;const Ise=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Ose=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Rse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Pse(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=Fae("type",{handlers:{root:Dse,element:Mse,text:Fse,comment:Bse,doctype:jse,raw:Hse},unknown:Use}),a={parser:n?new Lie(Rse):Lie.getFragmentParser(void 0,Rse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),$se(a,Dee());const o=function(e,t){const n=t||{};return Oae({file:n.file||void 0,location:!1,schema:"svg"===n.space?aee:ree,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&Sre(o,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===o.type&&1===o.children.length&&o.children[0].type===e.type?o.children[0]:o}function Lse(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Dse(e,t){Lse(e.children,t)}function Mse(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Hoe.PLAINTEXT)return;$se(t,Dee(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:Aae.html;a===Aae.html&&"svg"===n&&(a=Aae.svg);const o=function(e,t){const n=(t||jae).space;return Bae(e,"svg"===n?aee:ree)}({...e,children:[]},{space:a===Aae.svg?"svg":"html"}),i={type:soe.START_TAG,tagName:n,tagID:Doe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Gse(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),Lse(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Vae.includes(n))return;if(t.parser.tokenizer.state===Hoe.PLAINTEXT)return;$se(t,Lee(e));const r={type:soe.END_TAG,tagName:n,tagID:Doe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Gse(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Hoe.RCDATA&&t.parser.tokenizer.state!==Hoe.RAWTEXT&&t.parser.tokenizer.state!==Hoe.SCRIPT_DATA||(t.parser.tokenizer.state=Hoe.DATA)}(e,t)}function Fse(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:soe.CHARACTER,chars:e.value,location:Gse(e)};$se(t,Dee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function jse(e,t){const n={type:soe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Gse(e)};$se(t,Dee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function zse(e,t){t.stitches=!0;const n=function(e){return mre("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=Pse({type:"root",children:e.children},t.options);n.children=r.children}Bse({type:"comment",value:{stitch:n}},t)}function Bse(e,t){const n=e.value,r={type:soe.COMMENT,data:n,location:Gse(e)};$se(t,Dee(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Hse(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,Vse(t,Dee(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ise,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Use(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw Ose.has(n.type)&&(e=". 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"+e)}zse(n,t)}function $se(e,t){Vse(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=Hoe.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 Vse(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Gse(e){const t=Dee(e)||{line:void 0,column:void 0,offset:void 0},n=Lee(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 qse(e){return function(t,n){return Pse(t,{...e,file:n})}}function Wse(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function Yse(e,t,n){const r=bre((n||{}).ignore||[]),a=function(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 e=n[r];t.push([Zse(e[0]),Kse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)_re(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Zse(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Kse(e){return"function"==typeof e?e:function(){return e}}const Xse="phrasing",Qse=["autolink","link","image","label"];function Jse(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ele(e){this.config.enter.autolinkProtocol.call(this,e)}function tle(e){this.config.exit.autolinkProtocol.call(this,e)}function nle(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 rle(e){this.config.exit.autolinkEmail.call(this,e)}function ale(e){this.exit(e)}function ole(e){Yse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ile],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),sle]],{ignore:["link","linkReference"]})}function ile(e,t,n,r,a){let o="";if(!lle(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const i=function(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 a=Wse(e,"(");let o=Wse(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function sle(e,t,n,r){return!(!lle(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lle(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Ite(n)||Nte(n))&&(!t||47!==n)}function cle(){this.buffer()}function ule(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dle(){this.buffer()}function ple(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hle(e){this.exit(e)}function mle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gle(e){this.exit(e)}function yle(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function ble(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?kle:vle)));return s(),i},footnoteReference:yle},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function vle(e,t,n){return 0===t?e:kle(e,t,n)}function kle(e,t,n){return(n?"":" ")+e}yle.peek=function(){return"["};const xle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function wle(e){this.enter({type:"delete",children:[]},e)}function Ele(e){this.exit(e)}function _le(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function Sle(e){return e.length}function Tle(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function Cle(e,t,n){return">"+(n?"":" ")+e}function Ale(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Nle(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&(o=n.stack,i=n.unsafe[a],Ale(o,i.inConstruct,!0)&&!Ale(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function Ile(e,t,n){return(n?"":" ")+e}function Ole(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 Rle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ple(e,t,n){const r=Fte(e),a=Fte(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Lle(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ple(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Rle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ple(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Rle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Dle(e){return e.value||""}function Mle(e,t,n,r){const a=Ole(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Fle(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function jle(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function zle(e,t){const n=ite(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Ble(e,t,n,r){const a=Ole(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(zle(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Hle(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ule(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 $le(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}_le.peek=function(){return"~"},Lle.peek=function(e,t,n){return n.options.emphasis||"*"},Dle.peek=function(){return"<"},Mle.peek=function(){return"!"},Fle.peek=function(){return"!"},jle.peek=function(){return"`"},Ble.peek=function(e,t,n){return zle(e,n)?"<":"["},Hle.peek=function(){return"["};const Vle=bre(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gle(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ple(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Rle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ple(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Rle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Gle.peek=function(e,t,n){return n.options.strong||"*"};const qle={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),Cle);return a(),i},break:Nle,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,Ile);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=Ole(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:Lle,hardBreak:Nle,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return Sre(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Ere})),Boolean((!e.depth||e.depth<3)&&ite(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=Rle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Dle,image:Mle,imageReference:Fle,inlineCode:jle,link:Ble,linkReference:Hle,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Ule(n);const s=e.ordered?"."===i?")":".":function(e){const t=Ule(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}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),$le(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Ule(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some((function(e){return Vle(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Gle,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=($le(n)+(n.options.ruleSpaces?" ":"")).repeat(function(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}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Wle(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function Yle(e){this.exit(e),this.data.inTable=void 0}function Zle(e){this.enter({type:"tableRow",children:[]},e)}function Kle(e){this.exit(e)}function Xle(e){this.enter({type:"tableCell",children:[]},e)}function Qle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Jle));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Jle(e,t){return"|"===t?t:e}function ece(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=qle.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=s([l(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||Sle,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=null==(d=e[u][o])?"":String(d);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)o[p]=Tle(r[p]);else{const e=Tle(r);for(;++p<c;)o[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=o[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[p]&&(l[p]=a),h[p]=a),f[p]=i}i.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<i.length;){const e=i[u],t=s[u];p=-1;const r=[];for(;++p<c;){const a=e[p]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=o[p];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function tce(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function nce(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rce(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=qle.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const ace={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},oce={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(sce,l,s)(t):null===t||Cte(t)||Ite(t)||45!==t&&Nte(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},ice={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(sce,t,o)(i):null===i||Cte(i)||Ite(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},sce={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||Cte(i)||Ite(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||Cte(e)||Ite(e)?t(e):r(e)}function o(e){return vte(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):vte(t)?(e.consume(t),i):n(t)}},partial:!0},lce={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return kte(e)?n(e):t(e)}},partial:!0},cce={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!hce.call(r,r.previous)||bce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ace,e.attempt(oce,e.attempt(ice,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:hce},uce={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&mce.call(r,r.previous)&&!bce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(vte(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||wte(t)||Cte(t)||Ite(t)||Nte(t)?n(t):e.attempt(oce,e.attempt(ice,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:mce},dce={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!yce(t)||!gce.call(r,r.previous)||bce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return yce(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(lce,c,l)(t):45===t||95===t||kte(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&vte(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:gce},pce={};let fce=48;for(;fce<123;)pce[fce]=dce,fce++,58===fce?fce=65:91===fce&&(fce=97);function hce(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Cte(e)}function mce(e){return!vte(e)}function gce(e){return!(47===e||yce(e))}function yce(e){return 43===e||45===e||46===e||95===e||kte(e)}function bce(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}pce[43]=dce,pce[45]=dce,pce[46]=dce,pce[95]=dce,pce[72]=[dce,uce],pce[104]=[dce,uce],pce[87]=[dce,cce],pce[119]=[dce,cce];const vce={tokenize:function(e,t,n){const r=this;return Pte(e,(function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function kce(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=bte(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function xce(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function wce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||Cte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(bte(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Cte(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function Ece(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||Cte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=bte(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Cte(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),Pte(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function _ce(e,t,n){return e.check(Ute,t,e.attempt(vce,t,n))}function Sce(e){e.exit("gfmFootnoteDefinition")}function Tce(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=Fte(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=Fte(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&dte(i,i.length,0,jte(s,e.slice(r+1,n),t)),dte(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),dte(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Cce{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function Ace(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function Nce(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?k:s;if(o===k&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):Tte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Ate(t)?Pte(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Cte(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,Ate(t)?Pte(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return Ate(t)?Pte(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||Tte(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Ate(t)?Pte(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||Tte(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function k(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||Tte(n)?(e.exit("tableRow"),t(n)):Ate(n)?Pte(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||Cte(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:w)}function E(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function Ice(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Cce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(Rce(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=Oce(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=Oce(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],a=Oce(p,t,l,s,o,a)):0!==c[1]&&(a=Oce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&Rce(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ace(t.events,o))}return e}function Oce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},Pce(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Pce(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=Pce(t.events,n[2]),o=Pce(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},Pce(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Rce(e,t,n,r,a){const o=[],i=Pce(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function Pce(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Lce={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return Cte(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return Tte(r)?t(r):Ate(r)?e.check({tokenize:Dce},t,n)(r):n(r)}}};function Dce(e,t,n){return Pte(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const Mce={};function Fce(e){const t=e||Mce,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return hte([{text:pce},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ece,continuation:{tokenize:_ce},exit:Sce}},text:{91:{name:"gfmFootnoteCall",tokenize:wce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kce,resolveTo:xce}}},Tce(e),{flow:{null:{name:"table",tokenize:Nce,resolveAll:Ice}}},{text:{91:Lce}}])}(t)),a.push([{transforms:[ole],enter:{literalAutolink:Jse,literalAutolinkEmail:ele,literalAutolinkHttp:ele,literalAutolinkWww:ele},exit:{literalAutolink:ale,literalAutolinkEmail:rle,literalAutolinkHttp:tle,literalAutolinkWww:nle}},{enter:{gfmFootnoteCallString:cle,gfmFootnoteCall:ule,gfmFootnoteDefinitionLabelString:dle,gfmFootnoteDefinition:ple},exit:{gfmFootnoteCallString:fle,gfmFootnoteCall:hle,gfmFootnoteDefinitionLabelString:mle,gfmFootnoteDefinition:gle}},{canContainEols:["delete"],enter:{strikethrough:wle},exit:{strikethrough:Ele}},{enter:{table:Wle,tableData:Xle,tableHeader:Xle,tableRow:Zle},exit:{codeText:Qle,table:Yle,tableData:Kle,tableHeader:Kle,tableRow:Kle}},{exit:{taskListCheckValueChecked:tce,taskListCheckValueUnchecked:tce,paragraph:nce}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Xse,notInConstruct:Qse},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Xse,notInConstruct:Qse},{character:":",before:"[ps]",after:"\\/",inConstruct:Xse,notInConstruct:Qse}]},ble(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xle}],handlers:{delete:_le}},ece(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rce}}]}}(t))}const jce=function(e){if(null==e)return Bce;if("string"==typeof e)return function(e){return zce(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jce(e[n]);return zce(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}(e):function(e){return zce(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return zce(e);throw new Error("Expected function, string, or object as test")};function zce(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Bce(){return!0}const Hce=!0,Uce=!1,$ce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=jce(t),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=[];if((!t||a(i,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Hce,e];return[e]}(n(i,l)),p[0]===Uce))return p;if(i.children&&"skip"!==p[0])for(u=(r?i.children.length:-1)+o,d=l.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,d)(),c[0]===Uce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Vce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),$ce(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Gce(){return e=>{Vce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\^/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"superscript",data:{hName:"sup"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)})),Vce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\~/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"subscript",data:{hName:"sub"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)}))}}function qce(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=qce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=qce(e))&&(r&&(r+=" "),r+=t);return r}var Yce,Zce,Kce,Xce,Qce,Jce,eue,tue=Object.create,nue=Object.defineProperty,rue=Object.defineProperties,aue=Object.getOwnPropertyDescriptor,oue=Object.getOwnPropertyDescriptors,iue=Object.getOwnPropertyNames,sue=Object.getOwnPropertySymbols,lue=Object.getPrototypeOf,cue=Object.prototype.hasOwnProperty,uue=Object.prototype.propertyIsEnumerable,due=(e,t,n)=>t in e?nue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pue=(e,t)=>{for(var n in t||(t={}))cue.call(t,n)&&due(e,n,t[n]);if(sue)for(var n of sue(t))uue.call(t,n)&&due(e,n,t[n]);return e},fue=(e,t)=>rue(e,oue(t)),hue=(e,t)=>{var n={};for(var r in e)cue.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&sue)for(var r of sue(e))t.indexOf(r)<0&&uue.call(e,r)&&(n[r]=e[r]);return n},mue=(Yce={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],a||s);var l=t[s],c=r.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new s;return l(a,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,y=!!m.lookbehind,b=!!m.greedy,v=m.alias;if(b&&!m.pattern.global){var k=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,k+"g")}for(var x=m.pattern||m,w=s.next,E=u;w!==t.tail&&!(d&&E>=d.reach);E+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof a)){var S,T=1;if(b){if(!(S=o(x,E,e,y))||S.index>=e.length)break;var C=S.index,A=S.index+S[0].length,N=E;for(N+=w.value.length;C>=N;)N+=(w=w.next).value.length;if(E=N-=w.value.length,w.value instanceof a)continue;for(var I=w;I!==t.tail&&(N<A||"string"==typeof I.value);I=I.next)T++,N+=I.value.length;T--,_=e.slice(E,N),S.index-=E}else if(!(S=o(x,0,_,y)))continue;C=S.index;var O=S[0],R=_.slice(0,C),P=_.slice(C+O.length),L=E+_.length;d&&L>d.reach&&(d.reach=L);var D=w.prev;if(R&&(D=l(t,D,R),E+=R.length),c(t,D,T),w=l(t,D,new a(p,g?r.tokenize(O,g):O,v,O)),P&&l(t,w,P),T>1){var M={cause:p+","+h,reach:L};i(e,t,n,w.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return Zce||(0,Yce[iue(Yce)[0]])((Zce={exports:{}}).exports,Zce),Zce.exports}),gue=((e,t,n)=>(n=null!=e?tue(lue(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of iue(t))cue.call(e,a)||a===n||nue(e,a,{get:()=>t[a],enumerable:!(r=aue(t,a))||r.enumerable});return e})(e&&e.__esModule?n:nue(n,"default",{value:e,enumerable:!0}),e)))(mue());gue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},gue.languages.markup.tag.inside["attr-value"].inside.entity=gue.languages.markup.entity,gue.languages.markup.doctype.inside["internal-subset"].inside=gue.languages.markup,gue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(gue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:gue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:gue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},gue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(gue.languages.markup.tag,"addAttribute",{value:function(e,t){gue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:gue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),gue.languages.html=gue.languages.markup,gue.languages.mathml=gue.languages.markup,gue.languages.svg=gue.languages.markup,gue.languages.xml=gue.languages.extend("markup",{}),gue.languages.ssml=gue.languages.xml,gue.languages.atom=gue.languages.xml,gue.languages.rss=gue.languages.xml,Kce=gue,Xce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},Jce="(?:[^\\\\-]|"+(Qce=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",Jce=RegExp(Jce+"-"+Jce),eue={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Kce.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:Jce,inside:{escape:Qce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":Xce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:Qce}},"special-escape":Xce,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":eue}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:Qce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":eue}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},gue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},gue.languages.javascript=gue.languages.extend("clike",{"class-name":[gue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),gue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,gue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:gue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:gue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:gue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:gue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:gue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),gue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:gue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),gue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),gue.languages.markup&&(gue.languages.markup.tag.addInlined("script","javascript"),gue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),gue.languages.js=gue.languages.javascript,gue.languages.actionscript=gue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),gue.languages.actionscript["class-name"].alias="function",delete gue.languages.actionscript.parameter,delete gue.languages.actionscript["literal-property"],gue.languages.markup&&gue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:gue.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(gue),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(gue),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(gue),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(gue),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(gue),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a,o=t[n];"code"!==o.type?e(o.content):(a=o.content[1],o=o.content[3],a&&o&&"code-language"===a.type&&"code-block"===o.type&&"string"==typeof a.content&&(a=a.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),a="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase()),o.alias?"string"==typeof o.alias?o.alias=[o.alias,a]:o.alias.push(a):o.alias=[a]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r];if(o=/language-(.+)/.exec(o)){n=o[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(gue),gue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:gue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},gue.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<a.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=a.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))a++;else if(r.test(s)&&0==--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),gue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var o=0;o<n.length;o++){if(c>=d.length)return;var i,l,p,f,h,m,g,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(m="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=m.substring(0,g),h=u[i],p=void 0,(f={})["interpolation-punctuation"]=a,3===(f=e.tokenize(h,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,h),f=m.substring(g+i.length),h=[],l&&h.push(l),h.push(p),f&&(t(m=[f]),h.push.apply(h,m)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(h)),o+=h.length-1):y.content=h)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,a=n.length;r<a;r++){var o,i,s,c=n[r];"string"!=typeof c&&(o=c.content,Array.isArray(o)?"template-string"===c.type?(c=o[1],3===o.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(o[1]=l(i,s,c))):t(o):"string"!=typeof o&&t([o]))}}(t.tokens)}))}(gue),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(gue),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(gue),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(gue),gue.languages.n4js=gue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),gue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),gue.languages.n4jsd=gue.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];a=(o="RegExp"===e.util.type(o)?e.languages.javascript[a]={pattern:o}:o).inside||{};(o.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(gue),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;"string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(a.content[0].content[1])&&n.pop():"/>"!==a.content[a.content.length-1].content&&n.push({tagName:s(a.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&0<n.length&&0===n[n.length-1].openedBraces&&(o=s(a),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(o+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(o=s(t[r-1])+o,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",o,null,o)),a.content&&"string"!=typeof a.content&&i(a.content)}}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(gue),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(gue),gue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},gue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=gue.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(gue),gue.languages.c=gue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),gue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),gue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},gue.languages.c.string],char:gue.languages.c.char,comment:gue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:gue.languages.c}}}}),gue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete gue.languages.c.boolean,gue.languages.objectivec=gue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete gue.languages.objectivec["class-name"],gue.languages.objc=gue.languages.objectivec,gue.languages.reason=gue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),gue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete gue.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(gue),gue.languages.go=gue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),gue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete gue.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(gue),gue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},gue.languages.python["string-interpolation"].inside.interpolation.inside.rest=gue.languages.python,gue.languages.py=gue.languages.python,gue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},gue.languages.webmanifest=gue.languages.json;var yue={};((e,t)=>{for(var n in t)nue(e,n,{get:t[n],enumerable:!0})})(yue,{dracula:()=>bue,duotoneDark:()=>vue,duotoneLight:()=>kue,github:()=>xue,gruvboxMaterialDark:()=>jue,gruvboxMaterialLight:()=>zue,jettwaveDark:()=>Lue,jettwaveLight:()=>Due,nightOwl:()=>wue,nightOwlLight:()=>Eue,oceanicNext:()=>Tue,okaidia:()=>Cue,oneDark:()=>Mue,oneLight:()=>Fue,palenight:()=>Aue,shadesOfPurple:()=>Nue,synthwave84:()=>Iue,ultramin:()=>Oue,vsDark:()=>Rue,vsLight:()=>Pue});var bue={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},vue={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},kue={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},xue={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},wue={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},Eue={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},_ue="#c5a5c5",Sue="#8dc891",Tue={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:_ue}},{types:["attr-value"],style:{color:Sue}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:Sue}},{types:["punctuation"],style:{color:Sue}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:_ue}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},Cue={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},Aue={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},Nue={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},Iue={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},Oue={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},Rue={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Pue={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},Lue={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Due={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Mue={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},Fue={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},jue={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},zue={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Bue=/\r\n|\r|\n/,Hue=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Uue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},$ue=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(o=r[i]++)<a[i];){let e,c=t[i];const u=n[i][o];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=Uue(c,u.type),u.alias&&(c=Uue(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(Bue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Hue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Hue(s),l},Vue=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=pue(pue({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=fue(pue({},n),{backgroundColor:void 0}),r},Gue=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Vue(r,o),s=(e=>he.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=hue(n,["className","style","line"]);const s=fue(pue({},i),{className:Wce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=pue(pue({},s.style||{}),a)),s}),[e]))(i),l=(e=>{const t=he.useCallback((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return he.useCallback((e=>{var n=e,{token:r,className:a,style:o}=n,i=hue(n,["token","className","style"]);const s=fue(pue({},i),{className:Wce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=pue(pue({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>he.useMemo((()=>{if(null==n)return $ue([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),$ue(a.tokens)}),[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:c,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:s,getTokenProps:l})},que=e=>he.createElement(Gue,fue(pue({},e),{prism:e.prism||gue,theme:e.theme||Rue,code:e.code,language:e.language}))
70
+ */const MG={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"LuSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand",chatButtonClose:"LuChevronDown",chatHistory:"LuHistory",chatHistoryPanel:"LuPanelLeft",backToChat:"LuArrowLeft",fileUpload:"LuPaperclip",filePdf:"FaRegFilePdf",fileText:"PiFileText",fileMarkdown:"PiFileMarkdown",fileHtml:"PiFileHtml",fileCsv:"PiFileCsv",fileLog:"PiFileLog",fileJson:"PiFileJson"};function FG({iconKey:e,...t}){var n;const r=MG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=wR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return wg.jsx(DG,{"data-icon":e,iconSettings:i,...t})}const jG=he.createContext(void 0),zG=({children:e})=>{const[t,n]=he.useState(null),r=he.useCallback((e=>{n(e)}),[]),a=he.useCallback((()=>{n(null)}),[]),o=he.useMemo((()=>({imagePreview:t,openImagePreview:r,closeImagePreview:a})),[t,r,a]);return wg.jsx(jG.Provider,{value:o,children:e})},BG=()=>{const e=he.useContext(jG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},HG=he.createContext(void 0),UG=({children:e,message:t})=>wg.jsx(HG.Provider,{value:{message:t},children:e}),$G=()=>{const e=he.useContext(HG);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var VG=(e,t=[])=>({parts:(...n)=>{if(qG(t))return VG(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>VG(e,[...t,...n]),omit:(...n)=>VG(e,t.filter((e=>!n.includes(e)))),rename:e=>VG(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${GG(e)}"][data-part="${GG(n)}"]`,`& [data-scope="${GG(e)}"][data-part="${GG(n)}"]`].join(", "),attrs:{"data-scope":GG(e),"data-part":GG(n)}}})),{})}),GG=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),qG=e=>0===e.length,WG=VG("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),YG=Object.defineProperty,ZG=(e,t,n)=>((e,t,n)=>t in e?YG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),KG=e=>"object"==typeof e&&null!==e,XG=e=>e?"":void 0,QG=e=>KG(e)&&1===e.nodeType&&"string"==typeof e.nodeName,JG=e=>KG(e)&&void 0!==e.nodeType,eq=e=>JG(e)&&11===e.nodeType&&"host"in e;function tq(e,t){var n;if(!e||!t)return!1;if(!QG(e)||!JG(t))return!1;if(QG(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&eq(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function nq(e){var t;return eq(e)?nq(e.host):(e=>KG(e)&&9===e.nodeType)(e)?e.defaultView??window:QG(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function rq(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}var aq=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},oq=class e{constructor(){ZG(this,"id",null),ZG(this,"fn_cleanup"),ZG(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};var iq={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},sq=e=>e.isDirectory,lq=e=>e.isFile,cq=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),uq=(e,t="")=>new Promise((n=>{const r=[],a=()=>{e.readEntries((e=>{if(0===e.length)return void n(Promise.all(r).then((e=>e.flat())));const o=e.map((e=>e?sq(e)?uq(e.createReader(),`${t}${e.name}`):lq(e)?new Promise((n=>{e.file((e=>{n(cq(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var dq=e=>function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}(e)||function(e){return/^.*\.[\w]+$/.test(e)}(e);var pq=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,fq=e=>null!=e;var hq=new Map("3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip".split("[").flatMap((e=>{const[t,n]=e.split("_");return t.split(",").map((e=>[e,n]))})));function mq(e,t){if(e&&t){const n=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];if(0===n.length)return!0;const r=e.name||"",a=(e.type||function(e){const t=e.split(".").pop();return t&&hq.get(t)||null}(r)||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):a===t}))}return!0}var gq=function(e){const t=new Map;return function(n,r){const a=n+(r?Object.entries(r).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"");if(t.has(a))return t.get(a);let o=new e(n,r);return t.set(a,o),o}}(Intl.NumberFormat);var yq=["","kilo","mega","giga","tera"],bq=["","kilo","mega","giga","tera","peta"],vq=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(0===e)return"0 B";const{unitSystem:r="decimal",precision:a=3,unit:o="byte",unitDisplay:i="short"}=n,s="binary"===r?1024:1e3,l="bit"===o?yq:bq,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const p=parseFloat(u.toPrecision(a));return function(e,t,n={}){return gq(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function kq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(kq(t)):e.concat(t)),[])}var xq=e=>String.fromCharCode(e+(e>25?39:97));var wq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=xq(t%52)+n;return xq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function Eq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var _q=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},Sq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},Tq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},Cq=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemDeleteTrigger)?void 0:r.call(n,t))??`file:${e.id}:item-delete:${t}`},Aq=e=>wq(`${e.name}-${e.size}`),Nq=e=>e.getById(Tq(e));function Iq(e){const t=rq(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function Oq(e,t,n=[],r=[]){const{prop:a,computed:o}=e,i=[],s=[],l={acceptedFiles:n,rejectedFiles:r};return t.forEach((e=>{var t;const[r,c]=function(e,t){const n="application/x-moz-file"===e.type||mq(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(fq(e.size))if(fq(t)&&fq(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(fq(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(fq(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>pq(t,e)))||i.some((t=>pq(t,e))),f=null==(t=a("validate"))?void 0:t(e,l),h=!f||0===f.length;if(r&&u&&h&&!p)i.push(e);else{const t=[c,d];p&&t.push("FILE_EXISTS"),h||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}})),function(e,t,n){const{prop:r,computed:a}=e;return!(!a("multiple")&&t>1||(a("multiple")||t+n.length!==2)&&t+n.length>r("maxFiles"))}(e,i.length,n)||(i.forEach((e=>{s.push({file:e,errors:["TOO_MANY_FILES"]})})),i.splice(0)),{acceptedFiles:i,rejectedFiles:s}}var Rq="accepted";function Pq(e,t){if(!e||"file"===e.getAttribute("type"))return!1;const n=e.closest("button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]");return n!=t&&tq(t,n)}function Lq(e,t){const{state:n,send:r,prop:a,computed:o,scope:i,context:s}=e,l=!!a("disabled"),c=!!a("readOnly"),u=!!a("required"),d=a("allowDrop"),p=a("translations"),f=n.matches("dragging"),h=n.matches("focused")&&!l,m=s.get("acceptedFiles"),g=a("maxFiles");return{dragging:f,focused:h,disabled:l,readOnly:c,transforming:s.get("transforming"),maxFilesReached:m.length>=g,remainingFiles:Math.max(0,g-m.length),openFilePicker(){l||c||r({type:"OPEN"})},deleteFile(e,t=Rq){l||c||r({type:"FILE.DELETE",file:e,itemType:t})},acceptedFiles:m,rejectedFiles:s.get("rejectedFiles"),setFiles(e){l||c||r({type:"FILES.SET",files:e,count:e.length})},clearRejectedFiles(){l||c||r({type:"REJECTED_FILES.CLEAR"})},clearFiles(){l||c||r({type:"FILES.CLEAR"})},getFileSize:e=>vq(e.size,a("locale")),createFileUrl(e,t){const n=i.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(l||c)return!1;const t=Array.from((null==e?void 0:e.items)??[]).reduce(((e,t)=>{if("file"!==t.kind)return e;const n=t.getAsFile();return n?[...e,n]:e}),[]);return!!t.length&&(r({type:"FILE.SELECT",files:t}),!0)},getRootProps:()=>t.element({...WG.root.attrs,dir:a("dir"),id:_q(i),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f)}),getDropzoneProps:(e={})=>t.element({...WG.dropzone.attrs,dir:a("dir"),id:Sq(i),tabIndex:l||c||e.disableClick?void 0:0,role:e.disableClick?"application":"button","aria-label":p.dropzone,"aria-disabled":l||c||void 0,"data-invalid":XG(a("invalid")),"data-disabled":XG(l),"data-readonly":XG(c),"data-dragging":XG(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=rq(t);tq(t.currentTarget,n)&&(Pq(n,t.currentTarget)||e.disableClick||"Enter"!==t.key&&" "!==t.key||r({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(t){if(l||c)return;if(t.defaultPrevented)return;if(e.disableClick)return;const n=rq(t);tq(t.currentTarget,n)&&(Pq(n,t.currentTarget)||("label"===t.currentTarget.localName&&t.preventDefault(),r({type:"DROPZONE.CLICK"})))},onDragOver(e){if(l||c)return;if(!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch{}if(!Iq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(tq(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;Iq(e)&&(t=e.dataTransfer.items,n=a("directory"),Promise.all(Array.from(t).filter((e=>"file"===e.kind)).map((e=>{const t=(e=>"function"==typeof e.getAsEntry?e.getAsEntry():"function"==typeof e.webkitGetAsEntry?e.webkitGetAsEntry():null)(e);if(!t)return null;if(sq(t)&&n)return uq(t.createReader(),`${t.name}`);if(lq(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?cq(t,""):null)}return lq(t)?new Promise((e=>{t.file((t=>{e(cq(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:kq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...WG.trigger.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.trigger)??`file:${e.id}:trigger`),disabled:l||c,"data-disabled":XG(l),"data-readonly":XG(c),"data-invalid":XG(a("invalid")),type:"button",onClick(e){l||c||(tq((e=>e.getById(Sq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:Tq(i),tabIndex:-1,disabled:l||c,type:"file",required:a("required"),capture:a("capture"),name:a("name"),accept:o("acceptAttr"),webkitdirectory:a("directory")?"":void 0,multiple:o("multiple")||a("maxFiles")>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=""},onInput(e){if(l||c)return;const{files:t}=e.currentTarget;r({type:"FILE.SELECT",files:t?Array.from(t):[]})},style:iq}),getItemGroupProps(e={}){const{type:n=Rq}=e;return t.element({...WG.itemGroup.attrs,dir:a("dir"),"data-disabled":XG(l),"data-type":n})},getItemProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.item.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemName.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.itemName)?void 0:u.call(c,s))??`file:${o.id}:item-name:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.itemSizeText)?void 0:u.call(c,s))??`file:${o.id}:item-size:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=Rq}=e;return t.element({...WG.itemPreview.attrs,dir:a("dir"),id:(o=i,s=Aq(n),(null==(u=null==(c=o.ids)?void 0:c.itemPreview)?void 0:u.call(c,s))??`file:${o.id}:item-preview:${s}`),"data-disabled":XG(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=Rq}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...WG.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":XG(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=Rq}=e;return t.button({...WG.itemDeleteTrigger.attrs,dir:a("dir"),id:Cq(i,Aq(o)),type:"button",disabled:l||c,"data-disabled":XG(l),"data-readonly":XG(c),"data-type":s,"aria-label":null==(n=p.deleteFile)?void 0:n.call(p,o),onClick(){l||c||r({type:"FILE.DELETE",file:o,itemType:s})}})},getLabelProps(){return t.label({...WG.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:Tq(i),"data-disabled":XG(l),"data-required":XG(u)});var e,n},getClearTriggerProps:()=>t.button({...WG.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":XG(l),"data-readonly":XG(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var Dq=new WeakMap,Mq=new WeakMap;function Fq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Eq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){!function(e,t){if(null==e)throw new Error(t())}(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||Eq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=(l=t,(s=e)?`${s}.${l}`:l);r(a,n)}var s,l}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}var jq,zq=(jq={props:({props:e})=>({minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:n})=>({acceptedFiles:t((()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>pq(e,t[n]))),hash:e=>e.map((e=>`${e.name}-${e.size}`)).join(","),onChange(t){var r,a;const o=n();null==(r=e("onFileAccept"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:t,rejectedFiles:o.get("rejectedFiles")})}}))),rejectedFiles:t((()=>({defaultValue:[],isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>pq(e.file,t[n].file))),onChange(t){var r,a;const o=n();null==(r=e("onFileReject"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:o.get("acceptedFiles"),rejectedFiles:t})}}))),transforming:t((()=>({defaultValue:!1})))}),computed:{acceptAttr:({prop:e})=>function(e){if(null!=e)return"string"==typeof e?e:Array.isArray(e)?e.filter(dq).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(dq).join(",")}(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],(()=>{n(["syncInputElement"])}))},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop"))return;if(!e("allowDrop"))return;if(e("disabled"))return;const n=t.getDoc();return((...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))})(aq(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),aq(n,"drop",(e=>{var n;tq((n=t).getById(_q(n)),rq(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=Nq(e);if(!n)return;!function(e,t){const n=nq(e);try{if("DataTransfer"in n){const r=new n.DataTransfer;t.forEach((e=>{r.items.add(e)})),e.files=r.files}}catch{}}(n,t.get("acceptedFiles"));const r=e.getWin();n.dispatchEvent(new r.Event("change",{bubbles:!0}))}))},openFilePicker({scope:e}){!function(e){const t=oq.create();t.request(e),t.cleanup}((()=>{var t;null==(t=Nq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=Oq(e,r.files);n.set("acceptedFiles",t("multiple")?a:a.length>0?[a[0]]:[]),n.set("rejectedFiles",o)},setEventFiles(e){const{computed:t,context:n,event:r,prop:a}=e,o=n.get("acceptedFiles"),i=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=Oq(e,r.files,o,i),c=e=>t("multiple")?(n.set("acceptedFiles",(t=>[...t,...e])),void n.set("rejectedFiles",l)):e.length?(n.set("acceptedFiles",[e[0]]),void n.set("rejectedFiles",l)):void(l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))),u=a("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch((e=>{!function(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}(`[zag-js/file-upload] error transforming files\n${e}`)})).finally((()=>{n.set("transforming",!1)}))):c(s)},removeFile({context:e,event:t}){if("rejected"===t.itemType){const n=e.get("rejectedFiles").filter((e=>!pq(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!pq(e,t.file)));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}},function(e){const t=Dq.get(e);if(t)return t;const{index:n,idIndex:r}=Fq(e);Dq.set(e,n),Mq.set(e,r)}(jq),jq);var Bq=(e,...t)=>e.filter((e=>!t.includes(e))),Hq=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Bq(e,t):((e,...t)=>e.concat(t))(e,t),Uq=e=>"Array"===(null==e?void 0:e.constructor.name),$q=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof(null==e?void 0:e.isEqual)&&"function"==typeof(null==t?void 0:t.isEqual))return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(Uq(e)&&Uq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!$q(e[n],t[n]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let a=0;a<r;a++){if(!Reflect.has(e,n[a]))return!1}for(let a=0;a<r;a++){const r=n[a];if(!$q(e[r],t[r]))return!1}return!0},Vq=e=>null!=e&&"object"==typeof e,Gq=e=>Vq(e)&&!(e=>Array.isArray(e))(e),qq=e=>"function"==typeof e,Wq=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Yq=Function.prototype.toString,Zq=Yq.call(Object),Kq=e=>{if(!Vq(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||Xq(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Wq(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Yq.call(n)==Zq},Xq=e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e),Qq=e=>e(),Jq=()=>{},eW=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function tW(e,t,...n){var r;if(e in t){const r=t[e];return qq(r)?r(...n):r}const a=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw null==(r=Error.captureStackTrace)||r.call(Error,a,tW),a}function nW(e){if(!Kq(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const r of t){const t=e[r];void 0!==t&&(n[r]=nW(t))}return n}function rW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function aW(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function oW(e,t){if(null==e)throw new Error(t())}var iW=".",sW=new WeakMap,lW=new WeakMap;function cW(e){return e.join(iW)}function uW(e){return e.startsWith("#")}function dW(e,t){return e?`${e}${iW}${t}`:t}function pW(e){const t=sW.get(e);if(t)return t;const{index:n,idIndex:r}=function(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&aW(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){oW(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||aW(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=dW(e,t);r(a,n)}}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}(e);return sW.set(e,n),lW.set(e,r),n}function fW(e){return e?String(e).split(iW).filter(Boolean):[]}function hW(e,t){if(!t)return[];const n=pW(e),r=fW(t),a=[],o=[];for(const i of r){o.push(i);const e=cW(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function mW(e,t){const n=pW(e),r=fW(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=cW(a);if(!n.has(e))return t}let o=cW(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${iW}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function gW(e,t){return pW(e).has(t)}function yW(e,t,n){const r=String(t);if(uW(r)){const t=function(e){return uW(e)?e.slice(1):e}(r),n=function(e,t){var n;return pW(e),null==(n=lW.get(e))?void 0:n.get(t)}(e,t);return oW(n,(()=>`[zag-js] Unknown state id: "${t}"`)),mW(e,n)}if(function(e){return e.startsWith(iW)}(r)&&n){return mW(e,dW(n,r.slice(1)))}if(!function(e){return e.includes(iW)}(r)&&n){const t=fW(n);for(let n=t.length-1;n>=1;n--){const a=dW(t.slice(0,n).join(iW),r);if(gW(e,a))return mW(e,a)}if(gW(e,r))return mW(e,r)}return mW(e,r)}function bW(e){return pW(e),e}var vW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(vW||{}),kW="__init__",xW=Object.defineProperty,wW=(e,t,n)=>((e,t,n)=>t in e?xW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function EW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var _W=()=>{},SW=e=>"object"==typeof e&&null!==e,TW=e=>e?"":void 0,CW=e=>e?"true":void 0,AW=e=>SW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,NW=e=>SW(e)&&9===e.nodeType,IW=e=>AW(e)?e.localName||"":"#document";var OW=e=>SW(e)&&void 0!==e.nodeType,RW=e=>OW(e)&&11===e.nodeType&&"host"in e,PW=e=>AW(e)&&"input"===e.localName;function LW(e){if(!e)return!1;return zW(e.getRootNode())===e}var DW=/(textarea|select)/;function MW(e,t){var n;if(!e||!t)return!1;if(!AW(e)||!OW(t))return!1;if(AW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&RW(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function FW(e){return NW(e)?e:(e=>SW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function jW(e){var t;return RW(e)?jW(e.host):NW(e)?e.defaultView??window:AW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function zW(e){let t=e.activeElement;for(;null==t?void 0:t.shadowRoot;){const e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function BW(e){if("html"===IW(e))return e;const t=e.assignedSlot||e.parentNode||RW(e)&&e.host||FW(e).documentElement;return RW(t)?t.host:t}function HW(e){let t;try{if(t=e.getRootNode({composed:!0}),NW(t)||RW(t))return t}catch{}return e.ownerDocument??document}var UW=new WeakMap;function $W(e){return UW.has(e)||UW.set(e,jW(e).getComputedStyle(e)),UW.get(e)}var VW=new Set(["menu","listbox","dialog","grid","tree","region"]),GW=e=>VW.has(e),qW=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function WW(e,t){const n=new Set,r=HW(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=qW(i);for(const o of e){if(!o||n.has(o))continue;n.add(o);const e=r.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");if(n&&GW(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function YW(e){const t=new Set;return function(e,t){const n=HW(e),r=new Set,a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=qW(i);for(const o of e){if(!o||r.has(o))continue;r.add(o);const e=n.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");n&&VW.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function ZW(e){if(!e.id)return!1;const t=HW(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`,a=t.querySelector(r);return Boolean(a&&function(e){const t=e.getAttribute("role");return Boolean(t&&VW.has(t))}(e))}var KW=()=>"undefined"!=typeof document;var XW=e=>KW()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),QW=e=>KW()&&e.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((({brand:e,version:t})=>`${e}/${t}`)).join(" "):navigator.userAgent}()),JW=()=>KW()&&!!navigator.maxTouchPoints,eY=()=>XW(/^iPhone/i)||XW(/^iPad/i)||tY()&&navigator.maxTouchPoints>1,tY=()=>XW(/^Mac/i);function nY(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}function rY(e){const t=e.currentTarget;if(!t)return!1;if(!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const n=1===e.button,r=(a=e,tY()?a.metaKey:a.ctrlKey);var a;return n||r}function aY(e){return!(""!==e.pointerType||!e.isTrusted)||(QW(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var oY=e=>0===e.button,iY=e=>2===e.button||tY()&&e.ctrlKey&&0===e.button,sY={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},lY={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function cY(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=sY[a]??a;return"rtl"===n&&"horizontal"===r&&a in lY&&(a=lY[a]),a}var uY=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},dY=e=>AW(e)&&"IFRAME"===e.tagName,pY=/^(audio|video|details)$/;function fY(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function hY(e){if(!function(e){return PW(e)&&"radio"===e.type}(e)||!e.name)return!0;if(e.checked)return!0;const t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter((t=>t.form===e.form&&vY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function mY(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;const n=t(e);return(!0===n?e.shadowRoot:n)||null}function gY(e,t,n){const r=[...e],a=[...e],o=new Set,i=new Map;e.forEach(((e,t)=>i.set(e,t)));let s=0;for(;s<a.length;){const e=a[s++];if(!e||o.has(e))continue;o.add(e);const l=mY(e,t);if(l){const t=Array.from(l.querySelectorAll(yY)).filter(n),o=i.get(e);if(void 0!==o){const e=o+1;r.splice(e,0,...t),t.forEach(((t,n)=>{i.set(t,e+n)}));for(let n=e+t.length;n<r.length;n++)i.set(r[n],n)}else{const e=r.length;r.push(...t),t.forEach(((t,n)=>{i.set(t,e+n)}))}a.push(...t)}}return r}var yY="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",bY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));(1==n||"if-empty"==n&&0===a.length)&&AW(e)&&vY(e)&&a.unshift(e);const o=[];for(const i of a)if(vY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...bY(e,{getShadowRoot:r}))}else o.push(i);return r?gY(o,r,vY):o};function vY(e){return!(!AW(e)||e.closest("[inert]"))&&(e.matches(yY)&&(!!AW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function kY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(yY));n&&xY(e)&&a.unshift(e);const o=[];for(const i of a)if(xY(i))if(dY(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...kY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=gY(o,r,xY);return!e.length&&n?a:e}return!o.length&&n?a:o}function xY(e){return!!(AW(e)&&e.tabIndex>0)||!(!vY(e)||(e=>fY(e)<0)(e))&&hY(e)}function wY(e){return e.tabIndex<0&&(pY.test(e.localName)||function(e){if(null==e||!AW(e))return!1;try{return PW(e)&&null!=e.selectionStart||DW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(fY(t)))?0:e.tabIndex;var t}var EY=class e{constructor(){wW(this,"id",null),wW(this,"fn_cleanup"),wW(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function _Y(e){const t=EY.create();return t.request(e),t.cleanup}function SY(e){const t=new Set;function n(e){const n=globalThis.requestAnimationFrame(e);t.add((()=>globalThis.cancelAnimationFrame(n)))}return n((()=>n(e))),function(){t.forEach((e=>e()))}}function TY(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(function(e,t){if(!e)return;const{attributes:n,callback:r}=t,a=new(e.ownerDocument.defaultView||window).MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&n.includes(t.attributeName)&&r(t)}));return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function CY(e){const t=()=>{const t=jW(e);e.dispatchEvent(new t.MouseEvent("click"))};QW(/Firefox/i)?function(e,t,n){const r=_Y((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function AY(e){const t=BW(e);return["html","body","#document"].includes(IW(t))?FW(t).body:AW(t)&&OY(t)?t:AY(t)}var NY=/auto|scroll|overlay|hidden|clip/,IY=new Set(["inline","contents"]);function OY(e){const t=jW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return NY.test(n+a+r)&&!IY.has(o)}function RY(e,t){const{rootEl:n,...r}=t||{};e&&n&&OY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function PY(e,t){if(!e)return _W;const n=Object.keys(t).reduce(((t,n)=>(t[n]=e.style.getPropertyValue(n),t)),{});return r=n,a=t,Object.keys(r).every((e=>r[e]===a[e]))?_W:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function LY(e,t){const{timeout:n,rootNode:r}=t,a=jW(r),o=FW(r),i=new a.AbortController;return function(e,t,n){const{signal:r}=t;return[new Promise(((t,a)=>{const o=setTimeout((()=>{a(new Error(`Timeout of ${n}ms exceeded`))}),n);r.addEventListener("abort",(()=>{clearTimeout(o),a(new DOMException("Promise aborted","AbortError"))})),e.then((e=>{r.aborted||(clearTimeout(o),t(e))})).catch((e=>{r.aborted||(clearTimeout(o),a(e))}))})),()=>t.abort()]}(new Promise((t=>{const n=e();if(n)return void t(n);const r=new a.MutationObserver((()=>{const n=e();n&&n.isConnected&&(r.disconnect(),t(n))}));r.observe(o.body,{childList:!0,subtree:!0})})),i,n)}var DY=void 0!==globalThis.document?he.useLayoutEffect:he.useEffect;function MY(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=he.useState(t),[a,o]=he.useState(r),i=void 0!==e().value,s=he.useRef(a);s.current=i?e().value:a;const l=he.useRef(s.current);DY((()=>{l.current=s.current}),[a,e().value]);return{initial:r,ref:s,get:function(){return i?e().value:a},set(t){(e().sync?Ce.flushSync:Qq)((()=>(t=>{var r,a;const s=l.current,c=qq(t)?t(s):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:s}),i||o(c),n(c,s)||null==(a=(r=e()).onChange)||a.call(r,c,s)})(t)))},invoke(t,n){var r,a;null==(a=(r=e()).onChange)||a.call(r,t,n)},hash(t){var n,r;return(null==(r=(n=e()).hash)?void 0:r.call(n,t))??String(t)}}}MY.cleanup=e=>{he.useEffect((()=>e),[])},MY.ref=e=>{const t=he.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var FY=(e,t)=>{const n=he.useRef(!1),r=he.useRef(!1);he.useEffect((()=>{if(n.current&&r.current)return t();r.current=!0}),[...(e??[]).map((e=>"function"==typeof e?e():e))]),he.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])};function jY(e,t={}){var n,r,a,o;const i=he.useMemo((()=>{const{id:e,ids:n,getRootNode:r}=t;return function(e){const t=()=>{var t;return(null==(t=e.getRootNode)?void 0:t.call(e))??document},n=()=>FW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>zW(t()),isActiveElement:LW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=zY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:nW(t),scope:i}))??t),c=zY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:MY,scope:i,flush:BY,getContext:()=>u,getComputed:()=>E,getRefs:()=>y,getEvent:()=>m()})),u={get(e){var t;return null==(t=c.current)?void 0:t[e].ref.current},set(e,t){var n;null==(n=c.current)||n[e].set(t)},initial(e){var t;return null==(t=c.current)?void 0:t[e].initial},hash(e){var t,n;const r=null==(t=c.current)?void 0:t[e].get();return null==(n=c.current)?void 0:n[e].hash(r)}},d=he.useRef(new Map),p=he.useRef(null),f=he.useRef(null),h=he.useRef({type:""}),m=()=>({...h.current,current:()=>h.current,previous:()=>f.current}),g=()=>({..._,matches:(...e)=>e.some((e=>function(e,t){return!!e&&(e===t||e.startsWith(`${t}${iW}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return hW(e,t).some((e=>{var t;return null==(t=e.state.tags)?void 0:t.includes(n)}))}(e,_.ref.current,t)}),y=function(e){const t=he.useRef(e);return{get:e=>t.current[e],set(e,n){t.current[e]=n}}}((null==(a=e.refs)?void 0:a.call(e,{prop:l,context:u}))??{}),b=()=>({state:g(),context:u,event:m(),prop:l,send:A,action:v,guard:k,track:FY,refs:y,computed:E,flush:BY,scope:i,choose:w}),v=t=>{const n=qq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.actions)?void 0:r[t];return a||rW(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),a}));for(const e of r)null==e||e(b())},k=t=>{var n,r;return qq(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=qq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.effects)?void 0:r[t];return a||rW(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),a})),a=[];for(const e of r){const t=null==e?void 0:e(b());t&&a.push(t)}return()=>a.forEach((e=>null==e?void 0:e()))},w=e=>{return(t=e,null==t?[]:Array.isArray(t)?t:[t]).find((e=>{let t=!e.guard;return(e=>"string"==typeof e)(e.guard)?t=!!k(e.guard):qq(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{oW(e.computed,(()=>"[zag-js] No computed object found on machine"));return(0,e.computed[t])({context:u,event:m(),prop:l,refs:y,scope:i,computed:E})},_=MY((()=>({defaultValue:yW(e,e.initialState({prop:l})),onChange(t,n){var r,a;const{exiting:o,entering:i}=function(e,t,n,r){var a,o,i,s;const l=t?hW(e,t):[],c=hW(e,n);let u=0;for(;u<l.length&&u<c.length&&(null==(a=l[u])?void 0:a.path)===(null==(o=c[u])?void 0:o.path);)u+=1;let d=l.slice(u).reverse(),p=c.slice(u);const f=(null==(i=l.at(-1))?void 0:i.path)===(null==(s=c.at(-1))?void 0:s.path);return r&&f&&(d=l.slice().reverse(),p=c),{exiting:d,entering:p}}(e,n,t,null==(r=p.current)?void 0:r.reenter);if(o.forEach((e=>{const t=d.current.get(e.path);null==t||t(),d.current.delete(e.path)})),o.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.exit)})),v(null==(a=p.current)?void 0:a.actions),i.forEach((e=>{var t;const n=x(null==(t=e.state)?void 0:t.effects);n&&d.current.set(e.path,n)})),n===kW){v(e.entry);const t=x(e.effects);t&&d.current.set(kW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=he.useRef(void 0),T=he.useRef(vW.NotStarted);DY((()=>{queueMicrotask((()=>{const e=T.current===vW.Started;T.current=vW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():kW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=vW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=vW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==vW.Started)return;f.current=h.current,h.current=t;let n=C();const{transitions:r,source:a}=function(e,t,n){var r,a;const o=hW(e,t);for(let s=o.length-1;s>=0;s--){const e=null==(r=o[s])?void 0:r.state.on,t=null==e?void 0:e[n];if(t)return{transitions:t,source:null==(a=o[s])?void 0:a.path}}const i=e.on;return{transitions:null==i?void 0:i[n],source:void 0}}(e,n,t.type),o=w(r);if(!o)return;p.current=o;const i=yW(e,o.target??n,a);s("transition",t.type,o.target||n,`(${o.actions})`);i!==n?Ce.flushSync((()=>_.set(i))):o.reenter?_.invoke(n,n):v(o.actions??[])}))};return null==(o=e.watch)||o.call(e,b()),{state:g(),send:A,context:u,prop:l,scope:i,refs:y,computed:E,event:m(),getStatus:()=>T.current}}function zY(e){const t=he.useRef(e);return t.current=e,t}function BY(e){queueMicrotask((()=>{Ce.flushSync((()=>e()))}))}var HY,UY=(HY=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>HY({style:e}).style:HY}));const $Y=he.createContext(null);function VY({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=he.useId(),u=cR(),d=Lq(jY(zq,{id:c,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,getRootNode:()=>{var e;return(null==(e=null==u?void 0:u.shadowHost)?void 0:e.shadowRoot)??document},onFileAccept:i,onFileChange:s,onFileReject:l}),UY);return wg.jsx($Y.Provider,{value:d,children:e})}function GY(){const e=he.useContext($Y);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function qY(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const WY={"application/pdf":"filePdf","text/plain":"fileText","text/markdown":"fileMarkdown","text/html":"fileHtml","text/csv":"fileCsv","text/x-log":"fileLog","application/json":"fileJson"};function YY(e){return e.startsWith("image/")}const ZY={"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/webp":[".webp"],"application/pdf":[".pdf"],"text/plain":[".txt"],"text/markdown":[".md"],"text/html":[".html"],"text/csv":[".csv"],"text/x-log":[".log"],"application/json":[".json"]},KY=new Set(Object.keys(ZY)),XY=Object.values(ZY).flat().join(", "),QY=10485760,JY=Object.entries(ZY).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function eZ(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=JY[n];return r?new File([e],e.name,{type:r}):e}const tZ=vV("div",{_id:"aiChatMessage__Files"}),nZ=({children:e,...t})=>{const{message:n}=$G();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return KY.has(t??"")}));return r.length?wg.jsx(tZ,{...t,children:e(r)}):null},rZ=vV("button",{_id:"aiChatMessage__File"}),aZ=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=BG(),[i,s]=he.useState(!0),l=he.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return wg.jsx(TZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:wg.jsx(rZ,{type:"button","aria-label":YY(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":aV(i),onClick:qY(r,(()=>{if(YY(n??""))o({url:e,name:t??"file"});else if(e)if(e.startsWith("data:")){const n=document.createElement("a");n.href=e,n.download=t??"file",n.click()}else window.open(e,"_blank","noopener,noreferrer")})),...a})})},oZ=vV("div",{_id:"aiChatInput__Fieldset"}),iZ=e=>{const t=GY();return wg.jsx(oZ,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":aV(t.dragging),...e})},sZ=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=EJ();return wg.jsx(VY,{accept:ZY,maxFiles:10,maxFileSize:QY,preventDocumentDrop:!0,acceptedFiles:t,onFileAccept:e=>n(e.files),onFileReject:e=>{const t=function(e){var t;if(!e.length)return null;const n=t=>e.some((e=>e.errors.includes(t)));if(n("TOO_MANY_FILES"))return{title:"Attachment limit reached",message:"You can only attach up to 10 files per message."};if(n("FILE_INVALID_TYPE"))return{title:"Unsupported file type",message:`Only ${XY} files are supported.`};if(n("FILE_TOO_LARGE"))return{title:"File too large",message:"Files must be smaller than 10MB."};if(n("FILE_EXISTS"))return{title:"File already exists",message:`The file "${(null==(t=e.find((e=>e.errors.includes("FILE_EXISTS"))))?void 0:t.file.name)??"file"}" is already attached to this message.`};return{title:"File rejected",message:"This file could not be added."}}(e.files);t&&r(t)},children:wg.jsx(iZ,{...e})})},lZ=vV("div",{_id:"aiChatInput__DropZone"}),cZ=vV("div",{_id:"aiChatInput__Notification"}),uZ=e=>{const{inputNotification:t}=EJ();return t?wg.jsx(cZ,{role:"alert",...e}):null},dZ=vV("p",{_id:"aiChatInput__NotificationTitle"}),pZ=({children:e,...t})=>{const{inputNotification:n}=EJ();return(null==n?void 0:n.title)?wg.jsxs(dZ,{...t,children:[e,n.title]}):null},fZ=vV("p",{_id:"aiChatInput__NotificationMessage"}),hZ=e=>{const{inputNotification:t}=EJ();return wg.jsx(fZ,{...e,children:null==t?void 0:t.message})},mZ=vV("button",{_id:"aiChatInput__NotificationClose"}),gZ=({onClick:e,...t})=>{const{clearInputNotification:n}=EJ();return wg.jsx(mZ,{type:"button","aria-label":"Dismiss",onClick:qY(e,n),...t})},yZ=vV("div",{_id:"aiChatInput__NotificationContent"}),bZ=vV("div",{_id:"aiChatInput__NotificationHeader"}),vZ=vV(FG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),kZ=vV("button",{_id:"aiChatInput__FileUploadButton"}),xZ=e=>{const{aiChatSettings:t}=wR(),n=GY(),{onClick:r,...a}=e;return wg.jsx(kZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:qY(r,(()=>n.openFilePicker())),...a})},wZ=vV("input",{_id:"aiChatInput__FileInput"}),EZ=e=>{const t=GY();return wg.jsx(wZ,{...e,...t.getHiddenInputProps()})},_Z=vV("div",{_id:"aiChatInput__FileList"}),SZ=({children:e,...t})=>{const n=GY().acceptedFiles;return n.length?wg.jsx(_Z,{...t,children:e(n)}):null},TZ=me.createContext(null);function CZ(){const e=me.useContext(TZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const AZ=vV("div",{_id:"aiChatInput__FileItem"}),NZ=({file:e,...t})=>{const n=GY(),[r,a]=he.useState(void 0),[o,i]=he.useState(!0);he.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return wg.jsx(TZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:wg.jsx(AZ,{"data-loading":aV(o),...t})})},IZ=vV("button",{_id:"aiChatInput__FilePreviewTrigger"}),OZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=CZ(),{openImagePreview:a}=BG();return wg.jsx(IZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:qY(e,(()=>{n&&a({url:n,name:r.name})})),...t})},RZ=vV("span",{_id:"aiChatInput__FileContent"}),PZ=e=>wg.jsx(RZ,{...e}),LZ=vV("img",{_id:"aiChatInput__FileThumbnail"}),DZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=CZ();return wg.jsx(LZ,{src:n,alt:r.name,onLoad:qY(e,(()=>a(!1))),...t})},MZ=({className:e})=>{const{file:t}=CZ(),n=WY[eZ(t).type]??"fileText";return wg.jsx(FG,{iconKey:n,className:e})},FZ=vV("span",{_id:"aiChatInput__FileName"}),jZ=e=>{const{file:t}=CZ();return wg.jsx(FZ,{...e,children:t.name})},zZ=vV("button",{_id:"aiChatInput__FileRemove"}),BZ=vV(FG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),HZ=({onClick:e,...t})=>{const{onRemove:n}=CZ();return wg.jsx(zZ,{type:"button","aria-label":"Remove file",onClick:qY(e,n),...t})},UZ=e=>{const[t,n]=he.useState(!1);return he.useEffect((()=>{const t=window.matchMedia(e);n(t.matches);const r=e=>n(e.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}),[e]),t};function $Z(e,t){if(401===e&&"object"==typeof t&&null!==t){const e=t.detail??"";if(e.includes("Invalid end-user JWT")||e.includes("Bearer token required"))return"session"}return null}function VZ(e){if(!e)return{};if(e instanceof Headers){const t={};return e.forEach(((e,n)=>{t[n]=e})),t}return Array.isArray(e)?Object.fromEntries(e):e}function GZ(e,t,n){return{...e?{"x-inkeep-app-id":e}:{},...t?{Authorization:`Bearer ${t}`}:{},...VZ(n)}}function qZ({appId:e,authToken:t,refreshSession:n}){const r=he.useRef(e);r.current=e;const a=he.useRef(t);a.current=t;const o=he.useRef(n);o.current=n;return{fetchWithAuth:he.useCallback((async(e,t)=>{const n=GZ(r.current,a.current,null==t?void 0:t.headers),i=await fetch(e,{...t,headers:n});if(401!==i.status)return i;let s;try{s=await i.clone().json()}catch{return i}if("session"===$Z(i.status,s)&&o.current){const n=await o.current();if(!n)return i;const a=GZ(r.current,n,null==t?void 0:t.headers);return fetch(e,{...t,headers:a})}return i}),[])}}function WZ(e){return new Date(e.expiresAt).getTime()-3e4<=Date.now()}const YZ=({baseUrl:e,appId:t,optOutAllAnalytics:n,enabled:r=!0})=>{const a=r&&t&&!n?`inkeep_session_${t}`:null,[o,i]=(e=>{const[t,n]=he.useState((()=>{if(!e)return null;try{const t=localStorage.getItem(e);return null!==t?JSON.parse(t):null}catch{return null}}));return[t,he.useCallback((t=>{if(n(t),e)try{null===t?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}catch{}}),[e])]})(a),s=he.useRef(r);he.useEffect((()=>{const e=s.current;if(s.current=r,e&&!r&&t&&!n){try{localStorage.removeItem(`inkeep_session_${t}`)}catch{}i(null)}}),[r,t,n,i]);const{fetchWithAuth:l}=qZ({appId:t,authToken:void 0}),c=he.useRef(e);c.current=e;const u=he.useRef(t);u.current=t;const d=he.useRef(o);d.current=o;const p=he.useRef(i);p.current=i;const f=he.useRef(l);f.current=l;const h=he.useRef(null),m=he.useRef(r);m.current=r;const g=he.useCallback((async e=>{if(!m.current)return null;if(!c.current||!u.current)return null;if(!e&&h.current)return h.current;const t=`${c.current}/run/auth/apps/${u.current}/anonymous-session`,n=(async()=>{var n;try{const r={"Content-Type":"application/json"},a=null==(n=d.current)?void 0:n.token;a&&(r.Authorization=`Bearer ${a}`);const o=await f.current(t,{method:"POST",headers:r,signal:e});if(!o.ok)throw new Error(`Failed to fetch anonymous session: ${o.status}`);const i=await o.json();return p.current({token:i.token,expiresAt:i.expiresAt}),i.token}catch(fNe){return fNe instanceof Error&&"AbortError"===fNe.name||console.error("[anonymous-session] fetch failed",fNe),null}finally{e||(h.current=null)}})();return e||(h.current=n),n}),[]),y=he.useRef(!1);he.useEffect((()=>{if(!r)return;if(!e||!t)return;const n=!y.current;if(y.current=!0,!n&&d.current&&!WZ(d.current))return;if(h.current)return;const a=new AbortController;return g(a.signal),()=>a.abort()}),[e,t,r,g]),he.useEffect((()=>{if(!r)return;if(!e||!t||!(null==o?void 0:o.expiresAt))return;const n=new Date(o.expiresAt).getTime()-3e4-Date.now();if(n<=0)return;const a=setTimeout((()=>g()),Math.min(n,2147483647));return()=>clearTimeout(a)}),[e,t,r,null==o?void 0:o.expiresAt,g]),he.useEffect((()=>{if(!r)return;if(!e||!t)return;const n=()=>{if("visible"!==document.visibilityState)return;const e=d.current;e&&!WZ(e)||g()};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)}),[e,t,r,g]);const b=he.useCallback((()=>g()),[g]);return{sessionToken:(null==o?void 0:o.token)??null,refreshSession:b}};const ZZ=()=>{const{baseSettings:e}=wR(),{getAuthToken:t}=e,[n,r]=he.useState(null),[a,o]=he.useState(!!t),i=he.useRef(null),s=he.useRef(t);s.current=t;const l=he.useCallback((async()=>{const e=s.current;if(!e)return null;if(i.current)return i.current;const t=(async()=>{try{const t=await e();return r(t),t}catch(fNe){return console.error("[useAuthToken] getAuthToken failed",fNe),r(null),null}finally{i.current=null,o(!1)}})();return i.current=t,t}),[]);he.useEffect((()=>{if(!t)return r(null),void o(!1);l()}),[t,l]),he.useEffect((()=>{if(!t||!n)return;const e=function(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return"number"==typeof n.exp?1e3*n.exp:null}catch{return null}}(n);if(!e)return;const r=e-3e4-Date.now();if(r<=0)return;const a=setTimeout((()=>l()),Math.min(r,2147483647));return()=>clearTimeout(a)}),[t,n,l]);const c=he.useCallback((async()=>s.current?l():null),[l]);return{authToken:n,isLoading:a,refreshToken:c}};function KZ(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const XZ=new Map;function QZ(e="id"){const t=(XZ.get(e)||0)+1;return XZ.set(e,t),`${e}${t}`}var JZ=ge[" useInsertionEffect ".trim().toString()]||aR;function eK({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=he.useState(e),a=he.useRef(n),o=he.useRef(t);return JZ((()=>{o.current=t}),[t]),he.useEffect((()=>{var e;a.current!==n&&(null==(e=o.current)||e.call(o,n),a.current=n)}),[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=he.useRef(void 0!==e);he.useEffect((()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s}),[s,r])}const c=he.useCallback((t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else o(t)}),[s,e,o,i]);return[l,c]}function tK(e){const t=Number(e.code)||Number(e.statusCode);if(t&&!Number.isNaN(t))return t;try{const t=Number(JSON.parse(e.message??"").status);return t&&!Number.isNaN(t)?t:null}catch{return null}}const nK="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",rK="Please try again.",aK=()=>{const{baseSettings:e,aiChatSettings:t}=wR(),[n="",r]=eK({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),{logEvent:a}=SR(),{setConversationId:o,emitToParent:i}=function(){const e=cR(),t=null==e?void 0:e.shadowHost,n=he.useRef("");return{setConversationId:he.useCallback((e=>{n.current=e}),[]),emitToParent:he.useCallback(((e,r)=>{if(!t)return void console.warn("useStreamingEvents: No host element available for parent event emission");const a=new CustomEvent(`ikp-${e}`,{detail:{...r,conversationId:n.current,timestamp:Date.now()},bubbles:!0,composed:!0});t.dispatchEvent(a)}),[t])}}(),s=he.useRef(n);he.useEffect((()=>{const e=s.current;s.current=n,e!==n&&a({eventName:"chat_conversation_changed",properties:{conversationId:n,previousConversationId:e}})}),[n,a]);const[l,c]=he.useState(""),{filters:u,privacyPreferences:d,userProperties:p}=e,{authToken:f,isLoading:h,refreshToken:m}=ZZ(),g=!!e.getAuthToken,y=!!f,{onInputMessageChange:b,filters:v,baseUrl:k,agentUrl:x,context:w,headers:E,appId:_,apiKey:S,files:T}=t,C=x||`${k}/run/api/chat`,{sessionToken:A,refreshSession:N}=YZ({baseUrl:k,appId:_,optOutAllAnalytics:null==d?void 0:d.optOutAllAnalytics,enabled:!y&&!h}),I=S??(y?f:A),{loadConversation:O}=(({baseUrl:e,appId:t,authToken:n,refreshSession:r})=>{const{fetchWithAuth:a}=qZ({appId:t,authToken:n,refreshSession:r});return{loadConversation:he.useCallback((async(t,r)=>{var o;if(!e||!n)return null;try{const n=`${e}/run/v1/conversations/${t}`,i=await a(n,{signal:r});if(!i.ok)throw new Error(`Failed to load conversation: ${i.status}`);return(null==(o=(await i.json()).data)?void 0:o.messages)??[]}catch(fNe){return fNe instanceof Error&&"AbortError"===fNe.name||console.error("[useConversationLoader]",fNe),null}}),[e,n,a])}})({baseUrl:k,appId:_,authToken:I,refreshSession:S||y?void 0:N}),[R,P]=he.useState(!1),L=he.useRef(null);L.current=A;const D=he.useRef(null);D.current=f;const M=he.useRef(void 0);M.current=p&&Object.keys(p).length>0?JSON.stringify(p):void 0;const F=he.useRef(0),j=he.useRef(null),z=he.useRef(null),B=he.useRef(void 0),H=(null==T?void 0:T.map((e=>`${e.filename??""}:${e.mediaType}:${e.url.length}:${e.url.slice(0,64)}:${e.url.slice(-32)}`)).join("\n"))??"";he.useEffect((()=>{B.current=(null==T?void 0:T.length)?T:void 0}),[H]);const U=he.useRef(E);U.current=E;const $=he.useRef(void 0);$.current=u||v?JSON.stringify({...u,...v}):void 0;const[V,G]=he.useState([]),q=he.useMemo((()=>new GU({api:C,headers:()=>{const e=S??D.current??L.current;return{"x-inkeep-client-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-inkeep-client-timestamp":(new Date).toISOString(),"x-inkeep-invocation-type":"chat_widget",..._?{"x-inkeep-app-id":_}:{},...e?{Authorization:`Bearer ${e}`}:{},...$.current?{"inkeep-filters":$.current}:{},...M.current?{"x-inkeep-user-properties":M.current}:{},...U.current}},prepareSendMessagesRequest:e=>{const t=e.messages[e.messages.length-1];return t||console.warn("[useInkeepChat] prepareSendMessagesRequest called with empty messages array"),{body:{...e.body,id:e.id,messages:t?[t]:[],trigger:e.trigger,messageId:e.messageId},headers:e.headers}},body:{requestContext:w}})),[C,w,_,S]),{messages:W,sendMessage:Y,addToolApprovalResponse:Z,status:K,setMessages:X,stop:Q,error:J}=function({experimental_throttle:e,resume:t=!1,...n}={}){const r=he.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const a={...n,onToolCall:e=>{var t,n;return null==(n=(t=r.current).onToolCall)?void 0:n.call(t,e)},onData:e=>{var t,n;return null==(n=(t=r.current).onData)?void 0:n.call(t,e)},onFinish:e=>{var t,n;return null==(n=(t=r.current).onFinish)?void 0:n.call(t,e)},onError:e=>{var t,n;return null==(n=(t=r.current).onError)?void 0:n.call(t,e)},sendAutomaticallyWhen:e=>{var t,n,a;return null!=(a=null==(n=(t=r.current).sendAutomaticallyWhen)?void 0:n.call(t,e))&&a}},o=he.useRef("chat"in n?n.chat:new k$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new k$(a));const i=he.useCallback((t=>o.current["~registerMessagesCallback"](t,e)),[e,o.current.id]),s=he.useSyncExternalStore(i,(()=>o.current.messages),(()=>o.current.messages)),l=he.useSyncExternalStore(o.current["~registerStatusCallback"],(()=>o.current.status),(()=>o.current.status)),c=he.useSyncExternalStore(o.current["~registerErrorCallback"],(()=>o.current.error),(()=>o.current.error)),u=he.useCallback((e=>{"function"==typeof e&&(e=e(o.current.messages)),o.current.messages=e}),[o]);return he.useEffect((()=>{t&&o.current.resumeStream()}),[t,o]),{id:o.current.id,messages:s,setMessages:u,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:l,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}({transport:q,onData(e){i(e.type,e.data)},async onFinish(){i("completion",{conversationId:n}),await a({eventName:"assistant_message_received",properties:{conversationId:n}}),a({eventName:"assistant_answer_displayed",properties:{conversationId:n}})},onError(t){var r;console.error("onError",{code:t.code,message:t.message});const o=S?null:function(e){const t=tK(e),n=$Z(t??0,{detail:e.message??""});return null!==n?n:401===t?"session":null}(t);if(null!==o&&F.current<1){F.current++;const e=z.current,t=j.current;return void(async()=>{var n;if("session"===o&&g){const e=await m();if(!e)throw new Error("Auth token refresh failed");D.current=e}else if("session"===o){const e=await N();e&&(L.current=e)}e?Z(e):t&&(X((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r})),Y((null==(n=t.files)?void 0:n.length)?{parts:[{type:"text",text:t.content},...t.files]}:{text:t.content},{body:t.body}))})().catch((()=>{F.current=0,X((e=>{const t=[...e],n=t[t.length-1];if(!n)return t;const r=nK;return"user"===n.role?t.push({id:KZ(16),role:"assistant",parts:[{type:"text",text:r}]}):n.parts=[{type:"text",text:r}],t}))}))}F.current=0;const i=function(e){const t=tK(e);return 400===t||429===t}(t),s=(t=>{var n,r;switch(tK(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??rK}catch{return(null==(r=t.message)?void 0:r.trim())||rK}case 401:return g?"Authentication failed. Please try again.":nK;case 403:return`There seems to be a configuration error. Please contact ${e.organizationDisplayName??"Administrator"}`;case 429:return"You're sending requests too quickly. Please wait a moment and try again.";default:return nK}})(t);if(a({eventName:"chat_error",properties:{conversationId:n,error:t.message}}),i){ge({title:"Request failed",message:s},8e3),X((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r}));const e=null==(r=j.current)?void 0:r.content;return e&&c(e),void(fe.current=t)}X((e=>{const t=[...e],n=t[t.length-1];return n&&("user"===n.role?t.push({id:KZ(16),role:"assistant",parts:[{type:"text",text:s}]}):n.parts=[{type:"text",text:s}]),t}))}}),ee=he.useRef(y);he.useEffect((()=>{const e=ee.current;ee.current=y,e!==y&&(Q(),pe(null),X([]),r(""),c(""),G([]))}),[y,Q,X,r]);const te="submitted"===K,ne="streaming"===K,re=he.useMemo((()=>{var e,t;const n=[...W??[]].reverse().find((e=>"assistant"===e.role));if(!n)return!1;const r=null==(e=n.parts)?void 0:e.at(-1);return!!(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.type&&t.type.startsWith("tool-")})(r)&&("output-available"===r.state&&(!!(null==(t=r.approval)?void 0:t.id)&&!ne))}),[W,ne]),[ae,oe]=he.useState(!1),ie=ne||re&&!ae,se=te||ie,le=0===W.length,ce=!l.trim()&&0===V.length||se,ue=UZ("(max-width: 768px)"),[de,pe]=he.useState(null),fe=he.useRef(null);he.useEffect((()=>{if(J){if(fe.current===J)return void(fe.current=null);pe(J)}}),[J]);const{inputNotification:me,showInputNotification:ge,clearInputNotification:ye}=function(){const[e,t]=he.useState(null),n=he.useRef(null),r=he.useCallback(((e,r=5e3)=>{n.current&&clearTimeout(n.current),t(e),n.current=setTimeout((()=>t(null)),r)}),[]),a=he.useCallback((()=>{n.current&&clearTimeout(n.current),t(null)}),[]);return he.useEffect((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{inputNotification:e,showInputNotification:r,clearInputNotification:a}}(),be=he.useRef(null);he.useEffect((()=>{null==b||b(l)}),[l]);const ve=async(e=l)=>{if(ce&&(!e||0===e.trim().length)&&0===V.length)return;const t=V;G([]),c(""),F.current=0,z.current=null,oe(!1),await a({eventName:"user_message_submitted",properties:{conversationId:n}});let i=n;i||(i=`conv_${KZ(16)}`,r(i)),o(i);const s=B.current;let u,d;if(B.current=void 0,null==s?void 0:s.length){let n;try{n=await Promise.all(t.map((e=>{const t=eZ(e);return new Promise(((e,n)=>{const r=new FileReader;r.onload=()=>{"string"==typeof r.result?e({type:"file",url:r.result,mediaType:t.type,filename:t.name}):n(new Error(`Failed to read file "${t.name}"`))},r.onerror=()=>n(new Error(`Failed to read file "${t.name}"`)),r.readAsDataURL(t)}))})))}catch(p){return void ge({title:"Failed to attach files",message:"Could not read one or more files. Please try again."})}d=[...n,...s],u=e.trim()?{parts:[{type:"text",text:e},...d]}:{parts:d}}else if(t.length>0){const n=new DataTransfer;for(const e of t)n.items.add(eZ(e));const r=n.files;u=e.trim()?{text:e,files:r}:{files:r}}else u={text:e};j.current={content:e,body:{conversationId:i},files:d},Y(u,{body:{conversationId:i}})},ke=he.useCallback((e=>{F.current=0,z.current=e,oe(!1),Z(e)}),[Z]),xe=he.useCallback((()=>{oe(!0),Q().then((()=>{i("aborted",{conversationId:n})}))}),[Q,n,i]),we=()=>{pe(null),X([]),r(""),B.current=(null==T?void 0:T.length)?T:void 0,a({eventName:"chat_clear_button_clicked",properties:{conversationId:n}})},Ee=he.useCallback(((e,t)=>{pe(null),X(t),r(e),B.current=void 0}),[X,r]),_e=he.useCallback((async(e,t)=>{xe(),Ee(e,[]),P(!0);try{const n=await O(e,t);if(null===n)return!1;const r=n[n.length-1],a="user"===(null==r?void 0:r.role)?[...n,{id:KZ(16),role:"assistant",parts:[{type:"text",text:"This session was interrupted. Please check back in a few minutes or start a new conversation."}]}]:n;return Ee(e,a),!0}finally{(null==t?void 0:t.aborted)||P(!1)}}),[Ee,O,xe]);(({conversationId:e,effectiveAuthToken:t,loadAndRestoreSession:n,onLoadFailed:r})=>{const a=he.useRef(null),o=he.useRef(n);o.current=n;const i=he.useRef(r);i.current=r,he.useEffect((()=>{if(!e||!t)return;if(a.current===e)return;a.current=e;const n=new AbortController,r=t=>{var n;a.current=null,console.error("[useInitialConversation] failed to load conversation:",e,t),null==(n=i.current)||n.call(i)};return(async()=>{try{await o.current(e,n.signal)||n.signal.aborted||r()}catch(fNe){n.signal.aborted||r(fNe)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:I,loadAndRestoreSession:_e,onLoadFailed:()=>Ee("",[])});const{openForm:Se}=tL(),Te=c0();return he.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:ve,updateInputMessage(e){c(e)},clearChat:we,openForm:e=>{null==Te||Te.setView("chat"),Se(e,void 0)},focusInput:()=>{var e;null==(e=be.current)||e.focus()}}))),{messages:W,sendMessage:Y,addToolApprovalResponse:ke,isLoading:te,isStreaming:ie,isBusy:se,error:de,setError:pe,isSubmitDisabled:ce,input:l,handleInputChange:e=>c(e.target.value),handleInputKeyDown:e=>{"Enter"!==e.key||e.shiftKey||ce||e.nativeEvent.isComposing||(e.preventDefault(),ve())},handleSubmit:ve,stop:xe,clear:we,inputRef:be,isMobile:ue,files:V,setFiles:G,isNewChat:le,conversationId:n,restoreSession:Ee,loadAndRestoreSession:_e,isSessionLoading:R,authToken:y?f:A,refreshSession:y?m:N,inputNotification:me,showInputNotification:ge,clearInputNotification:ye}};const oK=he.createContext(void 0);function iK(){const{baseSettings:e,aiChatSettings:t}=wR(),[n,r]=he.useState(null),[a,o]=he.useState({}),{conversationId:i,messages:s,authToken:l,refreshSession:c}=EJ(),{analyticsProperties:u}=e,{logEvent:d}=SR(),{submitFeedback:p}=function({baseUrl:e,appId:t,authToken:n,refreshSession:r}){const{fetchWithAuth:a}=qZ({appId:t,authToken:n,refreshSession:r});return{submitFeedback:he.useCallback((async({conversationId:t,messageId:r,type:o,details:i})=>{if(!e||!n)return;const s=`${e}/run/v1/feedback`,l=await a(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,messageId:r,type:o,details:i})});if(!l.ok)throw new Error(`Feedback submission failed: ${l.status}`);return l.json()}),[e,n,a])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,refreshSession:c}),f=he.useCallback((async(t,n,r)=>{o((e=>({...e,[t]:{type:n,messageId:t,details:r}}))),e.onFeedback?e.onFeedback({type:n,messageId:t,details:r,properties:u}).catch((e=>console.warn("[feedback] onFeedback error:",e))):p({conversationId:i,messageId:t,type:n,details:r}).catch((e=>console.warn("[feedback] submitFeedbackToApi error:",e)));const a=s.findIndex((e=>e.id===t)),l=s[a],c={conversationId:i,question:lV(s[a-1]),answer:lV(l),messageId:t,details:r};d({eventName:"positive"===n?"assistant_positive_feedback_submitted":"assistant_negative_feedback_submitted",properties:c}),"negative"===n&&d({eventName:"user_escalation_indicated",properties:{escalationType:"downvote",conversationId:i}})}),[s,i,u,e,d,p]);return{feedback:a,currentFeedback:n,setCurrentFeedback:r,submitPositiveFeedback:he.useCallback((async e=>{f(e,"positive")}),[f]),submitNegativeFeedback:he.useCallback((async(e,t)=>{f(e,"negative",t)}),[f])}}const sK=({children:e})=>{const t=iK();return wg.jsx(oK.Provider,{value:t,children:e})},lK=()=>{const e=he.useContext(oK);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function cK(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function uK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function dK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=uK(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():uK(e[t],null)}}}}function pK(...e){return he.useCallback(dK(...e),e)}function fK(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>he.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return he.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=he.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=he.useMemo((()=>s),Object.values(s));return wg.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=he.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},hK(r,...t)]}function hK(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return he.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var mK=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=he.Children.toArray(n),o=a.find(bK);if(o){const e=o.props.children,n=a.map((t=>t===o?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(gK,{...r,ref:t,children:he.isValidElement(e)?he.cloneElement(e,void 0,n):null})}return wg.jsx(gK,{...r,ref:t,children:n})}));mK.displayName="Slot";var gK=he.forwardRef(((e,t)=>{const{children:n,...r}=e;if(he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n);return he.cloneElement(n,{...vK(r,n.props),ref:t?dK(t,e):e})}return he.Children.count(n)>1?he.Children.only(null):null}));gK.displayName="SlotClone";var yK=({children:e})=>wg.jsx(wg.Fragment,{children:e});function bK(e){return he.isValidElement(e)&&e.type===yK}function vK(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}var kK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=he.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?mK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function xK(e){const t=he.useRef(e);return he.useEffect((()=>{t.current=e})),he.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function wK(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e);he.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var EK,_K="dismissableLayer.update",SK="dismissableLayer.pointerDownOutside",TK="dismissableLayer.focusOutside",CK=he.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),AK=he.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=he.useContext(CK),[u,d]=he.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=he.useState({}),h=pK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1),a=he.useRef((()=>{}));return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){IK(SK,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1);return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){IK(TK,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return wK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),he.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(EK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),NK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=EK)}}),[u,p,n,c]),he.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),NK())}),[u,c]),he.useEffect((()=>{const e=()=>f({});return document.addEventListener(_K,e),()=>document.removeEventListener(_K,e)}),[]),wg.jsx(kK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:cK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:cK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:cK(e.onPointerDownCapture,x.onPointerDownCapture)})}));AK.displayName="DismissableLayer";function NK(){const e=new CustomEvent(_K);document.dispatchEvent(e)}function IK(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Ce.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}he.forwardRef(((e,t)=>{const n=he.useContext(CK),r=he.useRef(null),a=pK(t,r);return he.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),wg.jsx(kK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var OK=Boolean(null==globalThis?void 0:globalThis.document)?he.useLayoutEffect:()=>{},RK=ge["useId".toString()]||(()=>{}),PK=0;function LK(e){const[t,n]=he.useState(RK());return OK((()=>{n((e=>e??String(PK++)))}),[e]),e||(t?`radix-${t}`:"")}const DK=["top","right","bottom","left"],MK=Math.min,FK=Math.max,jK=Math.round,zK=Math.floor,BK=e=>({x:e,y:e}),HK={left:"right",right:"left",bottom:"top",top:"bottom"};function UK(e,t,n){return FK(e,MK(t,n))}function $K(e,t){return"function"==typeof e?e(t):e}function VK(e){return e.split("-")[0]}function GK(e){return e.split("-")[1]}function qK(e){return"x"===e?"y":"x"}function WK(e){return"y"===e?"height":"width"}function YK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ZK(e){return qK(YK(e))}function KK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const XK=["left","right"],QK=["right","left"],JK=["top","bottom"],eX=["bottom","top"];function tX(e,t,n,r){const a=GK(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?QK:XK:t?XK:QK;case"left":case"right":return t?JK:eX;default:return[]}}(VK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(KK)))),o}function nX(e){const t=VK(e);return HK[t]+e.slice(t.length)}function rX(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function aX(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function oX(e,t,n){let{reference:r,floating:a}=e;const o=YK(t),i=ZK(t),s=WK(i),l=VK(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch(GK(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function iX(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=$K(t,e),h=rX(f),m=s[p?"floating"===d?"reference":"floating":d],g=aX(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},k=aX(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-k.top+h.top)/v.y,bottom:(k.bottom-g.bottom+h.bottom)/v.y,left:(g.left-k.left+h.left)/v.x,right:(k.right-g.right+h.right)/v.x}}function sX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lX(e){return DK.some((t=>e[t]>=0))}const cX=new Set(["left","top"]);function uX(){return"undefined"!=typeof window}function dX(e){return hX(e)?(e.nodeName||"").toLowerCase():"#document"}function pX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function fX(e){var t;return null==(t=(hX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function hX(e){return!!uX()&&(e instanceof Node||e instanceof pX(e).Node)}function mX(e){return!!uX()&&(e instanceof Element||e instanceof pX(e).Element)}function gX(e){return!!uX()&&(e instanceof HTMLElement||e instanceof pX(e).HTMLElement)}function yX(e){return!(!uX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof pX(e).ShadowRoot)}function bX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=AX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function vX(e){return/^(table|td|th)$/.test(dX(e))}function kX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const xX=/transform|translate|scale|rotate|perspective|filter/,wX=/paint|layout|strict|content/,EX=e=>!!e&&"none"!==e;let _X;function SX(e){const t=mX(e)?AX(e):e;return EX(t.transform)||EX(t.translate)||EX(t.scale)||EX(t.rotate)||EX(t.perspective)||!TX()&&(EX(t.backdropFilter)||EX(t.filter))||xX.test(t.willChange||"")||wX.test(t.contain||"")}function TX(){return null==_X&&(_X="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_X}function CX(e){return/^(html|body|#document)$/.test(dX(e))}function AX(e){return pX(e).getComputedStyle(e)}function NX(e){return mX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function IX(e){if("html"===dX(e))return e;const t=e.assignedSlot||e.parentNode||yX(e)&&e.host||fX(e);return yX(t)?t.host:t}function OX(e){const t=IX(e);return CX(t)?e.ownerDocument?e.ownerDocument.body:e.body:gX(t)&&bX(t)?t:OX(t)}function RX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=OX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=pX(a);if(o){const e=PX(i);return t.concat(i,i.visualViewport||[],bX(a)?a:[],e&&n?RX(e):[])}return t.concat(a,RX(a,[],n))}function PX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function LX(e){const t=AX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=gX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=jK(n)!==o||jK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function DX(e){return mX(e)?e:e.contextElement}function MX(e){const t=DX(e);if(!gX(t))return BK(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=LX(t);let i=(o?jK(n.width):n.width)/r,s=(o?jK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const FX=BK(0);function jX(e){const t=pX(e);return TX()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:FX}function zX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=DX(e);let i=BK(1);t&&(r?mX(r)&&(i=MX(r)):i=MX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==pX(e))&&t}(o,n,r)?jX(o):BK(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=pX(o),t=r&&mX(r)?pX(r):r;let n=e,a=PX(n);for(;a&&r&&t!==n;){const e=MX(a),t=a.getBoundingClientRect(),r=AX(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=pX(a),a=PX(n)}}return aX({width:u,height:d,x:l,y:c})}function BX(e,t){const n=NX(e).scrollLeft;return t?t.left+n:zX(fX(e)).left+n}function HX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-BX(e,n),y:n.top+t.scrollTop}}function UX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=pX(e),r=fX(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=TX();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=BX(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=fX(e),n=NX(e),r=e.ownerDocument.body,a=FK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=FK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+BX(e);const s=-n.scrollTop;return"rtl"===AX(r).direction&&(i+=FK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(fX(e));else if(mX(t))r=function(e,t){const n=zX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=gX(e)?MX(e):BK(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=jX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return aX(r)}function $X(e,t){const n=IX(e);return!(n===t||!mX(n)||CX(n))&&("fixed"===AX(n).position||$X(n,t))}function VX(e,t,n){const r=gX(t),a=fX(t),o="fixed"===n,i=zX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=BK(0);function c(){l.x=BX(a)}if(r||!r&&!o)if(("body"!==dX(t)||bX(a))&&(s=NX(t)),r){const e=zX(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?BK(0):HX(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function GX(e){return"static"===AX(e).position}function qX(e,t){if(!gX(e)||"fixed"===AX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return fX(e)===n&&(n=n.ownerDocument.body),n}function WX(e,t){const n=pX(e);if(kX(e))return n;if(!gX(e)){let t=IX(e);for(;t&&!CX(t);){if(mX(t)&&!GX(t))return t;t=IX(t)}return n}let r=qX(e,t);for(;r&&vX(r)&&GX(r);)r=qX(r,t);return r&&CX(r)&&GX(r)&&!SX(r)?n:r||function(e){let t=IX(e);for(;gX(t)&&!CX(t);){if(SX(t))return t;if(kX(t))return null;t=IX(t)}return null}(e)||n}const YX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=fX(r),s=!!t&&kX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=BK(1);const u=BK(0),d=gX(r);if((d||!d&&!o)&&(("body"!==dX(r)||bX(i))&&(l=NX(r)),d)){const e=zX(r);c=MX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?BK(0):HX(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:fX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?kX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=RX(e,[],!1).filter((e=>mX(e)&&"body"!==dX(e))),a=null;const o="fixed"===AX(e).position;let i=o?IX(e):e;for(;mX(i)&&!CX(i);){const t=AX(i),n=SX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||bX(i)&&!n&&$X(e,i))?r=r.filter((e=>e!==i)):a=t,i=IX(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=UX(t,o[0],a);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<o.length;d++){const e=UX(t,o[d],a);s=FK(e.top,s),l=MK(e.right,l),c=MK(e.bottom,c),u=FK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:WX,getElementRects:async function(e){const t=this.getOffsetParent||WX,n=this.getDimensions,r=await n(e.floating);return{reference:VX(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=LX(e);return{width:t,height:n}},getScale:MX,isElement:mX,isRTL:function(e){return"rtl"===AX(e).direction}};function ZX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=DX(e),u=a||o?[...c?RX(c):[],...t?RX(t):[]]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=fX(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-zK(d)+"px "+-zK(a.clientWidth-(u+p))+"px "+-zK(a.clientHeight-(d+f))+"px "+-zK(u)+"px",threshold:FK(0,MK(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}1!==r||ZX(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:a.ownerDocument})}catch(y){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null;let p,f=-1,h=null;i&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?zX(e):null;return l&&function t(){const r=zX(e);m&&!ZX(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const XX=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=VK(n),s=GK(n),l="y"===YK(n),c=cX.has(i)?-1:1,u=o&&l?-1:1,d=$K(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},QX=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=$K(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=YK(VK(a)),f=qK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=UK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=UK(m+d["y"===p?"top":"left"],m,m-d[e])}const g=l.fn({...t,[f]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:s}}}}}},JX=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=$K(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=VK(a),b=YK(s),v=VK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[nX(s)]:function(e){const t=nX(e);return[KK(e),t,KK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...tX(s,m,h,k));const E=[s,...x],_=await l.detectOverflow(t,g),S=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=GK(e),a=ZK(e),o=WK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=nX(i)),[i,nX(i)]}(a,i,k);S.push(_[e[0]],_[e[1]])}if(T=[...T,{placement:a,overflows:S}],!S.every((e=>e<=0))){var C,A;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&b!==YK(t))||T.every((e=>YK(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(A=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=T.filter((e=>{if(w){const t=YK(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},eQ=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=$K(e,t),u=await i.detectOverflow(t,c),d=VK(a),p=GK(a),f="y"===YK(a),{width:h,height:m}=o.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,k=MK(m-u[g],b),x=MK(h-u[y],v),w=!t.middlewareData.shift;let E=k,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),w&&!p){const e=FK(u.left,0),t=FK(u.right,0),n=FK(u.top,0),r=FK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:FK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:FK(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const S=await i.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},tQ=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=$K(e,t);switch(a){case"referenceHidden":{const e=sX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:lX(e)}}}case"escaped":{const e=sX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:lX(e)}}}default:return{}}}}},nQ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=$K(e,t)||{};if(null==c)return{};const d=rX(u),p={x:n,y:r},f=ZK(a),h=WK(f),m=await i.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[f]-p[f]-o.floating[h],x=p[f]-o.reference[f],w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=w?w[v]:0;E&&await(null==i.isElement?void 0:i.isElement(w))||(E=s.floating[v]||o.floating[h]);const _=k/2-x/2,S=E/2-m[h]/2-1,T=MK(d[y],S),C=MK(d[b],S),A=T,N=E-m[h]-C,I=E/2-m[h]/2+_,O=UK(A,I,N),R=!l.arrow&&null!=GK(a)&&I!==O&&o.reference[h]/2-(I<A?T:C)-m[h]/2<0,P=R?I<A?I-A:I-N:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:I-O-P,...R&&{alignmentOffset:P}},reset:R}}}),rQ=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=$K(e,t),u={x:n,y:r},d=YK(a),p=qK(d);let f=u[p],h=u[d];const m=$K(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+g.mainAxis,n=o.reference[p]+o.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=cX.has(VK(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},aQ=(e,t,n)=>{const r=new Map,a={platform:YX,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:iX},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=oX(c,r,l),p=r,f=0;const h={};for(let m=0;m<o.length;m++){const n=o[m];if(!n)continue;const{name:g,fn:y}=n,{x:b,y:v,data:k,reset:x}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=v?v:d,h[g]={...h[g],...k},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:u,y:d}=oX(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var oQ="undefined"!=typeof document?he.useLayoutEffect:function(){};function iQ(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!iQ(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!iQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function sQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lQ(e,t){const n=sQ(e);return Math.round(t*n)/n}function cQ(e){const t=he.useRef(e);return oQ((()=>{t.current=e})),t}function uQ(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=he.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=he.useState(r);iQ(p,r)||f(r);const[h,m]=he.useState(null),[g,y]=he.useState(null),b=he.useCallback((e=>{e!==w.current&&(w.current=e,m(e))}),[]),v=he.useCallback((e=>{e!==E.current&&(E.current=e,y(e))}),[]),k=o||h,x=i||g,w=he.useRef(null),E=he.useRef(null),_=he.useRef(u),S=null!=l,T=cQ(l),C=cQ(a),A=cQ(c),N=he.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),aQ(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!iQ(_.current,t)&&(_.current=t,Ce.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);oQ((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const I=he.useRef(!1);oQ((()=>(I.current=!0,()=>{I.current=!1})),[]),oQ((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,N);N()}}),[k,x,N,T,S]);const O=he.useMemo((()=>({reference:w,floating:E,setReference:b,setFloating:v})),[b,v]),R=he.useMemo((()=>({reference:k,floating:x})),[k,x]),P=he.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=lQ(R.floating,u.x),r=lQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...sQ(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,u.x,u.y]);return he.useMemo((()=>({...u,update:N,refs:O,elements:R,floatingStyles:P})),[u,N,O,R,P])}const dQ=(e,t)=>{const n=XX(e);return{name:n.name,fn:n.fn,options:[e,t]}},pQ=(e,t)=>{const n=QX(e);return{name:n.name,fn:n.fn,options:[e,t]}},fQ=(e,t)=>({fn:rQ(e).fn,options:[e,t]}),hQ=(e,t)=>{const n=JX(e);return{name:n.name,fn:n.fn,options:[e,t]}},mQ=(e,t)=>{const n=eQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},gQ=(e,t)=>{const n=tQ(e);return{name:n.name,fn:n.fn,options:[e,t]}},yQ=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?nQ({element:n.current,padding:r}).fn(t):{}:n?nQ({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var bQ=he.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return wg.jsx(kK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:wg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));bQ.displayName="Arrow";var vQ=bQ;function kQ(e){const[t,n]=he.useState(void 0);return OK((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var xQ="Popper",[wQ,EQ]=fK(xQ),[_Q,SQ]=wQ(xQ),TQ=e=>{const{__scopePopper:t,children:n}=e,[r,a]=he.useState(null);return wg.jsx(_Q,{scope:t,anchor:r,onAnchorChange:a,children:n})};TQ.displayName=xQ;var CQ="PopperAnchor",AQ=he.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=SQ(CQ,n),i=he.useRef(null),s=pK(t,i);return he.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:wg.jsx(kK.div,{...a,ref:s})}));AQ.displayName=CQ;var NQ="PopperContent",[IQ,OQ]=wQ(NQ),RQ=he.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=SQ(NQ,l),[E,_]=he.useState(null),S=pK(t,(e=>_(e))),[T,C]=he.useState(null),A=kQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(MQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=uQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>KX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[dQ({mainAxis:u+I,alignmentAxis:p}),h&&pQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?fQ():void 0,...D}),h&&hQ({...D}),mQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&yQ({element:T,padding:f}),FQ({arrowWidth:N,arrowHeight:I}),b&&gQ({strategy:"referenceHidden",...D})]}),[H,U]=jQ(j),$=xK(k);OK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=he.useState();return OK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),wg.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:wg.jsx(IQ,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:wg.jsx(kK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));RQ.displayName=NQ;var PQ="PopperArrow",LQ={top:"bottom",right:"left",bottom:"top",left:"right"},DQ=he.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=OQ(PQ,n),o=LQ[a.placedSide];return wg.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:wg.jsx(vQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function MQ(e){return null!==e}DQ.displayName=PQ;var FQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=jQ(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function jQ(e){const[t,n="center"]=e.split("-");return[t,n]}var zQ=TQ,BQ=AQ,HQ=RQ,UQ=DQ;var $Q=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=he.useState(),r=he.useRef({}),a=he.useRef(e),o=he.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return he.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return he.useEffect((()=>{const e=VQ(r.current);o.current="mounted"===s?e:"none"}),[s]),OK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=VQ(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),OK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=VQ(r.current).includes(o.animationName);if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=VQ(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:he.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):he.Children.only(n),o=pK(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?he.cloneElement(a,{ref:o}):null};function VQ(e){return(null==e?void 0:e.animationName)||"none"}function GQ({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=function({defaultProp:e,onChange:t}){const n=he.useState(e),[r]=n,a=he.useRef(r),o=xK(t);return he.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=xK(n);return[i,he.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}$Q.displayName="Presence";var qQ=he.forwardRef(((e,t)=>wg.jsx(kK.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));qQ.displayName="VisuallyHidden";var WQ=qQ,[YQ]=fK("Tooltip",[EQ]),ZQ=EQ(),KQ="TooltipProvider",XQ=700,QQ="tooltip.open",[JQ,eJ]=YQ(KQ),tJ=e=>{const{__scopeTooltip:t,delayDuration:n=XQ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=he.useState(!0),l=he.useRef(!1),c=he.useRef(0);return he.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),wg.jsx(JQ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:he.useCallback((()=>{window.clearTimeout(c.current),s(!1)}),[]),onClose:he.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:he.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:o})};tJ.displayName=KQ;var nJ="Tooltip",[rJ,aJ]=YQ(nJ),oJ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=eJ(nJ,e.__scopeTooltip),c=ZQ(t),[u,d]=he.useState(null),p=LK(),f=he.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=he.useRef(!1),[y=!1,b]=GQ({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(QQ))):l.onClose(),null==o||o(e)}}),v=he.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),k=he.useCallback((()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,b(!0)}),[b]),x=he.useCallback((()=>{window.clearTimeout(f.current),f.current=0,b(!1)}),[b]),w=he.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{g.current=!0,b(!0),f.current=0}),m)}),[m,b]);return he.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),wg.jsx(zQ,{...c,children:wg.jsx(rJ,{scope:t,contentId:p,open:y,stateAttribute:v,trigger:u,onTriggerChange:d,onTriggerEnter:he.useCallback((()=>{l.isOpenDelayed?w():k()}),[l.isOpenDelayed,w,k]),onTriggerLeave:he.useCallback((()=>{h?x():(window.clearTimeout(f.current),f.current=0)}),[x,h]),onOpen:k,onClose:x,disableHoverableContent:h,children:n})})};oJ.displayName=nJ;var iJ="TooltipTrigger",sJ=he.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=aJ(iJ,n),o=eJ(iJ,n),i=ZQ(n),s=pK(t,he.useRef(null),a.onTriggerChange),l=he.useRef(!1),c=he.useRef(!1),u=he.useCallback((()=>l.current=!1),[]);return he.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),wg.jsx(BQ,{asChild:!0,...i,children:wg.jsx(kK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:cK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:cK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:cK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:cK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:cK(e.onBlur,a.onClose),onClick:cK(e.onClick,a.onClose)})})}));sJ.displayName=iJ;var[lJ,cJ]=YQ("TooltipPortal",{forceMount:void 0}),uJ="TooltipContent",dJ=he.forwardRef(((e,t)=>{const n=cJ(uJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=aJ(uJ,e.__scopeTooltip);return wg.jsx($Q,{present:r||i.open,children:i.disableHoverableContent?wg.jsx(mJ,{side:a,...o,ref:t}):wg.jsx(pJ,{side:a,...o,ref:t})})})),pJ=he.forwardRef(((e,t)=>{const n=aJ(uJ,e.__scopeTooltip),r=eJ(uJ,e.__scopeTooltip),a=he.useRef(null),o=pK(t,a),[i,s]=he.useState(null),{trigger:l,onClose:c}=n,u=a.current,{onPointerInTransitChange:d}=r,p=he.useCallback((()=>{s(null),d(!1)}),[d]),f=he.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return he.useEffect((()=>()=>p()),[p]),he.useEffect((()=>{if(l&&u){const e=e=>f(e,u),t=e=>f(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[l,u,f,p]),he.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==u?void 0:u.contains(t)),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o].x,s=t[o].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(a=!a)}return a}(n,i);r?p():a&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,u,i,c,p]),wg.jsx(mJ,{...e,ref:o})})),[fJ,hJ]=YQ(nJ,{isInside:!1}),mJ=he.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=aJ(uJ,n),c=ZQ(n),{onClose:u}=l;return he.useEffect((()=>(document.addEventListener(QQ,u),()=>document.removeEventListener(QQ,u))),[u]),he.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;(null==t?void 0:t.contains(l.trigger))&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,u]),wg.jsx(AK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:wg.jsxs(HQ,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[wg.jsx(yK,{children:r}),wg.jsx(fJ,{scope:n,isInside:!0,children:wg.jsx(WQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));dJ.displayName=uJ;var gJ="TooltipArrow",yJ=he.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=ZQ(n);return hJ(gJ,n).isInside?null:wg.jsx(UQ,{...a,...r,ref:t})}));yJ.displayName=gJ;var bJ=tJ,vJ=sJ,kJ=yJ;const xJ=he.createContext(void 0),wJ=({children:e,...t})=>{const n=aK();return wg.jsx(xJ.Provider,{value:{...n,...t},children:wg.jsx(sK,{children:wg.jsx(bJ,{children:e})})})},EJ=()=>{const e=he.useContext(xJ);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},_J=he.createContext(void 0);const SJ=({layout:e,children:t})=>{const n=function(e){const{stop:t,clear:n,conversationId:r,isStreaming:a,loadAndRestoreSession:o,authToken:i,refreshSession:s}=EJ(),{aiChatSettings:l,baseSettings:c}=wR(),{baseUrl:u,appId:d,apiKey:p}=l,f=!!c.getAuthToken,h=!p&&!!d&&(!!i||f),{fetchWithAuth:m}=qZ({appId:d,authToken:i,refreshSession:s}),[g,y]=he.useState(!1),[b,v]=he.useState([]),[k,x]=he.useState(!i&&h),[w,E]=he.useState(0),[_,S]=he.useState(!1),T=he.useRef(!1),C=he.useRef(null),A=he.useRef(f),N=he.useRef(i);he.useEffect((()=>{const e=A.current,t=N.current;A.current=f,N.current=i,(e!==f||null!==t&&null!==i&&t!==i)&&(v([]),E(0),S(!1),T.current=!1)}),[f,i]);const I=he.useRef([]);I.current=b;const O=he.useRef(m);O.current=m;const R=he.useCallback((async(e,t=!1)=>{if(u&&i&&h){t||x(!0);try{const n=`${u}/run/v1/conversations?page=${e+1}&limit=25`,r=await O.current(n);if(!r.ok)throw new Error(`Failed to fetch conversations: ${r.status}`);const a=await r.json(),o=(a.data??[]).map((e=>({id:e.id,title:e.title??"",createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})));v((n=>{if(0===e&&!t)return o;if(0===e&&t){const e=new Set(o.map((e=>e.id)));return[...o,...n.slice(25).filter((t=>!e.has(t.id)))]}const r=new Set(n.map((e=>e.id)));return[...n,...o.filter((e=>!r.has(e.id)))]}));const{page:i,pages:s}=a.pagination??{};S(null!=i&&null!=s&&i<s),t||E(e)}catch(fNe){console.error("[useChatHistory] Failed to load conversations:",fNe)}finally{x(!1)}}}),[u,i,h]);he.useEffect((()=>{g&&(i||f)&&h&&("stack"===e?R(0):!T.current&&i&&(T.current=!0,R(0)))}),[g,i,f,h,e,R]);const P=he.useRef("");he.useEffect((()=>{h&&"sidepane"===e&&r&&a&&T.current&&P.current!==r&&(I.current.some((e=>e.id===r))||(P.current=r,R(0,!0)))}),[r,h,e,R,a]);const L=he.useCallback((()=>{!k&&_&&R(w+1)}),[k,_,w,R]),D=he.useCallback((()=>{t(),n(),"sidepane"!==e&&y(!1)}),[e,t,n]),M=he.useCallback((async t=>{var n;null==(n=C.current)||n.abort();const r=new AbortController;C.current=r,await o(t,r.signal),r.signal.aborted||"sidepane"===e||y(!1)}),[e,o]);return{isEnabled:h,isOpen:g,setIsOpen:y,sessions:b,isLoading:k,hasMore:_,loadMore:L,startNewConversation:D,loadSession:M}}(e);return wg.jsx(_J.Provider,{value:n,children:"function"==typeof t?t(n):t})},TJ=()=>{const e=he.useContext(_J);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},CJ=he.createContext(void 0),AJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=tL(),o=a[t.name];return wg.jsx(CJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},NJ=()=>{const e=he.useContext(CJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},IJ=he.createContext(void 0);const OJ=({children:e,value:t})=>wg.jsx(IJ.Provider,{value:t,children:e});function RJ(e){return new Promise(((t,n)=>{if(document.querySelector(`script[src="${e}"]`))return void t();let r=document.createElement("script");r.src=e,r.async=!0,r.onload=()=>t(),r.onerror=e=>{console.error("Error loading script",e),n(e)},document.head.appendChild(r)}))}var PJ=(f=class{constructor(){var e;__privateAdd(this,o),__privateAdd(this,i),__privateAdd(this,s,0),__publicField(this,"getChallenge",(async()=>(await __privateGet(this,u).call(this),await __privateGet(this,o).then((e=>"function"==typeof e?e():e))))),__privateAdd(this,l,(()=>{var e;if(document.hidden)return;let{promise:t,resolve:n}=__privateMethod(e=f,p,h).call(e);__privateSet(this,o,t),__privateSet(this,i,n),window.V_C=[],window.V_C.push=n;let r=document.querySelector('script[src*="c.js"]');r&&r.remove(),__privateSet(this,s,__privateGet(this,s)+1)})),__privateAdd(this,c,(()=>{if(window.V_C){let e=window.V_C.pop();e&&__privateGet(this,i).call(this,e)}else window.V_C=[],window.V_C.push=__privateGet(this,i)})),__privateAdd(this,u,(()=>{let e=new URL("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/a-4-a/c.js",window.location.origin);return e.searchParams.set("i",String(__privateGet(this,s))),e.searchParams.set("v",String(3)),e.searchParams.set("h",window.location.host),RJ(e.pathname+e.search)})),__privateAdd(this,d,(()=>{window.V_C=void 0}));let{promise:t,resolve:n}=__privateMethod(e=f,p,h).call(e);__privateSet(this,o,t),__privateSet(this,i,n),__privateGet(this,c).call(this),window.addEventListener("online",__privateGet(this,l)),window.addEventListener("visibilitychange",__privateGet(this,l))}},o=new WeakMap,i=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakSet,h=function(){let e,t;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}},__privateAdd(f,p),f),LJ=(k=class{constructor(e){__privateAdd(this,m,!1),__privateAdd(this,g),__publicField(this,"load",(async()=>{__privateGet(this,m)||await __privateGet(this,b).call(this)})),__privateAdd(this,y,(()=>{if(typeof globalThis.window>"u")throw new Error("KPSDK is not available in the server");if(!window.KPSDK)throw new Error("KPSDK is not loaded");let e=__privateGet(this,g).map((e=>{var t;let n=__privateMethod(t=k,v,x).call(t,e.path);return{domain:n.host,path:n.pathname,method:e.method}}));try{window.KPSDK.configure(e)}catch(Qce){console.error("Error configuring KPSDK...",Qce)}})),__privateAdd(this,b,(async()=>{let e=this;return new Promise(((t,n)=>{let r=()=>{document.removeEventListener("kpsdk-load",r),__privateGet(this,y).call(this)},a=()=>{document.removeEventListener("kpsdk-ready",a),__privateSet(e,m,!0),t()};document.addEventListener("kpsdk-load",r,{once:!0}),document.addEventListener("kpsdk-ready",a,{once:!0}),RJ("/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/p.js").catch((e=>{document.removeEventListener("kpsdk-load",r),document.removeEventListener("kpsdk-ready",a),n(e)}))}))})),__privateSet(this,g,e)}get loaded(){return __privateGet(this,m)}},m=new WeakMap,g=new WeakMap,y=new WeakMap,b=new WeakMap,v=new WeakSet,x=function(e){let t;try{t=new URL(e)}catch{t=new URL(e,location.origin)}return t},__privateAdd(k,v),k),DJ=e=>{let t=e.replace(/[.?+^$[\]\\(){}|-]/g,"\\$&").split("*").join(".*");return new RegExp(`^${t}$`)},MJ=({path:e,pattern:t})=>-1!==e.search(t);function FJ({protect:e=[]}){var t;for(let a of e)if(void 0!==(null==(t=a.advancedOptions)?void 0:t.checkLevel)&&"deepAnalysis"!==a.advancedOptions.checkLevel&&"basic"!==a.advancedOptions.checkLevel)throw new Error(`Invalid checkLevel "${a.advancedOptions.checkLevel}" for route "${a.path}". Must be one of: deepAnalysis, basic`);let n=new PJ,r=new LJ(e);(async function(e,t,n){let r=XMLHttpRequest.prototype.open,a=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.open=function(e,t,n,a,o){return this._requestUrl=t.toString(),this._requestMethod=e,r.call(this,e,t,n??!0,a,o)},XMLHttpRequest.prototype.send=async function(r){var o;let i=this._requestUrl;if(!i)return a.call(this,r);if(this._isReexecution)return a.call(this,r);let s=new URL(i,location.href),l=s.origin===location.origin,c=this._requestMethod??"GET",u=n.find((e=>{let t=MJ({path:s.pathname,pattern:DJ(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||"*"===e.method;return t&&n}));if(!u||!l)return a.call(this,r);let d=await e.getChallenge();if(this.setRequestHeader("x-is-human",JSON.stringify(d)),this.setRequestHeader("x-path",s.pathname),this.setRequestHeader("x-method",c),0!==d.b)return a.call(this,r);if(t.loaded)return a.call(this,r);if((1===d.d||"deepAnalysis"===(null==(o=null==u?void 0:u.advancedOptions)?void 0:o.checkLevel))&&await t.load(),!t.loaded)return a.call(this,r);this.setRequestHeader("x-is-human",JSON.stringify(d)),this.setRequestHeader("x-path",s.pathname),this.setRequestHeader("x-method",c);let p=new XMLHttpRequest;return p._isReexecution=!0,p.open(c,i,!0),p.setRequestHeader("x-is-human",JSON.stringify(d)),p.setRequestHeader("x-path",s.pathname),p.setRequestHeader("x-method",c),this.timeout&&(p.timeout=this.timeout),this.responseType&&(p.responseType=this.responseType),this.withCredentials&&(p.withCredentials=this.withCredentials),p.onreadystatechange=()=>{Object.defineProperty(this,"readyState",{value:p.readyState,writable:!0,configurable:!0}),p.readyState===XMLHttpRequest.DONE&&(Object.defineProperty(this,"status",{value:p.status,writable:!0,configurable:!0}),Object.defineProperty(this,"statusText",{value:p.statusText,writable:!0,configurable:!0}),Object.defineProperty(this,"response",{value:p.response,writable:!0,configurable:!0}),Object.defineProperty(this,"responseText",{value:p.responseText,writable:!0,configurable:!0}),Object.defineProperty(this,"responseXML",{value:p.responseXML,writable:!0,configurable:!0}),this.getAllResponseHeaders=()=>p.getAllResponseHeaders(),this.getResponseHeader=e=>p.getResponseHeader(e)),this.onreadystatechange&&this.onreadystatechange.call(this,new Event("readystatechange"))},p.onload=e=>{this.onload&&this.onload.call(this,e)},p.onerror=e=>{this.onerror&&this.onerror.call(this,e)},p.onabort=e=>{this.onabort&&this.onabort.call(this,e)},p.ontimeout=e=>{this.ontimeout&&this.ontimeout.call(this,e)},p.onloadstart=e=>{this.onloadstart&&this.onloadstart.call(this,e)},p.onloadend=e=>{this.onloadend&&this.onloadend.call(this,e)},p.onprogress=e=>{this.onprogress&&this.onprogress.call(this,e)},p.send(r)}})(n,r,e).catch((e=>{console.error("Error patching XMLHttpRequest:",e)})),function(e,t,n){let r=window.fetch;window.fetch=async(a,o)=>{var i;let s=new URL(a instanceof Request?a.url:a,location.href),l=s.origin===location.origin,c=(null==o?void 0:o.method)??(a instanceof Request?a.method:"GET"),u=n.find((e=>{let t=MJ({path:s.pathname,pattern:DJ(e.path)}),n=e.method.toLowerCase()===c.toLowerCase()||"*"===e.method;return t&&n}));if(null==u||!l)return r(a,o);let d=await e.getChallenge(),p=new Headers((null==o?void 0:o.headers)||(a instanceof Request?a.headers:void 0));p.set("x-is-human",JSON.stringify(d)),p.set("x-path",s.pathname),p.set("x-method",c);let f={...o,headers:p};return t.loaded||0!==d.b?r(a,f):1===d.d||"deepAnalysis"===(null==(i=null==u?void 0:u.advancedOptions)?void 0:i.checkLevel)?(await t.load(),window.fetch(a,f)):r(a,f)}}(n,r,e)}function jJ(){const{baseSettings:e,aiChatSettings:t}=wR(),{shouldBypassCaptcha:n}=e,{baseUrl:r,apiKey:a,botProtectionLevel:o}=t,i=he.useRef(!1);return he.useEffect((()=>{if(i.current)return;if(n||a)return;if(!r)return;if("undefined"!=typeof window&&!window.__INKEEP_FETCH_DEBUG__){window.__INKEEP_FETCH_DEBUG__=!0;const e=window.fetch;window.fetch=async function(t,n){var r;let a;a="string"==typeof t?t:t instanceof URL?t.toString():t.url;try{const o=new URL(a,location.href);if(o.pathname.startsWith("/run/")){const a=new Headers((null==n?void 0:n.headers)??(t instanceof Request?t.headers:void 0)),i=(null==n?void 0:n.method)??(t instanceof Request?t.method:"GET");console.log("[botid-debug] fetch →",{url:o.toString(),method:i,locationOrigin:location.origin,targetOrigin:o.origin,sameOrigin:o.origin===location.origin,hasXIsHuman:a.has("x-is-human"),xIsHumanLength:(null==(r=a.get("x-is-human"))?void 0:r.length)??null,xPath:a.get("x-path"),xMethod:a.get("x-method")});const s=await e.call(this,t,n);return console.log("[botid-debug] fetch ←",{url:o.toString(),status:s.status,statusText:s.statusText}),s}}catch{}return e.call(this,t,n)}}const e={checkLevel:o};try{console.log("[botid-debug] calling initBotId",{baseUrl:r,advancedOptions:e}),FJ({protect:[{path:"*",method:"POST",advancedOptions:e}]}),i.current=!0,console.log("[botid-debug] initBotId returned successfully")}catch(fNe){console.warn("[botid-debug] initBotId threw",fNe)}}),[r,a,n,o]),null}const zJ=["light","dark"],BJ="(prefers-color-scheme: dark)",HJ="undefined"==typeof window,UJ=he.createContext(void 0),$J={setColorMode:e=>{},colorModes:[]};function VJ(e,t){const n=he.useContext(UJ)??$J;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const GJ=e=>(he.useContext(UJ),wg.jsx(WJ,{...e})),qJ=["light","dark"],WJ=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=qJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=he.useState((()=>ZJ(a,i))),[m,g]=he.useState((()=>ZJ(a))),y=l?Object.values(l):o,b=he.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=XJ());const c=l?l[o]:o,u=t?KJ():null,f=d&&p&&(null==(a=document.getElementById(d))?void 0:a.shadowRoot),h=f?f.getElementById(p)??document.documentElement:document.documentElement;if("class"===s?(h.classList.remove(...y),c&&h.classList.add(c)):c?h.setAttribute(s,c):h.removeAttribute(s),r){const e=zJ.includes(i)?i:null,t=zJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=he.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Kce){}}),[e]),k=he.useCallback((t=>{const r=XJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);he.useEffect((()=>{const e=window.matchMedia(BJ);return e.addListener(k),k(e),()=>e.removeListener(k)}),[k]),he.useEffect((()=>{const e=e=>{if(e.key!==a)return;const t=e.newValue||i;v(t)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[v]),he.useEffect((()=>{b(e??f)}),[e,f]);const x=he.useMemo((()=>({colorMode:f,setColorMode:v,forcedColorMode:e,resolvedColorMode:"system"===f?m:f,colorModes:n?[...o,"system"]:o,systemColorMode:n?m:void 0})),[f,v,e,m,n,o]);return wg.jsxs(UJ.Provider,{value:x,children:[wg.jsx(YJ,{forcedColorMode:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:a,colorModes:o,defaultColorMode:i,attribute:s,value:l,children:c,attrs:y,nonce:u,shadowHostId:d,rootId:p}),c]})},YJ=he.memo((({forcedColorMode:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultColorMode:o,value:i,attrs:s,nonce:l,shadowHostId:c,rootId:u})=>{const d="system"===o,p=(()=>{const e=c&&u?`document.getElementById('${c}').shadowRoot.getElementById('${u}')`:"document.documentElement";if("class"===n){return`var d=${e},c=d.classList;${`c.remove(${s.map((e=>`'${e}'`)).join(",")})`};`}return`var d=${e},n='${n}',s='setAttribute';`})(),f=(()=>{if(!a)return"";return(zJ.includes(o)?o:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e"})(),h=(e,t=!1,r=!0)=>{const o=i?i[e]:e,s=t?`${e}|| ''`:`'${o}'`;let l="";return a&&r&&!t&&zJ.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=e?`!function(){${p}${h(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${BJ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":`else{${h(o,!1,!1)}}`}${f}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(o,!1,!1)};}${f}}catch(t){}}();`;return wg.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),ZJ=(e,t)=>{if(HJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Kce){}return n||t},KJ=()=>{const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout((()=>{document.head.removeChild(e)}),1)}},XJ=e=>{e||(e=window.matchMedia(BJ));return e.matches?"dark":"light"};var QJ=Object.prototype.hasOwnProperty;function JJ(e,t,n){for(n of e.keys())if(e0(n,t))return n}function e0(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&e0(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=JJ(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=JJ(t,a)))return!1;if(!e0(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(QJ.call(e,n)&&++r&&!QJ.call(t,n))return!1;if(!(n in t)||!e0(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function t0(){const{baseSettings:e}=wR(),[t,n]=he.useState([]),r=function(e){const t=he.useRef(void 0);e0(t.current,e)||(t.current=e);return t.current}(e.theme.styles),{customStyles:a,linksCount:o}=he.useMemo((()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:e,styleSheets:t}=r.reduce(((e,t)=>("link"===t.type?e.links.push(t):"style"===t.type&&e.styleSheets.push(t),e)),{links:[],styleSheets:[]}),a=t.map((e=>wg.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??QZ("link_")))),o=e.map((e=>{const t=e.key??QZ("stylesheet_");return wg.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:wg.jsxs(wg.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const n0=({children:e})=>{const{baseSettings:t}=wR(),{theme:n,primaryBrandColor:r,shadowHost:a,rootElement:o,colorMode:i}=t,{primaryColors:s,varsClassName:l}=n,{disableLoadingDefaultFont:c,fontFamily:u,fontSize:d,zIndex:p}=n,f=Dk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=Fk[n]||n,a=(n,r=[])=>{for(const[o,i]of Object.entries(n)){const n=[...r,o];if("object"==typeof i&&null!==i)a(i,n);else{const r=n.map((e=>e.replace(/([A-Z])/g,"-$1").toLowerCase())).join("-");t[`--ikp-${e}-${r}`]=i}}};a(r)}return t}({colors:lg(n.colors,f),fontFamily:u,fontSize:d,zIndex:p}),{customStyles:m,loaded:g}=t0(),{sync:y,forcedColorMode:b,...v}=i??{},[k,x]=he.useState(),w=he.useRef(null);return he.useEffect((()=>{var e,t;if(!(null==y?void 0:y.target))return;const n="string"==typeof y.target?document.querySelector(y.target):y.target;if(!n)return;function r(e,t){return t.reduce(((t,n)=>({...t,[n]:e.getAttribute(n)})),{})}const a=new MutationObserver((()=>{var e,t;const a=r(n,y.attributes),o=(null==(e=y.isDarkMode)?void 0:e.call(y,a))?"dark":"light";null==(t=y.onChange)||t.call(y,o),x(o)}));a.observe(n,{attributes:!0,attributeFilter:y.attributes,childList:!1,subtree:!1}),w.current=a;const o=(null==(e=y.isDarkMode)?void 0:e.call(y,r(n,null==y?void 0:y.attributes)))?"dark":"light";return null==(t=y.onChange)||t.call(y,o),x(o),()=>a.disconnect()}),[y]),wg.jsxs(wg.Fragment,{children:[!c&&wg.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');\n "}}),m,g&&wg.jsx(GJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:wg.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function r0(e){const{children:t,config:n,componentType:r}=e;return wg.jsxs(xR,{value:{...n,componentType:r},children:[wg.jsx(jJ,{}),wg.jsx(n0,{children:wg.jsx(_R,{children:t})})]})}const a0=he.createContext(void 0),o0=({children:e,source:t})=>wg.jsx(a0.Provider,{value:{source:t},children:e}),i0=()=>{const e=he.useContext(a0);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},s0=he.createContext(void 0),l0=({children:e,widget:t})=>wg.jsx(s0.Provider,{value:t,children:e}),c0=()=>he.useContext(s0),u0=(e,t)=>{const{isOpen:n,onOpenChange:r,defaultOpen:a=!1,shortcutKey:o,triggerSelector:i=t.defaultTriggerSelector}=e??{},{logEvent:s}=SR(),[l=a,c]=eK({prop:n,defaultProp:a??!1,onChange:r}),u=i||t.defaultTriggerSelector;(e=>{const{triggerSelector:t,onTriggerClick:n}=e;he.useEffect((()=>{const e=e=>{var r;const a=e.target;t&&(null==(r=null==a?void 0:a.matches)?void 0:r.call(a,t))&&(null==n||n())};return t&&document.addEventListener("click",e),()=>{t&&document.removeEventListener("click",e)}}),[t,n])})({triggerSelector:u,onTriggerClick:u?()=>c(!l):void 0});const d=he.useRef(!0);he.useEffect((()=>{d.current?d.current=!1:s({eventName:l?`${t.eventNamePrefix}_opened`:`${t.eventNamePrefix}_closed`,properties:{}})}),[l,t.eventNamePrefix]);const p=he.useRef(l);return p.current=l,he.useEffect((()=>{const e=e=>{o&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===o.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),c(!0)),"Escape"===e.key&&p.current&&(e.preventDefault(),c(!1))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o,c]),{isOpen:l,setOpen:c,shortcutKey:o}},d0=he.createContext(void 0),p0=({children:e,value:t})=>wg.jsx(d0.Provider,{value:t,children:e}),f0=()=>{const e=he.useContext(d0);if(!e)throw new Error("useSidebarChat must be used within a SidebarChatProvider");return e},h0=he.createContext(void 0),m0=({children:e,value:t})=>wg.jsx(h0.Provider,{value:t,children:e});var g0=he.useLayoutEffect,y0=function(e,t){"function"!=typeof e?e.current=t:e(t)},b0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},v0=function(e){Object.keys(b0).forEach((function(t){e.style.setProperty(t,b0[t],"important")}))},k0=null,x0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var w0=function(){},E0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],_0=!!document.documentElement.currentStyle,S0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,E0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(_0&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function T0(e,t,n){var r,a,o=(r=n,a=me.useRef(r),g0((function(){a.current=r})),a);he.useLayoutEffect((function(){var n=function(e){return o.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}}),[])}var C0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],A0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?w0:o,s=e.onHeightChange,l=void 0===s?w0:s,c=x$(e,C0),u=void 0!==c.value,d=he.useRef(null),p=function(e,t){var n=me.useRef();return me.useCallback((function(r){e.current=r,n.current&&y0(n.current,null),n.current=t,t&&y0(t,r)}),[t])}(d,t),f=he.useRef(0),h=he.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:S0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),k0||((k0=document.createElement("textarea")).setAttribute("tabindex","-1"),k0.setAttribute("aria-hidden","true"),v0(k0)),null===k0.parentNode&&document.body.appendChild(k0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;k0.style[t]=i[t]})),v0(k0),k0.value=t;var l=x0(k0,e);k0.value=t,l=x0(k0,e),k0.value="x";var c=k0.scrollHeight-a,u=c*n;"border-box"===s&&(u=u+a+o),l=Math.max(u,l);var d=c*r;return"border-box"===s&&(d=d+a+o),[l=Math.min(d,l),c]}(t,e.value||e.placeholder||"x",a,r),i=o[0],s=o[1];f.current!==i&&(f.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return he.useLayoutEffect(m),function(e,t){T0(document.body,"reset",(function(n){e.current.form===n.target&&t(n)}))}(d,(function(){if(!u){var e=d.current,t=e.value;requestAnimationFrame((function(){t!==e.value&&m()}))}})),T0(window,"resize",m),function(e){T0(document.fonts,"loadingdone",e)}(m),he.createElement("textarea",w$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},N0=he.forwardRef(A0),I0="Avatar",[O0]=fK(I0),[R0,P0]=O0(I0),L0=he.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=he.useState("idle");return wg.jsx(R0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:wg.jsx(kK.span,{...r,ref:t})})}));L0.displayName=I0;var D0="AvatarImage",M0=he.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=P0(D0,n),s=function(e,t){const[n,r]=he.useState("idle");return OK((()=>{if(!e)return void r("error");let n=!0;const a=new window.Image,o=e=>()=>{n&&r(e)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{n=!1}}),[e,t]),n}(r,o.referrerPolicy),l=xK((e=>{a(e),i.onImageLoadingStatusChange(e)}));return OK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?wg.jsx(kK.img,{...o,ref:t,src:r}):null}));M0.displayName=D0;var F0="AvatarFallback",j0=he.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=P0(F0,n),[i,s]=he.useState(void 0===r);return he.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>s(!0)),r);return()=>window.clearTimeout(e)}}),[r]),i&&"loaded"!==o.imageLoadingStatus?wg.jsx(kK.span,{...a,ref:t}):null}));j0.displayName=F0;var z0=L0,B0=M0,H0=j0;var U0="Checkbox",[$0]=fK(U0),[V0,G0]=$0(U0),q0=he.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[p,f]=he.useState(null),h=pK(t,(e=>f(e))),m=he.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=GQ({prop:a,defaultProp:o,onChange:c}),v=he.useRef(y);return he.useEffect((()=>{const e=null==p?void 0:p.form;if(e){const t=()=>b(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[p,b]),wg.jsxs(V0,{scope:n,state:y,disabled:s,children:[wg.jsx(kK.button,{type:"button",role:"checkbox","aria-checked":K0(y)?"mixed":y,"aria-required":i,"data-state":X0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:cK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:cK(e.onClick,(e=>{b((e=>!!K0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&wg.jsx(Z0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!K0(o)&&o})]})}));q0.displayName=U0;var W0="CheckboxIndicator",Y0=he.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=G0(W0,n);return wg.jsx($Q,{present:r||K0(o.state)||!0===o.state,children:wg.jsx(kK.span,{"data-state":X0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));Y0.displayName=W0;var Z0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,i=he.useRef(null),s=function(e){const t=he.useRef({value:e,previous:e});return he.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n),l=kQ(t);he.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=K0(n),a.call(e,!K0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=he.useRef(!K0(n)&&n);return wg.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function K0(e){return"indeterminate"===e}function X0(e){return K0(e)?"indeterminate":e?"checked":"unchecked"}var Q0=q0,J0=Y0,e1=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=he.Children.toArray(n),o=a.find(r1);if(o){const e=o.props.children,n=a.map((t=>t===o?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(t1,{...r,ref:t,children:he.isValidElement(e)?he.cloneElement(e,void 0,n):null})}return wg.jsx(t1,{...r,ref:t,children:n})}));e1.displayName="Slot";var t1=he.forwardRef(((e,t)=>{const{children:n,...r}=e;if(he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==he.Fragment&&(a.ref=t?dK(t,e):e),he.cloneElement(n,a)}return he.Children.count(n)>1?he.Children.only(null):null}));t1.displayName="SlotClone";var n1=({children:e})=>wg.jsx(wg.Fragment,{children:e});function r1(e){return he.isValidElement(e)&&e.type===n1}var a1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=he.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?e1:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var o1,i1="dismissableLayer.update",s1="dismissableLayer.pointerDownOutside",l1="dismissableLayer.focusOutside",c1=he.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u1=he.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=he.useContext(c1),[u,d]=he.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=he.useState({}),h=pK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1),a=he.useRef((()=>{}));return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){p1(s1,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=xK(e),r=he.useRef(!1);return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){p1(l1,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return wK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),he.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(o1=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),d1(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o1)}}),[u,p,n,c]),he.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),d1())}),[u,c]),he.useEffect((()=>{const e=()=>f({});return document.addEventListener(i1,e),()=>document.removeEventListener(i1,e)}),[]),wg.jsx(a1.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:cK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:cK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:cK(e.onPointerDownCapture,x.onPointerDownCapture)})}));u1.displayName="DismissableLayer";function d1(){const e=new CustomEvent(i1);document.dispatchEvent(e)}function p1(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Ce.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}he.forwardRef(((e,t)=>{const n=he.useContext(c1),r=he.useRef(null),a=pK(t,r);return he.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),wg.jsx(a1.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var f1=0;function h1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var m1="focusScope.autoFocusOnMount",g1="focusScope.autoFocusOnUnmount",y1={bubbles:!1,cancelable:!0},b1=he.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=he.useState(null),c=xK(a),u=xK(o),d=he.useRef(null),p=pK(t,(e=>l(e))),f=he.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;he.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:w1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||w1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&w1(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),he.useEffect((()=>{if(s){E1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(m1,y1);s.addEventListener(m1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(w1(r,{select:t}),document.activeElement!==n)return}((e=v1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&w1(s))}return()=>{s.removeEventListener(m1,c),setTimeout((()=>{const e=new CustomEvent(g1,y1);s.addEventListener(g1,u),s.dispatchEvent(e),e.defaultPrevented||w1(t??document.body,{select:!0}),s.removeEventListener(g1,u),E1.remove(f)}),0)}}var e}),[s,c,u,f]);const h=he.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=v1(e),n=k1(t,e),r=k1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&w1(o,{select:!0})):(e.preventDefault(),n&&w1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return wg.jsx(a1.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function v1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function k1(e,t){for(const n of e)if(!x1(n,{upTo:t}))return n}function x1(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function w1(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}b1.displayName="FocusScope";var E1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_1(e,t),e.unshift(t)},remove(t){var n;e=_1(e,t),null==(n=e[0])||n.resume()}}}();function _1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var S1=he.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return wg.jsx(a1.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:wg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));S1.displayName="Arrow";var T1=S1,C1="Popper",[A1,N1]=fK(C1),[I1,O1]=A1(C1),R1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=he.useState(null);return wg.jsx(I1,{scope:t,anchor:r,onAnchorChange:a,children:n})};R1.displayName=C1;var P1="PopperAnchor",L1=he.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=O1(P1,n),i=he.useRef(null),s=pK(t,i);return he.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:wg.jsx(a1.div,{...a,ref:s})}));L1.displayName=P1;var D1="PopperContent",[M1,F1]=A1(D1),j1=he.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=O1(D1,l),[E,_]=he.useState(null),S=pK(t,(e=>_(e))),[T,C]=he.useState(null),A=kQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(U1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=uQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>KX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[dQ({mainAxis:u+I,alignmentAxis:p}),h&&pQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?fQ():void 0,...D}),h&&hQ({...D}),mQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&yQ({element:T,padding:f}),$1({arrowWidth:N,arrowHeight:I}),b&&gQ({strategy:"referenceHidden",...D})]}),[H,U]=V1(j),$=xK(k);OK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=he.useState();return OK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),wg.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:wg.jsx(M1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:wg.jsx(a1.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));j1.displayName=D1;var z1="PopperArrow",B1={top:"bottom",right:"left",bottom:"top",left:"right"},H1=he.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=F1(z1,n),o=B1[a.placedSide];return wg.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:wg.jsx(T1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function U1(e){return null!==e}H1.displayName=z1;var $1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=V1(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function V1(e){const[t,n="center"]=e.split("-");return[t,n]}var G1=R1,q1=L1,W1=j1,Y1=H1,Z1=new WeakMap,K1=new WeakMap,X1={},Q1=0,J1=function(e){return e&&(e.host||J1(e.parentNode))},e2=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=J1(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);X1[n]||(X1[n]=new WeakMap);var o=X1[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(Z1.get(e)||0)+1,c=(o.get(e)||0)+1;Z1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&K1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Kce){console.error("aria-hidden: cannot operate on ",e,Kce)}}))};return u(t),s.clear(),Q1++,function(){i.forEach((function(e){var t=Z1.get(e)-1,a=o.get(e)-1;Z1.set(e,t),o.set(e,a),t||(K1.has(e)||e.removeAttribute(r),K1.delete(e)),a||e.removeAttribute(n)})),--Q1||(Z1=new WeakMap,Z1=new WeakMap,K1=new WeakMap,X1={})}},t2=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),e2(r,a,n,"aria-hidden")):function(){return null}},n2="right-scroll-bar-position",r2="width-before-scroll-bar";function a2(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var o2="undefined"!=typeof window?he.useLayoutEffect:he.useEffect,i2=new WeakMap;function s2(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return a2(e,t)}))},(a=he.useState((function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=r,a.facade);return o2((function(){var t=i2.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||a2(e,null)})),r.forEach((function(e){n.has(e)||a2(e,a)}))}i2.set(o,e)}),[e]),o}function l2(e){return e}var c2=function(e){var t=e.sideCar,n=S$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return he.createElement(r,_$({},n))};c2.isSideCarExport=!0;var u2=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=l2);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=_$({async:!0,ssr:!1},e),t}(),d2=function(){},p2=he.forwardRef((function(e,t){var n=he.useRef(null),r=he.useState({onScrollCapture:d2,onWheelCapture:d2,onTouchMoveCapture:d2}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,v=e.gapMode,k=S$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=s2([n,t]),E=_$(_$({},k),a);return he.createElement(he.Fragment,null,u&&he.createElement(x,{sideCar:u2,removeScrollBar:c,shards:d,noRelative:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:v}),i?he.cloneElement(he.Children.only(s),_$(_$({},E),{ref:w})):he.createElement(b,_$({},E,{className:l,ref:w}),s))}));p2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},p2.classNames={fullWidth:r2,zeroRight:n2};function f2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var h2=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=f2())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},m2=function(){var e,t=(e=h2(),function(t,n){he.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},g2={left:0,top:0,right:0,gap:0},y2=function(e){return parseInt(e||"",10)||0},b2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return g2;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[y2(n),y2(r),y2(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},v2=m2(),k2="data-scroll-locked",x2=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(k2,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(n2," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(r2," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(n2," .").concat(n2," {\n right: 0 ").concat(r,";\n }\n \n .").concat(r2," .").concat(r2," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(k2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},w2=function(){var e=parseInt(document.body.getAttribute(k2)||"0",10);return isFinite(e)?e:0},E2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;he.useEffect((function(){return document.body.setAttribute(k2,(w2()+1).toString()),function(){var e=w2()-1;e<=0?document.body.removeAttribute(k2):document.body.setAttribute(k2,e.toString())}}),[]);var o=he.useMemo((function(){return b2(a)}),[a]);return he.createElement(v2,{styles:x2(o,!t,a,n?"":"!important")})},_2=!1;if("undefined"!=typeof window)try{var S2=Object.defineProperty({},"passive",{get:function(){return _2=!0,!0}});window.addEventListener("test",S2,S2),window.removeEventListener("test",S2,S2)}catch(fNe){_2=!1}var T2=!!_2&&{passive:!1},C2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},A2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),N2(e,r)){var a=I2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},N2=function(e,t){return"v"===e?function(e){return C2(e,"overflowY")}(t):function(e){return C2(e,"overflowX")}(t)},I2=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},O2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},R2=function(e){return[e.deltaX,e.deltaY]},P2=function(e){return e&&"current"in e?e.current:e},L2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},D2=0,M2=[];function F2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const j2=(z2=function(e){var t=he.useRef([]),n=he.useRef([0,0]),r=he.useRef(),a=he.useState(D2++)[0],o=he.useState(m2)[0],i=he.useRef(e);he.useEffect((function(){i.current=e}),[e]),he.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=T$([e.lockRef.current],(e.shards||[]).map(P2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=he.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=O2(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===u||f.contains(u)))return!1;var h=A2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=A2(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=a*r,i=n.target,s=t.contains(i),l=!1,c=o>0,u=0,d=0;do{if(!i)break;var p=I2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&N2(e,i)&&(u+=h,d+=f);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:c)}),[]),l=he.useCallback((function(e){var n=e;if(M2.length&&M2[M2.length-1]===o){var r="deltaY"in n?R2(n):O2(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a}))[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(P2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=he.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:F2(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=he.useCallback((function(e){n.current=O2(e),r.current=void 0}),[]),d=he.useCallback((function(t){c(t.type,R2(t),t.target,s(t,e.lockRef.current))}),[]),p=he.useCallback((function(t){c(t.type,O2(t),t.target,s(t,e.lockRef.current))}),[]);he.useEffect((function(){return M2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,T2),document.addEventListener("touchmove",l,T2),document.addEventListener("touchstart",u,T2),function(){M2=M2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,T2),document.removeEventListener("touchmove",l,T2),document.removeEventListener("touchstart",u,T2)}}),[]);var f=e.removeScrollBar,h=e.inert;return he.createElement(he.Fragment,null,h?he.createElement(o,{styles:L2(a)}):null,f?he.createElement(E2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},u2.useMedium(z2),c2);var z2,B2=he.forwardRef((function(e,t){return he.createElement(p2,_$({},e,{ref:t,sideCar:j2}))}));B2.classNames=p2.classNames;var H2="Popover",[U2]=fK(H2,[N1]),$2=N1(),[V2,G2]=U2(H2),q2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=$2(t),l=he.useRef(null),[c,u]=he.useState(!1),[d=!1,p]=GQ({prop:r,defaultProp:a,onChange:o});return wg.jsx(G1,{...s,children:wg.jsx(V2,{scope:t,contentId:LK(),triggerRef:l,open:d,onOpenChange:p,onOpenToggle:he.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:c,onCustomAnchorAdd:he.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:he.useCallback((()=>u(!1)),[]),modal:i,children:n})})};q2.displayName=H2;var W2="PopoverAnchor";he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=G2(W2,n),o=$2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return he.useEffect((()=>(i(),()=>s())),[i,s]),wg.jsx(q1,{...o,...r,ref:t})})).displayName=W2;var Y2="PopoverTrigger",Z2=he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=G2(Y2,n),o=$2(n),i=pK(t,a.triggerRef),s=wg.jsx(a1.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":o5(a.open),...r,ref:i,onClick:cK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:wg.jsx(q1,{asChild:!0,...o,children:s})}));Z2.displayName=Y2;var[K2,X2]=U2("PopoverPortal",{forceMount:void 0}),Q2="PopoverContent",J2=he.forwardRef(((e,t)=>{const n=X2(Q2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=G2(Q2,e.__scopePopover);return wg.jsx($Q,{present:r||o.open,children:o.modal?wg.jsx(e5,{...a,ref:t}):wg.jsx(t5,{...a,ref:t})})}));J2.displayName=Q2;var e5=he.forwardRef(((e,t)=>{const n=G2(Q2,e.__scopePopover),r=he.useRef(null),a=pK(t,r),o=he.useRef(!1);return he.useEffect((()=>{const e=r.current;if(e)return t2(e)}),[]),wg.jsx(B2,{as:e1,allowPinchZoom:!0,children:wg.jsx(n5,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:cK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:cK(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:cK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),t5=he.forwardRef(((e,t)=>{const n=G2(Q2,e.__scopePopover),r=he.useRef(!1),a=he.useRef(!1);return wg.jsx(n5,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),n5=he.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=G2(Q2,n),f=$2(n);return he.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??h1()),document.body.insertAdjacentElement("beforeend",e[1]??h1()),f1++,()=>{1===f1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),f1--}}),[]),wg.jsx(b1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:wg.jsx(u1,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:wg.jsx(W1,{"data-state":o5(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),r5="PopoverClose";he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=G2(r5,n);return wg.jsx(a1.button,{type:"button",...r,ref:t,onClick:cK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=r5;var a5=he.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=$2(n);return wg.jsx(Y1,{...a,...r,ref:t})}));function o5(e){return e?"open":"closed"}a5.displayName="PopoverArrow";var i5=q2,s5=Z2,l5=J2,c5=a5,u5=he.createContext(void 0);var d5="ScrollArea",[p5]=fK(d5),[f5,h5]=p5(d5),m5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=he.useState(null),[c,u]=he.useState(null),[d,p]=he.useState(null),[f,h]=he.useState(null),[m,g]=he.useState(null),[y,b]=he.useState(0),[v,k]=he.useState(0),[x,w]=he.useState(!1),[E,_]=he.useState(!1),S=pK(t,(e=>l(e))),T=function(e){const t=he.useContext(u5);return e||t||"ltr"}(a);return wg.jsx(f5,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:w,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:k,children:wg.jsx(kK.div,{dir:T,...i,ref:S,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})})}));m5.displayName=d5;var g5="ScrollAreaViewport",y5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=h5(g5,n),s=pK(t,he.useRef(null),i.onViewportChange);return wg.jsxs(wg.Fragment,{children:[wg.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),wg.jsx(kK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:wg.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));y5.displayName=g5;var b5="ScrollAreaScrollbar",v5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(b5,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s="horizontal"===e.orientation;return he.useEffect((()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)})),[s,o,i]),"hover"===a.type?wg.jsx(k5,{...r,ref:t,forceMount:n}):"scroll"===a.type?wg.jsx(x5,{...r,ref:t,forceMount:n}):"auto"===a.type?wg.jsx(w5,{...r,ref:t,forceMount:n}):"always"===a.type?wg.jsx(E5,{...r,ref:t}):null}));v5.displayName=b5;var k5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(b5,e.__scopeScrollArea),[o,i]=he.useState(!1);return he.useEffect((()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout((()=>i(!1)),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[a.scrollArea,a.scrollHideDelay]),wg.jsx($Q,{present:n||o,children:wg.jsx(w5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),x5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=h5(b5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=U5((()=>l("SCROLL_END")),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},he.useReducer(((e,t)=>u[e][t]??e),c));var c,u;return he.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),a.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,a.scrollHideDelay,l]),he.useEffect((()=>{const e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[a.viewport,o,l,i]),wg.jsx($Q,{present:n||"hidden"!==s,children:wg.jsx(E5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:cK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:cK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),w5=he.forwardRef(((e,t)=>{const n=h5(b5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=he.useState(!1),s="horizontal"===e.orientation,l=U5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return $5(n.viewport,l),$5(n.content,l),wg.jsx($Q,{present:r||o,children:wg.jsx(E5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),E5=he.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=h5(b5,e.__scopeScrollArea),o=he.useRef(null),i=he.useRef(0),[s,l]=he.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=M5(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const a=F5(n),o=a/2,i=t||o,s=a-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return z5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?wg.jsx(_5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=j5(a.viewport.scrollLeft,s,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?wg.jsx(S5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=j5(a.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null})),_5=he.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=h5(b5,e.__scopeScrollArea),[i,s]=he.useState(),l=he.useRef(null),c=pK(t,l,o.onScrollbarXChange);return he.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),wg.jsx(A5,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":F5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),B5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:D5(i.paddingLeft),paddingEnd:D5(i.paddingRight)}})}})})),S5=he.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=h5(b5,e.__scopeScrollArea),[i,s]=he.useState(),l=he.useRef(null),c=pK(t,l,o.onScrollbarYChange);return he.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),wg.jsx(A5,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":F5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),B5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:D5(i.paddingTop),paddingEnd:D5(i.paddingBottom)}})}})})),[T5,C5]=p5(b5),A5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=h5(b5,n),[h,m]=he.useState(null),g=pK(t,(e=>m(e))),y=he.useRef(null),b=he.useRef(""),v=f.viewport,k=r.content-r.viewport,x=xK(u),w=xK(l),E=U5(d,10);function _(e){if(y.current){const t=e.clientX-y.current.left,n=e.clientY-y.current.top;c({x:t,y:n})}}return he.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[v,h,k,x]),he.useEffect(w,[r,w]),$5(h,E),$5(f.content,E),wg.jsx(T5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:xK(o),onThumbPointerUp:xK(i),onThumbPositionChange:w,onThumbPointerDown:xK(s),children:wg.jsx(kK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:cK(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),y.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),_(e)}})),onPointerMove:cK(e.onPointerMove,_),onPointerUp:cK(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,f.viewport&&(f.viewport.style.scrollBehavior=""),y.current=null}))})})})),N5="ScrollAreaThumb",I5=he.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=C5(N5,e.__scopeScrollArea);return wg.jsx($Q,{present:n||a.hasThumb,children:wg.jsx(O5,{ref:t,...r})})})),O5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=h5(N5,n),i=C5(N5,n),{onThumbPositionChange:s}=i,l=pK(t,(e=>i.onThumbChange(e))),c=he.useRef(void 0),u=U5((()=>{c.current&&(c.current(),c.current=void 0)}),100);return he.useEffect((()=>{const e=o.viewport;if(e){const t=()=>{if(u(),!c.current){const t=H5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),wg.jsx(kK.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:cK(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})})),onPointerUp:cK(e.onPointerUp,i.onThumbPointerUp)})}));I5.displayName=N5;var R5="ScrollAreaCorner",P5=he.forwardRef(((e,t)=>{const n=h5(R5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?wg.jsx(L5,{...e,ref:t}):null}));P5.displayName=R5;var L5=he.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=h5(R5,n),[o,i]=he.useState(0),[s,l]=he.useState(0),c=Boolean(o&&s);return $5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),$5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?wg.jsx(kK.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null}));function D5(e){return e?parseInt(e,10):0}function M5(e,t){const n=e/t;return isNaN(n)?0:n}function F5(e){const t=M5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function j5(e,t,n="ltr"){const r=F5(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-r,l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,i]:[-1*i,0]);return z5([0,i],[0,s])(l)}function z5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function B5(e,t){return e>0&&e<t}var H5=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,s=n.top!==o.top;(i||s)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function U5(e,t){const n=xK(e),r=he.useRef(0);return he.useEffect((()=>()=>window.clearTimeout(r.current)),[]),he.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function $5(e,t){const n=xK(t);OK((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}var V5=m5,G5=y5,q5=P5;function W5(e,[t,n]){return Math.min(n,Math.max(t,e))}function Y5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function Z5(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>he.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return he.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=he.createContext(r);a.displayName=t+"Context";const o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=he.useMemo((()=>s),Object.values(s));return wg.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=he.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},K5(r,...t)]}function K5(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return he.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function X5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Q5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=X5(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():X5(e[t],null)}}}}function J5(...e){return he.useCallback(Q5(...e),e)}var e3=Symbol.for("react.lazy"),t3=ge[" use ".trim().toString()];function n3(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===e3&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function r3(e){const t=a3(e),n=he.forwardRef(((e,n)=>{let{children:r,...a}=e;n3(r)&&"function"==typeof t3&&(r=t3(r._payload));const o=he.Children.toArray(r),i=o.find(i3);if(i){const e=i.props.children,r=o.map((t=>t===i?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(t,{...a,ref:n,children:he.isValidElement(e)?he.cloneElement(e,void 0,r):null})}return wg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function a3(e){const t=he.forwardRef(((e,t)=>{let{children:n,...r}=e;if(n3(n)&&"function"==typeof t3&&(n=t3(n._payload)),he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==he.Fragment&&(a.ref=t?Q5(t,e):e),he.cloneElement(n,a)}return he.Children.count(n)>1?he.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var o3=Symbol("radix.slottable");function i3(e){return he.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===o3}var s3=he.createContext(void 0);function l3(e){const t=he.useContext(s3);return e||t||"ltr"}function c3(e){const t=u3(e),n=he.forwardRef(((e,n)=>{const{children:r,...a}=e,o=he.Children.toArray(r),i=o.find(p3);if(i){const e=i.props.children,r=o.map((t=>t===i?he.Children.count(e)>1?he.Children.only(null):he.isValidElement(e)?e.props.children:null:t));return wg.jsx(t,{...a,ref:n,children:he.isValidElement(e)?he.cloneElement(e,void 0,r):null})}return wg.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function u3(e){const t=he.forwardRef(((e,t)=>{const{children:n,...r}=e;if(he.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==he.Fragment&&(a.ref=t?Q5(t,e):e),he.cloneElement(n,a)}return he.Children.count(n)>1?he.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var d3=Symbol("radix.slottable");function p3(e){return he.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===d3}var f3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=c3(`Primitive.${t}`),r=he.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function h3(e){const t=he.useRef(e);return he.useEffect((()=>{t.current=e})),he.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}var m3,g3="dismissableLayer.update",y3="dismissableLayer.pointerDownOutside",b3="dismissableLayer.focusOutside",v3=he.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),k3=he.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=he.useContext(v3),[u,d]=he.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=he.useState({}),h=J5(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=h3(e),r=he.useRef(!1),a=he.useRef((()=>{}));return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){w3(y3,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=h3(e),r=he.useRef(!1);return he.useEffect((()=>{const e=e=>{if(e.target&&!r.current){w3(b3,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=h3(e);he.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),he.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(m3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),x3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=m3)}}),[u,p,n,c]),he.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),x3())}),[u,c]),he.useEffect((()=>{const e=()=>f({});return document.addEventListener(g3,e),()=>document.removeEventListener(g3,e)}),[]),wg.jsx(f3.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:Y5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Y5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Y5(e.onPointerDownCapture,x.onPointerDownCapture)})}));k3.displayName="DismissableLayer";function x3(){const e=new CustomEvent(g3);document.dispatchEvent(e)}function w3(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&Ce.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}he.forwardRef(((e,t)=>{const n=he.useContext(v3),r=he.useRef(null),a=J5(t,r);return he.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),wg.jsx(f3.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var E3=0;function _3(){he.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??S3()),document.body.insertAdjacentElement("beforeend",e[1]??S3()),E3++,()=>{1===E3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),E3--}}),[])}function S3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var T3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=r3(`Primitive.${t}`),r=he.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),wg.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),C3="focusScope.autoFocusOnMount",A3="focusScope.autoFocusOnUnmount",N3={bubbles:!1,cancelable:!0},I3=he.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=he.useState(null),c=h3(a),u=h3(o),d=he.useRef(null),p=J5(t,(e=>l(e))),f=he.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;he.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:L3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||L3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&L3(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),he.useEffect((()=>{if(s){D3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(C3,N3);s.addEventListener(C3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(L3(r,{select:t}),document.activeElement!==n)return}((e=O3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&L3(s))}return()=>{s.removeEventListener(C3,c),setTimeout((()=>{const e=new CustomEvent(A3,N3);s.addEventListener(A3,u),s.dispatchEvent(e),e.defaultPrevented||L3(t??document.body,{select:!0}),s.removeEventListener(A3,u),D3.remove(f)}),0)}}var e}),[s,c,u,f]);const h=he.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=O3(e),n=R3(t,e),r=R3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&L3(o,{select:!0})):(e.preventDefault(),n&&L3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return wg.jsx(T3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function O3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function R3(e,t){for(const n of e)if(!P3(n,{upTo:t}))return n}function P3(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function L3(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}I3.displayName="FocusScope";var D3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=M3(e,t),e.unshift(t)},remove(t){var n;e=M3(e,t),null==(n=e[0])||n.resume()}}}();function M3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var F3=he.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return wg.jsx(f3.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:wg.jsx("polygon",{points:"0,0 30,0 15,10"})})}));F3.displayName="Arrow";var j3=F3;function z3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>he.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return he.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=he.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=he.useMemo((()=>s),Object.values(s));return wg.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=he.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},B3(r,...t)]}function B3(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return he.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var H3="Popper",[U3,$3]=z3(H3),[V3,G3]=U3(H3),q3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=he.useState(null);return wg.jsx(V3,{scope:t,anchor:r,onAnchorChange:a,children:n})};q3.displayName=H3;var W3="PopperAnchor",Y3=he.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=G3(W3,n),i=he.useRef(null),s=J5(t,i),l=he.useRef(null);return he.useEffect((()=>{const e=l.current;l.current=(null==r?void 0:r.current)||i.current,e!==l.current&&o.onAnchorChange(l.current)})),r?null:wg.jsx(f3.div,{...a,ref:s})}));Y3.displayName=W3;var Z3="PopperContent",[K3,X3]=U3(Z3),Q3=he.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=G3(Z3,l),[E,_]=he.useState(null),S=J5(t,(e=>_(e))),[T,C]=he.useState(null),A=function(e){const[t,n]=he.useState(void 0);return aR((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(n4),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=uQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>KX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[dQ({mainAxis:u+I,alignmentAxis:p}),h&&pQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?fQ():void 0,...D}),h&&hQ({...D}),mQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&yQ({element:T,padding:f}),r4({arrowWidth:N,arrowHeight:I}),b&&gQ({strategy:"referenceHidden",...D})]}),[H,U]=a4(j),$=h3(k);aR((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=he.useState();return aR((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),wg.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:wg.jsx(K3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:wg.jsx(f3.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));Q3.displayName=Z3;var J3="PopperArrow",e4={top:"bottom",right:"left",bottom:"top",left:"right"},t4=he.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=X3(J3,n),o=e4[a.placedSide];return wg.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:wg.jsx(j3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function n4(e){return null!==e}t4.displayName=J3;var r4=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=a4(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function a4(e){const[t,n="center"]=e.split("-");return[t,n]}var o4=q3,i4=Y3,s4=Q3,l4=t4,c4=he.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=he.useState(!1);aR((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?Ae.createPortal(wg.jsx(T3.div,{...a,ref:t}),s):null}));c4.displayName="Portal";const u4=[" ","Enter","ArrowUp","ArrowDown"],d4=[" ","Enter"],p4="Select",[f4,h4,m4]=function(e){const t=e+"CollectionProvider",[n,r]=Z5(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=me.useRef(null),o=me.useRef(new Map).current;return wg.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=r3(s),c=me.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=J5(t,o(s,n).collectionRef);return wg.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=r3(u),f=me.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=me.useRef(null),s=J5(t,i),l=o(u,n);return me.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),wg.jsx(p,{[d]:"",ref:s,children:r})}));return f.displayName=u,[{Provider:i,Slot:c,ItemSlot:f},function(t){const n=o(e+"CollectionConsumer",t);return me.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(p4),[g4]=Z5(p4,[m4,$3]),y4=$3(),[b4,v4]=g4(p4),[k4,x4]=g4(p4),w4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:c,disabled:u,required:d}=e,p=y4(t),[f,h]=he.useState(null),[m,g]=he.useState(null),[y,b]=he.useState(!1),v=l3(c),[k,x]=eK({prop:r,defaultProp:a??!1,onChange:o,caller:p4}),[w,E]=eK({prop:i,defaultProp:s,onChange:l,caller:p4}),_=he.useRef(null),[S,T]=he.useState(new Set);return wg.jsx(o4,{...p,children:wg.jsx(b4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:sR(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:wg.jsx(f4.Provider,{scope:t,children:wg.jsx(k4,{scope:e.__scopeSelect,onNativeOptionAdd:he.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:he.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:n})})})})};w4.displayName=p4;const E4="SelectTrigger",_4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=y4(n),i=v4(E4,n),s=i.disabled||r,l=J5(t,i.onTriggerChange),c=h4(n),u=he.useRef("touch"),[d,p,f]=a6((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=o6(t,e,n);void 0!==r&&i.onValueChange(r.value)})),h=e=>{s||(i.onOpenChange(!0),f()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return wg.jsx(i4,{asChild:!0,...o,children:wg.jsx(T3.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":r6(i.value)?"":void 0,...a,ref:l,onClick:Y5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:Y5(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:Y5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||u4.includes(e.key)&&(h(),e.preventDefault())}))})})}));_4.displayName=E4;const S4="SelectValue",T4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=v4(S4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=J5(t,l.onValueNodeChange);return aR((()=>{c(u)}),[c,u]),wg.jsx(T3.span,{...s,ref:d,style:{pointerEvents:"none"},children:r6(l.value)?wg.jsx(wg.Fragment,{children:i}):o})}));T4.displayName=S4;const C4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return wg.jsx(T3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));C4.displayName="SelectIcon";const A4="SelectContent",N4=he.forwardRef(((e,t)=>{const n=v4(A4,e.__scopeSelect),[r,a]=he.useState();if(aR((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?Ce.createPortal(wg.jsx(O4,{scope:e.__scopeSelect,children:wg.jsx(f4.Slot,{scope:e.__scopeSelect,children:wg.jsx("div",{children:e.children})})}),t):null}return wg.jsx(L4,{...e,ref:t})}));N4.displayName=A4;const I4=10,[O4,R4]=g4(A4),P4=r3("SelectContent.RemoveScroll"),L4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g,...y}=e,b=v4(A4,n),[v,k]=he.useState(null),[x,w]=he.useState(null),E=J5(t,(e=>k(e))),[_,S]=he.useState(null),[T,C]=he.useState(null),A=h4(n),[N,I]=he.useState(!1),O=he.useRef(!1);he.useEffect((()=>{if(v)return t2(v)}),[v]),_3();const R=he.useCallback((e=>{const[t,...n]=A().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const o of e){if(o===a)return;if(null==o||o.scrollIntoView({block:"nearest"}),o===t&&x&&(x.scrollTop=0),o===r&&x&&(x.scrollTop=x.scrollHeight),null==o||o.focus(),document.activeElement!==a)return}}),[A,x]),P=he.useCallback((()=>R([_,v])),[R,_,v]);he.useEffect((()=>{N&&P()}),[N,P]);const{onOpenChange:L,triggerPointerDownPosRef:D}=b;he.useEffect((()=>{if(v){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=D.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=D.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():v.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[v,L,D]),he.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[M,F]=a6((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=o6(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),j=he.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(S(e),r&&(O.current=!0))}),[b.value]),z=he.useCallback((()=>null==v?void 0:v.focus()),[v]),B=he.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),H="popper"===r?M4:D4,U=H===M4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return wg.jsx(O4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:N,searchRef:M,children:wg.jsx(B2,{as:P4,allowPinchZoom:!0,removeScrollBar:!1,children:wg.jsx(I3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Y5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:wg.jsx(k3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:wg.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Y5(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=A().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));L4.displayName="SelectContentImpl";const D4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=v4(A4,n),i=R4(A4,n),[s,l]=he.useState(null),[c,u]=he.useState(null),d=J5(t,(e=>u(e))),p=h4(n),f=he.useRef(!1),h=he.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,v=he.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&g&&y){const e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=y.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-I4,d=W5(o,[I4,Math.max(I4,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-I4,d=W5(o,[I4,Math.max(I4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*I4,u=m.scrollHeight,d=window.getComputedStyle(c),h=Number.parseInt(d.borderTopWidth,10),b=Number.parseInt(d.paddingTop,10),v=Number.parseInt(d.borderBottomWidth,10),k=h+b+u+Number.parseInt(d.paddingBottom,10)+v,x=Math.min(5*g.offsetHeight,k),w=window.getComputedStyle(m),E=Number.parseInt(w.paddingTop,10),_=Number.parseInt(w.paddingBottom,10),S=e.top+e.height/2-I4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),N=k-A;if(A<=S){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=A+Math.max(T,C+(e?_:0)+t+v);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?E:0)+C)+N;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${I4}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>f.current=!0))}}),[p,o.trigger,o.valueNode,s,c,m,g,y,o.dir,r]);aR((()=>v()),[v]);const[k,x]=he.useState();aR((()=>{c&&x(window.getComputedStyle(c).zIndex)}),[c]);const w=he.useCallback((e=>{e&&!0===h.current&&(v(),null==b||b(),h.current=!1)}),[v,b]);return wg.jsx(F4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:wg.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:wg.jsx(T3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));D4.displayName="SelectItemAlignedPosition";const M4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=I4,...o}=e,i=y4(n);return wg.jsx(s4,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));M4.displayName="SelectPopperPosition";const[F4,j4]=g4(A4,{}),z4="SelectViewport",B4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=R4(z4,n),i=j4(z4,n),s=J5(t,o.onViewportChange),l=he.useRef(0);return wg.jsxs(wg.Fragment,{children:[wg.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),wg.jsx(f4.Slot,{scope:n,children:wg.jsx(T3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Y5(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if((null==r?void 0:r.current)&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*I4,a=Number.parseFloat(n.style.minHeight),o=Number.parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))})})]})}));B4.displayName=z4;const H4="SelectGroup",[U4,$4]=g4(H4);he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=sR();return wg.jsx(U4,{scope:n,id:a,children:wg.jsx(T3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=H4;const V4="SelectLabel";he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=$4(V4,n);return wg.jsx(T3.div,{id:a.id,...r,ref:t})})).displayName=V4;const G4="SelectItem",[q4,W4]=g4(G4),Y4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=v4(G4,n),l=R4(G4,n),c=s.value===r,[u,d]=he.useState(o??""),[p,f]=he.useState(!1),h=J5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=sR(),g=he.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return wg.jsx(q4,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:he.useCallback((e=>{d((t=>t||((null==e?void 0:e.textContent)??"").trim()))}),[]),children:wg.jsx(f4.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:wg.jsx(T3.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:Y5(i.onFocus,(()=>f(!0))),onBlur:Y5(i.onBlur,(()=>f(!1))),onClick:Y5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:Y5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:Y5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:Y5(i.onPointerMove,(e=>{var t;g.current=e.pointerType,a?null==(t=l.onItemLeave)||t.call(l):"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:Y5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:Y5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(d4.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));Y4.displayName=G4;const Z4="SelectItemText",K4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=v4(Z4,n),s=R4(Z4,n),l=W4(Z4,n),c=x4(Z4,n),[u,d]=he.useState(null),p=J5(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,l.value,l.disabled)})),f=null==u?void 0:u.textContent,h=he.useMemo((()=>wg.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return aR((()=>(m(h),()=>g(h))),[m,g,h]),wg.jsxs(wg.Fragment,{children:[wg.jsx(T3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Ce.createPortal(o.children,i.valueNode):null]})}));K4.displayName=Z4;const X4="SelectItemIndicator",Q4=he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return W4(X4,n).isSelected?wg.jsx(T3.span,{"aria-hidden":!0,...r,ref:t}):null}));Q4.displayName=X4;const J4="SelectScrollUpButton";he.forwardRef(((e,t)=>{const n=R4(J4,e.__scopeSelect),r=j4(J4,e.__scopeSelect),[a,o]=he.useState(!1),i=J5(t,r.onScrollButtonChange);return aR((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?wg.jsx(t6,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=J4;const e6="SelectScrollDownButton";he.forwardRef(((e,t)=>{const n=R4(e6,e.__scopeSelect),r=j4(e6,e.__scopeSelect),[a,o]=he.useState(!1),i=J5(t,r.onScrollButtonChange);return aR((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?wg.jsx(t6,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=e6;const t6=he.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=R4("SelectScrollButton",n),i=he.useRef(null),s=h4(n),l=he.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return he.useEffect((()=>()=>l()),[l]),aR((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})}),[s]),wg.jsx(T3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Y5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:Y5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:Y5(a.onPointerLeave,(()=>{l()}))})}));he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return wg.jsx(T3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const n6="SelectArrow";function r6(e){return""===e||void 0===e}function a6(e){const t=h3(e),n=he.useRef(""),r=he.useRef(0),a=he.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=he.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return he.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function o6(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map(((e,t)=>i[(s+t)%i.length])));var i,s;1===r.length&&(o=o.filter((e=>e!==n)));const l=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}he.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=y4(n),o=v4(n6,n),i=R4(n6,n);return o.open&&"popper"===i.position?wg.jsx(l4,{...a,...r,ref:t}):null})).displayName=n6;const i6=w4,s6=_4,l6=T4,c6=C4,u6=N4,d6=B4,p6=Y4,f6=K4,h6=Q4;var m6=(e,t=[])=>({parts:(...n)=>{if(y6(t))return m6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>m6(e,[...t,...n]),omit:(...n)=>m6(e,t.filter((e=>!n.includes(e)))),rename:e=>m6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${g6(e)}"][data-part="${g6(n)}"]`,`& [data-scope="${g6(e)}"][data-part="${g6(n)}"]`].join(", "),attrs:{"data-scope":g6(e),"data-part":g6(n)}}})),{})}),g6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),y6=e=>0===e.length,b6=m6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),v6=Object.defineProperty,k6=(e,t,n)=>((e,t,n)=>t in e?v6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),x6={itemToValue:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:Gq(e)&&Wq(e,"label")?e.label:x6.itemToValue(e),isItemDisabled:e=>!(!Gq(e)||!Wq(e,"disabled"))&&!!e.disabled},w6=class e{constructor(t){this.options=t,k6(this,"items"),k6(this,"indexMap",null),k6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),k6(this,"isEqual",(e=>$q(this.items,e.items))),k6(this,"setItems",(e=>this.copy(e))),k6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),k6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),k6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),k6(this,"at",(e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;const n=this.group();for(const[,r]of n)for(const n of r){if(t===e)return n;t++}return null})),k6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),k6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),k6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??x6.itemToValue(e)})),k6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??x6.isItemDisabled(e))})),k6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??x6.itemToString(e)})),k6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),k6(this,"stringifyItems",((e,t=", ")=>{const n=[];for(const r of e){const e=this.stringifyItem(r);null!=e&&n.push(e)}return n.join(t)})),k6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),k6(this,"has",(e=>-1!==this.indexOf(e))),k6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),k6(this,"group",(()=>{const{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];const n=new Map;this.items.forEach(((t,r)=>{const a=e(t,r);n.has(a)||n.set(a,[]),n.get(a).push(t)}));let r=Array.from(n.entries());return t&&r.sort((([e],[n])=>{if("function"==typeof t)return t(e,n);if(Array.isArray(t)){const r=t.indexOf(e),a=t.indexOf(n);return-1===r?1:-1===a?-1:r-a}return"asc"===t?e.localeCompare(n):"desc"===t?n.localeCompare(e):0})),r})),k6(this,"getNextValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))})),k6(this,"getPreviousValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))})),k6(this,"indexOf",(e=>{if(null==e)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex((t=>this.getItemValue(t)===e));if(!this.indexMap){this.indexMap=new Map;let e=0;const t=this.group();for(const[,n]of t)for(const t of n){const n=this.getItemValue(t);null!=n&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1})),k6(this,"getByText",((e,t)=>{const n=null!=t?this.indexOf(t):-1,r=1===e.length;for(let a=0;a<this.items.length;a++){const o=this.items[(n+a+1)%this.items.length];if((!r||this.getItemValue(o)!==t)&&(!this.getItemDisabled(o)&&E6(this.stringifyItem(o),e)))return o}})),k6(this,"search",((e,t)=>{const{state:n,currentValue:r,timeout:a=350}=t,o=n.keysSoFar+e,i=o.length>1&&Array.from(o).every((e=>e===o[0]))?o[0]:o,s=this.getByText(i,r),l=this.getItemValue(s);function c(){clearTimeout(n.timer),n.timer=-1}return function e(t){n.keysSoFar=t,c(),""!==t&&(n.timer=+setTimeout((()=>{e(""),c()}),a))}(o),l})),k6(this,"update",((e,t)=>{let n=this.indexOf(e);return-1===n?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])})),k6(this,"upsert",((e,t,n="append")=>{let r=this.indexOf(e);if(-1===r){return("append"===n?this.append:this.prepend)(t)}return this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])})),k6(this,"insert",((e,...t)=>this.copy(_6(this.items,e,...t)))),k6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(_6(this.items,n,...t))})),k6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(_6(this.items,n+1,...t))})),k6(this,"prepend",((...e)=>this.copy(_6(this.items,0,...e)))),k6(this,"append",((...e)=>this.copy(_6(this.items,this.items.length,...e)))),k6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),k6(this,"remove",((...e)=>{const t=e.map((e=>"string"==typeof e?e:this.getItemValue(e)));return this.copy(this.items.filter((e=>{const n=this.getItemValue(e);return null!=n&&!t.includes(n)})))})),k6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(S6(this.items,[n],t))})),k6(this,"moveBefore",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(S6(this.items,r,n))})),k6(this,"moveAfter",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(S6(this.items,r,n+1))})),k6(this,"reorder",((e,t)=>this.copy(S6(this.items,[e],t)))),k6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),k6(this,"range",((e,t)=>{let n=[],r=e;for(;null!=r;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]})),k6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),k6(this,"toString",(()=>{let e="";for(const t of this.items){e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+","}return e})),k6(this,"toJSON",(()=>({size:this.size,first:this.firstValue,last:this.lastValue}))),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},E6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function _6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function S6(e,t,n){const r=(t=[...t].sort(((e,t)=>e-t))).map((t=>e[t]));for(let a=t.length-1;a>=0;a--)e=[...e.slice(0,t[a]),...e.slice(t[a]+1)];return n=Math.max(0,n-t.filter((e=>e<n)).length),[...e.slice(0,n),...r,...e.slice(n)]}function T6({values:e,collection:t,selectedItemMap:n}){const r=[];for(const a of e){const e=t.find(a)??n.get(a);null!=e&&r.push(e)}return r}function C6({selectedItemMap:e,values:t,selectedItems:n,collection:r}){const a=new Map(e);for(const i of n){const e=r.getItemValue(i);null!=e&&a.set(e,i)}const o=new Set(t);for(const i of a.keys())o.has(i)||a.delete(i);return a}function A6({values:e,collection:t,selectedItemMap:n}){const r=T6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:C6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function N6({selectedItems:e,collection:t}){return C6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var I6=e=>new w6(e);function O6(e=0,t=0,n=0,r=0){if("function"==typeof DOMRect)return new DOMRect(e,t,n,r);const a={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...a,toJSON:()=>a}}function R6(e,t){return{contextElement:AW(e)?e:null==e?void 0:e.contextElement,getBoundingClientRect:()=>{const n=e,r=null==t?void 0:t(n);return r||!n?function(e){if(!e)return O6();const{x:t,y:n,width:r,height:a}=e;return O6(t,n,r,a)}(r):n.getBoundingClientRect()}}}I6.empty=()=>new w6({items:[]});var P6=e=>({variable:e,reference:`var(${e})`}),L6={arrowSize:P6("--arrow-size"),arrowSizeHalf:P6("--arrow-size-half"),arrowBg:P6("--arrow-background"),transformOrigin:P6("--transform-origin"),arrowOffset:P6("--arrow-offset")};function D6(e,t){return{name:"transformOrigin",fn(n){var r,a,o,i;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,p=c.split("-")[0],f=(e=>"top"===e||"bottom"===e?"y":"x")(p),h=(null==(r=l.arrow)?void 0:r.x)||0,m=(null==(a=l.arrow)?void 0:a.y)||0,g=(null==t?void 0:t.clientWidth)||0,y=(null==t?void 0:t.clientHeight)||0,b=h+g/2,v=m+y/2,k=Math.abs((null==(o=l.shift)?void 0:o.y)||0),x=u.reference.height/2,w=y/2,E=(null==(i=e.offset)?void 0:i.mainAxis)??e.gutter,_="number"==typeof E?E+w:E??w,S=k>_,T={top:`${b}px calc(100% + ${_}px)`,bottom:`${b}px ${-_}px`,left:`calc(100% + ${_}px) ${v}px`,right:`${-_}px ${v}px`}[p],C=`${b}px ${u.reference.y+x-d}px`,A=Boolean(e.overlap)&&"y"===f&&S;return s.floating.style.setProperty(L6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var M6={name:"rects",fn:({rects:e})=>({data:e})},F6=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:a}=n.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=r?`${r}px`:"",top:null!=a?`${a}px`:"",[o]:`calc(100% + ${L6.arrowOffset.reference})`}),{}}}};var j6={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function z6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function B6(e,t){return null!=e&&Math.abs(e-t)<.5}function H6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function U6(e,t,n){const r=e||t.createElement("div");return nQ({element:r,padding:n.arrowPadding})}function $6(e,t){if(null!=(t.offset??t.gutter))return XX((({placement:n})=>{var r,a;const o=((null==e?void 0:e.clientHeight)||0)/2,i=(null==(r=t.offset)?void 0:r.mainAxis)??t.gutter,s="number"==typeof i?i+o:i??o,{hasAlign:l}=function(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:null!=n}}(n),c=l?void 0:t.shift;return nW({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function V6(e){if(!e.flip)return;const t=H6(e.boundary);return JX({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function G6(e){if(!e.slide&&!e.overlap)return;const t=H6(e.boundary);return QX({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:rQ()})}function q6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return eQ({padding:e.overflowPadding,apply({elements:e,rects:o,availableHeight:i,availableWidth:s}){const l=e.floating,c=Math.round(o.reference.width),u=Math.round(o.reference.height);s=Math.floor(s),i=Math.floor(i),B6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),B6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),B6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),B6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function W6(e){if(e.hideWhenDetached)return tQ({strategy:"referenceHidden",boundary:H6(e.boundary)??"clippingAncestors"})}var Y6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],Z6=["top","right","bottom","left"];function K6(e,t){if(!e)return Jq;const n=new Map(t.map((t=>[t,e.style.getPropertyValue(t)])));return()=>{n.forEach(((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)})),0===e.style.length&&e.removeAttribute("style")}}function X6(e,t,n={}){const{defer:r,...a}=n,o=r?_Y:e=>e(),i=[];return i.push(o((()=>{const n="function"==typeof e?e():e,r="function"==typeof t?t():t;i.push(function(e,t,n={}){var r;const a=R6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},j6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?K6(t,Y6):void 0,l=o.restoreStyles?K6(i,Z6):void 0,c=[$6(i,o),V6(o),G6(o),U6(i,t.ownerDocument,o),F6(i),D6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),q6(o),W6(o),M6],{placement:u,strategy:d,onComplete:p,onPositioned:f}=o;let h,m,g=!1;const y=async()=>{var e;if(!a||!t)return;const n=await aQ(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=jW(t),i=z6(r,n.x),s=z6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,B6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),B6(m,s)||(t.style.setProperty("--y",`${s}px`),m=s),o.hideWhenDetached&&((null==(e=n.middlewareData.hide)?void 0:e.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events"))),!g){const e=t.firstElementChild;e&&(t.style.setProperty("--z-index",$W(e).zIndex),g=!0)}},b=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:y,floatingElement:t}),null==f||f({placed:!0})):await y()},v=function(e){return e?!0===e?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}(o.listeners),k=o.listeners?KX(a,t,b,v):Jq;return b(),()=>{null==k||k(),null==l||l(),null==s||s(),null==f||f({placed:!1})}}(n,r,a))}))),()=>{i.forEach((e=>null==e?void 0:e()))}}var Q6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var J6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},e8=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},t8=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},n8=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},r8=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},a8=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},o8=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},i8=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroup)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup:${t}`},s8=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroupLabel)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup-label:${t}`},l8=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.item)?void 0:r.call(n,t))??`combobox:${e.id}:option:${t}`},c8=e=>e.getById(n8(e)),u8=e=>e.getById(t8(e)),d8=e=>e.getById(r8(e)),p8=e=>e.getById(e8(e)),f8=e=>e.getById(a8(e)),h8=(e,t)=>{if(null==t)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return function(e,t){return(null==e?void 0:e.querySelector(t))??null}(c8(e),n)},m8=e=>{const t=u8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),EW(t)};function g8(e,t){const{context:n,prop:r,state:a,send:o,scope:i,computed:s,event:l}=e,c=r("translations"),u=r("collection"),d=!!r("disabled"),p=s("isInteractive"),f=!!r("invalid"),h=!!r("required"),m=!!r("readOnly"),g=a.hasTag("open"),y=a.hasTag("focused"),b=r("composite"),v=n.get("highlightedValue"),k=function(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:a="absolute"}=e;return{arrow:{position:"absolute",width:L6.arrowSize.reference,height:L6.arrowSize.reference,[L6.arrowSizeHalf.variable]:`calc(${L6.arrowSize.reference} / 2)`,[L6.arrowOffset.variable]:`calc(${L6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Q6[t.split("-")[0]]:void 0,background:L6.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:a,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}({...r("positioning"),placement:n.get("currentPlacement")});function x(e){const t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return oW(r,(()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`)),{value:r,disabled:Boolean(d||t),highlighted:v===r,selected:n.get("value").includes(r)}}return{focused:y,open:g,inputValue:n.get("inputValue"),highlightedValue:v,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:s("valueAsString"),hasSelectedItems:s("hasSelectedItems"),selectedItems:s("selectedItems"),collection:r("collection"),multiple:!!r("multiple"),disabled:!!d,syncSelectedItems(){o({type:"SELECTED_ITEMS.SYNC"})},reposition(e={}){o({type:"POSITIONING.SET",options:e})},setHighlightValue(e){o({type:"HIGHLIGHTED_VALUE.SET",value:e})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(e){o({type:"ITEM.SELECT",value:e})},setValue(e){o({type:"VALUE.SET",value:e})},setInputValue(e,t="script"){o({type:"INPUT_VALUE.SET",value:e,src:t})},clearValue(e){o(null!=e?{type:"ITEM.CLEAR",value:e}:{type:"VALUE.CLEAR"})},focus(){var e;null==(e=u8(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...b6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":TW(f),"data-readonly":TW(m)});var e,n},getLabelProps:()=>t.label({...b6.label.attrs,dir:r("dir"),htmlFor:t8(i),id:J6(i),"data-readonly":TW(m),"data-disabled":TW(d),"data-invalid":TW(f),"data-required":TW(h),"data-focus":TW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=f8(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...b6.control.attrs,dir:r("dir"),id:e8(i),"data-state":g?"open":"closed","data-focus":TW(y),"data-disabled":TW(d),"data-invalid":TW(f)}),getPositionerProps:()=>t.element({...b6.positioner.attrs,dir:r("dir"),id:r8(i),style:k.floating}),getInputProps:()=>t.input({...b6.input.attrs,dir:r("dir"),"aria-invalid":CW(f),"data-invalid":TW(f),"data-autofocus":TW(r("autoFocus")),name:r("name"),form:r("form"),disabled:d,required:r("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:m,placeholder:r("placeholder"),id:t8(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":n8(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?l8(i,v):void 0,onClick(e){e.defaultPrevented||r("openOnClick")&&p&&o({type:"INPUT.CLICK",src:"input-click"})},onFocus(){d||o({type:"INPUT.FOCUS"})},onBlur(){d||o({type:"INPUT.BLUR"})},onChange(e){o({type:"INPUT.CHANGE",value:e.currentTarget.value,src:"input-change"})},onKeyDown(e){if(e.defaultPrevented)return;if(!p)return;if(e.ctrlKey||e.shiftKey||function(e){return function(e){return e.nativeEvent??e}(e).isComposing||229===e.keyCode}(e))return;const t=r("openOnKeyPress"),n=e.ctrlKey||e.metaKey||e.shiftKey,a=!0,l={ArrowDown(e){(t||g)&&(o({type:e.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:a,src:"arrow-key"}),e.preventDefault())},ArrowUp(){(t||g)&&(o({type:e.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:a,src:"arrow-key"}),e.preventDefault())},Home(e){n||(o({type:"INPUT.HOME",keypress:a}),g&&e.preventDefault())},End(e){n||(o({type:"INPUT.END",keypress:a}),g&&e.preventDefault())},Enter(e){var t;o({type:"INPUT.ENTER",keypress:a,src:"item-select"});const n=s("isCustomValue")&&r("allowCustomValue"),l=null!=v,c=r("alwaysSubmitOnEnter");if(g&&!n&&!c&&l&&e.preventDefault(),null==v)return;const u=h8(i,v);var d;(null==(d=u)?void 0:d.matches("a[href]"))&&(null==(t=r("navigate"))||t({value:v,node:u,href:u.href}))},Escape(){o({type:"INPUT.ESCAPE",keypress:a,src:"escape-key"}),e.preventDefault()}}[cY(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...b6.trigger.attrs,dir:r("dir"),id:a8(i),"aria-haspopup":b?"listbox":"dialog",type:"button",tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":g,"data-state":g?"open":"closed","aria-controls":g?n8(i):void 0,disabled:d,"data-invalid":TW(f),"data-focusable":TW(e.focusable),"data-readonly":TW(m),"data-disabled":TW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&oY(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&oY(e)&&(e.preventDefault(),queueMicrotask((()=>{m8(i)})))},onKeyDown(e){if(e.defaultPrevented)return;if(b)return;const t={ArrowDown(){o({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){o({type:"INPUT.ARROW_UP",src:"arrow-key"})}}[cY(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...b6.content.attrs,dir:r("dir"),id:n8(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":J6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":TW(0===u.size),onPointerDown(e){oY(e)&&e.preventDefault()}}),getListProps:()=>t.element({...b6.list.attrs,role:b?void 0:"listbox","data-empty":TW(0===u.size),"aria-labelledby":J6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...b6.clearTrigger.attrs,dir:r("dir"),id:o8(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":TW(f),"aria-label":c.clearTriggerLabel,"aria-controls":t8(i),hidden:!n.get("value").length,onPointerDown(e){oY(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||p&&o({type:"VALUE.CLEAR",src:"clear-trigger"})}}),getItemState:x,getItemProps(e){const n=x(e),a=n.value;return t.element({...b6.item.attrs,dir:r("dir"),id:l8(i,a),role:"option",tabIndex:-1,"data-highlighted":TW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":CW(n.selected),"aria-disabled":CW(n.disabled),"data-disabled":TW(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||o({type:"ITEM.POINTER_MOVE",value:a})},onPointerLeave(){if(e.persistFocus)return;if(n.disabled)return;const t=l.previous();(null==t?void 0:t.type.includes("POINTER"))&&o({type:"ITEM.POINTER_LEAVE",value:a})},onClick(e){(function(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)})(e)||rY(e)||iY(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...b6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":TW(n.disabled),"data-highlighted":TW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...b6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...b6.itemGroup.attrs,dir:r("dir"),id:i8(i,n),"aria-labelledby":s8(i,n),"data-empty":TW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...b6.itemGroupLabel.attrs,dir:r("dir"),id:s8(i,n),role:"presentation"})}}}var y8="pointerdown.outside",b8="focus.outside";function v8(e){for(const t of e)if(AW(t)&&vY(t))return!0;return!1}var k8=e=>"clientY"in e;function x8(e,t){if(!t||!k8(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,o=a&&e.clientY>t.offsetTop+t.clientHeight;return!!function(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(a?16:0)},{x:e.clientX,y:e.clientY})&&(r||o)}function w8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=FW(e),c=jW(e),u=function(e){const t={each(t){var n;for(let r=0;r<(null==(n=e.frames)?void 0:n.length);r+=1){const n=e.frames[r];n&&t(n)}},addEventListener:(e,n,r)=>(t.each((t=>{try{t.document.addEventListener(e,n,r)}catch{}})),()=>{try{t.removeEventListener(e,n,r)}catch{}}),removeEventListener(e,n,r){t.each((t=>{try{t.document.removeEventListener(e,n,r)}catch{}}))}};return t}(c),d=function(e){const t=null!=e.frameElement?e.parent:null;return{addEventListener:(e,n,r)=>{try{null==t||t.addEventListener(e,n,r)}catch{}return()=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}}}(c);function p(t,r){if(!AW(r))return!1;if(!r.isConnected)return!1;if(MW(e,r))return!1;if(function(e,t){if(!k8(t)||!e)return!1;const n=e.getBoundingClientRect();return 0!==n.width&&0!==n.height&&n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}(e,t))return!1;if(s&&WW(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(x8(t,AY(a)))return!1}return!x8(t,AY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=RW(null==e?void 0:e.getRootNode());let m=!1;function g(t){m=!0;const n=()=>{m=!1};function r(n){var r;const s=i&&!JW()?_Y:e=>e(),l=n??t,c=(null==(r=null==l?void 0:l.composedPath)?void 0:r.call(l))??[null==l?void 0:l.target];s((()=>{const n=h?c[0]:nY(t);if(e&&p(t,n)){if(a||o){const t=eW(a,o);e.addEventListener(y8,t,{once:!0})}_8(e,y8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:iY(l),focusable:v8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(uY(l,"click",r,{once:!0})),f.add(d.addEventListener("click",r,{once:!0})),f.add(u.addEventListener("click",r,{once:!0}))):r()}const y=new Set,b=setTimeout((()=>{y.add(uY(l,"pointerdown",g,!0)),y.add(d.addEventListener("pointerdown",g,!0)),y.add(u.addEventListener("pointerdown",g,!0))}),0);function v(t){if(m)return;(i?_Y:e=>e())((()=>{var n;const a=(null==(n=null==t?void 0:t.composedPath)?void 0:n.call(t))??[null==t?void 0:t.target],i=h?a[0]:nY(t);if(e&&p(t,i)){if(r||o){const t=eW(r,o);e.addEventListener(b8,t,{once:!0})}_8(e,b8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:vY(i),target:i}})}}))}return JW()||(y.add(uY(l,"focusin",v,!0)),y.add(d.addEventListener("focusin",v,!0)),y.add(u.addEventListener("focusin",v,!0))),()=>{clearTimeout(b),f.forEach((e=>e())),y.forEach((e=>e()))}}function E8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(w8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function _8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function S8(e,t){return uY(FW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var T8,C8="layer:request-dismiss",A8={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter((e=>e.pointerBlocking))},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var t;return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(null==(t=this.topMostPointerBlockingLayer())?void 0:t.node):-1)},isTopMost(e){const t=this.layers[this.count()-1];return(null==t?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter((t=>t.type===e))},getNestedLayersByType(e,t){const n=this.indexOf(e);return-1===n?[]:this.layers.slice(n+1).filter((e=>e.type===t))},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find((e=>e.type===t))},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!this.getNestedLayers(e).some((e=>MW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>MW(t,e)))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);if(!(t<0)){if(this.recentlyRemoved.add(e),SY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>A8.dismiss(t.node,e)))}this.layers.splice(t,1),this.syncLayers()}},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach(((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested");this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)}))},indexOf(e){return this.layers.findIndex((t=>t.node===e))},dismiss(e,t){const n=this.indexOf(e);if(-1===n)return;const r=this.layers[n];var a,o;a=C8,o=e=>{var t;null==(t=r.requestDismiss)||t.call(r,e),e.defaultPrevented||null==r||r.dismiss()},e.addEventListener(a,o,{once:!0}),function(e,t,n){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});e.dispatchEvent(a)}(e,C8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function N8(){A8.layers.forEach((({node:e})=>{e.style.pointerEvents=A8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function I8(e,t){const n=FW(e),r=[];return A8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(T8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=LY((()=>{const t=e();return AW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(PY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{A8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=T8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function O8(e,t){const{defer:n}=t,r=n?_Y:e=>e(),a=[];return a.push(r((()=>{const n=qq(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void rW("[@zag-js/dismissable] node is `null` or `undefined`");if(!e)return;const{onDismiss:r,onRequestDismiss:a,pointerBlocking:o,exclude:i,debug:s,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:o,requestDismiss:a};A8.add(c),N8();const u=[o?I8(e,t.persistentElements):void 0,S8(e,(function(n){var a;A8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),E8(e,{exclude:function(n){var r;if(!e)return!1;const a="function"==typeof i?i():i,o=Array.isArray(a)?a:[a],s=null==(r=t.persistentElements)?void 0:r.map((e=>e())).filter(AW);return s&&o.push(...s),o.some((e=>MW(e,n)))||A8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=nY(e.detail.originalEvent);A8.isInBranch(o)||(null==(n=t.onFocusOutside)||n.call(t,e),null==(a=t.onInteractOutside)||a.call(t,e),e.defaultPrevented||(s&&console.log("onFocusOutside:",e.detail.originalEvent),null==r||r()))},onPointerDownOutside:function(n){var a,o;const i=nY(n.detail.originalEvent);A8.isBelowPointerBlockingLayer(e)||A8.isInBranch(i)||(null==(a=t.onPointerDownOutside)||a.call(t,n),null==(o=t.onInteractOutside)||o.call(t,n),n.defaultPrevented||(s&&console.log("onPointerDownOutside:",n.detail.originalEvent),null==r||r()))},defer:t.defer})];return()=>{A8.remove(e),N8(),function(e){e.style.pointerEvents=""}(e),u.forEach((e=>null==e?void 0:e()))}}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}var R8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var P8=null,L8=new Set,D8=new Map,M8=!1,F8=!1,j8={Tab:!0,Escape:!0};function z8(e,t){for(let n of L8)n(e,t)}function B8(e){M8=!0,function(e){return!(e.metaKey||!tY()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(P8="keyboard",z8("keyboard",e))}function H8(e){P8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(M8=!0,z8("pointer",e))}function U8(e){aY(e)&&(M8=!0,P8="virtual")}function $8(e){const t=nY(e);t!==jW(t)&&t!==FW(t)&&e.isTrusted&&(M8||F8||(P8="virtual",z8("virtual",e)),M8=!1,F8=!1)}function V8(){M8=!1,F8=!0}var G8=(e,t)=>{const n=jW(e),r=FW(e),a=D8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",B8,!0),r.removeEventListener("keyup",B8,!0),r.removeEventListener("click",U8,!0),n.removeEventListener("focus",$8,!0),n.removeEventListener("blur",V8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",H8,!0),r.removeEventListener("pointermove",H8,!0),r.removeEventListener("pointerup",H8,!0)):(r.removeEventListener("mousedown",H8,!0),r.removeEventListener("mousemove",H8,!0),r.removeEventListener("mouseup",H8,!0)),D8.delete(n)}};function q8(){return"keyboard"===P8||"virtual"===P8}function W8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||D8.get(jW(e)))return;const t=jW(e),n=FW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){M8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",B8,!0),n.addEventListener("keyup",B8,!0),n.addEventListener("click",U8,!0),t.addEventListener("focus",$8,!0),t.addEventListener("blur",V8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",H8,!0),n.addEventListener("pointermove",H8,!0),n.addEventListener("pointerup",H8,!0)):(n.addEventListener("mousedown",H8,!0),n.addEventListener("mousemove",H8,!0),n.addEventListener("mouseup",H8,!0)),t.addEventListener("beforeunload",(()=>{G8(e)}),{once:!0}),D8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||q8(),modality:P8});const o=(e,n)=>{(function(e,t,n){const r=n?nY(n):null,a=FW(r),o=jW(r),i=zW(a);return!((e=e||i instanceof o.HTMLInputElement&&!R8.has(null==i?void 0:i.type)||i instanceof o.HTMLTextAreaElement||i instanceof o.HTMLElement&&i.isContentEditable)&&"keyboard"===t&&n instanceof o.KeyboardEvent&&!Reflect.has(j8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:q8(),modality:e}))};return L8.add(o),()=>{L8.delete(o)}}var{guards:Y8,createMachine:Z8,choose:K8}={guards:{and:(...e)=>function(t){return e.every((e=>t.guard(e)))},or:(...e)=>function(t){return e.some((e=>t.guard(e)))},not:e=>function(t){return!t.guard(e)}},createMachine:e=>bW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:X8,not:Q8}=Y8,J8=Z8({props:({props:e})=>({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){CY(e)},collection:I6.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open.suggesting":"closed.idle",context({prop:e,bindable:t,getContext:n,getEvent:r}){const a=e("value")??e("defaultValue")??[],o=e("collection").findMany(a);return{currentPlacement:t((()=>({defaultValue:void 0}))),value:t((()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:$q,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=A6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:A6({values:s,collection:o,selectedItemMap:i.nextSelectedItemMap});a.set("selectedItemMap",l.nextSelectedItemMap),null==(r=e("onValueChange"))||r({value:t,items:i.selectedItems})}}))),highlightedValue:t((()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){var n;const r=e("collection").find(t);null==(n=e("onHighlightChange"))||n({highlightedValue:t,highlightedItem:r})}}))),inputValue:t((()=>{let t=e("inputValue")||e("defaultInputValue");const n=e("value")||e("defaultValue");if(!t.trim()&&!e("multiple")){const r=e("collection").stringifyMany(n);t=tW(e("selectionBehavior"),{preserve:t||r,replace:r,clear:""})}return{defaultValue:t,value:e("inputValue"),onChange(t){var n;const a=r(),o=(a.previousEvent||a).src;null==(n=e("onInputValueChange"))||n({inputValue:t,reason:o})}}})),highlightedItem:t((()=>{const t=e("highlightedValue");return{defaultValue:e("collection").find(t)}})),selectedItemMap:t((()=>({defaultValue:N6({selectedItems:o,collection:e("collection")})})))}},computed:{isInputValueEmpty:({context:e})=>0===e.get("inputValue").length,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>"autocomplete"===e("inputBehavior"),autoHighlight:({prop:e})=>"autohighlight"===e("inputBehavior"),hasSelectedItems:({context:e})=>e.get("value").length>0,selectedItems:({context:e,prop:t})=>T6({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:r,send:a}){n([()=>e.hash("value")],(()=>{r(["syncSelectedItems"])})),n([()=>e.get("inputValue")],(()=>{r(["syncInputValue"])})),n([()=>e.get("highlightedValue")],(()=>{r(["syncHighlightedItem","autofillInputValue"])})),n([()=>t("open")],(()=>{r(["toggleVisibility"])})),n([()=>t("collection").toString()],(()=>{a({type:"CHILDREN_CHANGE"})}))},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:K8([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{closed:{tags:["closed"],initial:"idle",states:{idle:{tags:["idle"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"open.interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"open.suggesting"},{target:"open.interacting"}],"INPUT.CHANGE":[{guard:X8("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"open.suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:X8("isCustomValue",Q8("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:X8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:X8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}}}},open:{tags:["open","focused"],entry:["setInitialFocus"],effects:["trackFocusVisible","scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"closed.focused",actions:["setFinalFocus"]},{target:"closed.idle"}],"INPUT.ENTER":[{guard:X8("isOpenControlled","isCustomValue",Q8("hasHighlightedItem"),Q8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:X8("isCustomValue",Q8("hasHighlightedItem"),Q8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:X8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:X8("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:X8("isOpenControlled","isCustomValue",Q8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:X8("isCustomValue",Q8("allowCustomValue")),target:"closed.idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"closed.focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]},initial:"interacting",states:{interacting:{on:{CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:X8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:X8("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.ESCAPE":[{guard:X8("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"closed.focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:X8("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open"),openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return!0===(r=n)||!1===r?n:!!(null==n?void 0:n({inputValue:t.get("inputValue")}));var r},restoreFocus:({event:e})=>{var t;const n=e.restoreFocus??(null==(t=e.previousEvent)?void 0:t.restoreFocus);return null==n||!!n},isChangeEvent:({event:e})=>{var t;return"INPUT.CHANGE"===(null==(t=e.previousEvent)?void 0:t.type)},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackFocusVisible({scope:e}){var t;return W8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return O8((()=>c8(n)),{type:"listbox",defer:!0,exclude:()=>{return[u8(n),f8(n),(e=n,e.getById(o8(e)))];var e},onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement:({context:e,prop:t,scope:n})=>(e.set("currentPlacement",t("positioning").placement),X6((()=>p8(n)||f8(n)),(()=>d8(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=u8(n);let a=[];const o=r=>{if("pointer"===P8)return;const o=e.get("highlightedValue");if(!o)return;const i=c8(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>h8(n,o)})}const l=h8(n,o),c=_Y((()=>{RY(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=_Y((()=>{var e;P8=e="virtual",z8(e,null),o(!0)}));a.push(i);const s=TY(r,{attributes:["aria-activedescendant"],callback:()=>o(!1)});return a.push(s),()=>{a.forEach((e=>e()))}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){X6((()=>p8(n)),(()=>d8(n)),{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setHighlightedValue({context:e,event:t}){null!=t.value&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:r}=e,a=r("collection"),o=n.get("highlightedValue");if(!o||!a.has(o))return;const i=r("multiple")?Hq(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=tW(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){SY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=h8(n,r),o=c8(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>h8(n,r)})}else RY(a,{rootEl:o,block:"nearest"})}))},selectItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{var e;const r=a("multiple")?Hq(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r),clear:""});t.set("inputValue",o)}))},clearItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{const e=Bq(t.get("value"),n.value);t.set("value",e);const r=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){_Y((()=>{m8(e)}))},setFinalFocus({scope:e}){_Y((()=>{const t=f8(e);null==(null==t?void 0:t.dataset.focusable)?m8(e):(e=>{const t=f8(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=u8(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&EW(r)})))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const r=tW(t("selectionBehavior"),{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){const{context:t,flush:n,event:r,prop:a}=e;n((()=>{t.set("value",r.value);const e=tW(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r.value),clear:""});t.set("inputValue",e)}))},clearSelectedItems(e){const{context:t,flush:n,prop:r}=e;n((()=>{t.set("value",[]);const e=tW(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany([]),clear:""});t.set("inputValue",e)}))},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const r=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>h8(t,r)})}else{const e=c8(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=e9(t);null==(r=e("onOpenChange"))||r({open:!0,reason:a,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;const a=e9(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(c8(n)?queueMicrotask:_Y)((()=>{const n=t("collection").firstValue;n&&e.set("highlightedValue",n)}))},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(c8(n)?queueMicrotask:_Y)((()=>{const n=t("collection").lastValue;n&&e.set("highlightedValue",n)}))},highlightNextItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getNextValue(r),!n&&t("loopFocus")&&(n=a.firstValue)):n=a.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getPreviousValue(r),!n&&t("loopFocus")&&(n=a.lastValue)):n=a.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){_Y((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){_Y((()=>{let r=null;r=n("hasSelectedItems")?t("collection").sort(e.get("value"))[0]:t("collection").firstValue,r&&e.set("highlightedValue",r)}))},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){_Y((()=>{const r=t("collection");let a=null;a=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue,a&&e.set("highlightedValue",a)}))},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:a}){const o=u8(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));_Y((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=A6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=tW(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:r.stringifyMany(a),clear:""});t.set("inputValue",i)}))},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function e9(e){return(e.previousEvent||e).src}const t9=he.forwardRef(((e,t)=>{const{children:n,defaultValue:r=[],items:a,multiple:o=!1,placeholder:i,name:s,disabled:l,required:c,id:u,onValueChange:d}=e,p=he.useId(),f=u??p,h=cR(),[m,g]=he.useState(a),y=he.useMemo((()=>I6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=g8(jY(J8,{id:f,collection:y,defaultValue:r,multiple:o,placeholder:i,name:s,disabled:l,required:c,openOnClick:!0,getRootNode:()=>{var e;return(null==(e=null==h?void 0:h.shadowHost)?void 0:e.shadowRoot)??document},selectionBehavior:o?"clear":"replace",onOpenChange(e){e.open||g(a)},onInputValueChange(e){const t=""===e.inputValue.trim()?a:a.filter((t=>t.label.toLowerCase().includes(e.inputValue.toLowerCase())));g(t.length>0?t:[])},onValueChange(e){null==d||d(e)}}),UY),v=he.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return wg.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:wg.jsx(m9.Provider,{value:v,children:n})})}));t9.displayName="ComboboxRoot";const n9=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=g9(),o=a.getControlProps();return wg.jsx("div",{"data-scope":"combobox","data-part":"control","data-state":a.open?"open":"closed","data-disabled":a.disabled?"":void 0,"data-focus":a.focused?"":void 0,...o,ref:r9(t,o.ref),...r,children:n})}));function r9(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}n9.displayName="ComboboxControl";const a9=he.forwardRef(((e,t)=>{const n=g9(),r=n.getInputProps();return wg.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:r9(t,r.ref)})}));a9.displayName="ComboboxInput";const o9=he.forwardRef(((e,t)=>{const n=g9(),r=n.getTriggerProps();return wg.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:r9(t,r.ref),...e,children:e.children??"▼"})}));o9.displayName="ComboboxTrigger";const i9=he.forwardRef((function(e,t){const n=g9();return wg.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),s9=he.forwardRef(((e,t)=>{const n=g9(),r=n.getContentProps();return wg.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:r9(t,r.ref),...e,children:e.children})}));s9.displayName="ComboboxContent";const l9=he.forwardRef(((e,t)=>{const n=g9().getListProps();return wg.jsx("div",{ref:r9(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));l9.displayName="ComboboxList";const c9=({children:e})=>{const t=function(){const e=he.useContext(m9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return wg.jsx(wg.Fragment,{children:e(t)})};c9.displayName="ComboboxListItems";const u9=he.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return wg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));u9.displayName="ComboboxListEmpty";const d9=he.createContext(null),p9=he.forwardRef(((e,t)=>{const{item:n,...r}=e,a=g9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return wg.jsx(d9.Provider,{value:n,children:wg.jsx("div",{ref:r9(t,i.ref),"data-scope":"combobox","data-part":"item","data-value":n.value,"data-highlighted":o.highlighted?"":void 0,"data-state":o.selected?"checked":"unchecked","data-disabled":o.disabled?"":void 0,...i,...r,children:e.children})})}));p9.displayName="ComboboxItem";const f9=he.forwardRef(((e,t)=>{const n=he.useContext(d9),r=g9(),a=n?r.getItemTextProps({item:n}):{};return wg.jsx("span",{ref:r9(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));f9.displayName="ComboboxItemText";const h9=he.forwardRef(((e,t)=>{const{children:n,...r}=e,a=he.useContext(d9),o=g9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?wg.jsx("span",{ref:r9(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??wg.jsx(DG,{iconSettings:{builtIn:"LuCheck"}})}):null}));h9.displayName="ComboboxItemIndicator";const m9=he.createContext(null);function g9(){const e=he.useContext(m9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const y9=he.forwardRef(((e,t)=>{const n=g9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:wg.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>wg.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,wg.jsx("button",{type:"button","data-part":"tag-clear","aria-label":`Remove ${t.label}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t.value)},children:wg.jsx(DG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));y9.displayName="ComboboxSelectedTags";var b9=Object.defineProperty,v9=(e,t,n)=>((e,t,n)=>t in e?b9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),k9={activateTrap(e,t){if(e.length>0){const n=e[e.length-1];n!==t&&n.pause()}const n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},x9=[],w9=class{constructor(e,t){v9(this,"trapStack"),v9(this,"config"),v9(this,"doc"),v9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),v9(this,"portalContainers",new Set),v9(this,"listenerCleanups",[]),v9(this,"handleFocus",(e=>{const t=nY(e),n=this.findContainerIndex(t,e)>=0;if(n||NW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(wY(this.state.mostRecentlyFocusedNode)>0){const e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){const e=r.findIndex((e=>e===this.state.mostRecentlyFocusedNode));e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some((e=>e.tabbableNodes.some((e=>wY(e)>0))))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0})),v9(this,"handlePointerDown",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||(C9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):C9(this.config.allowOutsideClick,e)||e.preventDefault())})),v9(this,"handleClick",(e=>{const t=nY(e);this.findContainerIndex(t,e)>=0||C9(this.config.clickOutsideDeactivates,e)||C9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),v9(this,"handleTabKey",(e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;const t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;_9(e)&&e.preventDefault(),this.tryFocus(n)}})),v9(this,"handleEscapeKey",(e=>{A9(e)&&!1!==C9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),v9(this,"_mutationObserver"),v9(this,"setupMutationObserver",(()=>{const e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver((e=>{e.some((e=>Array.from(e.removedNodes).some((e=>e===this.state.mostRecentlyFocusedNode))))&&this.tryFocus(this.getInitialFocusNode());e.some((e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return!!function(e){var t;return!!function(e){return e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")}(e)||Boolean(null==(t=e.querySelector)?void 0:t.call(e,'[aria-controls][aria-expanded="true"]'))}(t)||!(!t.id||this.state.containers.some((e=>e.contains(t))))&&ZW(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),v9(this,"updateObservedNodes",(()=>{var e;null==(e=this._mutationObserver)||e.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map((e=>{var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})})),this.portalContainers.forEach((e=>{this.observePortalContainer(e)})))})),v9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!vY(e)){const t=zW(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{const t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");if(e.isConnected||(e=this.getNodeForOption("fallbackFocus")),!e||!e.isConnected)throw new Error("Your focus-trap needs to have at least one focusable element");return e})),v9(this,"tryFocus",(e=>{!1!==e&&e!==zW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,I9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),v9(this,"deactivate",(e=>{if(!this.state.active)return this;const t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),k9.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const n=this.getOption(t,"onDeactivate"),r=this.getOption(t,"onPostDeactivate"),a=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");null==n||n();const i=()=>{N9((()=>{if(o){const e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}null==r||r()}))};if(o&&a){return a(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(i,i),this}return i(),this})),v9(this,"pause",(e=>{if(this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onPause"),n=this.getOption(e,"onPostPause");return this.state.paused=!0,null==t||t(),this.removeListeners(),this.updateObservedNodes(),null==n||n(),this})),v9(this,"unpause",(e=>{if(!this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onUnpause"),n=this.getOption(e,"onPostUnpause");return this.state.paused=!1,null==t||t(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n(),this})),v9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),v9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),v9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),v9(this,"getNodeForOption",((e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if("function"==typeof r&&(r=r(...n)),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let a=r;if("string"==typeof r){try{a=this.doc.querySelector(r)}catch(fNe){throw new Error(`\`${e}\` appears to be an invalid selector; error="${fNe.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),v9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||nY(t);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const e=this.findContainerIndex(r,t),o=e>=0?this.state.containerGroups[e]:void 0;if(e<0)a=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex((({firstTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||vY(r)&&!xY(r)&&!(null==o?void 0:o.nextTabbableNode(r,!1)))&&(n=e),n>=0){const e=0===n?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];a=wY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else _9(t)||(a=null==o?void 0:o.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex((({lastTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||vY(r)&&!xY(r)&&!(null==o?void 0:o.nextTabbableNode(r)))&&(n=e),n>=0){const e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];a=wY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else _9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||x9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:S9,isKeyBackward:T9,...t};this.doc=n.document||FW(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach((e=>{YW(e).forEach((e=>{this.addPortalContainer(e)}))}))}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return this.state.containerGroups.findIndex((({container:t,tabbableNodes:r})=>t.contains(e)||(null==n?void 0:n.includes(t))||r.find((t=>t===e))||this.isControlledElement(t,e)))}isControlledElement(e,t){return!!this.config.followControlledElements&&WW(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=kY(e,{getShadowRoot:this.config.getShadowRoot}),n=bY(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],a=t[t.length-1],o=r,i=a;let s=!1;for(let l=0;l<t.length;l++)if(wY(t[l])>0){s=!0;break}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:i,nextTabbableNode:function(e,r=!0){const a=t.indexOf(e);if(a>=0)return t[a+(r?1:-1)];const o=n.indexOf(e);if(!(o<0))if(r){for(let t=o+1;t<n.length;t++)if(xY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(xY(n[t]))return n[t]}}})),this.state.tabbableGroups=this.state.containerGroups.filter((e=>e.tabbableNodes.length>0)),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find((e=>e.posTabIndexesFound))&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return k9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?N9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(uY(this.doc,"focusin",this.handleFocus,!0),uY(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),uY(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),uY(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),uY(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach((e=>e())),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=zW(this.doc),null==t||t();const a=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n()};return r?(r(this.state.containers.concat()).then(a,a),this):(a(),this)}},E9=e=>"keydown"===(null==e?void 0:e.type),_9=e=>E9(e)&&"Tab"===(null==e?void 0:e.key),S9=e=>E9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),T9=e=>E9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),C9=(e,...t)=>"function"==typeof e?e(...t):e,A9=e=>!e.isComposing&&"Escape"===e.key,N9=e=>setTimeout(e,0),I9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var O9=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=he.useState(),r=he.useRef(null),a=he.useRef(e),o=he.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return he.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return he.useEffect((()=>{const e=R9(r.current);o.current="mounted"===s?e:"none"}),[s]),aR((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=R9(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),aR((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=R9(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=R9(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:he.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):he.Children.only(n),o=J5(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?he.cloneElement(a,{ref:o}):null};function R9(e){return(null==e?void 0:e.animationName)||"none"}O9.displayName="Presence";var P9="data-scroll-lock";function L9(e){const t=$W(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function D9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(P9))return;const o=L9(r)||L9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(P9,"");const s=function(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}(r),l=[function(e,t,n){if(!e)return _W;const r=e.style.getPropertyValue(t);return r===n?_W:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),eY()?(()=>{const{scrollX:e,scrollY:t,visualViewport:r}=n,l=(null==r?void 0:r.offsetLeft)??0,c=(null==r?void 0:r.offsetTop)??0,u={position:"fixed",overflow:"hidden",top:-(t-Math.floor(c))+"px",left:-(e-Math.floor(l))+"px",right:"0"};!o&&i>0&&(u[s]=`${i}px`);const d=PY(a,u);return()=>{null==d||d(),n.scrollTo({left:e,top:t,behavior:"instant"})}})():(()=>{const e={overflow:"hidden"};return!o&&i>0&&(e[s]=`${i}px`),PY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(P9)}}const M9="Dialog",[F9]=Z5(M9),[j9,z9]=F9(M9),B9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=he.useRef(null),l=he.useRef(null),[c=!1,u]=eK({prop:r,defaultProp:a??!1,onChange:o});return wg.jsx(j9,{scope:t,triggerRef:s,contentRef:l,contentId:sR(),titleId:sR(),descriptionId:sR(),open:c,onOpenChange:u,onOpenToggle:he.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};B9.displayName=M9;const H9="DialogTrigger";he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(H9,n),o=J5(t,a.triggerRef);return wg.jsx(T3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":o7(a.open),...r,ref:o,onClick:Y5(e.onClick,a.onOpenToggle)})})).displayName=H9;const U9="DialogPortal",[$9,V9]=F9(U9,{forceMount:void 0}),G9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=z9(U9,t);return wg.jsx($9,{scope:t,forceMount:n,children:he.Children.map(r,(e=>wg.jsx(O9,{present:n||o.open,children:wg.jsx(c4,{asChild:!0,container:a,children:e})})))})};G9.displayName=U9;const q9="DialogOverlay",W9=he.forwardRef(((e,t)=>{const n=V9(q9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=z9(q9,e.__scopeDialog);return o.modal?wg.jsx(O9,{present:r||o.open,children:wg.jsx(Y9,{...a,ref:t})}):null}));W9.displayName=q9;const Y9=he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(q9,n),o=cR();return he.useEffect((()=>{var e;return D9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),wg.jsx(T3.div,{"data-dialog-overlay":"","data-state":o7(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),Z9="DialogContent",K9=he.forwardRef(((e,t)=>{const n=V9(Z9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=z9(Z9,e.__scopeDialog);return wg.jsx(O9,{present:r||o.open,children:o.modal?wg.jsx(X9,{...a,ref:t}):wg.jsx(Q9,{...a,ref:t})})}));K9.displayName=Z9;const X9=he.forwardRef(((e,t)=>{const n=z9(Z9,e.__scopeDialog),r=he.useRef(null),a=J5(t,n.contentRef,r);return he.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return t2([e,...Array.from(t)])}}),[]),wg.jsx(J9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:Y5(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault();e.target.closest("[data-ikp-component]")&&e.preventDefault()})),onFocusOutside:Y5(e.onFocusOutside,(e=>e.preventDefault()))})})),Q9=he.forwardRef(((e,t)=>{const n=z9(Z9,e.__scopeDialog),r=he.useRef(!1),a=he.useRef(!1);return wg.jsx(J9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),J9=he.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=z9(Z9,n),l=he.useRef(null),c=J5(t,l);return _3(),he.useEffect((()=>{if(r)return function(e,t={}){let n;const r=_Y((()=>{const r=(Array.isArray(e)?e:[e]).map((e=>"function"==typeof e?e():e)).filter((e=>null!=e));if(0===r.length)return;const a=r[0];n=new w9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:FW(a)});try{n.activate()}catch{}}));return function(){null==n||n.deactivate(),r()}}(l.current,{preventScroll:!0,onActivate:a,onDeactivate:o,initialFocus:!1,allowOutsideClick:e=>{var t;const n=(null==(t=e.composedPath)?void 0:t.call(e)[0])??e.target;return!!n.closest("[data-ikp-component]")||!!n.closest("[data-dialog-overlay]")}})}),[]),wg.jsx(k3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":o7(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),e7="DialogTitle",t7=he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(e7,n);return wg.jsx(T3.h2,{id:a.titleId,...r,ref:t})}));t7.displayName=e7;const n7="DialogDescription";he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(n7,n);return wg.jsx(T3.p,{id:a.descriptionId,...r,ref:t})})).displayName=n7;const r7="DialogClose",a7=he.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=z9(r7,n);return wg.jsx(T3.button,{type:"button",...r,ref:t,onClick:Y5(e.onClick,(()=>a.onOpenChange(!1)))})}));function o7(e){return e?"open":"closed"}a7.displayName=r7;const i7=B9,s7=G9,l7=W9,c7=K9,u7=t7,d7=a7,p7=he.forwardRef(((e,t)=>{const n=he.useId();return wg.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[wg.jsx("title",{children:"AI Avatar"}),wg.jsx("path",{d:"M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",stroke:`url(#${n}-stroke1)`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),wg.jsx("path",{d:"M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",stroke:`url(#${n}-stroke2)`,strokeLinecap:"round",strokeLinejoin:"round"}),wg.jsx("path",{d:"M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",stroke:`url(#${n}-stroke3)`,strokeLinecap:"round",strokeLinejoin:"round"}),wg.jsxs("defs",{children:[wg.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[wg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),wg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),wg.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[wg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),wg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),wg.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[wg.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),wg.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),f7=he.forwardRef(((e,t)=>wg.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[wg.jsx("title",{children:"User Avatar"}),wg.jsx("path",{d:"M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",fill:"currentColor"})]}))),h7=he.forwardRef((({isExternal:e,...t},n)=>wg.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));h7.displayName="Link";const m7=he.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=wR(),o=Object.assign({},a.urlQueryParamsToAppend,t),i=e?function(e,t){if(!t)return e;try{const n=new URL(e);for(const e of Object.keys(t))t[e]&&n.searchParams.append(e,t[e]);return n.href}catch{return e}}(e,o):e;return wg.jsx(h7,{ref:r,href:i,...n})}));function g7(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(a,r).trim();!e&&o||t.push(e),a=r+1,r=n.indexOf(",",a)}return t}function y7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}m7.displayName="LinkWithQueryParams";const b7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,v7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,k7={};function x7(e,t){return(k7.jsx?v7:b7).test(e)}const w7=/[ \t\n\f\r]/g;function E7(e){return""===e.replace(w7,"")}class _7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function S7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new _7(n,r,t)}function T7(e){return e.toLowerCase()}_7.prototype.normal={},_7.prototype.property={},_7.prototype.space=void 0;class C7{constructor(e,t){this.attribute=t,this.property=e}}C7.prototype.attribute="",C7.prototype.booleanish=!1,C7.prototype.boolean=!1,C7.prototype.commaOrSpaceSeparated=!1,C7.prototype.commaSeparated=!1,C7.prototype.defined=!1,C7.prototype.mustUseProperty=!1,C7.prototype.number=!1,C7.prototype.overloadedBoolean=!1,C7.prototype.property="",C7.prototype.spaceSeparated=!1,C7.prototype.space=void 0;let A7=0;const N7=M7(),I7=M7(),O7=M7(),R7=M7(),P7=M7(),L7=M7(),D7=M7();function M7(){return 2**++A7}const F7=Object.freeze(Object.defineProperty({__proto__:null,boolean:N7,booleanish:I7,commaOrSpaceSeparated:D7,commaSeparated:L7,number:R7,overloadedBoolean:O7,spaceSeparated:P7},Symbol.toStringTag,{value:"Module"})),j7=Object.keys(F7);class z7 extends C7{constructor(e,t,n,r){let a=-1;if(super(e,t),B7(this,"space",r),"number"==typeof n)for(;++a<j7.length;){const e=j7[a];B7(this,j7[a],(n&F7[e])===F7[e])}}}function B7(e,t,n){n&&(e[t]=n)}function H7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new z7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[T7(r)]=r,n[T7(o.attribute)]=r}return new _7(t,n,e.space)}z7.prototype.defined=!0;const U7=H7({properties:{ariaActiveDescendant:null,ariaAtomic:I7,ariaAutoComplete:null,ariaBusy:I7,ariaChecked:I7,ariaColCount:R7,ariaColIndex:R7,ariaColSpan:R7,ariaControls:P7,ariaCurrent:null,ariaDescribedBy:P7,ariaDetails:null,ariaDisabled:I7,ariaDropEffect:P7,ariaErrorMessage:null,ariaExpanded:I7,ariaFlowTo:P7,ariaGrabbed:I7,ariaHasPopup:null,ariaHidden:I7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:P7,ariaLevel:R7,ariaLive:null,ariaModal:I7,ariaMultiLine:I7,ariaMultiSelectable:I7,ariaOrientation:null,ariaOwns:P7,ariaPlaceholder:null,ariaPosInSet:R7,ariaPressed:I7,ariaReadOnly:I7,ariaRelevant:null,ariaRequired:I7,ariaRoleDescription:P7,ariaRowCount:R7,ariaRowIndex:R7,ariaRowSpan:R7,ariaSelected:I7,ariaSetSize:R7,ariaSort:null,ariaValueMax:R7,ariaValueMin:R7,ariaValueNow:R7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function $7(e,t){return t in e?e[t]:t}function V7(e,t){return $7(e,t.toLowerCase())}const G7=H7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:L7,acceptCharset:P7,accessKey:P7,action:null,allow:null,allowFullScreen:N7,allowPaymentRequest:N7,allowUserMedia:N7,alt:null,as:null,async:N7,autoCapitalize:null,autoComplete:P7,autoFocus:N7,autoPlay:N7,blocking:P7,capture:null,charSet:null,checked:N7,cite:null,className:P7,cols:R7,colSpan:null,content:null,contentEditable:I7,controls:N7,controlsList:P7,coords:R7|L7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:N7,defer:N7,dir:null,dirName:null,disabled:N7,download:O7,draggable:I7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:N7,formTarget:null,headers:P7,height:R7,hidden:O7,high:R7,href:null,hrefLang:null,htmlFor:P7,httpEquiv:P7,id:null,imageSizes:null,imageSrcSet:null,inert:N7,inputMode:null,integrity:null,is:null,isMap:N7,itemId:null,itemProp:P7,itemRef:P7,itemScope:N7,itemType:P7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:N7,low:R7,manifest:null,max:null,maxLength:R7,media:null,method:null,min:null,minLength:R7,multiple:N7,muted:N7,name:null,nonce:null,noModule:N7,noValidate:N7,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:N7,optimum:R7,pattern:null,ping:P7,placeholder:null,playsInline:N7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:N7,referrerPolicy:null,rel:P7,required:N7,reversed:N7,rows:R7,rowSpan:R7,sandbox:P7,scope:null,scoped:N7,seamless:N7,selected:N7,shadowRootClonable:N7,shadowRootDelegatesFocus:N7,shadowRootMode:null,shape:null,size:R7,sizes:null,slot:null,span:R7,spellCheck:I7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R7,step:null,style:null,tabIndex:R7,target:null,title:null,translate:null,type:null,typeMustMatch:N7,useMap:null,value:I7,width:R7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:P7,axis:null,background:null,bgColor:null,border:R7,borderColor:null,bottomMargin:R7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:N7,declare:N7,event:null,face:null,frame:null,frameBorder:null,hSpace:R7,leftMargin:R7,link:null,longDesc:null,lowSrc:null,marginHeight:R7,marginWidth:R7,noResize:N7,noHref:N7,noShade:N7,noWrap:N7,object:null,profile:null,prompt:null,rev:null,rightMargin:R7,rules:null,scheme:null,scrolling:I7,standby:null,summary:null,text:null,topMargin:R7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:N7,disableRemotePlayback:N7,prefix:null,property:null,results:R7,security:null,unselectable:null},space:"html",transform:V7}),q7=H7({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"},properties:{about:D7,accentHeight:R7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R7,amplitude:R7,arabicForm:null,ascent:R7,attributeName:null,attributeType:null,azimuth:R7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R7,by:null,calcMode:null,capHeight:R7,className:P7,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:R7,diffuseConstant:R7,direction:null,display:null,dur:null,divisor:R7,dominantBaseline:null,download:N7,dx:null,dy:null,edgeMode:null,editable:null,elevation:R7,enableBackground:null,end:null,event:null,exponent:R7,externalResourcesRequired:null,fill:null,fillOpacity:R7,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:L7,g2:L7,glyphName:L7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R7,horizOriginX:R7,horizOriginY:R7,id:null,ideographic:R7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R7,k:R7,k1:R7,k2:R7,k3:R7,k4:R7,kernelMatrix:D7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R7,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:R7,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:R7,overlineThickness:R7,paintOrder:null,panose1:null,path:null,pathLength:R7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:P7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R7,pointsAtY:R7,pointsAtZ:R7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:D7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:D7,rev:D7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:D7,requiredFeatures:D7,requiredFonts:D7,requiredFormats:D7,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:R7,specularExponent:R7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R7,strikethroughThickness:R7,string:null,stroke:null,strokeDashArray:D7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R7,strokeOpacity:R7,strokeWidth:null,style:null,surfaceScale:R7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:D7,tabIndex:R7,tableValues:null,target:null,targetX:R7,targetY:R7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:D7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R7,underlineThickness:R7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R7,values:null,vAlphabetic:R7,vMathematical:R7,vectorEffect:null,vHanging:R7,vIdeographic:R7,version:null,vertAdvY:R7,vertOriginX:R7,vertOriginY:R7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$7}),W7=H7({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Y7=H7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:V7}),Z7=H7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),K7={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"},X7=/[A-Z]/g,Q7=/-[a-z]/g,J7=/^data[-\w.:]+$/i;function eee(e,t){const n=T7(t);let r=t,a=C7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&J7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Q7,nee);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Q7.test(e)){let n=e.replace(X7,tee);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=z7}return new a(r,t)}function tee(e){return"-"+e.toLowerCase()}function nee(e){return e.charAt(1).toUpperCase()}const ree=S7([U7,G7,W7,Y7,Z7],"html"),aee=S7([U7,q7,W7,Y7,Z7],"svg");function oee(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function iee(e){return e.join(" ").trim()}var see={},lee=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,cee=/\n/g,uee=/^\s*/,dee=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pee=/^:\s*/,fee=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,hee=/^[;\s]*/,mee=/^\s+|\s+$/g,gee="";function yee(e){return e?e.replace(mee,gee):gee}var bee=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(cee);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(uee)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;gee!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,gee===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(dee);if(t){if(d(),!l(pee))return s("property missing ':'");var n=l(fee),r=e({type:"declaration",property:yee(t[0].replace(lee,gee)),value:n?yee(n[0].replace(lee,gee)):gee});return l(hee),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},vee=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(see,"__esModule",{value:!0}),see.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,kee.default)(e),a="function"==typeof t;return r.forEach((e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)})),n};const kee=vee(bee);var xee={};Object.defineProperty(xee,"__esModule",{value:!0}),xee.camelCase=void 0;var wee=/^--[a-zA-Z0-9_-]+$/,Eee=/-([a-z])/g,_ee=/^[^-]+$/,See=/^-(webkit|moz|ms|o|khtml)-/,Tee=/^-(ms)-/,Cee=function(e,t){return t.toUpperCase()},Aee=function(e,t){return"".concat(t,"-")};xee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||_ee.test(e)||wee.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Tee,Aee):e.replace(See,Aee)).replace(Eee,Cee))};var Nee=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Iee=Nee(see),Oee=xee;function Ree(e,t){var n={};return e&&"string"==typeof e?((0,Iee.default)(e,(function(e,r){e&&r&&(n[(0,Oee.camelCase)(e,t)]=r)})),n):n}Ree.default=Ree;const Pee=S(Ree),Lee=Mee("end"),Dee=Mee("start");function Mee(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Fee(e){return e&&"object"==typeof e?"position"in e||"type"in e?zee(e.position):"start"in e||"end"in e?zee(e):"line"in e||"column"in e?jee(e):"":""}function jee(e){return Bee(e&&e.line)+":"+Bee(e&&e.column)}function zee(e){return jee(e&&e.start)+"-"+jee(e&&e.end)}function Bee(e){return e&&"number"==typeof e?e:1}class Hee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=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=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=Fee(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=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Hee.prototype.file="",Hee.prototype.name="",Hee.prototype.reason="",Hee.prototype.message="",Hee.prototype.stack="",Hee.prototype.column=void 0,Hee.prototype.line=void 0,Hee.prototype.ancestors=void 0,Hee.prototype.cause=void 0,Hee.prototype.fatal=void 0,Hee.prototype.place=void 0,Hee.prototype.ruleId=void 0,Hee.prototype.source=void 0;const Uee={}.hasOwnProperty,$ee=new Map,Vee=/[A-Z]/g,Gee=new Set(["table","tbody","thead","tfoot","tr"]),qee=new Set(["td","th"]),Wee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yee(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,a,o){const i=Array.isArray(a.children),s=Dee(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?aee:ree,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Zee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Zee(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=aee,e.schema=a);e.ancestors.push(t);const o=ete(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Uee.call(t.properties,a)){const o=Jee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&qee.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Qee(e,t);Gee.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&E7(t.value):E7(t));var t})));return Kee(e,i,o,t),Xee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}tte(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=aee,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:ete(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const a=t.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else tte(e,t.position);else{const a=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,o=e.evaluater.evaluateExpression(t.expression)}else tte(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=Qee(e,t);return Kee(e,i,o,t),Xee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tte(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Xee(r,Qee(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Kee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Qee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:$ee;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=Zee(e,o,i);void 0!==s&&n.push(s)}return n}function Jee(e,t,n){const r=eee(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?y7(n):iee(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Pee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Hee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Wee+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Uee.call(e,n)&&(t[nte(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?K7[r.property]||r.property:r.attribute,n]}}function ete(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=x7(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=x7(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Uee.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tte(e)}function tte(e,t){const n=new Hee("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=Wee+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nte(e){let t=e.replace(Vee,rte);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function rte(e){return"-"+e.toLowerCase()}const ate={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"]},ote={};function ite(e,t){return ste(e,"boolean"!=typeof ote.includeImageAlt||ote.includeImageAlt,"boolean"!=typeof ote.includeHtml||ote.includeHtml)}function ste(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lte(e.children,t,n)}return Array.isArray(e)?lte(e,t,n):""}function lte(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ste(e[a],t,n);return r.join("")}const cte=document.createElement("i");function ute(e){const t="&"+e+";";cte.innerHTML=t;const n=cte.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function dte(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function pte(e,t){return e.length>0?(dte(e,e.length,0,t),e):t}const fte={}.hasOwnProperty;function hte(e){const t={};let n=-1;for(;++n<e.length;)mte(t,e[n]);return t}function mte(e,t){let n;for(n in t){const r=(fte.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){fte.call(r,o)||(r[o]=[]);const e=a[o];gte(r[o],Array.isArray(e)?e:e?[e]:[])}}}function gte(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);dte(e,0,0,r)}function yte(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function bte(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vte=Ote(/[A-Za-z]/),kte=Ote(/[\dA-Za-z]/),xte=Ote(/[#-'*+\--9=?A-Z^-~]/);function wte(e){return null!==e&&(e<32||127===e)}const Ete=Ote(/\d/),_te=Ote(/[\dA-Fa-f]/),Ste=Ote(/[!-/:-@[-`{-~]/);function Tte(e){return null!==e&&e<-2}function Cte(e){return null!==e&&(e<0||32===e)}function Ate(e){return-2===e||-1===e||32===e}const Nte=Ote(new RegExp("\\p{P}|\\p{S}","u")),Ite=Ote(/\s/);function Ote(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Rte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&kte(e.charCodeAt(n+1))&&kte(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Pte(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(Ate(r))return e.enter(n),i(r);return t(r)};function i(r){return Ate(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const Lte={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Pte(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Tte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const Dte={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}y(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return dte(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return h(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mte,u,d)(a)}function u(e){return r&&b(),y(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(Mte,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):Tte(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(y(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;dte(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Mte={tokenize:function(e,t,n){return Pte(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Fte(e){return null===e||Cte(e)||Ite(e)?1:Nte(e)?2:void 0}function jte(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const zte={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Bte(d,-s),Bte(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=pte(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=pte(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=pte(l,jte(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=pte(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=pte(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,dte(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Fte(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=Fte(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Bte(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Hte={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return vte(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||kte(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||kte(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wte(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):xte(t)?(e.consume(t),l):n(t)}function c(e){return kte(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||kte(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Ute={partial:!0,tokenize:function(e,t,n){return function(t){return Ate(t)?Pte(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Tte(e)?t(e):n(e)}}};const $te={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Ate(t))return Pte(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt($te,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return Ate(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Vte={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Ste(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Gte={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=kte,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=_te,c):(e.enter("characterReferenceValue"),a=7,o=Ete,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==kte||ute(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const qte={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Wte={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Ate(t)?Pte(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),Ate(t)?Pte(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Tte(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Ate(t)?Pte(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Tte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(qte,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Tte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Ate(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pte(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||Tte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Tte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&Ate(t)?Pte(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||Tte(t)?e.check(qte,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Tte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const Yte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Pte(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):Tte(t)?e.attempt(Zte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Tte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Zte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):Tte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):Pte(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Tte(e)?a(e):n(e)}}};const Kte={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):Tte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Tte(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class Xte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Qte(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Qte(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Qte(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Qte(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Qte(this.left,t.reverse())}}}function Qte(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Jte(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new Xte(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,ene(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return dte(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function ene(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const tne={resolve:function(e){return Jte(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):Tte(t)?e.check(nne,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},nne={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Pte(e,a,"linePrefix")};function a(a){if(null===a||Tte(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function rne(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||wte(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Tte(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(a){return u||null!==a&&41!==a&&!Cte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||wte(a)?n(a):(e.consume(a),92===a?m:h):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function ane(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):Tte(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Tte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Ate(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function one(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):Tte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Pte(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||Tte(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function ine(e,t){let n;return function r(a){if(Tte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(Ate(a))return Pte(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const sne={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return ane.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=bte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return Cte(t)?ine(e,s)(t):s(t)}function s(t){return rne(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(lne,c,c)(t)}function c(t){return Ate(t)?Pte(e,u,"whitespace")(t):u(t)}function u(o){return null===o||Tte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},lne={partial:!0,tokenize:function(e,t,n){return function(t){return Cte(t)?ine(e,r)(t):n(t)};function r(t){return one(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return Ate(t)?Pte(e,o,"whitespace")(t):o(t)}function o(e){return null===e||Tte(e)?t(e):n(e)}}};const cne={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Tte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const une={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},dte(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||Cte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Tte(n)?(e.exit("atxHeading"),t(n)):Ate(n)?Pte(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||Cte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const dne=["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"],pne=["pre","script","style","textarea"],fne={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):vte(s)?(e.consume(s),i=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):vte(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return vte(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||Cte(s)){const l=47===s,c=i.toLowerCase();return l||o||!pne.includes(c)?dne.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||kte(s)?(e.consume(s),i+=String.fromCharCode(s),h):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function g(t){return Ate(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||vte(t)?(e.consume(t),b):Ate(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||kte(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):Ate(t)?(e.consume(t),v):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):Ate(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||Tte(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Cte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||Ate(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||Tte(t)?T(t):Ate(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),I):60===t&&1===a?(e.consume(t),O):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!Tte(t)||6!==a&&7!==a?null===t||Tte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(hne,M,C)(t))}function C(t){return e.check(mne,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||Tte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function I(t){return 45===t?(e.consume(t),L):T(t)}function O(t){return 47===t?(e.consume(t),i="",R):T(t)}function R(t){if(62===t){const n=i.toLowerCase();return pne.includes(n)?(e.consume(t),D):T(t)}return vte(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),R):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||Tte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},hne={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Ute,t,n)}}},mne={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Tte(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const gne={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),b):vte(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):vte(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Tte(t)?(i=u,R(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):Tte(t)?(i=h,R(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):Tte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):Tte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return vte(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||kte(t)?(e.consume(t),x):w(t)}function w(t){return Tte(t)?(i=w,R(t)):Ate(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||kte(t)?(e.consume(t),E):47===t||62===t||Cte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||vte(t)?(e.consume(t),S):Tte(t)?(i=_,R(t)):Ate(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||kte(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):Tte(t)?(i=T,R(t)):Ate(t)?(e.consume(t),T):_(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,A):Tte(t)?(i=C,R(t)):Ate(t)?(e.consume(t),C):(e.consume(t),N)}function A(t){return t===a?(e.consume(t),a=void 0,I):null===t?n(t):Tte(t)?(i=A,R(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Cte(t)?_(t):(e.consume(t),N)}function I(e){return 47===e||62===e||Cte(e)?_(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return Ate(t)?Pte(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const yne={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&dte(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=pte(o,e.slice(r+1,r+s+3)),o=pte(o,[["enter",u,t]]),o=pte(o,jte(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=pte(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=pte(o,e.slice(a+1)),o=pte(o,[["exit",l,t]]),dte(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(bte(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(bne,c,o?c:u)(t):91===t?e.attempt(vne,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(kne,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},bne={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Cte(t)?ine(e,a)(t):a(t)}function a(t){return 41===t?c(t):rne(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Cte(t)?ine(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?one(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Cte(t)?ine(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},vne={tokenize:function(e,t,n){const r=this;return function(t){return ane.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(bte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},kne={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const xne={name:"labelStartImage",resolveAll:yne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const wne={name:"labelStartLink",resolveAll:yne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ene={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Pte(e,t,"linePrefix")}}};const _ne={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||Tte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),Ate(t)?Pte(e,o,"whitespace")(t):o(t))}}};const Sne={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ute,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pte(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!Ate(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Cne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pte(e,e.attempt(Sne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:Ete(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(_ne,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Ete(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Ute,r.interrupt?n:c,e.attempt(Tne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return Ate(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Tne={partial:!0,tokenize:function(e,t,n){const r=this;return Pte(e,(function(e){const a=r.events[r.events.length-1];return!Ate(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Cne={partial:!0,tokenize:function(e,t,n){const r=this;return Pte(e,(function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const Ane={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Ate(t)?Pte(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Tte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Nne={tokenize:function(e){const t=this,n=e.attempt(Ute,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Pte(e,e.attempt(this.parser.constructs.flow,r,e.attempt(tne,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Ine={resolveAll:Lne()},One=Pne("string"),Rne=Pne("text");function Pne(e){return{resolveAll:Lne("text"===e?Dne:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Lne(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function Dne(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const Mne={42:Sne,43:Sne,45:Sne,48:Sne,49:Sne,50:Sne,51:Sne,52:Sne,53:Sne,54:Sne,55:Sne,56:Sne,57:Sne,62:$te},Fne={91:sne},jne={[-2]:Yte,[-1]:Yte,32:Yte},zne={35:une,42:_ne,45:[Ane,_ne],60:fne,61:Ane,95:_ne,96:Wte,126:Wte},Bne={38:Gte,92:Vte},Hne={[-5]:Ene,[-4]:Ene,[-3]:Ene,33:xne,38:Gte,42:zte,60:[Hte,gne],91:wne,92:[cne,Vte],93:yne,95:zte,96:Kte},Une={null:[zte,Ine]},$ne=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Fne,disable:{null:[]},document:Mne,flow:zne,flowInitial:jne,insideSpan:Une,string:Bne,text:Hne},Symbol.toStringTag,{value:"Module"}));function Vne(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let i=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){Tte(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=pte(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=jte(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),a}function y(e){return f.restore(),++u<i.length?m(i[u]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&dte(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const Gne=/[\0\t\n\r]/g;const qne=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return yte(n.slice(t?2:1),t?16:10)}return ute(n)||e}const Yne={}.hasOwnProperty;function Zne(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:o(X),blockQuote:o(q),characterEscape:S,characterReference:S,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:S,data:S,codeFlowValue:S,definition:o(Z),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(K),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:S,htmlText:o(J,i),htmlTextData:S,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:z,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(X),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:G,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:$,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(O),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:T,htmlText:l(I),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:F,resource:j,setextHeading:l(_),setextHeadingLineSequence:E,setextHeadingText:w,strong:l(),thematicBreak:l()}};Xne(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Yne.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Jne).call(o,void 0,e[0])}for(r.position={start:Kne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Kne(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Kne(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Fee({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||Jne).call(this,e,r[0])}n.position.end=Kne(e.end)}function u(){return ite(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bte(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Kne(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Kne(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Kne(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(qne,Wne)}(t),n.identifier=bte(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function j(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bte(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=yte(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=ute(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Kne(e.end)}function V(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Jte(e););return e}(function(e){const t={constructs:hte([$ne,...(e||{}).extensions||[]]),content:n(Lte),defined:[],document:n(Dte),flow:n(Nne),lazy:{},string:n(One),text:n(Rne)};return t;function n(e){return function(n){return Vne(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(Gne.lastIndex=u,l=Gne.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Kne(e){return{line:e.line,column:e.column,offset:e.offset}}function Xne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xne(e,r):Qne(e,r)}}function Qne(e,t){let n;for(n in t)if(Yne.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 Jne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fee({start:t.start,end:t.end})+") is still open")}function ere(e){const t=this;t.parser=function(n){return Zne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tre(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function nre(e){const t=e.spread;return null==t?e.children.length>1:t}function rre(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(are(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(are(t.slice(a),a>0,!1)),o.join("")}function are(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const ore={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Rte(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tre(e,t);const a={src:Rte(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:Rte(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tre(e,t);const a={href:Rte(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:Rte(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nre(n[r])}return t}(n):nre(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Dee(t.children[1]),i=Lee(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:rre(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ire,yaml:ire,definition:ire,footnoteDefinition:ire};function ire(){}const sre="object"==typeof self?self:globalThis,lre=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new sre[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new sre[o](i),a)};return r})(new Map,e)(0),cre="",{toString:ure}={},{keys:dre}=Object,pre=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=ure.call(e).slice(8,-1);switch(n){case"Array":return[1,cre];case"Object":return[2,cre];case"Date":return[3,cre];case"RegExp":return[4,cre];case"Map":return[5,cre];case"Set":return[6,cre];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},fre=([e,t])=>0===e&&("function"===t||"symbol"===t),hre=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=pre(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of dre(r))!e&&fre(pre(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[a,i]of r)(e||!fre(pre(a))&&!fre(pre(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&fre(pre(a))||t.push(o(a));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},mre="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?lre(hre(e,t)):structuredClone(e):(e,t)=>lre(hre(e,t));function gre(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 yre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const bre=function(e){if(null==e)return kre;if("function"==typeof e)return vre(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bre(e[n]);return vre(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return vre(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return vre(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function vre(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function kre(){return!0}const xre=[],wre=!0,Ere=!1;function _re(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=bre(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=xre;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[wre,e];return null==e?xre:[e]}(n(a,l)),p[0]===Ere))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Ere)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function Sre(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),_re(e,o,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),a)}const Tre={}.hasOwnProperty,Cre={};function Are(e,t){e.position&&(t.position=function(e){const t=Dee(e),n=Lee(e);if(t&&n)return{start:t,end:n}}(e))}function Nre(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&a&&Object.assign(n.properties,mre(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Ire(e,t){const n=t.data||{},r=!("value"in t)||Tre.call(n,"hProperties")||Tre.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Ore(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Rre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Pre(e,t){const n=function(e,t){const n=t||Cre,r=new Map,a=new Map,o=new Map,i={...ore,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=Rre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=Rre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:Nre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(Tre.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=mre(n);return r.children=s.all(e),r}return mre(e)}return(s.options.unknownHandler||Ire)(s,e,t)},options:n,patch:Are,wrap:Ore};return Sre(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gre,r=e.options.footnoteBackLabel||yre,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=Rte(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...mre(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function Lre(e,t){return e&&"run"in e?async function(n,r){const a=Pre(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Pre(n,{file:r,...e||t})}}function Dre(e){if(e)throw e}var Mre=Object.prototype.hasOwnProperty,Fre=Object.prototype.toString,jre=Object.defineProperty,zre=Object.getOwnPropertyDescriptor,Bre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Fre.call(e)},Hre=function(e){if(!e||"[object Object]"!==Fre.call(e))return!1;var t,n=Mre.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Mre.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Mre.call(e,t)},Ure=function(e,t){jre&&"__proto__"===t.name?jre(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},$re=function(e,t){if("__proto__"===t){if(!Mre.call(e,t))return;if(zre)return zre(e,t).value}return e[t]},Vre=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=$re(s,n),s!==(a=$re(t,n))&&(u&&a&&(Hre(a)||(o=Bre(a)))?(o?(o=!1,i=r&&Bre(r)?r:[]):i=r&&Hre(r)?r:{},Ure(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Ure(s,{name:n,newValue:a}));return s};const Gre=S(Vre);function qre(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Wre(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(a);try{s=e.apply(this,t)}catch(o){if(r&&n)throw o;return a(o)}r||(s&&s.then&&"function"==typeof s.then?s.then(i,a):s instanceof Error?a(s):i(s))}function a(e,...r){n||(n=!0,t(e,...r))}function i(e){a(null,e)}}(s,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Yre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Zre(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(Zre(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Zre(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Zre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Zre(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Zre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Kre={cwd:function(){return"/"}};function Xre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Qre(e){if("string"==typeof e)e=new URL(e);else if(!Xre(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Jre=["history","path","basename","stem","extname","dirname"];class eae{constructor(e){let t;t=e?Xre(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Kre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Jre.length;){const e=Jre[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Jre.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Yre.basename(this.path):void 0}set basename(e){nae(e,"basename"),tae(e,"basename"),this.path=Yre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Yre.dirname(this.path):void 0}set dirname(e){rae(this.basename,"dirname"),this.path=Yre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Yre.extname(this.path):void 0}set extname(e){if(tae(e,"extname"),rae(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Xre(e)&&(e=Qre(e)),nae(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Yre.basename(this.path,this.extname):void 0}set stem(e){nae(e,"stem"),tae(e,"stem"),this.path=Yre.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Hee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function tae(e,t){if(e&&e.includes(Yre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yre.sep+"`")}function nae(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rae(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const aae=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},oae={}.hasOwnProperty;class iae extends aae{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=Wre()}copy(){const e=new iae;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Gre(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(uae("data",this.frozen),this.namespace[e]=t,this):oae.call(this.namespace,e)&&this.namespace[e]||void 0:e?(uae("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=fae(e),n=this.parser||this.Parser;return lae("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),lae("process",this.parser||this.Parser),cae("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=fae(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,(function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),lae("processSync",this.parser||this.Parser),cae("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Dre(e),t=r})),pae("processSync","process",n),t}run(e,t,n){dae(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=fae(t);r.run(e,i,(function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Dre(e),n=t,r=!0})),pae("runSync","run",r),n}stringify(e,t){this.freeze();const n=fae(t),r=this.compiler||this.Compiler;return cae("stringify",r),dae(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(uae("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=Gre(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];qre(i)&&qre(r)&&(r=Gre(!0,i,r)),n[a]=[e,r,...o]}}}}const sae=(new iae).freeze();function lae(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function cae(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function uae(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 dae(e){if(!qre(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function pae(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fae(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new eae(e)}const hae=[],mae={allowDangerousHtml:!0},gae=/^(https?|ircs?|mailto|xmpp)$/i,yae=[{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 bae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||hae,l=e.remarkPlugins||hae,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mae}:mae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||vae,f=sae().use(ere).use(l).use(Lre,c).use(s),h=new eae;"string"==typeof r&&(h.value=r);for(const y of yae)Object.hasOwn(e,y.from)&&(y.from,y.to&&y.to,y.id);const m=f.parse(h);let g=f.runSync(m,h);return a&&(g={type:"element",tagName:"div",properties:{className:a},children:"root"===g.type?g.children:[g]}),Sre(g,(function(e,r,a){if("raw"===e.type&&a&&"number"==typeof r)return u?a.children.splice(r,1):a.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in ate)if(Object.hasOwn(ate,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=ate[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof r&&(o=!n(e,r,a)),o&&a&&"number"==typeof r)return d&&e.children?a.children.splice(r,1,...e.children):a.children.splice(r,1),r}})),Yee(g,{Fragment:wg.Fragment,components:o,ignoreInvalidStyle:!0,jsx:wg.jsx,jsxs:wg.jsxs,passKeys:!0,passNode:!0})}function vae(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||gae.test(e.slice(0,t))?e:""}const kae=/[#.]/g;function xae(e,t,n){const r=n?function(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,a,...o){let i;if(null==n){i={type:"root",children:[]};const e=a;o.unshift(e)}else{i=function(e,t){const n=e||"",r={};let a,o,i=0;for(;i<n.length;){kae.lastIndex=i;const e=kae.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?"#"===a?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=i.tagName.toLowerCase(),l=r?r.get(s):void 0;if(i.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(a))o.unshift(a);else for(const[t,n]of Object.entries(a))wae(e,i.properties,t,n)}for(const e of o)Eae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function wae(e,t,n,r){const a=eee(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?oee(r):a.commaSeparated?g7(r):a.commaOrSpaceSeparated?oee(g7(r).join(" ")):_ae(a,a.property,r):Array.isArray(r)?[...r]:"style"===a.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push(_ae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function Eae(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Eae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Eae(e,t.children):e.push(t)}}function _ae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||T7(n)===T7(t)))return!0}return n}const Sae=xae(ree,"div"),Tae=xae(aee,"g",["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"]);function Cae(e,t){const n=e.indexOf("\r",t),r=e.indexOf("\n",t);return-1===r?n:-1===n||n+1===r?r:n<r?n:r}const Aae={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/"},Nae={}.hasOwnProperty,Iae=Object.prototype;function Oae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Pae(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r&&("quirks"===r.mode||"limited-quirks"===r.mode);if(n={type:"root",children:Rae(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[];return{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){const e=n[n.length-1],r=Cae(t,e),a=-1===r?t.length+1:r+1;if(e===a)break;n.push(a)}const r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let r=0;for(;;){let a=n[r];if(void 0===a){const e=Cae(t,n[r-1]);a=-1===e?t.length+1:e+1,n[r]=a}if(a>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),a=r.toPoint(0),o=r.toPoint(t.length);n.position={start:a,end:o}}return n}case"#documentType":return n={type:"doctype"},Pae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},Pae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===Aae.svg?aee:ree;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;Nae.call(Iae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?Tae:Sae,i=o(t.tagName,a,Rae(e,t.childNodes));if(Pae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&Lae(r.startTag),o=r&&r.endTag&&Lae(r.endTag),s=Oae(e,n.content);a&&o&&e.file&&(s.position={start:a.end,end:o.start}),i.content=s}return e.schema=n,i}(e,t),n}}function Rae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Oae(e,t[n]);r.push(a)}return r}function Pae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=Lae(n);if("element"===t.type){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const r={};let a;if(n.attrs)for(a in n.attrs)Nae.call(n.attrs,a)&&(r[eee(e.schema,a).property]=Lae(n.attrs[a]));n.startTag;const o=Lae(n.startTag),i=n.endTag?Lae(n.endTag):void 0,s={opening:o};i&&(s.closing=i),s.properties=r,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Lae(e){const t=Dae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Dae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Dae(e){return e.line&&e.column?e:void 0}const Mae={}.hasOwnProperty;function Fae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&Mae.call(t,e)){const n=String(t[e]);a=Mae.call(o,n)?o[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jae={},zae={}.hasOwnProperty,Bae=Fae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Uae(e.children,n,t),$ae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=aee);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&zae.call(e.properties,o)){const t=Hae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Aae[i],childNodes:[],parentNode:null};s.childNodes=Uae(e.children,s,r),$ae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Uae(e.children,n,t),$ae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return $ae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return $ae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return $ae(e,t),t}}});function Hae(e,t,n){const r=eee(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?y7(n):iee(n));const a={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){const e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=r.attribute.slice(0,e)),a.namespace=Aae[r.space]}return a}function Uae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Bae(e[r],n);o.parentNode=t,a.push(o)}return a}function $ae(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 Vae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Gae=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]),qae="�";var Wae,Yae;(Yae=Wae||(Wae={}))[Yae.EOF=-1]="EOF",Yae[Yae.NULL=0]="NULL",Yae[Yae.TABULATION=9]="TABULATION",Yae[Yae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Yae[Yae.LINE_FEED=10]="LINE_FEED",Yae[Yae.FORM_FEED=12]="FORM_FEED",Yae[Yae.SPACE=32]="SPACE",Yae[Yae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Yae[Yae.QUOTATION_MARK=34]="QUOTATION_MARK",Yae[Yae.AMPERSAND=38]="AMPERSAND",Yae[Yae.APOSTROPHE=39]="APOSTROPHE",Yae[Yae.HYPHEN_MINUS=45]="HYPHEN_MINUS",Yae[Yae.SOLIDUS=47]="SOLIDUS",Yae[Yae.DIGIT_0=48]="DIGIT_0",Yae[Yae.DIGIT_9=57]="DIGIT_9",Yae[Yae.SEMICOLON=59]="SEMICOLON",Yae[Yae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Yae[Yae.EQUALS_SIGN=61]="EQUALS_SIGN",Yae[Yae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Yae[Yae.QUESTION_MARK=63]="QUESTION_MARK",Yae[Yae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Yae[Yae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Yae[Yae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Yae[Yae.GRAVE_ACCENT=96]="GRAVE_ACCENT",Yae[Yae.LATIN_SMALL_A=97]="LATIN_SMALL_A",Yae[Yae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const Zae="--",Kae="[CDATA[",Xae="doctype",Qae="script",Jae="public",eoe="system";function toe(e){return e>=55296&&e<=57343}function noe(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function roe(e){return e>=64976&&e<=65007||Gae.has(e)}var aoe,ooe;(ooe=aoe||(aoe={})).controlCharacterInInputStream="control-character-in-input-stream",ooe.noncharacterInInputStream="noncharacter-in-input-stream",ooe.surrogateInInputStream="surrogate-in-input-stream",ooe.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",ooe.endTagWithAttributes="end-tag-with-attributes",ooe.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",ooe.unexpectedSolidusInTag="unexpected-solidus-in-tag",ooe.unexpectedNullCharacter="unexpected-null-character",ooe.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",ooe.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",ooe.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",ooe.missingEndTagName="missing-end-tag-name",ooe.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",ooe.unknownNamedCharacterReference="unknown-named-character-reference",ooe.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",ooe.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",ooe.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",ooe.eofBeforeTagName="eof-before-tag-name",ooe.eofInTag="eof-in-tag",ooe.missingAttributeValue="missing-attribute-value",ooe.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",ooe.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",ooe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",ooe.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",ooe.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",ooe.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",ooe.missingDoctypePublicIdentifier="missing-doctype-public-identifier",ooe.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",ooe.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",ooe.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",ooe.cdataInHtmlContent="cdata-in-html-content",ooe.incorrectlyOpenedComment="incorrectly-opened-comment",ooe.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",ooe.eofInDoctype="eof-in-doctype",ooe.nestedComment="nested-comment",ooe.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",ooe.eofInComment="eof-in-comment",ooe.incorrectlyClosedComment="incorrectly-closed-comment",ooe.eofInCdata="eof-in-cdata",ooe.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",ooe.nullCharacterReference="null-character-reference",ooe.surrogateCharacterReference="surrogate-character-reference",ooe.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",ooe.controlCharacterReference="control-character-reference",ooe.noncharacterCharacterReference="noncharacter-character-reference",ooe.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",ooe.missingDoctypeName="missing-doctype-name",ooe.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",ooe.duplicateAttribute="duplicate-attribute",ooe.nonConformingDoctype="non-conforming-doctype",ooe.missingDoctype="missing-doctype",ooe.misplacedDoctype="misplaced-doctype",ooe.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",ooe.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",ooe.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",ooe.openElementsLeftAfterEof="open-elements-left-after-eof",ooe.abandonedHeadElementChild="abandoned-head-element-child",ooe.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",ooe.nestedNoscriptInHead="nested-noscript-in-head",ooe.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class ioe{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:a}=this,o=r+t,i=a+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:i,endOffset:i}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Wae.EOF;return this._err(aoe.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++){if((32|this.html.charCodeAt(this.pos+n))!==e.charCodeAt(n))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Wae.EOF;const n=this.html.charCodeAt(t);return n===Wae.CARRIAGE_RETURN?Wae.LINE_FEED:n}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,Wae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Wae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Wae.LINE_FEED;if(e===Wae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,toe(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Wae.LINE_FEED||e===Wae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){noe(e)?this._err(aoe.controlCharacterInInputStream):roe(e)&&this._err(aoe.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var soe,loe;function coe(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}(loe=soe||(soe={}))[loe.CHARACTER=0]="CHARACTER",loe[loe.NULL_CHARACTER=1]="NULL_CHARACTER",loe[loe.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",loe[loe.START_TAG=3]="START_TAG",loe[loe.END_TAG=4]="END_TAG",loe[loe.COMMENT=5]="COMMENT",loe[loe.DOCTYPE=6]="DOCTYPE",loe[loe.EOF=7]="EOF",loe[loe.HIBERNATION=8]="HIBERNATION";const uoe=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)))),doe=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]]);var poe,foe;(foe=poe||(poe={}))[foe.NUM=35]="NUM",foe[foe.SEMI=59]="SEMI",foe[foe.EQUALS=61]="EQUALS",foe[foe.ZERO=48]="ZERO",foe[foe.NINE=57]="NINE",foe[foe.LOWER_A=97]="LOWER_A",foe[foe.LOWER_F=102]="LOWER_F",foe[foe.LOWER_X=120]="LOWER_X",foe[foe.LOWER_Z=122]="LOWER_Z",foe[foe.UPPER_A=65]="UPPER_A",foe[foe.UPPER_F=70]="UPPER_F",foe[foe.UPPER_Z=90]="UPPER_Z";var hoe,moe,goe,yoe,boe,voe,koe,xoe,woe,Eoe,_oe,Soe,Toe,Coe,Aoe,Noe;function Ioe(e){return e>=poe.ZERO&&e<=poe.NINE}function Ooe(e){return e===poe.EQUALS||function(e){return e>=poe.UPPER_A&&e<=poe.UPPER_Z||e>=poe.LOWER_A&&e<=poe.LOWER_Z||Ioe(e)}(e)}(moe=hoe||(hoe={}))[moe.VALUE_LENGTH=49152]="VALUE_LENGTH",moe[moe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",moe[moe.JUMP_TABLE=127]="JUMP_TABLE",(yoe=goe||(goe={}))[yoe.EntityStart=0]="EntityStart",yoe[yoe.NumericStart=1]="NumericStart",yoe[yoe.NumericDecimal=2]="NumericDecimal",yoe[yoe.NumericHex=3]="NumericHex",yoe[yoe.NamedEntity=4]="NamedEntity",(voe=boe||(boe={}))[voe.Legacy=0]="Legacy",voe[voe.Strict=1]="Strict",voe[voe.Attribute=2]="Attribute";class Roe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=goe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=boe.Strict}startEntity(e){this.decodeMode=e,this.state=goe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case goe.EntityStart:return e.charCodeAt(t)===poe.NUM?(this.state=goe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=goe.NamedEntity,this.stateNamedEntity(e,t));case goe.NumericStart:return this.stateNumericStart(e,t);case goe.NumericDecimal:return this.stateNumericDecimal(e,t);case goe.NumericHex:return this.stateNumericHex(e,t);case goe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===poe.LOWER_X?(this.state=goe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=goe.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const a=n-t;this.result=this.result*Math.pow(r,a)+Number.parseInt(e.substr(t,a),r),this.consumed+=a}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const a=e.charCodeAt(t);if(!(Ioe(a)||(r=a,r>=poe.UPPER_A&&r<=poe.UPPER_F||r>=poe.LOWER_A&&r<=poe.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(a,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!Ioe(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===poe.SEMI)this.consumed+=1;else if(this.decodeMode===boe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=doe.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==poe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],a=(r&hoe.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=Poe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===boe.Attribute&&(0===a||Ooe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&hoe.VALUE_LENGTH)>>14,0!==a){if(o===poe.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==boe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&hoe.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~hoe.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case goe.NamedEntity:return 0===this.result||this.decodeMode===boe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case goe.NumericDecimal:return this.emitNumericEntity(0,2);case goe.NumericHex:return this.emitNumericEntity(0,3);case goe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case goe.EntityStart:return 0}}}function Poe(e,t,n,r){const a=(t&hoe.BRANCH_LENGTH)>>7,o=t&hoe.JUMP_TABLE;if(0===a)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=a?-1:e[n+t]-1}let i=n,s=i+a-1;for(;i<=s;){const t=i+s>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+a];s=t-1}}return-1}(xoe=koe||(koe={})).HTML="http://www.w3.org/1999/xhtml",xoe.MATHML="http://www.w3.org/1998/Math/MathML",xoe.SVG="http://www.w3.org/2000/svg",xoe.XLINK="http://www.w3.org/1999/xlink",xoe.XML="http://www.w3.org/XML/1998/namespace",xoe.XMLNS="http://www.w3.org/2000/xmlns/",(Eoe=woe||(woe={})).TYPE="type",Eoe.ACTION="action",Eoe.ENCODING="encoding",Eoe.PROMPT="prompt",Eoe.NAME="name",Eoe.COLOR="color",Eoe.FACE="face",Eoe.SIZE="size",(Soe=_oe||(_oe={})).NO_QUIRKS="no-quirks",Soe.QUIRKS="quirks",Soe.LIMITED_QUIRKS="limited-quirks",(Coe=Toe||(Toe={})).A="a",Coe.ADDRESS="address",Coe.ANNOTATION_XML="annotation-xml",Coe.APPLET="applet",Coe.AREA="area",Coe.ARTICLE="article",Coe.ASIDE="aside",Coe.B="b",Coe.BASE="base",Coe.BASEFONT="basefont",Coe.BGSOUND="bgsound",Coe.BIG="big",Coe.BLOCKQUOTE="blockquote",Coe.BODY="body",Coe.BR="br",Coe.BUTTON="button",Coe.CAPTION="caption",Coe.CENTER="center",Coe.CODE="code",Coe.COL="col",Coe.COLGROUP="colgroup",Coe.DD="dd",Coe.DESC="desc",Coe.DETAILS="details",Coe.DIALOG="dialog",Coe.DIR="dir",Coe.DIV="div",Coe.DL="dl",Coe.DT="dt",Coe.EM="em",Coe.EMBED="embed",Coe.FIELDSET="fieldset",Coe.FIGCAPTION="figcaption",Coe.FIGURE="figure",Coe.FONT="font",Coe.FOOTER="footer",Coe.FOREIGN_OBJECT="foreignObject",Coe.FORM="form",Coe.FRAME="frame",Coe.FRAMESET="frameset",Coe.H1="h1",Coe.H2="h2",Coe.H3="h3",Coe.H4="h4",Coe.H5="h5",Coe.H6="h6",Coe.HEAD="head",Coe.HEADER="header",Coe.HGROUP="hgroup",Coe.HR="hr",Coe.HTML="html",Coe.I="i",Coe.IMG="img",Coe.IMAGE="image",Coe.INPUT="input",Coe.IFRAME="iframe",Coe.KEYGEN="keygen",Coe.LABEL="label",Coe.LI="li",Coe.LINK="link",Coe.LISTING="listing",Coe.MAIN="main",Coe.MALIGNMARK="malignmark",Coe.MARQUEE="marquee",Coe.MATH="math",Coe.MENU="menu",Coe.META="meta",Coe.MGLYPH="mglyph",Coe.MI="mi",Coe.MO="mo",Coe.MN="mn",Coe.MS="ms",Coe.MTEXT="mtext",Coe.NAV="nav",Coe.NOBR="nobr",Coe.NOFRAMES="noframes",Coe.NOEMBED="noembed",Coe.NOSCRIPT="noscript",Coe.OBJECT="object",Coe.OL="ol",Coe.OPTGROUP="optgroup",Coe.OPTION="option",Coe.P="p",Coe.PARAM="param",Coe.PLAINTEXT="plaintext",Coe.PRE="pre",Coe.RB="rb",Coe.RP="rp",Coe.RT="rt",Coe.RTC="rtc",Coe.RUBY="ruby",Coe.S="s",Coe.SCRIPT="script",Coe.SEARCH="search",Coe.SECTION="section",Coe.SELECT="select",Coe.SOURCE="source",Coe.SMALL="small",Coe.SPAN="span",Coe.STRIKE="strike",Coe.STRONG="strong",Coe.STYLE="style",Coe.SUB="sub",Coe.SUMMARY="summary",Coe.SUP="sup",Coe.TABLE="table",Coe.TBODY="tbody",Coe.TEMPLATE="template",Coe.TEXTAREA="textarea",Coe.TFOOT="tfoot",Coe.TD="td",Coe.TH="th",Coe.THEAD="thead",Coe.TITLE="title",Coe.TR="tr",Coe.TRACK="track",Coe.TT="tt",Coe.U="u",Coe.UL="ul",Coe.SVG="svg",Coe.VAR="var",Coe.WBR="wbr",Coe.XMP="xmp",(Noe=Aoe||(Aoe={}))[Noe.UNKNOWN=0]="UNKNOWN",Noe[Noe.A=1]="A",Noe[Noe.ADDRESS=2]="ADDRESS",Noe[Noe.ANNOTATION_XML=3]="ANNOTATION_XML",Noe[Noe.APPLET=4]="APPLET",Noe[Noe.AREA=5]="AREA",Noe[Noe.ARTICLE=6]="ARTICLE",Noe[Noe.ASIDE=7]="ASIDE",Noe[Noe.B=8]="B",Noe[Noe.BASE=9]="BASE",Noe[Noe.BASEFONT=10]="BASEFONT",Noe[Noe.BGSOUND=11]="BGSOUND",Noe[Noe.BIG=12]="BIG",Noe[Noe.BLOCKQUOTE=13]="BLOCKQUOTE",Noe[Noe.BODY=14]="BODY",Noe[Noe.BR=15]="BR",Noe[Noe.BUTTON=16]="BUTTON",Noe[Noe.CAPTION=17]="CAPTION",Noe[Noe.CENTER=18]="CENTER",Noe[Noe.CODE=19]="CODE",Noe[Noe.COL=20]="COL",Noe[Noe.COLGROUP=21]="COLGROUP",Noe[Noe.DD=22]="DD",Noe[Noe.DESC=23]="DESC",Noe[Noe.DETAILS=24]="DETAILS",Noe[Noe.DIALOG=25]="DIALOG",Noe[Noe.DIR=26]="DIR",Noe[Noe.DIV=27]="DIV",Noe[Noe.DL=28]="DL",Noe[Noe.DT=29]="DT",Noe[Noe.EM=30]="EM",Noe[Noe.EMBED=31]="EMBED",Noe[Noe.FIELDSET=32]="FIELDSET",Noe[Noe.FIGCAPTION=33]="FIGCAPTION",Noe[Noe.FIGURE=34]="FIGURE",Noe[Noe.FONT=35]="FONT",Noe[Noe.FOOTER=36]="FOOTER",Noe[Noe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",Noe[Noe.FORM=38]="FORM",Noe[Noe.FRAME=39]="FRAME",Noe[Noe.FRAMESET=40]="FRAMESET",Noe[Noe.H1=41]="H1",Noe[Noe.H2=42]="H2",Noe[Noe.H3=43]="H3",Noe[Noe.H4=44]="H4",Noe[Noe.H5=45]="H5",Noe[Noe.H6=46]="H6",Noe[Noe.HEAD=47]="HEAD",Noe[Noe.HEADER=48]="HEADER",Noe[Noe.HGROUP=49]="HGROUP",Noe[Noe.HR=50]="HR",Noe[Noe.HTML=51]="HTML",Noe[Noe.I=52]="I",Noe[Noe.IMG=53]="IMG",Noe[Noe.IMAGE=54]="IMAGE",Noe[Noe.INPUT=55]="INPUT",Noe[Noe.IFRAME=56]="IFRAME",Noe[Noe.KEYGEN=57]="KEYGEN",Noe[Noe.LABEL=58]="LABEL",Noe[Noe.LI=59]="LI",Noe[Noe.LINK=60]="LINK",Noe[Noe.LISTING=61]="LISTING",Noe[Noe.MAIN=62]="MAIN",Noe[Noe.MALIGNMARK=63]="MALIGNMARK",Noe[Noe.MARQUEE=64]="MARQUEE",Noe[Noe.MATH=65]="MATH",Noe[Noe.MENU=66]="MENU",Noe[Noe.META=67]="META",Noe[Noe.MGLYPH=68]="MGLYPH",Noe[Noe.MI=69]="MI",Noe[Noe.MO=70]="MO",Noe[Noe.MN=71]="MN",Noe[Noe.MS=72]="MS",Noe[Noe.MTEXT=73]="MTEXT",Noe[Noe.NAV=74]="NAV",Noe[Noe.NOBR=75]="NOBR",Noe[Noe.NOFRAMES=76]="NOFRAMES",Noe[Noe.NOEMBED=77]="NOEMBED",Noe[Noe.NOSCRIPT=78]="NOSCRIPT",Noe[Noe.OBJECT=79]="OBJECT",Noe[Noe.OL=80]="OL",Noe[Noe.OPTGROUP=81]="OPTGROUP",Noe[Noe.OPTION=82]="OPTION",Noe[Noe.P=83]="P",Noe[Noe.PARAM=84]="PARAM",Noe[Noe.PLAINTEXT=85]="PLAINTEXT",Noe[Noe.PRE=86]="PRE",Noe[Noe.RB=87]="RB",Noe[Noe.RP=88]="RP",Noe[Noe.RT=89]="RT",Noe[Noe.RTC=90]="RTC",Noe[Noe.RUBY=91]="RUBY",Noe[Noe.S=92]="S",Noe[Noe.SCRIPT=93]="SCRIPT",Noe[Noe.SEARCH=94]="SEARCH",Noe[Noe.SECTION=95]="SECTION",Noe[Noe.SELECT=96]="SELECT",Noe[Noe.SOURCE=97]="SOURCE",Noe[Noe.SMALL=98]="SMALL",Noe[Noe.SPAN=99]="SPAN",Noe[Noe.STRIKE=100]="STRIKE",Noe[Noe.STRONG=101]="STRONG",Noe[Noe.STYLE=102]="STYLE",Noe[Noe.SUB=103]="SUB",Noe[Noe.SUMMARY=104]="SUMMARY",Noe[Noe.SUP=105]="SUP",Noe[Noe.TABLE=106]="TABLE",Noe[Noe.TBODY=107]="TBODY",Noe[Noe.TEMPLATE=108]="TEMPLATE",Noe[Noe.TEXTAREA=109]="TEXTAREA",Noe[Noe.TFOOT=110]="TFOOT",Noe[Noe.TD=111]="TD",Noe[Noe.TH=112]="TH",Noe[Noe.THEAD=113]="THEAD",Noe[Noe.TITLE=114]="TITLE",Noe[Noe.TR=115]="TR",Noe[Noe.TRACK=116]="TRACK",Noe[Noe.TT=117]="TT",Noe[Noe.U=118]="U",Noe[Noe.UL=119]="UL",Noe[Noe.SVG=120]="SVG",Noe[Noe.VAR=121]="VAR",Noe[Noe.WBR=122]="WBR",Noe[Noe.XMP=123]="XMP";const Loe=new Map([[Toe.A,Aoe.A],[Toe.ADDRESS,Aoe.ADDRESS],[Toe.ANNOTATION_XML,Aoe.ANNOTATION_XML],[Toe.APPLET,Aoe.APPLET],[Toe.AREA,Aoe.AREA],[Toe.ARTICLE,Aoe.ARTICLE],[Toe.ASIDE,Aoe.ASIDE],[Toe.B,Aoe.B],[Toe.BASE,Aoe.BASE],[Toe.BASEFONT,Aoe.BASEFONT],[Toe.BGSOUND,Aoe.BGSOUND],[Toe.BIG,Aoe.BIG],[Toe.BLOCKQUOTE,Aoe.BLOCKQUOTE],[Toe.BODY,Aoe.BODY],[Toe.BR,Aoe.BR],[Toe.BUTTON,Aoe.BUTTON],[Toe.CAPTION,Aoe.CAPTION],[Toe.CENTER,Aoe.CENTER],[Toe.CODE,Aoe.CODE],[Toe.COL,Aoe.COL],[Toe.COLGROUP,Aoe.COLGROUP],[Toe.DD,Aoe.DD],[Toe.DESC,Aoe.DESC],[Toe.DETAILS,Aoe.DETAILS],[Toe.DIALOG,Aoe.DIALOG],[Toe.DIR,Aoe.DIR],[Toe.DIV,Aoe.DIV],[Toe.DL,Aoe.DL],[Toe.DT,Aoe.DT],[Toe.EM,Aoe.EM],[Toe.EMBED,Aoe.EMBED],[Toe.FIELDSET,Aoe.FIELDSET],[Toe.FIGCAPTION,Aoe.FIGCAPTION],[Toe.FIGURE,Aoe.FIGURE],[Toe.FONT,Aoe.FONT],[Toe.FOOTER,Aoe.FOOTER],[Toe.FOREIGN_OBJECT,Aoe.FOREIGN_OBJECT],[Toe.FORM,Aoe.FORM],[Toe.FRAME,Aoe.FRAME],[Toe.FRAMESET,Aoe.FRAMESET],[Toe.H1,Aoe.H1],[Toe.H2,Aoe.H2],[Toe.H3,Aoe.H3],[Toe.H4,Aoe.H4],[Toe.H5,Aoe.H5],[Toe.H6,Aoe.H6],[Toe.HEAD,Aoe.HEAD],[Toe.HEADER,Aoe.HEADER],[Toe.HGROUP,Aoe.HGROUP],[Toe.HR,Aoe.HR],[Toe.HTML,Aoe.HTML],[Toe.I,Aoe.I],[Toe.IMG,Aoe.IMG],[Toe.IMAGE,Aoe.IMAGE],[Toe.INPUT,Aoe.INPUT],[Toe.IFRAME,Aoe.IFRAME],[Toe.KEYGEN,Aoe.KEYGEN],[Toe.LABEL,Aoe.LABEL],[Toe.LI,Aoe.LI],[Toe.LINK,Aoe.LINK],[Toe.LISTING,Aoe.LISTING],[Toe.MAIN,Aoe.MAIN],[Toe.MALIGNMARK,Aoe.MALIGNMARK],[Toe.MARQUEE,Aoe.MARQUEE],[Toe.MATH,Aoe.MATH],[Toe.MENU,Aoe.MENU],[Toe.META,Aoe.META],[Toe.MGLYPH,Aoe.MGLYPH],[Toe.MI,Aoe.MI],[Toe.MO,Aoe.MO],[Toe.MN,Aoe.MN],[Toe.MS,Aoe.MS],[Toe.MTEXT,Aoe.MTEXT],[Toe.NAV,Aoe.NAV],[Toe.NOBR,Aoe.NOBR],[Toe.NOFRAMES,Aoe.NOFRAMES],[Toe.NOEMBED,Aoe.NOEMBED],[Toe.NOSCRIPT,Aoe.NOSCRIPT],[Toe.OBJECT,Aoe.OBJECT],[Toe.OL,Aoe.OL],[Toe.OPTGROUP,Aoe.OPTGROUP],[Toe.OPTION,Aoe.OPTION],[Toe.P,Aoe.P],[Toe.PARAM,Aoe.PARAM],[Toe.PLAINTEXT,Aoe.PLAINTEXT],[Toe.PRE,Aoe.PRE],[Toe.RB,Aoe.RB],[Toe.RP,Aoe.RP],[Toe.RT,Aoe.RT],[Toe.RTC,Aoe.RTC],[Toe.RUBY,Aoe.RUBY],[Toe.S,Aoe.S],[Toe.SCRIPT,Aoe.SCRIPT],[Toe.SEARCH,Aoe.SEARCH],[Toe.SECTION,Aoe.SECTION],[Toe.SELECT,Aoe.SELECT],[Toe.SOURCE,Aoe.SOURCE],[Toe.SMALL,Aoe.SMALL],[Toe.SPAN,Aoe.SPAN],[Toe.STRIKE,Aoe.STRIKE],[Toe.STRONG,Aoe.STRONG],[Toe.STYLE,Aoe.STYLE],[Toe.SUB,Aoe.SUB],[Toe.SUMMARY,Aoe.SUMMARY],[Toe.SUP,Aoe.SUP],[Toe.TABLE,Aoe.TABLE],[Toe.TBODY,Aoe.TBODY],[Toe.TEMPLATE,Aoe.TEMPLATE],[Toe.TEXTAREA,Aoe.TEXTAREA],[Toe.TFOOT,Aoe.TFOOT],[Toe.TD,Aoe.TD],[Toe.TH,Aoe.TH],[Toe.THEAD,Aoe.THEAD],[Toe.TITLE,Aoe.TITLE],[Toe.TR,Aoe.TR],[Toe.TRACK,Aoe.TRACK],[Toe.TT,Aoe.TT],[Toe.U,Aoe.U],[Toe.UL,Aoe.UL],[Toe.SVG,Aoe.SVG],[Toe.VAR,Aoe.VAR],[Toe.WBR,Aoe.WBR],[Toe.XMP,Aoe.XMP]]);function Doe(e){var t;return null!==(t=Loe.get(e))&&void 0!==t?t:Aoe.UNKNOWN}const Moe=Aoe,Foe={[koe.HTML]:new Set([Moe.ADDRESS,Moe.APPLET,Moe.AREA,Moe.ARTICLE,Moe.ASIDE,Moe.BASE,Moe.BASEFONT,Moe.BGSOUND,Moe.BLOCKQUOTE,Moe.BODY,Moe.BR,Moe.BUTTON,Moe.CAPTION,Moe.CENTER,Moe.COL,Moe.COLGROUP,Moe.DD,Moe.DETAILS,Moe.DIR,Moe.DIV,Moe.DL,Moe.DT,Moe.EMBED,Moe.FIELDSET,Moe.FIGCAPTION,Moe.FIGURE,Moe.FOOTER,Moe.FORM,Moe.FRAME,Moe.FRAMESET,Moe.H1,Moe.H2,Moe.H3,Moe.H4,Moe.H5,Moe.H6,Moe.HEAD,Moe.HEADER,Moe.HGROUP,Moe.HR,Moe.HTML,Moe.IFRAME,Moe.IMG,Moe.INPUT,Moe.LI,Moe.LINK,Moe.LISTING,Moe.MAIN,Moe.MARQUEE,Moe.MENU,Moe.META,Moe.NAV,Moe.NOEMBED,Moe.NOFRAMES,Moe.NOSCRIPT,Moe.OBJECT,Moe.OL,Moe.P,Moe.PARAM,Moe.PLAINTEXT,Moe.PRE,Moe.SCRIPT,Moe.SECTION,Moe.SELECT,Moe.SOURCE,Moe.STYLE,Moe.SUMMARY,Moe.TABLE,Moe.TBODY,Moe.TD,Moe.TEMPLATE,Moe.TEXTAREA,Moe.TFOOT,Moe.TH,Moe.THEAD,Moe.TITLE,Moe.TR,Moe.TRACK,Moe.UL,Moe.WBR,Moe.XMP]),[koe.MATHML]:new Set([Moe.MI,Moe.MO,Moe.MN,Moe.MS,Moe.MTEXT,Moe.ANNOTATION_XML]),[koe.SVG]:new Set([Moe.TITLE,Moe.FOREIGN_OBJECT,Moe.DESC]),[koe.XLINK]:new Set,[koe.XML]:new Set,[koe.XMLNS]:new Set},joe=new Set([Moe.H1,Moe.H2,Moe.H3,Moe.H4,Moe.H5,Moe.H6]);var zoe,Boe;Toe.STYLE,Toe.SCRIPT,Toe.XMP,Toe.IFRAME,Toe.NOEMBED,Toe.NOFRAMES,Toe.PLAINTEXT,(Boe=zoe||(zoe={}))[Boe.DATA=0]="DATA",Boe[Boe.RCDATA=1]="RCDATA",Boe[Boe.RAWTEXT=2]="RAWTEXT",Boe[Boe.SCRIPT_DATA=3]="SCRIPT_DATA",Boe[Boe.PLAINTEXT=4]="PLAINTEXT",Boe[Boe.TAG_OPEN=5]="TAG_OPEN",Boe[Boe.END_TAG_OPEN=6]="END_TAG_OPEN",Boe[Boe.TAG_NAME=7]="TAG_NAME",Boe[Boe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Boe[Boe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Boe[Boe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Boe[Boe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Boe[Boe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Boe[Boe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Boe[Boe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Boe[Boe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Boe[Boe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Boe[Boe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Boe[Boe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Boe[Boe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Boe[Boe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Boe[Boe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Boe[Boe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Boe[Boe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Boe[Boe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Boe[Boe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Boe[Boe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Boe[Boe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Boe[Boe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Boe[Boe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Boe[Boe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Boe[Boe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Boe[Boe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Boe[Boe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Boe[Boe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Boe[Boe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Boe[Boe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Boe[Boe.COMMENT_START=42]="COMMENT_START",Boe[Boe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Boe[Boe.COMMENT=44]="COMMENT",Boe[Boe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Boe[Boe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Boe[Boe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Boe[Boe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Boe[Boe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Boe[Boe.COMMENT_END=50]="COMMENT_END",Boe[Boe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Boe[Boe.DOCTYPE=52]="DOCTYPE",Boe[Boe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Boe[Boe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Boe[Boe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Boe[Boe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Boe[Boe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Boe[Boe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Boe[Boe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Boe[Boe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Boe[Boe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Boe[Boe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Boe[Boe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Boe[Boe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Boe[Boe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Boe[Boe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Boe[Boe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Boe[Boe.CDATA_SECTION=68]="CDATA_SECTION",Boe[Boe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Boe[Boe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Boe[Boe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Boe[Boe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Hoe={DATA:zoe.DATA,RCDATA:zoe.RCDATA,RAWTEXT:zoe.RAWTEXT,SCRIPT_DATA:zoe.SCRIPT_DATA,PLAINTEXT:zoe.PLAINTEXT,CDATA_SECTION:zoe.CDATA_SECTION};function Uoe(e){return e>=Wae.LATIN_CAPITAL_A&&e<=Wae.LATIN_CAPITAL_Z}function $oe(e){return function(e){return e>=Wae.LATIN_SMALL_A&&e<=Wae.LATIN_SMALL_Z}(e)||Uoe(e)}function Voe(e){return $oe(e)||function(e){return e>=Wae.DIGIT_0&&e<=Wae.DIGIT_9}(e)}function Goe(e){return e+32}function qoe(e){return e===Wae.SPACE||e===Wae.LINE_FEED||e===Wae.TABULATION||e===Wae.FORM_FEED}function Woe(e){return qoe(e)||e===Wae.SOLIDUS||e===Wae.GREATER_THAN_SIGN}class Yoe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=zoe.DATA,this.returnState=zoe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ioe(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Roe(uoe,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(aoe.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(aoe.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Wae.NULL?aoe.nullCharacterReference:e>1114111?aoe.characterReferenceOutsideUnicodeRange:toe(e)?aoe.surrogateCharacterReference:roe(e)?aoe.noncharacterCharacterReference:noe(e)||e===Wae.CARRIAGE_RETURN?aoe.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:soe.START_TAG,tagName:"",tagID:Aoe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:soe.END_TAG,tagName:"",tagID:Aoe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:soe.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:soe.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(null===coe(n,this.currentAttr.name)){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){(null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(aoe.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Doe(e.tagName),e.type===soe.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(aoe.endTagWithAttributes),e.selfClosing&&this._err(aoe.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case soe.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case soe.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case soe.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:soe.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=qoe(e)?soe.WHITESPACE_CHARACTER:e===Wae.NULL?soe.NULL_CHARACTER:soe.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(soe.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=zoe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?boe.Attribute:boe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===zoe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===zoe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===zoe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case zoe.DATA:this._stateData(e);break;case zoe.RCDATA:this._stateRcdata(e);break;case zoe.RAWTEXT:this._stateRawtext(e);break;case zoe.SCRIPT_DATA:this._stateScriptData(e);break;case zoe.PLAINTEXT:this._statePlaintext(e);break;case zoe.TAG_OPEN:this._stateTagOpen(e);break;case zoe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case zoe.TAG_NAME:this._stateTagName(e);break;case zoe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case zoe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case zoe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case zoe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case zoe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case zoe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case zoe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case zoe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case zoe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case zoe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case zoe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case zoe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case zoe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case zoe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case zoe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case zoe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case zoe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case zoe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case zoe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case zoe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case zoe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case zoe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case zoe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case zoe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case zoe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case zoe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case zoe.BOGUS_COMMENT:this._stateBogusComment(e);break;case zoe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case zoe.COMMENT_START:this._stateCommentStart(e);break;case zoe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case zoe.COMMENT:this._stateComment(e);break;case zoe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case zoe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case zoe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case zoe.COMMENT_END:this._stateCommentEnd(e);break;case zoe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case zoe.DOCTYPE:this._stateDoctype(e);break;case zoe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case zoe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case zoe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case zoe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case zoe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case zoe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case zoe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case zoe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case zoe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case zoe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case zoe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case zoe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case zoe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case zoe.CDATA_SECTION:this._stateCdataSection(e);break;case zoe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case zoe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case zoe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case zoe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Wae.LESS_THAN_SIGN:this.state=zoe.TAG_OPEN;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitCodePoint(e);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.LESS_THAN_SIGN:this.state=zoe.RCDATA_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Wae.LESS_THAN_SIGN:this.state=zoe.RAWTEXT_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if($oe(e))this._createStartTagToken(),this.state=zoe.TAG_NAME,this._stateTagName(e);else switch(e){case Wae.EXCLAMATION_MARK:this.state=zoe.MARKUP_DECLARATION_OPEN;break;case Wae.SOLIDUS:this.state=zoe.END_TAG_OPEN;break;case Wae.QUESTION_MARK:this._err(aoe.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=zoe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Wae.EOF:this._err(aoe.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(aoe.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=zoe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if($oe(e))this._createEndTagToken(),this.state=zoe.TAG_NAME,this._stateTagName(e);else switch(e){case Wae.GREATER_THAN_SIGN:this._err(aoe.missingEndTagName),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(aoe.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=zoe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_ATTRIBUTE_NAME;break;case Wae.SOLIDUS:this.state=zoe.SELF_CLOSING_START_TAG;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.tagName+=qae;break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Uoe(e)?Goe(e):e)}}_stateRcdataLessThanSign(e){e===Wae.SOLIDUS?this.state=zoe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=zoe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){$oe(e)?(this.state=zoe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=zoe.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=zoe.BEFORE_ATTRIBUTE_NAME,!1;case Wae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=zoe.SELF_CLOSING_START_TAG,!1;case Wae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=zoe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Wae.SOLIDUS?this.state=zoe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=zoe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){$oe(e)?(this.state=zoe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=zoe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Wae.SOLIDUS:this.state=zoe.SCRIPT_DATA_END_TAG_OPEN;break;case Wae.EXCLAMATION_MARK:this.state=zoe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=zoe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){$oe(e)?(this.state=zoe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Wae.HYPHEN_MINUS?(this.state=zoe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Wae.HYPHEN_MINUS?(this.state=zoe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=zoe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Wae.HYPHEN_MINUS:this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.SCRIPT_DATA,this._emitChars(">");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Wae.SOLIDUS?this.state=zoe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:$oe(e)?(this._emitChars("<"),this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){$oe(e)?(this.state=zoe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Qae,!1)&&Woe(this.preprocessor.peek(Qae.length))){this._emitCodePoint(e);for(let e=0;e<Qae.length;e++)this._emitCodePoint(this._consume());this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=zoe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Wae.HYPHEN_MINUS:this._emitChars("-");break;case Wae.LESS_THAN_SIGN:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Wae.GREATER_THAN_SIGN:this.state=zoe.SCRIPT_DATA,this._emitChars(">");break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(qae);break;case Wae.EOF:this._err(aoe.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Wae.SOLIDUS?(this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Qae,!1)&&Woe(this.preprocessor.peek(Qae.length))){this._emitCodePoint(e);for(let e=0;e<Qae.length;e++)this._emitCodePoint(this._consume());this.state=zoe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=zoe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.SOLIDUS:case Wae.GREATER_THAN_SIGN:case Wae.EOF:this.state=zoe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Wae.EQUALS_SIGN:this._err(aoe.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=zoe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=zoe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:case Wae.SOLIDUS:case Wae.GREATER_THAN_SIGN:case Wae.EOF:this._leaveAttrName(),this.state=zoe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Wae.EQUALS_SIGN:this._leaveAttrName(),this.state=zoe.BEFORE_ATTRIBUTE_VALUE;break;case Wae.QUOTATION_MARK:case Wae.APOSTROPHE:case Wae.LESS_THAN_SIGN:this._err(aoe.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.name+=qae;break;default:this.currentAttr.name+=String.fromCodePoint(Uoe(e)?Goe(e):e)}}_stateAfterAttributeName(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.SOLIDUS:this.state=zoe.SELF_CLOSING_START_TAG;break;case Wae.EQUALS_SIGN:this.state=zoe.BEFORE_ATTRIBUTE_VALUE;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=zoe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.QUOTATION_MARK:this.state=zoe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this.state=zoe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingAttributeValue),this.state=zoe.DATA,this.emitCurrentTagToken();break;default:this.state=zoe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Wae.QUOTATION_MARK:this.state=zoe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.value+=qae;break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Wae.APOSTROPHE:this.state=zoe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.value+=qae;break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this._leaveAttrValue(),this.state=zoe.BEFORE_ATTRIBUTE_NAME;break;case Wae.AMPERSAND:this._startCharacterReference();break;case Wae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this.currentAttr.value+=qae;break;case Wae.QUOTATION_MARK:case Wae.APOSTROPHE:case Wae.LESS_THAN_SIGN:case Wae.EQUALS_SIGN:case Wae.GRAVE_ACCENT:this._err(aoe.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this._leaveAttrValue(),this.state=zoe.BEFORE_ATTRIBUTE_NAME;break;case Wae.SOLIDUS:this._leaveAttrValue(),this.state=zoe.SELF_CLOSING_START_TAG;break;case Wae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this._err(aoe.missingWhitespaceBetweenAttributes),this.state=zoe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Wae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=zoe.DATA,this.emitCurrentTagToken();break;case Wae.EOF:this._err(aoe.eofInTag),this._emitEOFToken();break;default:this._err(aoe.unexpectedSolidusInTag),this.state=zoe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.data+=qae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Zae,!0)?(this._createCommentToken(Zae.length+1),this.state=zoe.COMMENT_START):this._consumeSequenceIfMatch(Xae,!1)?(this.currentLocation=this.getCurrentLocation(Xae.length+1),this.state=zoe.DOCTYPE):this._consumeSequenceIfMatch(Kae,!0)?this.inForeignNode?this.state=zoe.CDATA_SECTION:(this._err(aoe.cdataInHtmlContent),this._createCommentToken(Kae.length+1),this.currentToken.data="[CDATA[",this.state=zoe.BOGUS_COMMENT):this._ensureHibernation()||(this._err(aoe.incorrectlyOpenedComment),this._createCommentToken(2),this.state=zoe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_START_DASH;break;case Wae.GREATER_THAN_SIGN:{this._err(aoe.abruptClosingOfEmptyComment),this.state=zoe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_END;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptClosingOfEmptyComment),this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=zoe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_END_DASH;break;case Wae.LESS_THAN_SIGN:t.data+="<",this.state=zoe.COMMENT_LESS_THAN_SIGN;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.data+=qae;break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Wae.EXCLAMATION_MARK:t.data+="!",this.state=zoe.COMMENT_LESS_THAN_SIGN_BANG;break;case Wae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Wae.HYPHEN_MINUS?this.state=zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=zoe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Wae.HYPHEN_MINUS?this.state=zoe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=zoe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Wae.GREATER_THAN_SIGN&&e!==Wae.EOF&&this._err(aoe.nestedComment),this.state=zoe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:this.state=zoe.COMMENT_END;break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EXCLAMATION_MARK:this.state=zoe.COMMENT_END_BANG;break;case Wae.HYPHEN_MINUS:t.data+="-";break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=zoe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Wae.HYPHEN_MINUS:t.data+="--!",this.state=zoe.COMMENT_END_DASH;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.incorrectlyClosedComment),this.state=zoe.DATA,this.emitCurrentComment(t);break;case Wae.EOF:this._err(aoe.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=zoe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_DOCTYPE_NAME;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Wae.EOF:{this._err(aoe.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(aoe.missingWhitespaceBeforeDoctypeName),this.state=zoe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Uoe(e))this._createDoctypeToken(String.fromCharCode(Goe(e))),this.state=zoe.DOCTYPE_NAME;else switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),this._createDoctypeToken(qae),this.state=zoe.DOCTYPE_NAME;break;case Wae.GREATER_THAN_SIGN:{this._err(aoe.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=zoe.DATA;break}case Wae.EOF:{this._err(aoe.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=zoe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.AFTER_DOCTYPE_NAME;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.name+=qae;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Uoe(e)?Goe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Jae,!1)?this.state=zoe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(eoe,!1)?this.state=zoe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(aoe.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Wae.QUOTATION_MARK:this._err(aoe.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this._err(aoe.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.QUOTATION_MARK:t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:t.publicId="",this.state=zoe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Wae.QUOTATION_MARK:this.state=zoe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.publicId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Wae.APOSTROPHE:this.state=zoe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.publicId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.QUOTATION_MARK:this._err(aoe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this._err(aoe.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.QUOTATION_MARK:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:this.state=zoe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Wae.QUOTATION_MARK:this._err(aoe.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:this._err(aoe.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.QUOTATION_MARK:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Wae.APOSTROPHE:t.systemId="",this.state=zoe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.DATA,this.emitCurrentDoctype(t);break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Wae.QUOTATION_MARK:this.state=zoe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.systemId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Wae.APOSTROPHE:this.state=zoe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter),t.systemId+=qae;break;case Wae.GREATER_THAN_SIGN:this._err(aoe.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Wae.SPACE:case Wae.LINE_FEED:case Wae.TABULATION:case Wae.FORM_FEED:break;case Wae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.EOF:this._err(aoe.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(aoe.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=zoe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Wae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=zoe.DATA;break;case Wae.NULL:this._err(aoe.unexpectedNullCharacter);break;case Wae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Wae.RIGHT_SQUARE_BRACKET:this.state=zoe.CDATA_SECTION_BRACKET;break;case Wae.EOF:this._err(aoe.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Wae.RIGHT_SQUARE_BRACKET?this.state=zoe.CDATA_SECTION_END:(this._emitChars("]"),this.state=zoe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Wae.GREATER_THAN_SIGN:this.state=zoe.DATA;break;case Wae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=zoe.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(!this.preprocessor.lastChunkWritten)return this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,void(this.preprocessor.endOfChunkHit=!0);e=this.entityDecoder.end()}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Wae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Voe(this.preprocessor.peek(1))?zoe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Voe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Wae.SEMICOLON&&this._err(aoe.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Zoe=new Set([Aoe.DD,Aoe.DT,Aoe.LI,Aoe.OPTGROUP,Aoe.OPTION,Aoe.P,Aoe.RB,Aoe.RP,Aoe.RT,Aoe.RTC]),Koe=new Set([...Zoe,Aoe.CAPTION,Aoe.COLGROUP,Aoe.TBODY,Aoe.TD,Aoe.TFOOT,Aoe.TH,Aoe.THEAD,Aoe.TR]),Xoe=new Set([Aoe.APPLET,Aoe.CAPTION,Aoe.HTML,Aoe.MARQUEE,Aoe.OBJECT,Aoe.TABLE,Aoe.TD,Aoe.TEMPLATE,Aoe.TH]),Qoe=new Set([...Xoe,Aoe.OL,Aoe.UL]),Joe=new Set([...Xoe,Aoe.BUTTON]),eie=new Set([Aoe.ANNOTATION_XML,Aoe.MI,Aoe.MN,Aoe.MO,Aoe.MS,Aoe.MTEXT]),tie=new Set([Aoe.DESC,Aoe.FOREIGN_OBJECT,Aoe.TITLE]),nie=new Set([Aoe.TR,Aoe.TEMPLATE,Aoe.HTML]),rie=new Set([Aoe.TBODY,Aoe.TFOOT,Aoe.THEAD,Aoe.TEMPLATE,Aoe.HTML]),aie=new Set([Aoe.TABLE,Aoe.TEMPLATE,Aoe.HTML]),oie=new Set([Aoe.TD,Aoe.TH]);class iie{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Aoe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Aoe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===koe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==koe.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(joe,koe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(oie,koe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(aie,koe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rie,koe.HTML)}clearBackToTableRowContext(){this.clearBackTo(nie,koe.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Aoe.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===Aoe.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case koe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case koe.SVG:if(tie.has(r))return!1;break;case koe.MATHML:if(eie.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Xoe)}hasInListItemScope(e){return this.hasInDynamicScope(e,Qoe)}hasInButtonScope(e){return this.hasInDynamicScope(e,Joe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case koe.HTML:if(joe.has(t))return!0;if(Xoe.has(t))return!1;break;case koe.SVG:if(tie.has(t))return!1;break;case koe.MATHML:if(eie.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===koe.HTML)switch(this.tagIDs[t]){case e:return!0;case Aoe.TABLE:case Aoe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===koe.HTML)switch(this.tagIDs[e]){case Aoe.TBODY:case Aoe.THEAD:case Aoe.TFOOT:return!0;case Aoe.TABLE:case Aoe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===koe.HTML)switch(this.tagIDs[t]){case e:return!0;case Aoe.OPTION:case Aoe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&Zoe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Koe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Koe.has(this.currentTagId);)this.pop()}}var sie,lie;(lie=sie||(sie={}))[lie.Marker=0]="Marker",lie[lie.Element=1]="Element";const cie={type:sie.Marker};class uie{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,a=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let i=0;i<this.entries.length;i++){const e=this.entries[i];if(e.type===sie.Marker)break;const{element:t}=e;if(this.treeAdapter.getTagName(t)===a&&this.treeAdapter.getNamespaceURI(t)===o){const e=this.treeAdapter.getAttrList(t);e.length===r&&n.push({idx:i,attrs:e})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let a=0;for(let o=0;o<n.length;o++){const e=n[o];e.attrs.every((e=>r.get(e.name)===e.value))&&(a+=1,a>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(cie)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:sie.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:sie.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(cie);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===sie.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===sie.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===sie.Element&&t.element===e))}}const die={createDocument:()=>({nodeName:"#document",mode:_oe.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({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=>e.content,setDocumentType(e,t,n,r){const a=e.childNodes.find((e=>"#documentType"===e.nodeName));if(a)a.name=t,a.publicId=n,a.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};die.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>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(die.isTextNode(n))return void(n.value+=t)}die.appendChild(e,die.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&die.isTextNode(r)?r.value+=t:die.insertBefore(e,die.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},pie="html",fie=["+//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//"],hie=[...fie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],mie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),gie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],yie=[...gie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function bie(e,t){return t.some((t=>e.startsWith(t)))}const vie="text/html",kie="application/xhtml+xml",xie=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]))),wie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:koe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:koe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:koe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:koe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:koe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:koe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:koe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:koe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:koe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:koe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:koe.XMLNS}]]),Eie=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]))),_ie=new Set([Aoe.B,Aoe.BIG,Aoe.BLOCKQUOTE,Aoe.BODY,Aoe.BR,Aoe.CENTER,Aoe.CODE,Aoe.DD,Aoe.DIV,Aoe.DL,Aoe.DT,Aoe.EM,Aoe.EMBED,Aoe.H1,Aoe.H2,Aoe.H3,Aoe.H4,Aoe.H5,Aoe.H6,Aoe.HEAD,Aoe.HR,Aoe.I,Aoe.IMG,Aoe.LI,Aoe.LISTING,Aoe.MENU,Aoe.META,Aoe.NOBR,Aoe.OL,Aoe.P,Aoe.PRE,Aoe.RUBY,Aoe.S,Aoe.SMALL,Aoe.SPAN,Aoe.STRONG,Aoe.STRIKE,Aoe.SUB,Aoe.SUP,Aoe.TABLE,Aoe.TT,Aoe.U,Aoe.UL,Aoe.VAR]);function Sie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function Tie(e){for(let t=0;t<e.attrs.length;t++){const n=xie.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function Cie(e){for(let t=0;t<e.attrs.length;t++){const n=wie.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 Aie(e,t,n,r){return(!r||r===koe.HTML)&&function(e,t,n){if(t===koe.MATHML&&e===Aoe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===woe.ENCODING){const e=n[r].value.toLowerCase();return e===vie||e===kie}return t===koe.SVG&&(e===Aoe.FOREIGN_OBJECT||e===Aoe.DESC||e===Aoe.TITLE)}(e,t,n)||(!r||r===koe.MATHML)&&function(e,t){return t===koe.MATHML&&(e===Aoe.MI||e===Aoe.MO||e===Aoe.MN||e===Aoe.MS||e===Aoe.MTEXT)}(e,t)}var Nie,Iie;(Iie=Nie||(Nie={}))[Iie.INITIAL=0]="INITIAL",Iie[Iie.BEFORE_HTML=1]="BEFORE_HTML",Iie[Iie.BEFORE_HEAD=2]="BEFORE_HEAD",Iie[Iie.IN_HEAD=3]="IN_HEAD",Iie[Iie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",Iie[Iie.AFTER_HEAD=5]="AFTER_HEAD",Iie[Iie.IN_BODY=6]="IN_BODY",Iie[Iie.TEXT=7]="TEXT",Iie[Iie.IN_TABLE=8]="IN_TABLE",Iie[Iie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",Iie[Iie.IN_CAPTION=10]="IN_CAPTION",Iie[Iie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",Iie[Iie.IN_TABLE_BODY=12]="IN_TABLE_BODY",Iie[Iie.IN_ROW=13]="IN_ROW",Iie[Iie.IN_CELL=14]="IN_CELL",Iie[Iie.IN_SELECT=15]="IN_SELECT",Iie[Iie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",Iie[Iie.IN_TEMPLATE=17]="IN_TEMPLATE",Iie[Iie.AFTER_BODY=18]="AFTER_BODY",Iie[Iie.IN_FRAMESET=19]="IN_FRAMESET",Iie[Iie.AFTER_FRAMESET=20]="AFTER_FRAMESET",Iie[Iie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",Iie[Iie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const Oie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Rie=new Set([Aoe.TABLE,Aoe.TBODY,Aoe.TFOOT,Aoe.THEAD,Aoe.TR]),Pie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:die,onParseError:null};class Lie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Nie.INITIAL,this.originalInsertionMode=Nie.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={...Pie,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Yoe(this.options,this),this.activeFormattingElements=new uie(this.treeAdapter),this.fragmentContextID=n?Doe(this.treeAdapter.getTagName(n)):Aoe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new iie(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...Pie,...t};null!=e||(e=n.treeAdapter.createElement(Toe.TEMPLATE,koe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",koe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===Aoe.TEMPLATE&&a.tmplInsertionModeStack.unshift(Nie.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const a=null!==(r=e.location)&&void 0!==r?r:Oie,o={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(e,t,n){var r,a;null===(a=(r=this.treeAdapter).onItemPush)||void 0===a||a.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===koe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,koe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Nie.TEXT}switchToPlaintextParsing(){this.insertionMode=Nie.TEXT,this.originalInsertionMode=Nie.IN_BODY,this.tokenizer.state=Hoe.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Toe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===koe.HTML)switch(this.fragmentContextID){case Aoe.TITLE:case Aoe.TEXTAREA:this.tokenizer.state=Hoe.RCDATA;break;case Aoe.STYLE:case Aoe.XMP:case Aoe.IFRAME:case Aoe.NOEMBED:case Aoe.NOFRAMES:case Aoe.NOSCRIPT:this.tokenizer.state=Hoe.RAWTEXT;break;case Aoe.SCRIPT:this.tokenizer.state=Hoe.SCRIPT_DATA;break;case Aoe.PLAINTEXT:this.tokenizer.state=Hoe.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,koe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,koe.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Toe.HTML,koe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Aoe.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),a=n?r.lastIndexOf(n):r.length,o=r[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),a=t.type===soe.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==Aoe.SVG||this.treeAdapter.getTagName(t)!==Toe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==koe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===Aoe.MGLYPH||e.tagID===Aoe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,koe.HTML))}_processToken(e){switch(e.type){case soe.CHARACTER:this.onCharacter(e);break;case soe.NULL_CHARACTER:this.onNullCharacter(e);break;case soe.COMMENT:this.onComment(e);break;case soe.DOCTYPE:this.onDoctype(e);break;case soe.START_TAG:this._processStartTag(e);break;case soe.END_TAG:this.onEndTag(e);break;case soe.EOF:this.onEof(e);break;case soe.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Aie(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===sie.Marker||this.openElements.contains(e.element)));for(let n=-1===t?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Nie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Aoe.P),this.openElements.popUntilTagNamePopped(Aoe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Aoe.TR:return void(this.insertionMode=Nie.IN_ROW);case Aoe.TBODY:case Aoe.THEAD:case Aoe.TFOOT:return void(this.insertionMode=Nie.IN_TABLE_BODY);case Aoe.CAPTION:return void(this.insertionMode=Nie.IN_CAPTION);case Aoe.COLGROUP:return void(this.insertionMode=Nie.IN_COLUMN_GROUP);case Aoe.TABLE:return void(this.insertionMode=Nie.IN_TABLE);case Aoe.BODY:return void(this.insertionMode=Nie.IN_BODY);case Aoe.FRAMESET:return void(this.insertionMode=Nie.IN_FRAMESET);case Aoe.SELECT:return void this._resetInsertionModeForSelect(e);case Aoe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case Aoe.HTML:return void(this.insertionMode=this.headElement?Nie.AFTER_HEAD:Nie.BEFORE_HEAD);case Aoe.TD:case Aoe.TH:if(e>0)return void(this.insertionMode=Nie.IN_CELL);break;case Aoe.HEAD:if(e>0)return void(this.insertionMode=Nie.IN_HEAD)}this.insertionMode=Nie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===Aoe.TEMPLATE)break;if(e===Aoe.TABLE)return void(this.insertionMode=Nie.IN_SELECT_IN_TABLE)}this.insertionMode=Nie.IN_SELECT}_isElementCausesFosterParenting(e){return Rie.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Aoe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===koe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Aoe.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Foe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:Gie(this,e);break;case Nie.BEFORE_HEAD:qie(this,e);break;case Nie.IN_HEAD:Zie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:Kie(this,e);break;case Nie.AFTER_HEAD:Xie(this,e);break;case Nie.IN_BODY:case Nie.IN_CAPTION:case Nie.IN_CELL:case Nie.IN_TEMPLATE:ese(this,e);break;case Nie.TEXT:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Nie.IN_TABLE:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:cse(this,e);break;case Nie.IN_TABLE_TEXT:hse(this,e);break;case Nie.IN_COLUMN_GROUP:bse(this,e);break;case Nie.AFTER_BODY:Cse(this,e);break;case Nie.AFTER_AFTER_BODY:Ase(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=qae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:Gie(this,e);break;case Nie.BEFORE_HEAD:qie(this,e);break;case Nie.IN_HEAD:Zie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:Kie(this,e);break;case Nie.AFTER_HEAD:Xie(this,e);break;case Nie.TEXT:this._insertCharacters(e);break;case Nie.IN_TABLE:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:cse(this,e);break;case Nie.IN_COLUMN_GROUP:bse(this,e);break;case Nie.AFTER_BODY:Cse(this,e);break;case Nie.AFTER_AFTER_BODY:Ase(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Uie(this,e);else switch(this.insertionMode){case Nie.INITIAL:case Nie.BEFORE_HTML:case Nie.BEFORE_HEAD:case Nie.IN_HEAD:case Nie.IN_HEAD_NO_SCRIPT:case Nie.AFTER_HEAD:case Nie.IN_BODY:case Nie.IN_TABLE:case Nie.IN_CAPTION:case Nie.IN_COLUMN_GROUP:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:case Nie.IN_CELL:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:case Nie.IN_TEMPLATE:case Nie.IN_FRAMESET:case Nie.AFTER_FRAMESET:Uie(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case Nie.AFTER_AFTER_BODY:case Nie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Nie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?_oe.QUIRKS:function(e){if(e.name!==pie)return _oe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return _oe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),mie.has(n))return _oe.QUIRKS;let e=null===t?hie:fie;if(bie(n,e))return _oe.QUIRKS;if(e=null===t?gie:yie,bie(n,e))return _oe.LIMITED_QUIRKS}return _oe.NO_QUIRKS}(t);(function(e){return e.name===pie&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,aoe.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Nie.BEFORE_HTML}(this,e);break;case Nie.BEFORE_HEAD:case Nie.IN_HEAD:case Nie.IN_HEAD_NO_SCRIPT:case Nie.AFTER_HEAD:this._err(e,aoe.misplacedDoctype);break;case Nie.IN_TABLE_TEXT:mse(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,aoe.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===Aoe.FONT&&e.attrs.some((({name:e})=>e===woe.COLOR||e===woe.SIZE||e===woe.FACE))||_ie.has(t)}(t))Nse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===koe.MATHML?Sie(t):r===koe.SVG&&(!function(e){const t=Eie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Doe(e.tagName))}(t),Tie(t)),Cie(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:!function(e,t){t.tagID===Aoe.HTML?(e._insertElement(t,koe.HTML),e.insertionMode=Nie.BEFORE_HEAD):Gie(e,t)}(this,e);break;case Nie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.HEAD:e._insertElement(t,koe.HTML),e.headElement=e.openElements.current,e.insertionMode=Nie.IN_HEAD;break;default:qie(e,t)}}(this,e);break;case Nie.IN_HEAD:Wie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.HEAD:case Aoe.LINK:case Aoe.META:case Aoe.NOFRAMES:case Aoe.STYLE:Wie(e,t);break;case Aoe.NOSCRIPT:e._err(t,aoe.nestedNoscriptInHead);break;default:Kie(e,t)}}(this,e);break;case Nie.AFTER_HEAD:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.BODY:e._insertElement(t,koe.HTML),e.framesetOk=!1,e.insertionMode=Nie.IN_BODY;break;case Aoe.FRAMESET:e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_FRAMESET;break;case Aoe.BASE:case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.LINK:case Aoe.META:case Aoe.NOFRAMES:case Aoe.SCRIPT:case Aoe.STYLE:case Aoe.TEMPLATE:case Aoe.TITLE:e._err(t,aoe.abandonedHeadElementChild),e.openElements.push(e.headElement,Aoe.HEAD),Wie(e,t),e.openElements.remove(e.headElement);break;case Aoe.HEAD:e._err(t,aoe.misplacedStartTagForHeadElement);break;default:Xie(e,t)}}(this,e);break;case Nie.IN_BODY:ose(this,e);break;case Nie.IN_TABLE:use(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.IN_CAPTION:!function(e,t){const n=t.tagID;gse.has(n)?e.openElements.hasInTableScope(Aoe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Aoe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Nie.IN_TABLE,use(e,t)):ose(e,t)}(this,e);break;case Nie.IN_COLUMN_GROUP:yse(this,e);break;case Nie.IN_TABLE_BODY:vse(this,e);break;case Nie.IN_ROW:xse(this,e);break;case Nie.IN_CELL:!function(e,t){const n=t.tagID;gse.has(n)?(e.openElements.hasInTableScope(Aoe.TD)||e.openElements.hasInTableScope(Aoe.TH))&&(e._closeTableCell(),xse(e,t)):ose(e,t)}(this,e);break;case Nie.IN_SELECT:Ese(this,e);break;case Nie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===Aoe.CAPTION||n===Aoe.TABLE||n===Aoe.TBODY||n===Aoe.TFOOT||n===Aoe.THEAD||n===Aoe.TR||n===Aoe.TD||n===Aoe.TH?(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ese(e,t)}(this,e);break;case Nie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case Aoe.BASE:case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.LINK:case Aoe.META:case Aoe.NOFRAMES:case Aoe.SCRIPT:case Aoe.STYLE:case Aoe.TEMPLATE:case Aoe.TITLE:Wie(e,t);break;case Aoe.CAPTION:case Aoe.COLGROUP:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:e.tmplInsertionModeStack[0]=Nie.IN_TABLE,e.insertionMode=Nie.IN_TABLE,use(e,t);break;case Aoe.COL:e.tmplInsertionModeStack[0]=Nie.IN_COLUMN_GROUP,e.insertionMode=Nie.IN_COLUMN_GROUP,yse(e,t);break;case Aoe.TR:e.tmplInsertionModeStack[0]=Nie.IN_TABLE_BODY,e.insertionMode=Nie.IN_TABLE_BODY,vse(e,t);break;case Aoe.TD:case Aoe.TH:e.tmplInsertionModeStack[0]=Nie.IN_ROW,e.insertionMode=Nie.IN_ROW,xse(e,t);break;default:e.tmplInsertionModeStack[0]=Nie.IN_BODY,e.insertionMode=Nie.IN_BODY,ose(e,t)}}(this,e);break;case Nie.AFTER_BODY:!function(e,t){t.tagID===Aoe.HTML?ose(e,t):Cse(e,t)}(this,e);break;case Nie.IN_FRAMESET:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.FRAMESET:e._insertElement(t,koe.HTML);break;case Aoe.FRAME:e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.NOFRAMES:Wie(e,t)}}(this,e);break;case Nie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.NOFRAMES:Wie(e,t)}}(this,e);break;case Nie.AFTER_AFTER_BODY:!function(e,t){t.tagID===Aoe.HTML?ose(e,t):Ase(e,t)}(this,e);break;case Nie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.NOFRAMES:Wie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===Aoe.P||t.tagID===Aoe.BR)return Nse(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===koe.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==Aoe.HTML&&n!==Aoe.HEAD&&n!==Aoe.BODY&&n!==Aoe.BR||Gie(e,t)}(this,e);break;case Nie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===Aoe.HEAD||n===Aoe.BODY||n===Aoe.HTML||n===Aoe.BR?qie(e,t):e._err(t,aoe.endTagWithoutMatchingOpenElement)}(this,e);break;case Nie.IN_HEAD:!function(e,t){switch(t.tagID){case Aoe.HEAD:e.openElements.pop(),e.insertionMode=Nie.AFTER_HEAD;break;case Aoe.BODY:case Aoe.BR:case Aoe.HTML:Zie(e,t);break;case Aoe.TEMPLATE:Yie(e,t);break;default:e._err(t,aoe.endTagWithoutMatchingOpenElement)}}(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case Aoe.NOSCRIPT:e.openElements.pop(),e.insertionMode=Nie.IN_HEAD;break;case Aoe.BR:Kie(e,t);break;default:e._err(t,aoe.endTagWithoutMatchingOpenElement)}}(this,e);break;case Nie.AFTER_HEAD:!function(e,t){switch(t.tagID){case Aoe.BODY:case Aoe.HTML:case Aoe.BR:Xie(e,t);break;case Aoe.TEMPLATE:Yie(e,t);break;default:e._err(t,aoe.endTagWithoutMatchingOpenElement)}}(this,e);break;case Nie.IN_BODY:sse(this,e);break;case Nie.TEXT:!function(e,t){var n;t.tagID===Aoe.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case Nie.IN_TABLE:dse(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case Aoe.CAPTION:case Aoe.TABLE:e.openElements.hasInTableScope(Aoe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Aoe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Nie.IN_TABLE,n===Aoe.TABLE&&dse(e,t));break;case Aoe.BODY:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TBODY:case Aoe.TD:case Aoe.TFOOT:case Aoe.TH:case Aoe.THEAD:case Aoe.TR:break;default:sse(e,t)}}(this,e);break;case Nie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case Aoe.COLGROUP:e.openElements.currentTagId===Aoe.COLGROUP&&(e.openElements.pop(),e.insertionMode=Nie.IN_TABLE);break;case Aoe.TEMPLATE:Yie(e,t);break;case Aoe.COL:break;default:bse(e,t)}}(this,e);break;case Nie.IN_TABLE_BODY:kse(this,e);break;case Nie.IN_ROW:wse(this,e);break;case Nie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case Aoe.TD:case Aoe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Nie.IN_ROW);break;case Aoe.TABLE:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:case Aoe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),wse(e,t));break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:break;default:sse(e,t)}}(this,e);break;case Nie.IN_SELECT:_se(this,e);break;case Nie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===Aoe.CAPTION||n===Aoe.TABLE||n===Aoe.TBODY||n===Aoe.TFOOT||n===Aoe.THEAD||n===Aoe.TR||n===Aoe.TD||n===Aoe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):_se(e,t)}(this,e);break;case Nie.IN_TEMPLATE:!function(e,t){t.tagID===Aoe.TEMPLATE&&Yie(e,t)}(this,e);break;case Nie.AFTER_BODY:Tse(this,e);break;case Nie.IN_FRAMESET:!function(e,t){t.tagID!==Aoe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===Aoe.FRAMESET||(e.insertionMode=Nie.AFTER_FRAMESET))}(this,e);break;case Nie.AFTER_FRAMESET:!function(e,t){t.tagID===Aoe.HTML&&(e.insertionMode=Nie.AFTER_AFTER_FRAMESET)}(this,e);break;case Nie.AFTER_AFTER_BODY:Ase(this,e)}}onEof(e){switch(this.insertionMode){case Nie.INITIAL:Vie(this,e);break;case Nie.BEFORE_HTML:Gie(this,e);break;case Nie.BEFORE_HEAD:qie(this,e);break;case Nie.IN_HEAD:Zie(this,e);break;case Nie.IN_HEAD_NO_SCRIPT:Kie(this,e);break;case Nie.AFTER_HEAD:Xie(this,e);break;case Nie.IN_BODY:case Nie.IN_TABLE:case Nie.IN_CAPTION:case Nie.IN_COLUMN_GROUP:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:case Nie.IN_CELL:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:lse(this,e);break;case Nie.TEXT:!function(e,t){e._err(t,aoe.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case Nie.IN_TABLE_TEXT:mse(this,e);break;case Nie.IN_TEMPLATE:Sse(this,e);break;case Nie.AFTER_BODY:case Nie.IN_FRAMESET:case Nie.AFTER_FRAMESET:case Nie.AFTER_AFTER_BODY:case Nie.AFTER_AFTER_FRAMESET:$ie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Wae.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Nie.IN_HEAD:case Nie.IN_HEAD_NO_SCRIPT:case Nie.AFTER_HEAD:case Nie.TEXT:case Nie.IN_COLUMN_GROUP:case Nie.IN_SELECT:case Nie.IN_SELECT_IN_TABLE:case Nie.IN_FRAMESET:case Nie.AFTER_FRAMESET:this._insertCharacters(e);break;case Nie.IN_BODY:case Nie.IN_CAPTION:case Nie.IN_CELL:case Nie.IN_TEMPLATE:case Nie.AFTER_BODY:case Nie.AFTER_AFTER_BODY:case Nie.AFTER_AFTER_FRAMESET:Jie(this,e);break;case Nie.IN_TABLE:case Nie.IN_TABLE_BODY:case Nie.IN_ROW:cse(this,e);break;case Nie.IN_TABLE_TEXT:fse(this,e)}}}function Die(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):ise(e,t),n}function Mie(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Fie(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,i=a;i!==n;o++,i=a){a=e.openElements.getCommonAncestor(i);const n=e.activeFormattingElements.getElementEntry(i),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(i)):(i=jie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function jie(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 zie(e,t,n){const r=Doe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===Aoe.TEMPLATE&&a===koe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Bie(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function Hie(e,t){for(let n=0;n<8;n++){const n=Die(e,t);if(!n)break;const r=Mie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=Fie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&zie(e,o,a),Bie(e,r,n)}}function Uie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function $ie(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 n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Vie(e,t){e._err(t,aoe.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,_oe.QUIRKS),e.insertionMode=Nie.BEFORE_HTML,e._processToken(t)}function Gie(e,t){e._insertFakeRootElement(),e.insertionMode=Nie.BEFORE_HEAD,e._processToken(t)}function qie(e,t){e._insertFakeElement(Toe.HEAD,Aoe.HEAD),e.headElement=e.openElements.current,e.insertionMode=Nie.IN_HEAD,e._processToken(t)}function Wie(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.BASE:case Aoe.BASEFONT:case Aoe.BGSOUND:case Aoe.LINK:case Aoe.META:e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.TITLE:e._switchToTextParsing(t,Hoe.RCDATA);break;case Aoe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Hoe.RAWTEXT):(e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_HEAD_NO_SCRIPT);break;case Aoe.NOFRAMES:case Aoe.STYLE:e._switchToTextParsing(t,Hoe.RAWTEXT);break;case Aoe.SCRIPT:e._switchToTextParsing(t,Hoe.SCRIPT_DATA);break;case Aoe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Nie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Nie.IN_TEMPLATE);break;case Aoe.HEAD:e._err(t,aoe.misplacedStartTagForHeadElement);break;default:Zie(e,t)}}function Yie(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Aoe.TEMPLATE&&e._err(t,aoe.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Aoe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,aoe.endTagWithoutMatchingOpenElement)}function Zie(e,t){e.openElements.pop(),e.insertionMode=Nie.AFTER_HEAD,e._processToken(t)}function Kie(e,t){const n=t.type===soe.EOF?aoe.openElementsLeftAfterEof:aoe.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Nie.IN_HEAD,e._processToken(t)}function Xie(e,t){e._insertFakeElement(Toe.BODY,Aoe.BODY),e.insertionMode=Nie.IN_BODY,Qie(e,t)}function Qie(e,t){switch(t.type){case soe.CHARACTER:ese(e,t);break;case soe.WHITESPACE_CHARACTER:Jie(e,t);break;case soe.COMMENT:Uie(e,t);break;case soe.START_TAG:ose(e,t);break;case soe.END_TAG:sse(e,t);break;case soe.EOF:lse(e,t)}}function Jie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ese(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function tse(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,koe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nse(e){const t=coe(e,woe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function rse(e,t){e._switchToTextParsing(t,Hoe.RAWTEXT)}function ase(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML)}function ose(e,t){switch(t.tagID){case Aoe.I:case Aoe.S:case Aoe.B:case Aoe.U:case Aoe.EM:case Aoe.TT:case Aoe.BIG:case Aoe.CODE:case Aoe.FONT:case Aoe.SMALL:case Aoe.STRIKE:case Aoe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Aoe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Toe.A);n&&(Hie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Aoe.H1:case Aoe.H2:case Aoe.H3:case Aoe.H4:case Aoe.H5:case Aoe.H6:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&joe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.P:case Aoe.DL:case Aoe.OL:case Aoe.UL:case Aoe.DIV:case Aoe.DIR:case Aoe.NAV:case Aoe.MAIN:case Aoe.MENU:case Aoe.ASIDE:case Aoe.CENTER:case Aoe.FIGURE:case Aoe.FOOTER:case Aoe.HEADER:case Aoe.HGROUP:case Aoe.DIALOG:case Aoe.DETAILS:case Aoe.ADDRESS:case Aoe.ARTICLE:case Aoe.SEARCH:case Aoe.SECTION:case Aoe.SUMMARY:case Aoe.FIELDSET:case Aoe.BLOCKQUOTE:case Aoe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.LI:case Aoe.DD:case Aoe.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===Aoe.LI&&t===Aoe.LI||(n===Aoe.DD||n===Aoe.DT)&&(t===Aoe.DD||t===Aoe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==Aoe.ADDRESS&&t!==Aoe.DIV&&t!==Aoe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.BR:case Aoe.IMG:case Aoe.WBR:case Aoe.AREA:case Aoe.EMBED:case Aoe.KEYGEN:tse(e,t);break;case Aoe.HR:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._appendElement(t,koe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case Aoe.RB:case Aoe.RTC:!function(e,t){e.openElements.hasInScope(Aoe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.RT:case Aoe.RP:!function(e,t){e.openElements.hasInScope(Aoe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Aoe.RTC),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.PRE:case Aoe.LISTING:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case Aoe.XMP:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Hoe.RAWTEXT)}(e,t);break;case Aoe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),Tie(t),Cie(t),t.selfClosing?e._appendElement(t,koe.SVG):e._insertElement(t,koe.SVG),t.ackSelfClosing=!0}(e,t);break;case Aoe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case Aoe.BASE:case Aoe.LINK:case Aoe.META:case Aoe.STYLE:case Aoe.TITLE:case Aoe.SCRIPT:case Aoe.BGSOUND:case Aoe.BASEFONT:case Aoe.TEMPLATE:Wie(e,t);break;case Aoe.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case Aoe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case Aoe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Aoe.NOBR)&&(Hie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,koe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case Aoe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),Sie(t),Cie(t),t.selfClosing?e._appendElement(t,koe.MATHML):e._insertElement(t,koe.MATHML),t.ackSelfClosing=!0}(e,t);break;case Aoe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==_oe.QUIRKS&&e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),e.framesetOk=!1,e.insertionMode=Nie.IN_TABLE}(e,t);break;case Aoe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,koe.HTML),nse(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case Aoe.PARAM:case Aoe.TRACK:case Aoe.SOURCE:!function(e,t){e._appendElement(t,koe.HTML),t.ackSelfClosing=!0}(e,t);break;case Aoe.IMAGE:!function(e,t){t.tagName=Toe.IMG,t.tagID=Aoe.IMG,tse(e,t)}(e,t);break;case Aoe.BUTTON:!function(e,t){e.openElements.hasInScope(Aoe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Aoe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.framesetOk=!1}(e,t);break;case Aoe.APPLET:case Aoe.OBJECT:case Aoe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case Aoe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Hoe.RAWTEXT)}(e,t);break;case Aoe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Nie.IN_TABLE||e.insertionMode===Nie.IN_CAPTION||e.insertionMode===Nie.IN_TABLE_BODY||e.insertionMode===Nie.IN_ROW||e.insertionMode===Nie.IN_CELL?Nie.IN_SELECT_IN_TABLE:Nie.IN_SELECT}(e,t);break;case Aoe.OPTION:case Aoe.OPTGROUP:!function(e,t){e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,koe.HTML)}(e,t);break;case Aoe.NOEMBED:case Aoe.NOFRAMES:rse(e,t);break;case Aoe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_FRAMESET)}(e,t);break;case Aoe.TEXTAREA:!function(e,t){e._insertElement(t,koe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Hoe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Nie.TEXT}(e,t);break;case Aoe.NOSCRIPT:e.options.scriptingEnabled?rse(e,t):ase(e,t);break;case Aoe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(Aoe.P)&&e._closePElement(),e._insertElement(t,koe.HTML),e.tokenizer.state=Hoe.PLAINTEXT}(e,t);break;case Aoe.COL:case Aoe.TH:case Aoe.TD:case Aoe.TR:case Aoe.HEAD:case Aoe.FRAME:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:case Aoe.CAPTION:case Aoe.COLGROUP:break;default:ase(e,t)}}function ise(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const t=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==Aoe.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(t,o))break}}function sse(e,t){switch(t.tagID){case Aoe.A:case Aoe.B:case Aoe.I:case Aoe.S:case Aoe.U:case Aoe.EM:case Aoe.TT:case Aoe.BIG:case Aoe.CODE:case Aoe.FONT:case Aoe.NOBR:case Aoe.SMALL:case Aoe.STRIKE:case Aoe.STRONG:Hie(e,t);break;case Aoe.P:!function(e){e.openElements.hasInButtonScope(Aoe.P)||e._insertFakeElement(Toe.P,Aoe.P),e._closePElement()}(e);break;case Aoe.DL:case Aoe.UL:case Aoe.OL:case Aoe.DIR:case Aoe.DIV:case Aoe.NAV:case Aoe.PRE:case Aoe.MAIN:case Aoe.MENU:case Aoe.ASIDE:case Aoe.BUTTON:case Aoe.CENTER:case Aoe.FIGURE:case Aoe.FOOTER:case Aoe.HEADER:case Aoe.HGROUP:case Aoe.DIALOG:case Aoe.ADDRESS:case Aoe.ARTICLE:case Aoe.DETAILS:case Aoe.SEARCH:case Aoe.SECTION:case Aoe.SUMMARY:case Aoe.LISTING:case Aoe.FIELDSET:case Aoe.BLOCKQUOTE:case Aoe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case Aoe.LI:!function(e){e.openElements.hasInListItemScope(Aoe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Aoe.LI),e.openElements.popUntilTagNamePopped(Aoe.LI))}(e);break;case Aoe.DD:case Aoe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case Aoe.H1:case Aoe.H2:case Aoe.H3:case Aoe.H4:case Aoe.H5:case Aoe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case Aoe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Toe.BR,Aoe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case Aoe.BODY:!function(e,t){if(e.openElements.hasInScope(Aoe.BODY)&&(e.insertionMode=Nie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case Aoe.HTML:!function(e,t){e.openElements.hasInScope(Aoe.BODY)&&(e.insertionMode=Nie.AFTER_BODY,Tse(e,t))}(e,t);break;case Aoe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Aoe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Aoe.FORM):n&&e.openElements.remove(n))}(e);break;case Aoe.APPLET:case Aoe.OBJECT:case Aoe.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case Aoe.TEMPLATE:Yie(e,t);break;default:ise(e,t)}}function lse(e,t){e.tmplInsertionModeStack.length>0?Sse(e,t):$ie(e,t)}function cse(e,t){if(void 0!==e.openElements.currentTagId&&Rie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Nie.IN_TABLE_TEXT,t.type){case soe.CHARACTER:hse(e,t);break;case soe.WHITESPACE_CHARACTER:fse(e,t)}else pse(e,t)}function use(e,t){switch(t.tagID){case Aoe.TD:case Aoe.TH:case Aoe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Toe.TBODY,Aoe.TBODY),e.insertionMode=Nie.IN_TABLE_BODY,vse(e,t)}(e,t);break;case Aoe.STYLE:case Aoe.SCRIPT:case Aoe.TEMPLATE:Wie(e,t);break;case Aoe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Toe.COLGROUP,Aoe.COLGROUP),e.insertionMode=Nie.IN_COLUMN_GROUP,yse(e,t)}(e,t);break;case Aoe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,koe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case Aoe.TABLE:!function(e,t){e.openElements.hasInTableScope(Aoe.TABLE)&&(e.openElements.popUntilTagNamePopped(Aoe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_TABLE_BODY}(e,t);break;case Aoe.INPUT:!function(e,t){nse(t)?e._appendElement(t,koe.HTML):pse(e,t),t.ackSelfClosing=!0}(e,t);break;case Aoe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_CAPTION}(e,t);break;case Aoe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_COLUMN_GROUP}(e,t);break;default:pse(e,t)}}function dse(e,t){switch(t.tagID){case Aoe.TABLE:e.openElements.hasInTableScope(Aoe.TABLE)&&(e.openElements.popUntilTagNamePopped(Aoe.TABLE),e._resetInsertionMode());break;case Aoe.TEMPLATE:Yie(e,t);break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TBODY:case Aoe.TD:case Aoe.TFOOT:case Aoe.TH:case Aoe.THEAD:case Aoe.TR:break;default:pse(e,t)}}function pse(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Qie(e,t),e.fosterParentingEnabled=n}function fse(e,t){e.pendingCharacterTokens.push(t)}function hse(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function mse(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)pse(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const gse=new Set([Aoe.CAPTION,Aoe.COL,Aoe.COLGROUP,Aoe.TBODY,Aoe.TD,Aoe.TFOOT,Aoe.TH,Aoe.THEAD,Aoe.TR]);function yse(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.COL:e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.TEMPLATE:Wie(e,t);break;default:bse(e,t)}}function bse(e,t){e.openElements.currentTagId===Aoe.COLGROUP&&(e.openElements.pop(),e.insertionMode=Nie.IN_TABLE,e._processToken(t))}function vse(e,t){switch(t.tagID){case Aoe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_ROW;break;case Aoe.TH:case Aoe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Toe.TR,Aoe.TR),e.insertionMode=Nie.IN_ROW,xse(e,t);break;case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE,use(e,t));break;default:use(e,t)}}function kse(e,t){const n=t.tagID;switch(t.tagID){case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE);break;case Aoe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE,dse(e,t));break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TD:case Aoe.TH:case Aoe.TR:break;default:dse(e,t)}}function xse(e,t){switch(t.tagID){case Aoe.TH:case Aoe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,koe.HTML),e.insertionMode=Nie.IN_CELL,e.activeFormattingElements.insertMarker();break;case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:case Aoe.TR:e.openElements.hasInTableScope(Aoe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY,vse(e,t));break;default:use(e,t)}}function wse(e,t){switch(t.tagID){case Aoe.TR:e.openElements.hasInTableScope(Aoe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY);break;case Aoe.TABLE:e.openElements.hasInTableScope(Aoe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY,kse(e,t));break;case Aoe.TBODY:case Aoe.TFOOT:case Aoe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(Aoe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Nie.IN_TABLE_BODY,kse(e,t));break;case Aoe.BODY:case Aoe.CAPTION:case Aoe.COL:case Aoe.COLGROUP:case Aoe.HTML:case Aoe.TD:case Aoe.TH:break;default:dse(e,t)}}function Ese(e,t){switch(t.tagID){case Aoe.HTML:ose(e,t);break;case Aoe.OPTION:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e._insertElement(t,koe.HTML);break;case Aoe.OPTGROUP:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Aoe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,koe.HTML);break;case Aoe.HR:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===Aoe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,koe.HTML),t.ackSelfClosing=!0;break;case Aoe.INPUT:case Aoe.KEYGEN:case Aoe.TEXTAREA:case Aoe.SELECT:e.openElements.hasInSelectScope(Aoe.SELECT)&&(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode(),t.tagID!==Aoe.SELECT&&e._processStartTag(t));break;case Aoe.SCRIPT:case Aoe.TEMPLATE:Wie(e,t)}}function _se(e,t){switch(t.tagID){case Aoe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===Aoe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Aoe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Aoe.OPTGROUP&&e.openElements.pop();break;case Aoe.OPTION:e.openElements.currentTagId===Aoe.OPTION&&e.openElements.pop();break;case Aoe.SELECT:e.openElements.hasInSelectScope(Aoe.SELECT)&&(e.openElements.popUntilTagNamePopped(Aoe.SELECT),e._resetInsertionMode());break;case Aoe.TEMPLATE:Yie(e,t)}}function Sse(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Aoe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):$ie(e,t)}function Tse(e,t){var n;if(t.tagID===Aoe.HTML){if(e.fragmentContext||(e.insertionMode=Nie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Aoe.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else Cse(e,t)}function Cse(e,t){e.insertionMode=Nie.IN_BODY,Qie(e,t)}function Ase(e,t){e.insertionMode=Nie.IN_BODY,Qie(e,t)}function Nse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==koe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}Toe.AREA,Toe.BASE,Toe.BASEFONT,Toe.BGSOUND,Toe.BR,Toe.COL,Toe.EMBED,Toe.FRAME,Toe.HR,Toe.IMG,Toe.INPUT,Toe.KEYGEN,Toe.LINK,Toe.META,Toe.PARAM,Toe.SOURCE,Toe.TRACK,Toe.WBR;const Ise=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Ose=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Rse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Pse(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=Fae("type",{handlers:{root:Dse,element:Mse,text:Fse,comment:Bse,doctype:jse,raw:Hse},unknown:Use}),a={parser:n?new Lie(Rse):Lie.getFragmentParser(void 0,Rse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),$se(a,Dee());const o=function(e,t){const n=t||{};return Oae({file:n.file||void 0,location:!1,schema:"svg"===n.space?aee:ree,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&Sre(o,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===o.type&&1===o.children.length&&o.children[0].type===e.type?o.children[0]:o}function Lse(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Dse(e,t){Lse(e.children,t)}function Mse(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Hoe.PLAINTEXT)return;$se(t,Dee(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:Aae.html;a===Aae.html&&"svg"===n&&(a=Aae.svg);const o=function(e,t){const n=(t||jae).space;return Bae(e,"svg"===n?aee:ree)}({...e,children:[]},{space:a===Aae.svg?"svg":"html"}),i={type:soe.START_TAG,tagName:n,tagID:Doe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Gse(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),Lse(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Vae.includes(n))return;if(t.parser.tokenizer.state===Hoe.PLAINTEXT)return;$se(t,Lee(e));const r={type:soe.END_TAG,tagName:n,tagID:Doe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Gse(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Hoe.RCDATA&&t.parser.tokenizer.state!==Hoe.RAWTEXT&&t.parser.tokenizer.state!==Hoe.SCRIPT_DATA||(t.parser.tokenizer.state=Hoe.DATA)}(e,t)}function Fse(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:soe.CHARACTER,chars:e.value,location:Gse(e)};$se(t,Dee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function jse(e,t){const n={type:soe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Gse(e)};$se(t,Dee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function zse(e,t){t.stitches=!0;const n=function(e){return mre("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=Pse({type:"root",children:e.children},t.options);n.children=r.children}Bse({type:"comment",value:{stitch:n}},t)}function Bse(e,t){const n=e.value,r={type:soe.COMMENT,data:n,location:Gse(e)};$se(t,Dee(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Hse(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,Vse(t,Dee(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ise,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Use(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw Ose.has(n.type)&&(e=". 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"+e)}zse(n,t)}function $se(e,t){Vse(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=Hoe.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 Vse(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Gse(e){const t=Dee(e)||{line:void 0,column:void 0,offset:void 0},n=Lee(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 qse(e){return function(t,n){return Pse(t,{...e,file:n})}}function Wse(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function Yse(e,t,n){const r=bre((n||{}).ignore||[]),a=function(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 e=n[r];t.push([Zse(e[0]),Kse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)_re(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Zse(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Kse(e){return"function"==typeof e?e:function(){return e}}const Xse="phrasing",Qse=["autolink","link","image","label"];function Jse(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ele(e){this.config.enter.autolinkProtocol.call(this,e)}function tle(e){this.config.exit.autolinkProtocol.call(this,e)}function nle(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 rle(e){this.config.exit.autolinkEmail.call(this,e)}function ale(e){this.exit(e)}function ole(e){Yse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ile],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),sle]],{ignore:["link","linkReference"]})}function ile(e,t,n,r,a){let o="";if(!lle(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const i=function(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 a=Wse(e,"(");let o=Wse(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function sle(e,t,n,r){return!(!lle(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lle(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Ite(n)||Nte(n))&&(!t||47!==n)}function cle(){this.buffer()}function ule(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dle(){this.buffer()}function ple(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hle(e){this.exit(e)}function mle(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gle(e){this.exit(e)}function yle(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function ble(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?kle:vle)));return s(),i},footnoteReference:yle},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function vle(e,t,n){return 0===t?e:kle(e,t,n)}function kle(e,t,n){return(n?"":" ")+e}yle.peek=function(){return"["};const xle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function wle(e){this.enter({type:"delete",children:[]},e)}function Ele(e){this.exit(e)}function _le(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function Sle(e){return e.length}function Tle(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function Cle(e,t,n){return">"+(n?"":" ")+e}function Ale(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Nle(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&(o=n.stack,i=n.unsafe[a],Ale(o,i.inConstruct,!0)&&!Ale(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function Ile(e,t,n){return(n?"":" ")+e}function Ole(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 Rle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ple(e,t,n){const r=Fte(e),a=Fte(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Lle(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ple(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Rle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ple(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Rle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Dle(e){return e.value||""}function Mle(e,t,n,r){const a=Ole(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Fle(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function jle(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function zle(e,t){const n=ite(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Ble(e,t,n,r){const a=Ole(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(zle(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Hle(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ule(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 $le(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}_le.peek=function(){return"~"},Lle.peek=function(e,t,n){return n.options.emphasis||"*"},Dle.peek=function(){return"<"},Mle.peek=function(){return"!"},Fle.peek=function(){return"!"},jle.peek=function(){return"`"},Ble.peek=function(e,t,n){return zle(e,n)?"<":"["},Hle.peek=function(){return"["};const Vle=bre(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Gle(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Ple(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Rle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ple(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Rle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Gle.peek=function(e,t,n){return n.options.strong||"*"};const qle={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),Cle);return a(),i},break:Nle,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,Ile);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=Ole(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:Lle,hardBreak:Nle,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return Sre(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Ere})),Boolean((!e.depth||e.depth<3)&&ite(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=Rle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Dle,image:Mle,imageReference:Fle,inlineCode:jle,link:Ble,linkReference:Hle,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Ule(n);const s=e.ordered?"."===i?")":".":function(e){const t=Ule(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}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),$le(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Ule(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some((function(e){return Vle(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Gle,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=($le(n)+(n.options.ruleSpaces?" ":"")).repeat(function(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}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Wle(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function Yle(e){this.exit(e),this.data.inTable=void 0}function Zle(e){this.enter({type:"tableRow",children:[]},e)}function Kle(e){this.exit(e)}function Xle(e){this.enter({type:"tableCell",children:[]},e)}function Qle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Jle));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Jle(e,t){return"|"===t?t:e}function ece(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=qle.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=s([l(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||Sle,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=null==(d=e[u][o])?"":String(d);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)o[p]=Tle(r[p]);else{const e=Tle(r);for(;++p<c;)o[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=o[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[p]&&(l[p]=a),h[p]=a),f[p]=i}i.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<i.length;){const e=i[u],t=s[u];p=-1;const r=[];for(;++p<c;){const a=e[p]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=o[p];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function tce(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function nce(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function rce(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=qle.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const ace={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},oce={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(sce,l,s)(t):null===t||Cte(t)||Ite(t)||45!==t&&Nte(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},ice={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(sce,t,o)(i):null===i||Cte(i)||Ite(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},sce={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||Cte(i)||Ite(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||Cte(e)||Ite(e)?t(e):r(e)}function o(e){return vte(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):vte(t)?(e.consume(t),i):n(t)}},partial:!0},lce={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return kte(e)?n(e):t(e)}},partial:!0},cce={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!hce.call(r,r.previous)||bce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ace,e.attempt(oce,e.attempt(ice,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:hce},uce={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&mce.call(r,r.previous)&&!bce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(vte(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||wte(t)||Cte(t)||Ite(t)||Nte(t)?n(t):e.attempt(oce,e.attempt(ice,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:mce},dce={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!yce(t)||!gce.call(r,r.previous)||bce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return yce(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(lce,c,l)(t):45===t||95===t||kte(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&vte(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:gce},pce={};let fce=48;for(;fce<123;)pce[fce]=dce,fce++,58===fce?fce=65:91===fce&&(fce=97);function hce(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Cte(e)}function mce(e){return!vte(e)}function gce(e){return!(47===e||yce(e))}function yce(e){return 43===e||45===e||46===e||95===e||kte(e)}function bce(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}pce[43]=dce,pce[45]=dce,pce[46]=dce,pce[95]=dce,pce[72]=[dce,uce],pce[104]=[dce,uce],pce[87]=[dce,cce],pce[119]=[dce,cce];const vce={tokenize:function(e,t,n){const r=this;return Pte(e,(function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function kce(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=bte(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function xce(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function wce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||Cte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(bte(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Cte(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function Ece(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||Cte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=bte(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Cte(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),Pte(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function _ce(e,t,n){return e.check(Ute,t,e.attempt(vce,t,n))}function Sce(e){e.exit("gfmFootnoteDefinition")}function Tce(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=Fte(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=Fte(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&dte(i,i.length,0,jte(s,e.slice(r+1,n),t)),dte(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),dte(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class Cce{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function Ace(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function Nce(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?k:s;if(o===k&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):Tte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Ate(t)?Pte(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Cte(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,Ate(t)?Pte(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return Ate(t)?Pte(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||Tte(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Ate(t)?Pte(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||Tte(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function k(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||Tte(n)?(e.exit("tableRow"),t(n)):Ate(n)?Pte(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||Cte(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:w)}function E(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function Ice(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new Cce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(Rce(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=Oce(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=Oce(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],a=Oce(p,t,l,s,o,a)):0!==c[1]&&(a=Oce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&Rce(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=Ace(t.events,o))}return e}function Oce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},Pce(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Pce(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=Pce(t.events,n[2]),o=Pce(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},Pce(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Rce(e,t,n,r,a){const o=[],i=Pce(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function Pce(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Lce={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return Cte(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return Tte(r)?t(r):Ate(r)?e.check({tokenize:Dce},t,n)(r):n(r)}}};function Dce(e,t,n){return Pte(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const Mce={};function Fce(e){const t=e||Mce,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return hte([{text:pce},{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ece,continuation:{tokenize:_ce},exit:Sce}},text:{91:{name:"gfmFootnoteCall",tokenize:wce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kce,resolveTo:xce}}},Tce(e),{flow:{null:{name:"table",tokenize:Nce,resolveAll:Ice}}},{text:{91:Lce}}])}(t)),a.push([{transforms:[ole],enter:{literalAutolink:Jse,literalAutolinkEmail:ele,literalAutolinkHttp:ele,literalAutolinkWww:ele},exit:{literalAutolink:ale,literalAutolinkEmail:rle,literalAutolinkHttp:tle,literalAutolinkWww:nle}},{enter:{gfmFootnoteCallString:cle,gfmFootnoteCall:ule,gfmFootnoteDefinitionLabelString:dle,gfmFootnoteDefinition:ple},exit:{gfmFootnoteCallString:fle,gfmFootnoteCall:hle,gfmFootnoteDefinitionLabelString:mle,gfmFootnoteDefinition:gle}},{canContainEols:["delete"],enter:{strikethrough:wle},exit:{strikethrough:Ele}},{enter:{table:Wle,tableData:Xle,tableHeader:Xle,tableRow:Zle},exit:{codeText:Qle,table:Yle,tableData:Kle,tableHeader:Kle,tableRow:Kle}},{exit:{taskListCheckValueChecked:tce,taskListCheckValueUnchecked:tce,paragraph:nce}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Xse,notInConstruct:Qse},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Xse,notInConstruct:Qse},{character:":",before:"[ps]",after:"\\/",inConstruct:Xse,notInConstruct:Qse}]},ble(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xle}],handlers:{delete:_le}},ece(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rce}}]}}(t))}const jce=function(e){if(null==e)return Bce;if("string"==typeof e)return function(e){return zce(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=jce(e[n]);return zce(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}(e):function(e){return zce(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return zce(e);throw new Error("Expected function, string, or object as test")};function zce(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Bce(){return!0}const Hce=!0,Uce=!1,$ce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=jce(t),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=[];if((!t||a(i,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Hce,e];return[e]}(n(i,l)),p[0]===Uce))return p;if(i.children&&"skip"!==p[0])for(u=(r?i.children.length:-1)+o,d=l.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,d)(),c[0]===Uce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Vce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),$ce(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Gce(){return e=>{Vce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\^/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"superscript",data:{hName:"sup"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)})),Vce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\~/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"subscript",data:{hName:"sub"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)}))}}function qce(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=qce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=qce(e))&&(r&&(r+=" "),r+=t);return r}var Yce,Zce,Kce,Xce,Qce,Jce,eue,tue=Object.create,nue=Object.defineProperty,rue=Object.defineProperties,aue=Object.getOwnPropertyDescriptor,oue=Object.getOwnPropertyDescriptors,iue=Object.getOwnPropertyNames,sue=Object.getOwnPropertySymbols,lue=Object.getPrototypeOf,cue=Object.prototype.hasOwnProperty,uue=Object.prototype.propertyIsEnumerable,due=(e,t,n)=>t in e?nue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pue=(e,t)=>{for(var n in t||(t={}))cue.call(t,n)&&due(e,n,t[n]);if(sue)for(var n of sue(t))uue.call(t,n)&&due(e,n,t[n]);return e},fue=(e,t)=>rue(e,oue(t)),hue=(e,t)=>{var n={};for(var r in e)cue.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&sue)for(var r of sue(e))t.indexOf(r)<0&&uue.call(e,r)&&(n[r]=e[r]);return n},mue=(Yce={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],a||s);var l=t[s],c=r.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new s;return l(a,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,y=!!m.lookbehind,b=!!m.greedy,v=m.alias;if(b&&!m.pattern.global){var k=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,k+"g")}for(var x=m.pattern||m,w=s.next,E=u;w!==t.tail&&!(d&&E>=d.reach);E+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof a)){var S,T=1;if(b){if(!(S=o(x,E,e,y))||S.index>=e.length)break;var C=S.index,A=S.index+S[0].length,N=E;for(N+=w.value.length;C>=N;)N+=(w=w.next).value.length;if(E=N-=w.value.length,w.value instanceof a)continue;for(var I=w;I!==t.tail&&(N<A||"string"==typeof I.value);I=I.next)T++,N+=I.value.length;T--,_=e.slice(E,N),S.index-=E}else if(!(S=o(x,0,_,y)))continue;C=S.index;var O=S[0],R=_.slice(0,C),P=_.slice(C+O.length),L=E+_.length;d&&L>d.reach&&(d.reach=L);var D=w.prev;if(R&&(D=l(t,D,R),E+=R.length),c(t,D,T),w=l(t,D,new a(p,g?r.tokenize(O,g):O,v,O)),P&&l(t,w,P),T>1){var M={cause:p+","+h,reach:L};i(e,t,n,w.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return Zce||(0,Yce[iue(Yce)[0]])((Zce={exports:{}}).exports,Zce),Zce.exports}),gue=((e,t,n)=>(n=null!=e?tue(lue(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of iue(t))cue.call(e,a)||a===n||nue(e,a,{get:()=>t[a],enumerable:!(r=aue(t,a))||r.enumerable});return e})(e&&e.__esModule?n:nue(n,"default",{value:e,enumerable:!0}),e)))(mue());gue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},gue.languages.markup.tag.inside["attr-value"].inside.entity=gue.languages.markup.entity,gue.languages.markup.doctype.inside["internal-subset"].inside=gue.languages.markup,gue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(gue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:gue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:gue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},gue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(gue.languages.markup.tag,"addAttribute",{value:function(e,t){gue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:gue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),gue.languages.html=gue.languages.markup,gue.languages.mathml=gue.languages.markup,gue.languages.svg=gue.languages.markup,gue.languages.xml=gue.languages.extend("markup",{}),gue.languages.ssml=gue.languages.xml,gue.languages.atom=gue.languages.xml,gue.languages.rss=gue.languages.xml,Kce=gue,Xce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},Jce="(?:[^\\\\-]|"+(Qce=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",Jce=RegExp(Jce+"-"+Jce),eue={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Kce.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:Jce,inside:{escape:Qce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":Xce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:Qce}},"special-escape":Xce,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":eue}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:Qce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":eue}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},gue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},gue.languages.javascript=gue.languages.extend("clike",{"class-name":[gue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),gue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,gue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:gue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:gue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:gue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:gue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:gue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),gue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:gue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),gue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),gue.languages.markup&&(gue.languages.markup.tag.addInlined("script","javascript"),gue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),gue.languages.js=gue.languages.javascript,gue.languages.actionscript=gue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),gue.languages.actionscript["class-name"].alias="function",delete gue.languages.actionscript.parameter,delete gue.languages.actionscript["literal-property"],gue.languages.markup&&gue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:gue.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(gue),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(gue),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(gue),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(gue),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(gue),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a,o=t[n];"code"!==o.type?e(o.content):(a=o.content[1],o=o.content[3],a&&o&&"code-language"===a.type&&"code-block"===o.type&&"string"==typeof a.content&&(a=a.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),a="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase()),o.alias?"string"==typeof o.alias?o.alias=[o.alias,a]:o.alias.push(a):o.alias=[a]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r];if(o=/language-(.+)/.exec(o)){n=o[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(gue),gue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:gue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},gue.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<a.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=a.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))a++;else if(r.test(s)&&0==--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),gue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var o=0;o<n.length;o++){if(c>=d.length)return;var i,l,p,f,h,m,g,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(m="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=m.substring(0,g),h=u[i],p=void 0,(f={})["interpolation-punctuation"]=a,3===(f=e.tokenize(h,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,h),f=m.substring(g+i.length),h=[],l&&h.push(l),h.push(p),f&&(t(m=[f]),h.push.apply(h,m)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(h)),o+=h.length-1):y.content=h)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,a=n.length;r<a;r++){var o,i,s,c=n[r];"string"!=typeof c&&(o=c.content,Array.isArray(o)?"template-string"===c.type?(c=o[1],3===o.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(o[1]=l(i,s,c))):t(o):"string"!=typeof o&&t([o]))}}(t.tokens)}))}(gue),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(gue),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(gue),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(gue),gue.languages.n4js=gue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),gue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),gue.languages.n4jsd=gue.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];a=(o="RegExp"===e.util.type(o)?e.languages.javascript[a]={pattern:o}:o).inside||{};(o.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(gue),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;"string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(a.content[0].content[1])&&n.pop():"/>"!==a.content[a.content.length-1].content&&n.push({tagName:s(a.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&0<n.length&&0===n[n.length-1].openedBraces&&(o=s(a),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(o+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(o=s(t[r-1])+o,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",o,null,o)),a.content&&"string"!=typeof a.content&&i(a.content)}}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(gue),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(gue),gue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},gue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=gue.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(gue),gue.languages.c=gue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),gue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),gue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},gue.languages.c.string],char:gue.languages.c.char,comment:gue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:gue.languages.c}}}}),gue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete gue.languages.c.boolean,gue.languages.objectivec=gue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete gue.languages.objectivec["class-name"],gue.languages.objc=gue.languages.objectivec,gue.languages.reason=gue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),gue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete gue.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(gue),gue.languages.go=gue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),gue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete gue.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(gue),gue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},gue.languages.python["string-interpolation"].inside.interpolation.inside.rest=gue.languages.python,gue.languages.py=gue.languages.python,gue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},gue.languages.webmanifest=gue.languages.json;var yue={};((e,t)=>{for(var n in t)nue(e,n,{get:t[n],enumerable:!0})})(yue,{dracula:()=>bue,duotoneDark:()=>vue,duotoneLight:()=>kue,github:()=>xue,gruvboxMaterialDark:()=>jue,gruvboxMaterialLight:()=>zue,jettwaveDark:()=>Lue,jettwaveLight:()=>Due,nightOwl:()=>wue,nightOwlLight:()=>Eue,oceanicNext:()=>Tue,okaidia:()=>Cue,oneDark:()=>Mue,oneLight:()=>Fue,palenight:()=>Aue,shadesOfPurple:()=>Nue,synthwave84:()=>Iue,ultramin:()=>Oue,vsDark:()=>Rue,vsLight:()=>Pue});var bue={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},vue={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},kue={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},xue={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},wue={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},Eue={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},_ue="#c5a5c5",Sue="#8dc891",Tue={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:_ue}},{types:["attr-value"],style:{color:Sue}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:Sue}},{types:["punctuation"],style:{color:Sue}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:_ue}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},Cue={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},Aue={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},Nue={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},Iue={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},Oue={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},Rue={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Pue={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},Lue={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Due={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Mue={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},Fue={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},jue={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},zue={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Bue=/\r\n|\r|\n/,Hue=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Uue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},$ue=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(o=r[i]++)<a[i];){let e,c=t[i];const u=n[i][o];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=Uue(c,u.type),u.alias&&(c=Uue(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(Bue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Hue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Hue(s),l},Vue=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=pue(pue({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=fue(pue({},n),{backgroundColor:void 0}),r},Gue=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Vue(r,o),s=(e=>he.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=hue(n,["className","style","line"]);const s=fue(pue({},i),{className:Wce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=pue(pue({},s.style||{}),a)),s}),[e]))(i),l=(e=>{const t=he.useCallback((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return he.useCallback((e=>{var n=e,{token:r,className:a,style:o}=n,i=hue(n,["token","className","style"]);const s=fue(pue({},i),{className:Wce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=pue(pue({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>he.useMemo((()=>{if(null==n)return $ue([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),$ue(a.tokens)}),[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:c,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:s,getTokenProps:l})},que=e=>he.createElement(Gue,fue(pue({},e),{prism:e.prism||gue,theme:e.theme||Rue,code:e.code,language:e.language}))
71
71
  /*! Bundled license information:
72
72
 
73
73
  prismjs/prism.js: